adccommunitymod (AutomationDirect) asked a question.

way to check for good communications

Created Date: August 17,2009

Created By: a agnone

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I know I seen this question before but can not locate the info. I want to be able to tell if I have good communications between two plc's. I can monitor the busy bit and tell when it is happening but this in not working for me. Is there a way to tell if there is good Read and/or writes. I am trying not to have to send a bit to another machine and have it answer back on another. I am looking for a bit that would say the read and write are happening. I tried messing with the busy and error bits but getting nowhere. For instance in the IEC function block type programming, the block will actually go true if rx/wx is happening. How do some of you handle this? My ad machine is doing all the rx and wx to a non ad machine over modbus. I just want to know if the comm link is up and running with out sending out a bit and waiting for the other machine to answer.


  • adccommunitymod (AutomationDirect)

    Created Date: August 17,2009

    Created by: bcarlton

    Once a RX/WX is started the Busy Bit is on. When it turns back off either the error bit is set or it isn't.

    If it isn't then the transmission was correct (the message went through and the unit at the other end answered appropriately accepting the transmission).

    If, when the busy bit turn back off the error bit is set then either the communication timed out without a proper answer or the target unit said there was some type of problem with the command.

    Now you may not want to panic at the first error. The manuals show a error counter set-up. You wouldn't want stray noise shutting everything down.

    I though in a Master/Slave PLC-PLC relationship alway use passed bits for additional verification. Especially on the slave side to initiate appropriate action at loss of communication.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 18,2009

    Created by: franji1

    If you are constantly polling the remote device, then you don't need to set up extra comm.

    If the RX data changes, then you know it has comm. If the data does not change that frequently (e.g. same data across multiple comms), RX the data into a temporary buffer, then when the RX is complete, move the data in the buffer to the ACTUAL data values. Then clear the temporary comm buffer or set the buffer values to 0xFFFF or some value you know the remote device cannot have.

    Then start a timer that will run as long as the buffer still equals this "uninitialized " value. If the timer fires, then you know the data from the remote device has not updated values in your temp comm buffer.

    Make sure your timer value is large enough to be a true "timeout " - don't try to get it so precise that you get "false negatives ". Whatever your worst-case over-all poll rate is with ALL your RX's and WX's on that PLC port, double it , and make that your timeout (i.e. the preset of the Timer mentioned above).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 18,2009

    Created by: KPrice

    a agnone, we have setup an error counter,as bcarlton mentioned, and we have setup a monitior, as franji1 mentioned.

    In the slave, setup a bit (or bit-of-word) to toggle on and off.

    Then in the master use the bit (or bit-of-word) to cycle timers.

    If the timers time-out because lack of comm failed to reset timers, then set alarm.

    C100

    --| |----T1

    C100

    --|/|----T2

    T1

    --| |----SET alarm

    T2 |

    --| |--|

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 19,2009

    Created by: a agnone

    Thanks for all the info. I chose to use the error and busy bits only. What I did was in the first rung look for the error bit when not busy. Ran this into a counter of K5. The second rung If the counter goes high I set a bit. In the third rung I watch the not error with the not busy bit, run it into a counter. Fourth if counter goes true rst the bit. Works really well! Of course this is done above the Read/Write rungs. Now I do not have to rely on the other end or slave. Just look for errors. I just randomly chose K5 to filter out noise or drops. Since it all happens so fast, K5 seems to be a good number.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 17,2009

    Created by: a agnone

    I know I seen this question before but can not locate the info. I want to be able to tell if I have good communications between two plc's. I can monitor the busy bit and tell when it is happening but this in not working for me. Is there a way to tell if there is good Read and/or writes. I am trying not to have to send a bit to another machine and have it answer back on another. I am looking for a bit that would say the read and write are happening. I tried messing with the busy and error bits but getting nowhere. For instance in the IEC function block type programming, the block will actually go true if rx/wx is happening. How do some of you handle this? My ad machine is doing all the rx and wx to a non ad machine over modbus. I just want to know if the comm link is up and running with out sending out a bit and waiting for the other machine to answer.

    Expand Post