Implementing state machines and programs in OPC UA|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
Implementing state machines and programs in OPC UA
Avatar
Akileswaran Karthikeyan
Member
Members
Forum Posts: 3
Member Since:
07/15/2021
sp_UserOfflineSmall Offline
1
09/20/2021 - 05:49
sp_Permalink sp_Print

Hello everyone, can anyone guide me on how to create a substate machine inside one of the states of a superstate machine in an OPC UA server? I am trying to implement a FiniteStateMachineType substate machine inside the running state of a ProgramStateMachineType state machine. Can someone help me with this? 

I saw this example in the OPC UA specification and I would like to do something similar. https://reference.opcfoundatio.....t10/A.2.2/  

It would be great if someone could tell me where to find the C# implementation of this example.

Avatar
Randy Armstrong
Admin
Forum Posts: 1445
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/22/2021 - 22:16
sp_Permalink sp_Print

I am not aware of examples.

Implementation is of the FiniteStateMachineType model is very dependent on the APIs available in the SDK you are using.

Have you tried posted on the support forum for the SDK you are using?

Avatar
Akileswaran Karthikeyan
Member
Members
Forum Posts: 3
Member Since:
07/15/2021
sp_UserOfflineSmall Offline
3
10/25/2021 - 03:17
sp_Permalink sp_Print

Hi Randy,

Thank you for the reply. Now I have a working prototype but I have a query about sub-state machines.

In the domain download example given in OPC 10000-10 - UA Specification Part 10 - Programs, the running state has been extended with a sub-state machine (Transfer sub-state machine). I would like to know the initial state of this sub-state machine. To be more specific, when the state transitions from closing to completed, the Transfer sub-state machine will no longer be active, so what will be the current state of the Transfer sub-state machine?

Avatar
Randy Armstrong
Admin
Forum Posts: 1445
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
10/25/2021 - 10:35
sp_Permalink sp_Print

When a substate machine is not active it has no state.

Any reads of the states of an inactive substate machine returns Bad_StateNotActive

When when a substate machine it goes to the initial state for the substate machine unless the containing statemachine defines a transition that goes to some other state.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Michael Pfannkuchen, Thomas Koehrsen
Guest(s) 29
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1347
Posts: 4567