Hi, Labview Forum.
It was advised I learn how to create a State Machine, so I'm on it. It was also recommended that I learn Core 1 and 2 Labview from the tutorial page. I'm on that too but have problems registering until I talk to Labview staff next week.
Meanwhile, I have created a State Machine to read a .CSV file and send a resulting String to a Slew Command of a Stepper motor. This comes from a previous VI and that works. See image below:
I have no faults in my State Machine and the Interface works. That said, the program does nothing but initializes stuff. I am missing something I've not learned yet.
Can anyone please laugh and say:" You missed this out, doooooohhhhh!"
This is the original VI:
If you just follow the states that are called, you run out of states. I do not know what the JKI State Machine does when you run out of states (do not currently have it installed and have not used it in any applications).
The JKI State Machine goes to its "Idle" state, which contains an Event Structure; it waits for an event when the queue empties. Your JKI SM simply initializes everything then goes idle. If you want it to do something periodically, put that into the "Timeout" case (and change the constant to something other than -1). If you want it to respond to the UI, add that logic.
You don't need to add "Event Structure" to the Idle case. If you want to go there (during a longer-running macro, for example) add "Idle" wherever you feel it's needed. Ideally, your JKI SM shouldn't need this. Long-running stuff should be launched to run in parallel so your UI stays responsive.