LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing Constraints - Revisited

I posted this question once before and a few (markwysong, Brian Vibert) of you asked to see my VI's so here they are. The previous post is below and thanks in advance for helping a newbie:

I'm completely new to LabView and have done a good bit of reading but I'm stuck on timing. My application needs to test pressure levels and decide when they are stable.

Ex)
Test pressure 6 times in 1min.
If stable move on to next phase of program.
If not stable wait 10 mins and repeat process.


The application needs to do several things that are very similar in nature to the control and timing of this pseudo code. I've been using while loops and the time controls but I'm really not confident that this is getting the job done
correctly. So my question is this:


How does one go about programming in labview when you have timing constraints within timing constraints within timing constraints? I now have a mess of sequential and while structures and timing controls and even though on the surface it seems like it's working correctly, I want to make sure. I feel like I've been throwing things together and I want to do this correctly and be confident in the coding.


I can supply my VI's if necessary.


Any advice is appreciated.


CCU Student
Download All
0 Kudos
Message 1 of 2
(2,565 Views)
You might switch your code over to a state machine (case structure inside a while loop) approach if the combination of sequences and while loops is getting too messy. In the state machine you should be able to easily monitor time passed. Set a constant loop rate using the "Wait until next ms multiple" and then just count how many iterations have taken place.

To help monitor your current code's timing, you can use the tick count vi. Subtract one tick count's value from another to get the time elapsed.
0 Kudos
Message 2 of 2
(2,565 Views)