LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview new timing structure

Solved!
Go to solution
Highlighted

Hello,

 

I am using this timed structure that is new for me and I am having issues on how to stop it and not losing  my data.

Please help, be kind.

Remove all stuff that is not necessary,

 

Gaston

 

PS: I was working over an instrument and typing was difficult.

PS2: From my desk now. What I want to do is to be able to stop the program and still have my data recorded, but the stop button does not do that. I try to place it inside the loop, and does not work or stop data. How is the basic machine state for this?

0 Kudos
Message 1 of 6
(336 Views)
Highlighted

Where is your code running?

 

I would only use timed loops on a real-time or FPGA target.

In Windows, you are at the mercy of the operating system for the timing of anything that happens.  You might as well use a regular While Loop.

0 Kudos
Message 2 of 6
(283 Views)
Highlighted
Solution
Accepted by GastonBA

That stop button is outside the inner loop.

 

It's value is read, then entered into the inner loop. If the control changes, the value of the wire doesn't (dataflow 101).

 

Put the Boolean in the inner loop, and when wire it to the outer loop. If the Stop control stops the inner loop, the value will go to the our loop and stop it.

Boolean in loop.PNG

Recreate these diagrams, and see what happens with highlighted execution...

0 Kudos
Message 3 of 6
(248 Views)
Highlighted

Hello,

 

Thank you for the kind answer. I almost sure that I had try that first, but I guess that something else was not working and was throwing off my vi.

 

Thank you,

 

Gaston

 

PS: It sucks to not have a soul on your workplace to fix these errors...

0 Kudos
Message 4 of 6
(218 Views)
Highlighted

Hello,

 

I find out why I did try something different...

Because I am using a delay of 1min inside the loop, I thought that was not working... But it simply was that I was not being patient...

 

Thank you again,

 

Gaston

0 Kudos
Message 5 of 6
(212 Views)
Highlighted

One mistake is usually easy to find and fix. Two can be much more than twice as difficult.

 

Yes, it help to have peers, especially to gain a good "programmer conscience". Make everything with someone else in mind, even if that person is "future you". Not an easy task... If it feels stupid to make, it probably is.

 

Not quite the same, but we're here to help.

Message 6 of 6
(181 Views)