CommState Values

arnoldjm
2015-07-07
2016-01-20
  • arnoldjm - 2015-07-07

    Hello,

    Does anyone have a list of possible values and their meanings for the OPC tag CommState? I had found a list before in an old manual, but I can no longer find it.

    Thanks!

     
  • TimvH

    TimvH - 2016-01-20

    See the .pdf in your installation folder, e.g. c:\program files (x86)\codesys\codesys opc server 3\
    This will tell you the following (PS, it describes the name with single underscore, but if I remember correctly it is a double underscore...):

    For each configured PLC the OPC Server V3 generates the status variables _CommState and _CommStateOK. _CommState can be interpreted from an OPC Client and the following states can
    be requested:
    STATE_TERMINATE = -1
    STATE_PLC_NOT_CONNECTED = 0
    STATE_PLC_CONNECTED = 1
    STATE_NO_SYMBOLS = 2
    STATE_SYMBOLS_LOADED = 3
    STATE_RUNNING = 4
    STATE_DISCONNECT = 5
    STATE_NO_CONFIGURATION = 6
    _CommStateOK is a Boolean variable indicating in state TRUE a communication with the OPC server.
    The name of the plc can be taken from the prefix of the Boolean variable. If the variable is FALSE,
    currently no communication is possible. This happens for example during download.

     

Log in to post a comment.