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

ModbusTCP, can i know when i get requests from slave side?

HLCN
2018-11-17
2018-11-19
  • HLCN - 2018-11-17

    I have a program that has a Modbus TCP slave, and i need to know the interval that i'm receiving requests from the Master. Has anyone done this? I've looked around at a few libraries and FBs, but it seems that i can get that information from the master side (of course), but not from the slave side...

    Any help?

    BR

     
  • dFx

    dFx - 2018-11-19

    If you can edit the master program, you may add some watchdog bit clocking

    Exemple :
    bit0 is set by master in slave
    bit0 is copied over bit1 internally in slave
    bit1 is read from master
    bit1 is inverted in bit0 in master internally
    and so on

    If you time the bit0 getting updated (0->1 and 1->0) then you will have your cycle.

    You may also write a timestamp from master.

     
  • HLCN - 2018-11-19

    Thanks for the response dFx, but i don't have access to the master program...

    I have no access to the master program. I need to be able to see the number of requests on the slave side...

     

Log in to post a comment.