Check the PLC State through OPC UA Server|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Check the PLC State through OPC UA Server
Avatar
Yiming Sun
Germany
Member
Members
Forum Posts: 6
Member Since:
10/04/2021
sp_UserOfflineSmall Offline
1
02/21/2022 - 08:27
sp_Permalink sp_Print

Hello, I’m using OPC UA Client in a WPF UI to get all necessary datas from Beckoff PLC (TwinCAT 3) through OPC UA Server. 

Is there any method in the library that I could use to check the PLC State (online, offline, Run Mode/ Config Mode) at a certain frequence?

I know there are Variables that can be monitored, their value being checked every certain milliseconds. 

Can I checking the PLC State by monitoring a variable in the PLC?

Namely, if the StatusCode of a variable is bad, then it means PLC is not online / not running, if the StatusCode is good, it means PLC is online.

 

Or is there a better way? Thanks in advance. Smile

Avatar
Randy Armstrong
Admin
Forum Posts: 1580
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
02/22/2022 - 11:24
sp_Permalink sp_Print

The open source code base includes code that monitors the connection and reports events if there is a problem:

public event KeepAliveEventHandler KeepAlive

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 21
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1446
Posts: 4891