From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure

Hello I have to edit my calculator using an event structure and I am just stuck as to how I am suppose to connect the wires. This is what i am suppose to do:

Convert your calculator to use an event structure.  Have 2 different event cases,

1) value change of your 2 numeric inputs or your enum. Put all of these controls in the event case so that they are all read when one of them changes.

2) value change of your stop button.

Process the data (i.e. your case statement) outside the event structure. 

When using the event structure, you should remove your wait.

any help is appreciated!

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

Hi Beijing,

 

Do your homework exactly as is written in the requirements: they are quite explicitly!

You can also study the example VIs coming with LabVIEW...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,631 Views)

This homework assignment is essentially completed for you.  Not much left for you to do.  Smiley Very Happy

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 7
(2,585 Views)

Hello I just need help on how to connect the stop button into my event case as I am confused as to how to do so. What I need to do is:

 

1) value change of your 2 numeric inputs or your enum. Put all of these controls in the event case so that they are all read when one of them changes.

2) value change of your stop button.

 

I can't find any videos on this as well.

 

Thanks.

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

Please give a more meaningful name to your message.  Everyone posted in the LabVIEW forum is looking for "LabVIEW Help".

 

Actually, it seems like you have started a new thread on a subject matter you've already started a message thread on.  Don't do that as it causes people to waste time answering duplicate message threads.  This message thread has been merged into the original.

 

Your VI's architecture is all wrong.  An event structure belongs in a while loop.  Right now your event structure only executes once, then the while loops start.  If you trigger another event, your VI will lock up cold because your event cases are set to lock the event structure until complete, and that will never happen because there is no execution path to allow the event structure to execute again.

 

You need one event structure inside of one while loop in your code.

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

Sorry I tried to delete my earlier post but did not know how to. This is what I have so far but it seems that my code freezes after the second input change. I may have done my event cases wrong but I am not sure. 

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

You can't delete message threads.  Just add on to it.  Why would you want to delete the original thread anyway?

 

You didn't listen to what I said.  One while loop. Total.  For your whole VI.  One event structure inside of it.

Message 7 of 7
(2,536 Views)