ReadAdsState
Reads the current ADS state of an ADS device.
object.ReadAdsState() As Long
Parameters
-
Return value
ADS-Status.
Description
Any ADS device can adopt several states. The PLC, for instance, can be in either the STOP or the RUN state. This state can be interrogated with the aid of the ReadAdsState() method. A summary of all the possible states is found, for instance, in the description of the ADSSTATE enum of the ADS-OCX. When evaluating the ADS state, it must be remembered that not every ADS device can adopt every state. The NC, for instance, cannot be in the STOP state.
The most important of the ADS states are RUN (5) and STOP (6), and they are used most often in connection with the PLC.