12/14/2022 6:54 AM | |
Joined: 1/21/2013 Last visit: 5/20/2024 Posts: 2798 Rating: (452)
|
Hi jin903368, in case of an open user communication, the best way to ensure a working connection is a handshake. In your case this means that the communication must be extended in a way that the PC sends some confirmation data. Mostly this is done by sending a count number which is answered by the remote station. What is the error status of T_DIAG in your case? Maybe you should have a look at the program example for T_DIAG. However, when using T_DIAG, you may be notified of a connection loss after some messages have already been lost. If you use a handshake, you can detect the first lost message. Kind regards |
This contribution was helpful to1 thankful Users |
12/16/2022 3:33 AM | |
Joined: 2/22/2018 Last visit: 8/15/2023 Posts: 18 Rating: (2) |
I have T_DIAG working now. The TDiag_StatusExt type at Result in T_DIAG can't be found in TIA. I have to Type the name in. I am monitoring the State tag. It should be HEX 04 to indicate the good connection. but what I found is that the connection might still shows connected even I unplug the Ethernet Cable. Is there any trick here? I am about to get the handshake signal from the PC where I am sending to. Probably a counter or random number. And use T_RCV to catch it. Thanks.
|
Follow us on