WriteAdsState
Changes the ADS state of an ADS device.
object.WriteAdsState(nAdsState As Long)
Parameters
nAdsState | new ADS status. |
Return value
-
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 changed by means of the WriteAdsState() 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.