Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time data display on front panel instruments

Hi again,

I have finally finished (at least I thought I did) a project for real-time monitoring of jet engine test data.
Problem is.... the data on the front panel only updates when I stop and then run the VI.  I am very new to LabVIEW, and am still waiting for a book I ordered that should explain more of it in "laymen's terms".  I know little about programming, but was able to create a project that will display all the info I need to see.  I am just having trouble getting it to show up in real-time.  If I run a sub-VI, it shows the data in real-time, but when I run the entire project, it just updates the screen once and stops.  What am I doing wrong?  I have learned a bit from reading the help provided with the software, but most of it seems to be written for programmers and not for the new user.  I do have some very basic programming knowledge, but it's VERY basic.

I've attached the VI I've created.  Please excuse the disorganization, but I plan on cleaning it up when I get some time and as I learn more about LabVIEW.  This is kind of a rush project, so I was working fast.  We have an engine to test this weekend and I'd like to get some real-time data displayed during the test without having to abort and run the VI over and over.

I know I'm probably missing something obvious, so I hope someone can find it and explain it to me in some basic terms.

Any help would be greatly appreciated!!!!!
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 1 of 20
(5,618 Views)
Hmmm... I thought I attached a file, but don't see it.  I'll try again.

BTW, I'm using LabVIEW with a Daytronic System 10 DAQ and am using their sub-VIs.  They work well by themselves, but when running the entire VI, it just takes snapshots.

Todd Munsell
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
Download All
0 Kudos
Message 2 of 20
(5,617 Views)
 

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

0 Kudos
Message 3 of 20
(5,606 Views)
Thanks for the reply, Emilie.

I have tried putting a while loop around it, but that didn't seem to help.  I may be misintrepreting the HELP for it (as I said, I'm not that familiar with programming or LabVIEW), but it seems to say that all you have to do is wrap it around the code and that's it.  Am I wrong?  I even tried using a Stop button w/ the While Loop, but it just changes color and stays that way, it doesn't stop the application from running.

I just made a test VI using one numeric display and one channel and it works fine (continous updates) if I select the "Run Continously" button, but not just the "Run" button.  This is without a While Loop around it.  I'm going to try adding one and see what happens.

I'm thinking I may have to go through and rewire everything one at a time to see when it stops working.  It seemed to work fine the other night, before I started adding more subVIs and wiring them in.  Our DAQ is working well.  I noticed the other night that the send and receive lights were on all the time when the app was running correctly, but now they just flash once and go out.

Thanks again.

Todd


Message Edited by tmunsell on 01-18-2008 06:39 PM
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 4 of 20
(5,600 Views)
UPDATE:

I just added a while loop to the test VI I made and it's working properly, as does the stop button.  I'm thinking that maybe the timer VI I added to my panel may be causing problems.  Do you think this is possible?

Todd
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 5 of 20
(5,597 Views)
Another UPDATE:

I figured out what was causing the problem.  I had added a subVI of a timer program (like a stop watch for timing external events) to my front panel, and once I removed it, the application started working normally.  This includes the while loop that I put back in it.  I'd really like to have the timer (attached VI) on the front panel though, to time engine starts, time running at certain power settings, etc.  We have been using a handheld stopwatch and it's a bit of a pain.  Is there a way to incorporate the timer into the front panel where it won't stop the main VI from functioning?  I'd tried putting it inside and outside the while loop, with the same results.

Todd
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 6 of 20
(5,595 Views)
That's great, Todd. Thanks for sharing your updates with us!
Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 7 of 20
(5,576 Views)
 

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

0 Kudos
Message 8 of 20
(5,572 Views)
Thanks for the reply and ideas, Emilie.

It may be possible to use your second suggestion, as long as it doesn't slow the data display, which we need to run at as close to real-time as possible.  Things happen very quickly when a 3 ton turbine engine is running at full power turning at over 14,000 rpm!

Would it be possible to run the timer I have as a seperate application that I can overlay onto the main app front panel?  I really do like that timer, since it does exactly what I need it to do.... work as a simple, resetable, stopwatch.


Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 9 of 20
(5,502 Views)

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!

Amanda Howard
Americas Services and Support Recruiting Manager
National Instruments
0 Kudos
Message 10 of 20
(5,489 Views)