Replies: 1 comment 3 replies
-
i will take a look tomorrow! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am quite new to this library and was trying some of the examples successfully but when I tried to run the StateMachine (statemachine-example.py) example, I got the following Error in line 52:
49 # initialise the StateMachine by call change_state() with the InitialState
50 # if the statechange should trigger an TransitionEvent the Message can be assigned here
51 # if event_msg is None no event will be triggered
52 await mystatemachine.change_state(state1, trans1, f"{mystatemachine._name}: Idle", 300)
asyncua.ua.uaerrors._auto.BadTypeMismatch: The value supplied for the attribute is not of the same type as the attribute"s value.(BadTypeMismatch)
By commenting out all the change_state calls, the code runs till the end but then obviously the state machine is not doing anything anymore.
I also tried to use the finiteStateMachine (finitestatemachine-example.py)
but there I get the following Error in line 19
17 mystatemachine = FiniteStateMachine(server, server.nodes.objects, idx, "FiniteStateMachine")
18 # call statemachine.install() to instantiate the statemachinetype (with or without optional nodes)
19 await mystatemachine.install(optionals=True)
InstantiationError NodeId: NodeId(Identifier=2771, NamespaceIndex=0, NodeIdType=<NodeIdType.FourByte: 1>) is abstract and cant be instantiated!
By checking the OPC UA FiniteStateMachineType (Node id 2771) it is specified that indeed this type IsAbstract
Therefore I am also stuck with this example.
I am using Python 3.12.1 for both examples
Could you please help me further and point me in a direction on how to solve the issues and run the StateMachine example? Many thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions