General Methods

  1. Methods AdsCreateVarHandle and AdsDeleteVarHandle are used to access PLC variables by name
    PLC declaration:
    TCtoLV_boolVal AT%MX0.0: BOOL;
    LabVIEW™
     
  2. Methods AdsAmsConnect and AdsAmsDisconnect
    Are called in the start and end phase respectively to connect and disconnect the AdsOcx to/from the router.
     

  3. 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.
  4. 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)
     
  5. General Methods 1: