API 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. Examples VBScript: Call TcClientSync.WriteAdsState(5) JScript:
TcClientSync.WriteAdsState(5); 3.2 Method - synchronous 3.2.1 ReadVar Reads the value of a variable from an ADS device. object.ReadVar( sVarName As String ) As Variant Parameters Return value Value of the ADS variable. Description The reading procedure is performed synchronously. Examples VBScript: Dim VarValue VarValue = TcClientSync.ReadVar(".PLCVarSInt") WScript.echo "VarValue = ", VarValue JScript: var VarValue; VarValue = TcClientSync.ReadVar(".PLCVarSInt"); WScript.echo("VarValue = ", VarValue); TX1000 12 Version: 1.0 sVarName Name of the ADS variable.