access device without mapping

julspower
2021-10-14
2022-06-14
  • julspower - 2021-10-14

    Hi
    Im using machine expert from schneider (based on codesys)
    I have a device on a modbus ioscanner (a generic device with some io channel added)
    Currently I have a function block that I pass the first address of the input and the first address of the output of that device, which I control in that function block.
    But to make things nicer I would like to pass only the device name to that function block (type: IoDrvModbusSerial.ModbusSerialSlave). My question is how do I access the data of that device using the device name, so I wont have to map the first in and first out and pass it as parameter to the function block??

    Do I have to define a device completly instead of a generic device with io channels? if so how?

    thank you all

     
  • julspower - 2021-10-18

    I have tried __VarInfo on the device but couldn't locate the data within.
    I also look the iecaccessvar library but not enough documentation there to be able to use that
    any idea?

     
  • spfollen - 2022-06-10

    I would also like to do something very similar. Is there a way to get the device data using the name rather than mapping to words?

     

Log in to post a comment.