How to identify in CHMI that OPC is disconnected from the controller?
In CHMI when my opc disconnects from the controller the graphic display holds the last state of the variables.
Is there any way to identify the connection break and show in HMI or reset the variables values to initial value?
thanks in advance.
Voted best answer
Usually, CHMI knows when OPC server disconnects. Then, CHMI sets all PLC Connect values quality to bad.
In your graphic display, you can set the DataQuality property of a numeric display to your variable quality. By doing this, CHMI will display a red X on the numeric display if the data quality is bad and just a red slash if the data quality is uncertain.
When you are in the DataQuality, you must browse for your data value and then add this char "#" right after without space. You should get a list of sub properties. You must select DataQuality in this list.
Hope this helps.
Answers
Hello,
Yes ,you can show the connection break in graphics through "S_STATUS" property of OPCDA service provider status from service structure.(If it is in service,its value is 0)
A "normal" OPC server will set 'bad' quality on all concerned items when a controller connection is lost.
Furthermore a "normal" OPC server will report an abnormal status on the GetStatus() supervision call when all controllers are lost. The OpcDA Connector service will detect this within 5 seconds and fail itself; this effectively lead to that all properties serviced by that OPC DA Connector become with 'bad' quality.
Normally, a graphic element without OPC quality check (i.e. subproperty #DataQuality connected to the OpcStatus input pin, resulting in that the default value '192' = 'good' prevails during all running conditons) will display a zero (0) value if the OPC DA Connector service is offline.
If your description is correct, i.e: "controller connection is lost HOWEVER the received OPC quality is still 'good' and value remains at last known (and non-zero) value" it probably means that your OPC server is not acting as most other OPC servers do.
In this case; there will be no quality to trigger bad connection on in graphics and you need to look for other means to trigger some error indication.
A calculation (aspect) can be setup to read and expect an ever changing value in the OPC server, e.g a triangular or sinus-wave. If the value stop changing, the calc can at some predefined timeout set a warning property that you later use to trigger some visual indication in your graphics and perhaps also an Alarm Expression to get an audible alarm as well.
/Stefan
Add new comment