LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

JKI

I want to know the real use of JKI state machine. I have studied for a few days, but I still don't understand the purpose of JKI. It seems to be a very common program, can someone guide me? Thank you very much!

0 Kudos
Message 1 of 7
(2,106 Views)

That's such a general question, but I guess the "use" or "purpose" of JKI State Machine would be to enqueue states in such a way as to accomplish some task or user interface. 

 

I just used it the other day at home, to make an auto clicker for a certain game that I play. Big time saver let me tell you. Best part, I built it up and gave it to my friends so they can use it too. Real world example for you.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 7
(2,095 Views)

I am currently working on a project from continuous data acquisition, data processing, control logic, system hardware protection, data storage, etc. Can JKI also do this? There is a time interval between each state.

0 Kudos
Message 3 of 7
(2,088 Views)

I have a question, is the state machine in the implementation of a state, the state should be waiting to be executed, and increase the time interval between each state, if I need to immediately carry out one of the state, but when the program does not perform here, still need to wait for some time, what should I do? I don't know if I have made myself clear. Thank you very much!

0 Kudos
Message 4 of 7
(2,083 Views)

@韩自华 wrote:

I am currently working on a project from continuous data acquisition, data processing, control logic, system hardware protection, data storage, etc. Can JKI also do this? There is a time interval between each state.


I guess a basic rule of thumb is, the more complicated the project, the less likely that JKISM will be sufficient to accomplish it. Any sort of continuously running test/acquisition is probably going to need a minimum of two loops, so that the process can run but the program can still respond nicely to user events. The big one is an "Are you sure?" dialog when aborting the process. If you want that, but want the process to keep running while the dialog is active, JKI will basically not work. I feel like this answers your other question too, but not sure.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 5 of 7
(2,039 Views)

@FireFist-Redhawk wrote:

@韩自华 wrote:

I am currently working on a project from continuous data acquisition, data processing, control logic, system hardware protection, data storage, etc. Can JKI also do this? There is a time interval between each state.


I guess a basic rule of thumb is, the more complicated the project, the less likely that JKISM will be sufficient to accomplish it. Any sort of continuously running test/acquisition is probably going to need a minimum of two loops, so that the process can run but the program can still respond nicely to user events. The big one is an "Are you sure?" dialog when aborting the process. If you want that, but want the process to keep running while the dialog is active, JKI will basically not work. I feel like this answers your other question too, but not sure.


I think for medium size projects like the OP described, the JKI SM machine works well. I used it for making a generalized interface to any DAQmx Analog Input that is Voltage. You do need to use more than 1 JKI SM. Link various SMs with User Events, that is, each SM can message other SMs via User Events. I use a separate JKI State Machine for various components, like a SM for just Instruments, one for data, one for UI, etc.

 

If you use one of the built in dialogs, that can be a blocking operation in any LabVIEW code, not just the JKI SM. If you make/program/write your own dialog and call it asynchronously, you can have a non-blocking dialog. As far as waiting a certain amount of time in between states, you can always change the timeout in the JKI SM dynamically and have it wait in an "IDLE" State. (This assumes no other events during this time.) I do this from time to time.

 

mcduff

0 Kudos
Message 6 of 7
(2,009 Views)

Thank you very much for your answer. Recently, I am looking for a top-level program design method, which can smoothly run the program, handle different tasks, respond to user events in time, and stop the program in time. Do you have any good codes to share with me?

0 Kudos
Message 7 of 7
(1,993 Views)