LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute case structure after every 10secs time lapse increment

Hello,

 

In the VI code attached, how to execute the case structure after every 10secs time lapse.  In the example given below, I would like to access the "True" case 6 times (60 secs/10).

2021-11-08_13-11-06.png

 

Or if there is an alternate way to access the case structure once every 10 secs?

 

Thanks!

 

 

Download All
0 Kudos
Message 1 of 5
(1,274 Views)

Hi hiNI,

 


@hiNI wrote:

In the VI code attached, how to execute the case structure after every 10secs time lapse.  In the example given below, I would like to access the "True" case 6 times (60 secs/10).

 

Or if there is an alternate way to access the case structure once every 10 secs?


Which of those 3 case structures in your image do you want to execute with a 10s interval?

 

Generic adivce:

  • As the While loop should iterate each 100ms you could call the case structure each 100th iteration…
  • Use ElapsedTime (set to 10s) to give you a boolean signal to execute your case structure…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(1,263 Views)

Hello,

 

The case structure, "Take data" should be where the time lapse data should execute.

 

For you first suggestion, do I need then to add a "count" input to increment up to 100 each time?

 

Thanks.

0 Kudos
Message 3 of 5
(1,260 Views)

Hi hiNI,

 


@hiNI wrote:

The case structure, "Take data" should be where the time lapse data should execute.


You already use some sort of ElapsedTime function, so you should use it correctly:

Why is the TimeTarget set to "1" when you want to execute the case after 10s?

 


@hiNI wrote:

For you first suggestion, do I need then to add a "count" input to increment up to 100 each time?


Well, yes.

Best regards,
GerdW


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

Hello GerdW,

 

In the "Take Data" case, I wait for 1 minute in that case before going to another state.  I should have labeled that state "Wait". However, in the "Wait" case, I wanted to just enter into that enclosed case every 10 secs (in reality, to capture a reading from an instrument).

 

With this in mind, I do not think I can get your solution to work.  

 

I accept all responsibility of not clarifying explicitly the requirements.  My sincerest apologies!

 

Thanks!

0 Kudos
Message 5 of 5
(1,198 Views)