General Methods
- Methods AdsCreateVarHandle and AdsDeleteVarHandle are used to access PLC variables by name
PLC declaration:
TCtoLV_boolVal AT%MX0.0: BOOL;
LabVIEW™
-
- Methods AdsAmsConnect and AdsAmsDisconnect
Are called in the start and end phase respectively to connect and disconnect the AdsOcx to/from the router.
-
If the AdsOcx was disconnected from the router via AdsAmsDisconnect, AdsAmsConnect must be called or LabVIEW™ must be restarted before the next call of an AdsOcx method.- The method AdsReadSymbolDesc
The method AdsReadSymbolDesc can be used to read information about a named PLC variable at runtime. For example, the address data nIndexGroup and nIndexOffset can be read to then access the variable by address (possibly also with the TcAdsDll). (see Sample 010.zip)
-