06-30-2022 03:16 AM
Hi
I'm developing two JKI State Machines to control two Modbus Units.
I want to keep their respective control in a state machine, such that they can be used stand-alone.
Now I want to combine these State machines as Sub VI to do various automated control. How can I call a JKI State Machine as a Sub VI and during its call change some control values, like programmatically pressing a button to enter a new state?
06-30-2022 03:29 AM
Hi,
I'm not familiar with JKI SM specifically, so ma answer will be broad about communikation with a sub-vi.
There are several ways, but the main idea is to make this communication follow a "by reference" approach, instead of LabVIEW's usual "by value" approach.
You could pass a queue into the subvi. You could the feed the queue in the caller and consume it in the sub-vi. (Queue are for one consumer only though)
You could use user events in a similar fashion. This could work with multiple such sub-vis simultaneously.
You could obtain references to the buttons in your sub-vi and pass them to the caller (via FG e.g.) and "press" them with property nodes (works only if mechanical action is switch)
Hope these are some good starting points.