GetUnitState

<< Click to Display Table of Contents >>

Manual > Reference > Methods >

GetUnitState


 

Gets the unit status (PLC status).

 

 

 


syntax

dState = AxEng1.GetUnitState(

                                         UnitName

                                         )


Parameters

UnitName

 

type:

string

 

Unit name. Example: U01

 

Return Value

dState

 

type:

integer

 

Unit status. 1-Alive 2-Virtual OR of each value

 


Commentary

dState stores values from 0 to 3 in the following combinations:

•Alive=F/ Virtual=F :0

•Alive=T/ Virtual=F :1

•Alive=F/ Virtual=T :2

•Alive=T/ Virtual=T :3

 

For example, when (dState And 1)=True, communication with PLC is established. When (dState And 2)=True, the communication mode is virtual.

 

 

 

 


reference

 

StateChanged