LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sequential while loops with same data input

I'm super new to LabView and programming in general.

 

I am creating a VI that displays a plot (plot 1) with a constant value as green until the Sine wave input (displayed as plot 0) equals a certain y-value range and then the color changes to black. After this color change of that particular plot (plot 1), I want a different plot (plot 2) to display a different constant value and the same requirements to be met, just at a different y-value for the Sine wave input.

 

 I've managed to complete the first part of my sequence with a while conditional loop but I am unable to get the second part to execute - it just stops with the next plot displayed but the data doesn't continue streaming through. Since I am relatively new to LabView, I'm unsure as to why this second part will not execute. Any help would be appreciated - I have attached a current version of my VI. 

0 Kudos
Message 1 of 4
(2,481 Views)

Combine everything into a single loop.  YOu might need a shift register to keep track of your state, but it all needs to be in a single loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,470 Views)

There is a function called In Range and Coerce you can use instead of those express VIs.  It is much lighter in weight than an Express VI.

 

No need to duplcate the Express VI.  You have two in each loop doing the same comparison.  Use one and split the wire after it.

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

Hi bdave87,

 

   Please check this block diagram..I configured the Sine wave with 10.1hz frequency,sampling rate as 1000samples per second

 

Regards,

SrikrishnaNF

 

ForBdave87_BD.png

Regards,
Srikrishna


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