01-18-2008 01:19 AM
01-18-2008 01:22 AM
01-18-2008
02:55 PM
- last edited on
04-22-2025
02:43 PM
by
Content Cleaner
Hi Todd,
It sounds like you're running a VI that acquires and displays data on a Windows OS. Have I understood you correctly? If so, you'll probably get a better response from the community if you post in the Multifunction DAQ forums. The Real-Time Measurement and Control forum is more focused on stand-alone applications running on dedicated targets with a real-time OS.
In general, the behavior you describe makes it sound like you need to add a While Loop around your code in order to make your program run continuously, i.e. constantly update your Front Panel indicators (user interface). Without downloading the entire library of your VIs, I took a quick look at your main VI and it doesn't look like you have a While Loop around your code. I would suggest you look at the Help Documentation on While Loops to find out how you should encorporate this into your program.
Hope this helps and good luck!
Emilie K
National Instruments
01-18-2008 06:37 PM - edited 01-18-2008 06:39 PM
01-18-2008 06:41 PM
01-18-2008 07:20 PM
01-21-2008 12:08 PM
01-21-2008
12:38 PM
- last edited on
04-22-2025
02:43 PM
by
Content Cleaner
Hi Todd,
If I understand your question correctly, you might try adding the Get Date/Time in Seconds.vi to your code to display a ticking clock on your front panel. This will constantly update the current time of your system with each iteration of your While Loop.
There's other ways you can integrate a "stop-watch"-like function to your program as well. You can use the Timing VIs, located on the Timing functions palatte, to specify how fast you want your While Loop to execute. I would suggest you check out the Wait Until Next ms Multiple.vi. If you specify how long it takes to execute one iteration of your While Loop, you can simply use the Iteration terminal to calculate and display how many seconds have actually passed. In this case, if you want to stop your program after you've acquired data for N seconds, you might just use a For Loop with a Timing VI.
(Disclaimer: You won't be able to guarantee the timing of your While Loop on a Windows OS, since it is non-deterministic, i.e. your virus software can pop up and cause your application to run slower than what you specified. This is where LabVIEW Real-Time becomes extremely useful.)
All of this discussion is covered in more detail in our LabVIEW Basics Customer Education course, so I imagine it's most likely included in the book you've ordered as well. But I can tell you're gaining a quick understanding of the LabVIEW programming environment, so I encourage you to continue utilize our online resources along the way. We're glad to hear new user's like yourself are adopting LabVIEW as a programming solution.
Cheers,
Emilie
01-27-2008 08:03 PM
01-28-2008 02:10 PM
Hi Todd,
Typically, placing Timing VIs such as Wait Until Next ms Multiple inside of the loop is the preferable way to ensure that your iterations are occurring at specified intervals. This should not slow your program too much, as you can set the wait time in milliseconds to fit your program. Placing timing VIs inside of your VIs also allows your processor to sleep, so it will have time to complete other tasks, such as updating your front panel. Happy coding!