06/18/2018
I am trying to implement an ADI instrument. I am using the OPC Foundation tools. I am struggling with the AnalyserDeviceStateMachineType. The c# code generated from the model builder does not create the states or transitions in the instrument namespace and the state machine has no ‘AvailableStates’ or ‘AvailableTransisitons’ defined, nor does it have an initial value (it’s null). The method FiniteStateMachine.SetState does not work because the transisitons mappings are not set up.
The c# classes for the objectTypes are not in the instrument namespace either. I am in the process of trying to fix this in code by using the ADI namespace Objects but wanted to check if:
* I am missing something – the model builder can create these classes
* There’s an example somewhere of setting up a state machine in code, ideally using the OPC Foundation SDK.Â
This is because there are many other state machines in the ADI instrument, some with sub-states, and it will become a bit of work to do to set them up if they didn’t need to be (because of model builder) or in an inefficient way (because no best practice example).
1 Guest(s)