IP-S7-Link .Net Advanced Frequently Asked Questions (FAQs)

 Traeger Industry Components GmbH

© by TIS


Using PlcValue derivates like PlcInt16, PlcInt32, PlcBoolean or PlcBooleanArray use the Changed event to populate value changes. This event does explicitly occur whenever the Value property gets changed.

This event is raised in the following circumstances:

  • User Code sets the value of the Value property to a different value as the property previously provided.
  • A read operation using the value instance(s) performed using a PlcDeviceConnection resulted into a different value as the property previously provided. In case of array values, if at least one item in the array changes the event is also raised.

This event is not raised in the following circumstances:

  • User Code sets the value of the Value property to the same value as the property already provides.
  • An event handler is attached to the Changed event. This also includes the first event handler.
  • The value is being read by a read operation using the value instance(s) using a PlcDeviceConnection which resulted into the same value as the property previously provided. This also includes the first time read.

Depending on user scenarios there may exist the need to get informed about process image changes in the PLC and not about the Value property changes (e.g. when reading the value instance(s)) for the first time. To do so just read all relevant values (= for monitoring/polling) before attaching the appropriate event handlers. Through the first time read - before attaching the change event handlers - following change events will then represent effective changes of the process image in the PLC.