LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop iteration delay

Hi I am trying to run the code in my event case structure but my program only runs for 10 ms. I want it to run for 14 s instead. I know one way of solving this is to delay the iteration in my while loop for 14 s so the code (waveform) in the event doesn’t stop running till after my first while loop iteration . Please if this method is correct how do I implement it in this program attached. 

0 Kudos
Message 1 of 3
(1,190 Views)

Hi obed,

 


@Obed41 wrote:

 in this program attached. 


There is no program attached. All you attach are two images, which are shown for me upside-down…

When you want us to edit your code then you need to attach (real) code!

 


@Obed41 wrote:

I am trying to run the code in my event case structure but my program only runs for 10 ms. I want it to run for 14 s instead. I know one way of solving this is to delay the iteration in my while loop for 14 s so the code (waveform) in the event doesn’t stop running till after my first while loop iteration.


So the code executes within 10ms even though there is a 100ms WaitForMultiple???

What should the code do the remaining 13.990s when it already finishes after 0.01s?

Why do you want to place an additional wait of 14s?

 

Please describe what you want to achieve - and not how you want to achieve your goal!

And please attach real code instead of images…

Best regards,
GerdW


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

No, 12MB of photographs with 5kb worth of information is completely useless to illustrate the problem. We cannot see the program structure, we cannot see what's in the other cases and events, we cannot see where the terminals are of all these local variables, we cannot see how the events are configured, we cannot see how the daq assistant is configured, we cannot see how you are converting the dynamic data, etc.

 

There are lots if hints that you are a beginner (index array is resizable, there is a +1 primitive, you probably don't need all these local variables, hidden wires everywhere, wired going in all directions, etc.) and this mean you might not fully understand the power and implications of dataflow.

 

What do you want it to do during these 14 seconds? (iterate every 10ms until 14 seconds are over? Wait 14 seconds? With a 100ms wait, your event cannot be faster than 100ms, assuming all other code is instantaneous)

 

So please start over:

 

  1. Attach your actual VI and all needed dependencies
  2. Tell us the purpose of the program and how it interacts with the world (hardware, user)
  3. Tell us exactly how you are using the program (What controls you operate and in what sequence)
  4. Tell us what you want the program to do.
  5. Tell us what you don't want it to do.
  6. etc.

 

0 Kudos
Message 3 of 3
(1,145 Views)