10-28-2021 09:06 AM
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.
10-28-2021 09:33 AM
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…
10-28-2021 10:58 AM - edited 10-28-2021 11:00 AM
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: