The method Update must be called cyclically to detect whether a connection to an EcoStruxure Machine Expert Twin is available. Once a connection is detected, events temporarily stored in the internal events buffer are written to the OPC UA structure. If the method Update is not called cyclically or if no EcoStruxure Machine Expert Twin connection is detected, the oldest data in the internal event buffer is overwritten when the buffer is full.
A typical cycle time for the Update method is in the range of 10...100 ms. If a lower cycle time is selected, adjust the timeout variable udiTimeoutTwin.
The following states are defined:
No EcoStruxure Machine Expert Twin connected: Events in the OPC UA structure are kept until the internal events buffer only contains new events. Once the internal events buffer only contains new events, the previous events in the OPC UA structure are deleted.
EcoStruxure Machine Expert Twin is connecting: As soon as a connection to an EcoStruxure Machine Expert Twin is detected, the method Update writes events from the internal events buffer to the OPC UA structure, beginning with the oldest events.
EcoStruxure Machine Expert Twin is connected: The Update method verifies every call to determine whether new events are in the internal events buffer. Once the events inside the OPC UA structure have been read and acknowledged by the EcoStruxure Machine Expert Twin, the method Update writes the new events from the internal events buffer to the OPC UA structure.
For more information, refer to the description of the function block FB_EventWriter and to the description of the handshake process.
Output |
Data type |
Description |
---|---|---|
q_xError |
BOOL |
Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg. |
q_etResult |
ET_Result |
Provides diagnostic and status information as a numeric value. |
q_sResultMsg |
STRING [80] |
Provides additional diagnostic and status information as a text message. |
q_xError |
q_etResult |
Description |
---|---|---|
FALSE |
Ok |
The method has been called successfully. |
FALSE |
NoTwinConnected |
The method has been called successfully. |
TRUE |
ConnectionTimeOut |
The connection to the EcoStruxure Machine Expert Twin is interrupted. |