Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Using exadecimal variables in GV and PRG

micelan
2016-05-17
2016-05-19
  • micelan - 2016-05-17

    Good afternoon,
    I need to call into 'Global variables' the variables defined into 'service data object' (in the picture1).

    [img]Codesys.png[/img]

    How can I define them? And, how can I see the address I have to use?

    Sonda1 AT %IW??? :WORD;

    Thank you

    IMG: Codesys.png

     
  • learnetk - 2016-05-17

    Hi
    normally you would need to use the Function block SDO_Read in the CIA405 library. The library is added along with
    the can device.

    IMG: can.PNG

     
  • micelan - 2016-05-19

    Thank you for the response.
    So basically I have to put inside my PLC_PRG a function that can read that address correct?

    Something as:

    test:= := CIA405.SDO_READ4(x,x,x,x,x,x,x,x,x,x,x,x);

    Correct?

     

Log in to post a comment.