AdsGetNextDynSymbol
The list of declared variables can be read from an ADS device with this method.
object.AdsGetNextDynSymbol(
navType As ADSGETDYNSYMBOLTYPE,
bstrName As String,
bstrFullName As String,
bstrType As String,
bstrComment As String,
adsType As Long,
symbolSize As Long,
nIndexGroup As Long,
nIndexOffset As Long
) As Long
Parameter
navType
[in] Navigation preset in the symbol tree (see data type ADSGETDYNSYMBOLTYPE)
bstrName
[out] Name of the symbol (short form without prefixed names of the parent)
bstrFullName
[out] Full name of the symbol
bstrType
[out] Name of the data type of the symbol
strComment
[out] Comment following the ADS variable declaration
adsType
[out] Data type of the ADS variable (see the ADSDATATYPEID data type)
symbolSize
[out] byte length of the symbol
nIndexGroup
[out] Index group of the ADS variable
nIndexOffset
[out] Index offset of the ADS variable
Return value
See ADS error codes
Comments
At navType ADSDYNSYM_GET_NEXT the entire symbol tree is navigated. Hereby all symbols can be read out in a simple way. The other three navTypes can be used for controlled navigation through the symbol tree.
Note on PLC: Ensure that 'Symbol download' is enabled in PLC Control under Project / Options / TwinCAT. More detailed information can be found in the PLC Control manual.
Note on NC: In the System Manager the symbol download must be enabled for each axis. This can be specified in the configuration dialog for the axis under 'General'. The 'Create symbols' box must be checked. See System Manager manual.