LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing with while loop

Hello,

 

How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,

0 Kudos
Message 1 of 3
(2,065 Views)

Hi nichts,

 

there's the function ElapsedTime in the timing function. You should try to use that in your while loop...

 

Usually you know how much data you get per second (aka sample rate), so you could just ask for a certain amount of data...

Best regards,
GerdW


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

@nichts wrote:

Hello,

 

How can I do a time with while loop?. I want to read a data in the While- Loop for 1 sec and then go to B .. I added a pic,


I would use as GerdW has mentioned,"elapsed time.vi" in a statement 1st case structure, after set time has elapsed> goto 2nd case structure. try not to use flat sequences....this can be done with case statements with transitional coding. I have noticed young LV programmers like to use flat sequences...I think it's a trap set up by LV developers?  Smiley Surprised

0 Kudos
Message 3 of 3
(2,045 Views)