Author Topic: What does the INT return value for EthernetIPforCLX.Write() mean?  (Read 1434 times)

mansan

  • Newbie
  • *
  • Posts: 2
    • View Profile
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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: What does the INT return value for EthernetIPforCLX.Write() mean?
« Reply #1 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.

Phrog30

  • Guest
Re: What does the INT return value for EthernetIPforCLX.Write() mean?
« Reply #2 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.