LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Break statement in case structure

I want to give a break statement at the output of a one button dialog block so that, if the user presses ok, then the program will again start from the previous loop. I have attached the image of the part of the program. I have denoted a red arrow where I want to put the break statement and I have given a blue arrow where I want to bring back the program counter after the execution of break statement. How to do it?

0 Kudos
Message 1 of 5
(4,628 Views)

Hi LSG,

 

1) NEVER ATTACH BMP PICTURES! There's a reason why it's not allowed! Renaming them to *.jpg doesn't change their format nor their extraordinary filesize! (As demonstrated by my attachment.)

 

2) Why do you separate Date and Time controls?

 

3) Why do you compare times with timestamp datatype while dates are compared using strings (which may fail easily)?

 

4) When you want to "go back" you need a loop.

 

5) Forwarding values to next iteration of a loop is a task for shift registers!

 

6) OneButtonDialog always gives "TRUE" regardless of clicking the OK button or the WindowClose-button. You will not be able to differentiate those two events...

 

Best regards,
GerdW


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

It's very difficult to answer your question because it is clear from the way that you stated it you are still thinking in another language (and by that I mean another computer language, C?) The most basic answer to your question as stated is that due to the fact that LV implements case statements properly it has no equivalent of a "break" statement -- nor does it need one, When a case is selected that case and only that case are executed.

 

However, there are bigger issues: The screen shot you posted is apparently one small piece of a much larger block diagram. You have some very fundamental architectural rework that needs to be done before you can even begin to get to how accomplish the "break" function that you want. The good news is that we can help you with this rework, but we will need to be able to see all of your code - not just a small window into it.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 5
(4,615 Views)

0 Kudos
Message 4 of 5
(4,599 Views)

Hi LSG,

 

see point 4 in message #2...

Best regards,
GerdW


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