Variable Import - Structs: Using structures may cause values to flicker

     

Description of the behavior: 

When using structures, values in the visualization may "flicker."
This is due to the classic problem associated with using OPC UA structures with bidirectional data exchange, since a structure is treated as a single object.


Conditions under which the behavior occurs: 
This behavior occurs when using structures that write values cyclically, both from the PLC and from the visualization.

For example, the structure looks like this:

 STRUCT: MachineData

  • SetSpeed (Setpoint, Client → Server)
  • SetPressure (Setpoint, Client → Server)
  • ActualSpeed (Actual value, Server → Client)
  • ActualPressure (Actual Value, Server → Client)
The process could now look like this:

  1. Client reads structure
  2. Client updates SetSpeed
  3. Client writes the entire structure back
  4. Server updates its data
  5. In the meantime, the server publishes a new actual value
  6. The client receives a new structure containing:
    • new actual value
    • old setpoint
  7. The display briefly reverts to the old setpoint
  8. Then the server confirms the new setpoint
  9. The display jumps back to the new value

This rapid change in values in the PLC and the visualization causes two packets to be transmitted and processed one after the other, resulting in different value changes becoming visible. 


Affected products: 

EASY UI Designer 1.8, 1.9

 

Short-term measure, recommendations, assessment: 

The best practice for separating target and actual values

Note:

STRUCT: MachineData

  • SetSpeed
  • SetPressure
  • ActualSpeed
  • ActualPressure
but rather:

STRUCT: MachineCommands (write)

  • SetSpeed
  • SetPressure
STRUCT: MachineStatus (read)

  • ActualSpeed
  • ActualPressure
or even as individual variables:

  • MachineCommands.SetSpeed
  • MachineCommands.SetPressure
  • MachineStatus.ActualSpeed
  • MachineStatus.ActualPressure

Then setpoints are written and actual values are read without affecting each other. This is typically the preferred OPC UA modeling approach.

[Automatic Translation]
URL for linking this AKB article: https://www.lenze.com/en-de/go/akb/202600124/1/
Kontakt