AdsReadSymbolInfo

The AdsReadSymbolInfo() method can be used to obtain information about the symbols (variables) in ADS devices.

object.AdsReadSymbolInfo(
  pSymbolsAvailable As Long,
  pBufSizeNeeded As Long
) As Long

Parameter

pSymbolsAvailable

[out] Number of symbols in the ADS device

pBufSizeNeeded

[out] Length of the data, in bytes, in which the symbol information is to be stored

Return value

See ADS error codes

Comments

Before the AdsEnumSymbols() method can be used to read the symbol list, the method AdsReadSymbolInfo() must be used to find the number of symbols and the size of the symbol list.

Notice

Enable the Symbol download at the PLC

Ensure that 'Symbol download' is enabled in PLC Control under Project / Options / TwinCAT. You will find more detailed information in the PLC Control manual.

Notice

In the NC, enable the Symbol download for each axis

Symbol download must be enabled for each axis in the System Manager. This can be specified in the configuration dialog for the axis under 'General'. The 'Create symbols' box must be checked. See System Manager manual.

Example

Visual Basic sample: 'Read PLC variable declaration'