LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a lab view interrupt vi structure?

Solved!
Go to solution

 

Hello fellow coders,

 

I have a little program that reads some process transmitters and controls valves through modbus. 

 

When I added code to save this data to a spreadsheet, the control valves stopped working on continous run and only work once I stop and start the program.

 

The code is in a disabled box in the vi

0 Kudos
Message 1 of 6
(2,545 Views)

Data flow.  Your outter loop can't iterate until everything inside of it is complete.  This includes the loop you have to do the logging.  And that loop isn't even needed.  Just remove the loop that is around the logging (keep the logging code though).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,532 Views)

Well, saving the same exact data every 30 seconds until you press an off-screen button (The "Unlabled Stop") was probably not what you really wanted to do.  In fact, the while loop around the write to spreadsheet file code is only going to cause trouble.  30 second delays in loops the user interacts with will probably just irritate your users too!  They aren't usually that patient and will almost always hit the dang abort button after just a few moments- that's often "not good".Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(2,529 Views)

I dont wat to save it every 5 times a second, how do I save it every 30 seconds without a loop+delay?

 

 

0 Kudos
Message 4 of 6
(2,507 Views)

tick count?

0 Kudos
Message 5 of 6
(2,477 Views)
Solution
Accepted by topic author Ferer44

Elapsed timer Express.vi and a case structure around the write to file code driven by the "Timer Expired" Boolean would make more sense.Smiley Wink


"Should be" isn't "Is" -Jay
Message 6 of 6
(2,470 Views)