LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing something from a JKL State Machine

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!"

 

Thank you!

 

Mike

 

screenshot_2066.jpg

 

This is the original VI:

 

screenshot_2067.jpg

 

 

Download All
0 Kudos
Message 1 of 5
(3,024 Views)

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,996 Views)

I made it work! I'm in a STATE!

 

screenshot_2068.jpg

Message 3 of 5
(2,993 Views)

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.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 5
(2,987 Views)

screenshot_2078.jpgI'm getting there!

Message 5 of 5
(2,917 Views)