Get StatusCode/Quality of nodes from subscription #807
-
So basically I have a Kepware Server that is running on my computer and it collects data from other servers like Siemens PLCs. Our program will get the data from this Kepware Server to use it to trigger measurements and other stuff. We are currently not connecting directly to the Siemens PLCs because I think it will be problematic with all the certificates and stuff. So far it worked quite well with the Kepware's drivers. We might look into connecting directly later on once we get a better hang on OPC UA and what is required do make successful connections with PLCs directly. Anyway my question is. I want to detect connection disruptions. Basically the PLC can go offline because of maintenance or power failure amongst other things. This is a construction environment where these things can happen quite often. Provided that not all the power went off, our system might still be working but the Kepware Server will show item quality: Bad which is probably the "StatusCode" related to that node. Now is it possible to conveniently read that along with the value while subscribing to several nodes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
in a SubscriptionHandler: opcua-asyncio/asyncua/common/subscription.py Line 136 in 033427b event_data -> class DataChangeNotif -> "data.monitored_item.Value" should be an DataValue inkl. StatusCode opcua-asyncio/asyncua/ua/uatypes.py Line 921 in 033427b and the Attribute which was subscribed is in data.subscription_data.attribute (data.subscription_data = class SubscriptionItemData)! |
Beta Was this translation helpful? Give feedback.
-
So basically this is what I have to do in the SubscriptionHandler?
|
Beta Was this translation helpful? Give feedback.
So basically this is what I have to do in the SubscriptionHandler?