AdsSetFirstDynSymbol

The list of declared variables can be read from an ADS device with this method.

object.AdsSetFirstDynSymbol(bForceReload As Boolean) As Long

Parameter

bForceReload

[in] TRUE if a (new) loading of the symbol information from the server is desired. If no symbol information is available yet, it will be loaded independently from bForceReload.

Return value

See ADS error codes

Comments

On the method call of AdsSetFirstDynSymbol() the internal "pointer" to the current symbol, which can be loaded with AdsGetNextDynSymbol(), is set back to the beginning. 

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'