11/04/2020
Using C# is it possible to use .Net reference OPC.Ua.Server from the OPC Foundation to connect KepServerEx6 so I can capture the Server shutdown event and Server Status. I can use OPC.UA.Client to create a session to the server but am unable to connect to the server itself.
I know this was possible using Opc.Da but as I understand Opc.Ua has superseded that version, any simple coding examples are more than welcome.
05/30/2017
It is not clear why you are switching between a client and a server.
You need a client to connect to KepServerEx6.
That client can be part of a server but that detail is not relevant to the connection to KepServerEx6 .
You need to create a subscription with KepServerEx6 and monitor these variables.
Server_ServerStatus_CurrentTime
Server_ServerStatus_State
Server_ServerStatus_SecondsTillShutdown
Server_ServerStatus_ShutdownReason
If the KepServerEx6 provides enough time your client should detect a change to Server_ServerStatus_SecondsTillShutdown.
11/04/2020
Thanks for the update.
I have subscribed to monitor a number of tags via a Client connection that works fine using the OPC .Net Standard code library but cant find the variables you mentioned above like Server_ServerStatus_State etc is there any type of API documentation available to point to where or how I can get hold of those variables?
By the way I'm connecting to KepServer 6.8 would that make a difference?
05/30/2017
You should find them by browsing the mandatory Server object:
https://reference.opcfoundatio.....rt5/8.3.2/
Documentation is here:
11/04/2020
Sorry to bother you but I'm a little confused.
I can’t see how the documentation relates to these variables?
Have you a simple C# example, I am developing using Visual Studio 2019 in C# using the latest .Net OPC.Ua dll. The variables you mentioned seem to be in the VariableIds class but I’m not sure how I can connect it to my session or even apply them in code?
Randy Armstrong said
You should find them by browsing the mandatory Server object:https://reference.opcfoundatio.....rt5/8.3.2/
Documentation is here:
https://reference.opcfoundatio.....rt5/6.3.1/
05/30/2017
You need to understand the design patterns that are built into the OPC .Net Standard code.
These design patterns allow you to go easily from the specification to C# constants and structures.
In the example above you want the variable that belongs to the ServerStatus component of the Server object.
This means the NodeId constant in code will be
VariableIds.Server_ServerStatus_SecondsTillShutdown
11/04/2020
I
Randy Armstrong said
You need to understand the design patterns that are built into the OPC .Net Standard code.These design patterns allow you to go easily from the specification to C# constants and structures.
In the example above you want the variable that belongs to the ServerStatus component of the Server object.
This means the NodeId constant in code will be
VariableIds.Server_ServerStatus_SecondsTillShutdown
Do I always need to create a server object can I skip this part?
Currently I have created a client session connected directly to the PLC which is reading the tags and get updates from the ones I monitor. I will never need more than a one to one connecting with this PLC so do I need an OPC Server or can I just use the OPC Client to connect to the PLC and not bother creating an OPC Server object ?
1 Guest(s)