Announcement

Collapse
No announcement yet.

Writing to an object index lager then 09

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing to an object index lager then 09

    Hello,

    I'am playing around with an 32PTU_AR i a Genie project. But it seems I'm missing something. While writing the value to an userimage everything works fine until i reach two digits. The first line works. The second line wont. What is the problem?


    genie.WriteObject(GENIE_OBJ_USERIMAGES, 0x09, 1); // works
    genie.WriteObject(GENIE_OBJ_USERIMAGES, 0x10, 1); // works not


    The WriteObject is defined als uint16t object, uint16_t index, uint16_data.

    Thank you

  • #2
    Hello,

    Welcome to the forum,

    The index will be the Userimages number and the data will be the frame. looking at you code.

    genie.WriteObject(GENIE_OBJ_USERIMAGES, 0x09, 1); // works ------- this line is Userimages9, frame 1
    genie.WriteObject(GENIE_OBJ_USERIMAGES, 0x10, 1); // works not - this line is Userimages16, frame 1

    if there isn't a Userimages 16 then it will fail. 0x10 = 16 decimal

    I hope this helps

    Best regards

    Paul



    Comment


    • #3
      correct, you should be using 0x0A (decimal 10), or instead of putting 0x0A you could also just put 10.

      Comment


      • #4
        Thank you both. In hindsight it was so easy.

        cfx

        Comment

        Working...
        X