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: 

terminate while loop

 

Hi ,

 

 If an outer while loop contains an event and another inner while loop and  both the event and inner while loop are separate, then is there any possibilty that the execution comes out of the inner while loop when the event occurs and after executing the event it comes back to the inner while loop where it was previously executing, just like Interrupts.  HOW is it possible? 

0 Kudos
Message 1 of 10
(4,416 Views)

I have no idea because I could not follow what you were saying. Are you saying you have an event structure and one of the events has a while loop inside? Or, do you have a parallel loop? Or do you have something else.

 

Please post some code.

0 Kudos
Message 2 of 10
(4,414 Views)

@mhs100 wrote:

 

Hi ,

 

 If an outer while loop contains an event and another inner while loop and  both the event and inner while loop are separate, then is there any possibilty that the execution comes out of the inner while loop when the event occurs and after executing the event it comes back to the inner while loop where it was previously executing, just like Interrupts.  HOW is it possible? 


What a convoluted question, but I think I know what you are asking.  No, the event case will not pause a parallel loop and it will not return to it after the event is done.  You have to code this function.  See the following example.  The work loop is to the right of the event loop.  It will run until the Dummy boolean becomes true.  When that happens, the loop inside the True case runs until the Dummy becomes False.  This has the effect of pausing the loop.  In the event, I make Dummy true to pause the work loop when the event fires, wait a bit, then make Dummy false to allow the work loop to continue.

 

 19431i8DC21CCA5E393EB9

 

I tried to attache a code snippet, but the damn thing wants to create a property node and reference for a local variable.  If the Code Capture Tool can get it right, then the Snippet tool should be able to do the same.  Somebody at NI needs to fix this.

 

- tbob

Inventor of the WORM Global
Message 3 of 10
(4,395 Views)

Hi Tbob,

 

On the local variable/property node issue: This was reported to R&D for further investigation in CAR 212845. 

 

Cheers,

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 4 of 10
(4,343 Views)

@The Chancenator wrote:

Hi Tbob,

 

On the local variable/property node issue: This was reported to R&D for further investigation in CAR 212845. 

 

Cheers,


YAAAYYYY Smiley Happy  Once fixed, I will use the snippet more often.

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 10
(4,335 Views)

 


@tbob wrote:

I tried to attache a code snippet, but the damn thing wants to create a property node and reference for a local variable.  If the Code Capture Tool can get it right, then the Snippet tool should be able to do the same.  Somebody at NI needs to fix this.

 


 

This is total of-topic, but what's stopping you from using the Code Capture Tool? (I am interested in this answer, since it probably improves the Code Capture Tool)

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 10
(4,315 Views)

@TCPlomp wrote:

 

 

This is total of-topic, but what's stopping you from using the Code Capture Tool? (I am interested in this answer, since it probably improves the Code Capture Tool)

 

Ton


I did use the Code Capture Tool.  I use it a lot more than I use Snippet.  Most of my pictures are done with Code Capture Tool.

- tbob

Inventor of the WORM Global
0 Kudos
Message 7 of 10
(4,303 Views)

Well... this is not the only bug with the native snippet generation in LabVIEW.

Try with cluster constants !

 

 

20091i0767B55C2559B421 LabVIEW

20093iB8ADE939954AF2A1 CCT

 

Let's hope that these bugs have been corrected in LV2010.

 

All I have to say is that I'm immensely happy and deeply impressed with the evolution of the CCT. 

 

Of course, the original idea was mine (brag, brag...) but I must claim that I would never have had the patience and talent shown by Tst and Tony over the various versions. Just open the source, and look at the perfection of the diagram presentation ! 

 

Chapeau les Artistes !

 

Now, if a working version could be developped for the Mac... 

 

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 8 of 10
(4,231 Views)

@chilly charly wrote:

Well... this is not the only bug with the native snippet generation in LabVIEW.

Try with cluster constants !

 

 


I ran into the cluster constant issue just yesterday (or the day before).  I am also very impressed with the CCT.  I use it more than the snippet.

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 10
(4,205 Views)

CAR 212845 discussed in this thread was fixed in  LabVIEW 2014.  For a more complete list of bugs fixed in LabVIEW 2014, check the LabVIEW 2014 Bug Fixes. You can download an evaluation copy of LabVIEW 2014 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.

 

Regards,

 

Jeff Peacock 

 

Product Support Engineer | LabVIEW R&D | National Instruments | Certified LabVIEW Architect 

 

0 Kudos
Message 10 of 10
(3,828 Views)