Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
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.