Login  •  Register

StateMachine states are not getting updated

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

StateMachine states are not getting updated

Postby sudhapc » 11 Mar 2019, 11:32

StateMachine states are not changing from one state to another. Here no custom API methods are used to change the state of "order" node currentState value.

internal bool UpdateOrderStateToActive(Node orderNode, OMNodeManager omNodeManager)
var orderModel = orderNode.UserData as IOMModel;
if (orderModel == null) return false;
//var stateMachine = new OrderStateMachineModel();
var stateMachine = ((OrderModel) orderModel).State;
stateMachine.CurrentState.Id = new NodeId(Objects.OrderStateMachineType_Active, 5);
stateMachine.CurrentState.Number = Variables.OrderStateMachineType_Active_StateNumber;
stateMachine.CurrentState.Value = new LocalizedText(BrowseNames.Active);
stateMachine.CurrentState.Name = new QualifiedName("Active");
return true;

Posts: 14
Joined: 16 Oct 2018, 12:47

Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 1 guest