How I can get "Done flag" for "Modbus Slave Channel"?

victor-p
2014-01-28
3 hours ago
  • victor-p - 2014-01-28

    When I triggered "Modbus Slave Channel" ( Trigger = RISING_EDGE ), I would like to know when exchange is completed. How I can get something like "Done flag" for separate "Modbus Slave Channel"?

     
    • edvard-munch - 3 hours ago

      This is from 10 years ago, I know. But I have been using

      (SLAVE_DEVICE.iChannelIndex = CHANNEL_NUMBER) AND (SLAVE_DEVICE.xDone)

      I suppose that it shows xDone for the channel that shows up in the iChannelIndex at the same cycle?

      It seems to be working properly for two devices that I have been using it before
      But now I have another device and using two write channels, for one register each.
      One channel works properly and returns DONE flag
      When another channel is triggered, I see that it shows up in iChannelIndex, but flag DONE not received, but no Error for the channel. Also, when i check the register in the device it's evident that data has been transferred.

      Is this could happen sometimes with CODESYS, so DONE flag not received? Or this is a problem with a given device? With this certain register

       

      Last edit: edvard-munch 3 hours ago
  • chab - 2014-02-03

    I use the basic timing of the messages. And assume the message is transmitted sucsesfully. Of course I check the error bits.
    Regards,
    Edwin.

     

Log in to post a comment.