Jump to content
Sign in to follow this  
raul.ionel

JKI Beginner hoping to learn

Recommended Posts

Hello,

 

I am a new user of Labview (2009) and implicitly of the JKI SM. I hope my question will be understood.

 

I have developed a JKI SM based application which continuously reads data from a Labview simulated device (I created the Acquire case under “New Cathegory”) and displays it in a Chart. This state is triggered by a new button (Start Acquisition) placed in the Event structure, just like in the JKI SM presentation movie.

 

In the Acquire state, by using a Select fed from another Front Panel button (Stop Acquisition) I can either go back to Idle (and Wait, Exit or restart the Acquire state) or continue executing the Acquire state.

 

My problem is as follows. The order of my execution would be: Start Acquisition and display data. If I want I could return to Idle and wait, or keep on gathering data. However, if by mistake, during the acquisition state I press the Exit button found in JKI SM by default, the vi keeps on executing the Acquire state, displays data but all buttons on the front panel are “blocked”. If I push any of them nothing happens. Is there a way to solve this?

 

I think the SM continuously executes the Acquire state (as it should) but due to a change in the state of the Exit button (which triggers the Idle State -> Macro:Exit) the front panel buttons do not respond to commands.

 

Does my explanations make sense? Is there a way to solve this?

Share this post


Link to post
Share on other sites

I think the SM continuously executes the Acquire state (as it should) but due to a change in the state of the Exit button (which triggers the Idle State -> Macro:Exit) the front panel buttons do not respond to commands.

You need to have your SM loop through the Idle state in order to respond to FP events. Something like: Start Acquisition, Display Data, Idle...

  • Upvote 1

Share this post


Link to post
Share on other sites

Hello,

 

I've managed to solve the problem by using Property Nodes-> Disable for the buttons. For example, when I am in the Acquire State, I Disable buttons which are not linked with this state. Then I can execute the state and as I exit the state, I use the same property node to re-enable all previously disabled buttons.

 

I do not know if the idea is the best solution, but it does the job.

 

Jim C., thank you for the answer. I will try to do that and see if it works.

 

Thank you and if there are any other suggestions please let me know.

Share this post


Link to post
Share on other sites

Hello,

 

I've managed to solve the problem by using Property Nodes-> Disable for the buttons. For example, when I am in the Acquire State, I Disable buttons which are not linked with this state. Then I can execute the state and as I exit the state, I use the same property node to re-enable all previously disabled buttons.

 

I do not know if the idea is the best solution, but it does the job.

 

Jim C., thank you for the answer. I will try to do that and see if it works.

 

Thank you and if there are any other suggestions please let me know.

Yes. This is the quickest way to solve this problem. You can either disable all front panel controls or display a modal dialog. Acquisition takes time and you're pretty much locked-in until it completes.

 

If you must have control of the front panel while the acquisition is taking place, you could place your acquisition code in a parallel loop to the main state machine. Then send messages (via notifier or user event) to that code from the main loop.

 

Hope this helps.

  • Upvote 1

Share this post


Link to post
Share on other sites

Yes. This is the quickest way to solve this problem. You can either disable all front panel controls or display a modal dialog. Acquisition takes time and you're pretty much locked-in until it completes.

 

If you must have control of the front panel while the acquisition is taking place, you could place your acquisition code in a parallel loop to the main state machine. Then send messages (via notifier or user event) to that code from the main loop.

 

Hope this helps.

 

 

Thank you for your answer and have a nice day.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.