Event driven reading, simple data types

Method: AdsReadVarConnectEx

Sample:

    Sample 007.zip

PLC declaration:

    TCtoLV_boolVal AT%MX0.0: BOOL;

A callback VI is registered for the event AdsReadConnectUpdateEx.

Event driven reading, simple data types 1:
TcAdsO44

 

The method AdsReadVarConnectEx establishes a fixed connection between LabVIEW™ and a PLC variable. The returned handle identifies the connection. When the connection is no longer needed, it is disconnected using AdsDisconnectEx.

Event driven reading, simple data types 2:
TcAdsO45

 

The data is transferred as a variant when the callback VI is called. Using the handle, the variables can be converted to the correct type and assigned to the correct LabVIEW™ global variable.

Event driven reading, simple data types 3:
TcAdsO46