AdvancedHMI Software

General Category => Open Discussion => Topic started by: mansan on October 17, 2017, 04:27:01 PM

Title: What does the INT return value for EthernetIPforCLX.Write() mean?
Post by: mansan on October 17, 2017, 04:27:01 PM
I am trying to know if a packet I send via IP was received by the PLC and I see that the Write() function returns an int. Does this number gives me a clue of an ACK? Or what does the return value mean? Thank You
Title: Re: What does the INT return value for EthernetIPforCLX.Write() mean?
Post by: Archie on October 17, 2017, 04:32:43 PM
The return value is a transaction number.

The Write method is synchronous/blocking, so it will only return after the successful write. If the write fails, it should throw an exception.

You can also handle the ComError event to be notified when there is an error.
Title: Re: What does the INT return value for EthernetIPforCLX.Write() mean?
Post by: Phrog30 on October 17, 2017, 06:37:54 PM
The best way to do that, no matter what HMI you're using is to use a counter. So, when the PLC sees a change it increments a counter. When the HMI sees this value change then you have your confirmation.