AdsReadSymbolDesc
The AdsReadSymbolDesc() method can be used to obtain information about the individual symbols (variables) in ADS devices.
object.AdsReadSymbolDesc(
strSymbolName As String,
nSymbolType As ADSDATATYPEID,
cbSymbolSize As Long,
strComment As String,
nIndexGroup As Long,
nIndexOffset As Long
) As LongParameter
strSymbolName
[in] Name of ADS variable from which the information is to be read
nSymbolType
[out] Data type of the ADS variable (see the ADSDATATYPID data type)
cbSymbolSize
[out] Data length of the ADS variable in bytes
strComment
[out] Comment following the ADS variable declaration
nIndexGroup
[out] Index group of the ADS variable
nIndexOffset
[out] Index offset of the ADS variable
Return value
See ADS error codes
Comments
If you wish to read the information for all the ADS variables from an ADS device, you will find a relevant sample under 'Read PLC variable declaration'.
Notice | |
Enable the Symbol download at PLC Control 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
-