LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

same code for every state in event

Solved!
Go to solution

Hello.

 

In my front panel there are some buttons that will give the same result each time they are pressed.

Exactly like menu items.

 

In every state of my FSM there is an event structure. Is it efficient to add a case for every menu item and buttons for every state?

 

Is there a way to add this functionality in just one case structure and then make it global somehow?

 

Thanks.

0 Kudos
Message 1 of 4
(2,812 Views)
Solution
Accepted by topic author vakost

Hi vakost,

 

don't use an event structure in each case. Use only ONE event event structure!

 

Read about Producer-Consumer scheme. Read about QDSM (queue driven state machines)! That should give you a kick…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,806 Views)

Thank you very much for the quick reply!

 

I am sorry I got confused with the double post.

0 Kudos
Message 3 of 4
(2,796 Views)

@vakost wrote:

Thank you very much for the quick reply!


Thanks are given with kudos.

 

And interestingly enough LabVIEW R&D was actually thinking about having LabVIEW not allow more than one event structure in each VI to help avoid this type of issue.

 

http://lavag.org/topic/17781-suppose-we-limited-1-event-structure-per-block-diagram/

0 Kudos
Message 4 of 4
(2,761 Views)