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 LongParameter
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.
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. |