Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Labview and Daytronic System 10

Hi,

I'm very new to LabVIEW, so please bear with me..... 🙂

I have created a VI for live data monitoring of jet engine tests.  We use a Daytronic System 10 DAQ.

The VI runs fine except for two problems.  I can't seem to find an example in the HELP section of the software that I can accurately understand.

The VI is in a while loop and runs fine until I place a timer sub-VI into the project.  I've tried putting it both inside and outside the while loop, but when it's there, the main VI will not display live data, only updating the screen when I abort and then re-run the VI.  Also, the STOP button won't work to stop the VI when the timer is there (running or not).

The other problem I'm having is that while the VI runs fine without the timer on the block diagram, when I try to run another PC that we use to displaying and saving our data to an Excel spreadsheet, the data on the Labview PC gets corrupted.  Could this be a problem with the Daytronic card setup (both run on serial connection on seperate cards).  The spreadsheet PC is using com2 and the Labview PC is on com1.  I may have to contact our Daytronic rep to fix this, but I'd like to get if running before Monday if possible.  We have an engine to test on Sunday afternoon.  We can still use the old Autonet system if we have to.  That's the odd part.....  The Excel PC and the Autonet PC work well together, so why doesn't the Labview PC work with it.  Of course, the Autonet system has a proprierity operating system, whereas the other PCs both use WinXP.  Hmmmm.....

Any assistance would be greatly appreciated!

Todd Munsell
Test Cell Test Technician
Wood Group Pratt & Whitney Industrial Turbine Services, LLS
Plattsburgh, NY
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 1 of 9
(3,507 Views)
The problem with the subVI is probably because you have a while loop in it with a stop button that you cannot control. No data is returned by a subVI until it finishes and if you have no way to stop it, it will never return and you have no control in the main VI either.
 
I'm not sure what could be the problem with the data corruption. Could yuo explain a bit more about the relationship between your data acquisition system and the two pc's? Is the data acquisition system separate from them both and are they accessing the same hardware? Why aren't you using the LabVIEW pc to display the data and write to a spreadsheet?
 
p.s. For future reference, this board is for NI data acquisition hardware. You should post new questions to either the LabVIEW or instrument control board.
0 Kudos
Message 2 of 9
(3,493 Views)
Thanks for the quick reply.

Yes, the timer does have a while loop.  Will it work better if I remove it and palce the rest of the subVI inside the main VI while loop?

The Data Acquisition system we use (Daytronic System 10) is seperate hardware which outputs the data via serial cable to both computers.  Each cable is attached to a seperate IO card.  We currently have data going to the PC with MS Excel, another PC with Autonet, and a third running the Monico Monitoring system so customers can view a run using WebEX.  I know Labview can be used for the same purpose as the Monico system, so that's something we plan on doing in the future.... cutting back to just 2 PCs.  I'm almost sure the scrambled data has something to do with the setting for each card, but I'll have to contact our Daytronic rep to find out for sure.  What stumps me is that the Autonet AND Monico PCs show good data when connected to the same DAQ card as the Labview system using the same cable.  This is true with all 3 PCs connected and running.  It may also be something with the interface software used for the Excel PC.... DDE's Datapack Server.  When I start running it, that's when the problems in Labview start.

We do plan on letting LabVIEW create the spreadsheet data as soon as I learn more about the software.  Right now, we have several macros created and data conversions and curves written into an existing Excel spreadsheet.  I may take quite a while to get these two combined.  Actually, we may not be able to since we need two different PCs to perform the tests.... one for the operator showing live data, and the other for the asst. operator for running the macros and saving the data to the approproiate workbook sheet.  The workbook PC only updates once every second, allowing us a moment to check certain data to ensure we save a good data point.  Which brings up another question.....

Is there a way to control the update rate of individual subVIs in LabVIEW?  We'd like most to update as fast as the PC can do it, close to real-time, but there are a couple that we'd like to slow to update everyone one or two seconds.  I've searched the help and it's a bit confusing in this area.

Thanks again,



Message Edited by tmunsell on 01-21-2008 06:06 PM

Message Edited by tmunsell on 01-21-2008 06:08 PM
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 3 of 9
(3,473 Views)

You just can't place a subVI with a while loop into a main VI. The way LabVIEW (and other programming languages) work, you pass execution control to the subVI (or function call). If you don't have a mechanism to stop the while loop in the subVI, execution control never returns to the main VI. You haven't provided any code so I don't know if you have to place all of your subVIs in the main or if you just need to rewrite some or all. You should really think about taking a LabVIEW class or start with the tutorials at http://www.ni.com/academic/lv_training/how_learn_lv.htm. If you have a specific question, you can attach your code and someone will try to answer.

A single pc with LabVIEW can actually replace the Excel and WebEx pc's if you want to go that route. I can't think what affect a pc using DDE would have on the LabVIEW program. I never did much more than a few experiments with DDE and that was a long time ago. Back when Microsoft actually supported DDE. It's been obsolete for a long time. It sounds like there is no connection between the pc's except for the serial cables so I'm really at a loss to explain it. Sorry.

0 Kudos
Message 4 of 9
(3,464 Views)
Thanks Dennis.

Unfortunately, I can't afford to take a Labview course, and with our current workload, the company won't be able to send me for quite a while.  I've been trying to get them to send me to Excel courses, but it's been way too busy here.  I have been reading through the tutorials and help sections in the software, but since I know next to nothing about programming in general, I can't really grasp everything that's taught, although I am picking up on it a little at a time.  It seems it's been written for programmers and not for laymen, like myself.  I have ordered a book that looks like it provides more easily understandable explainations and instructions for Labview.  Hopefully that will help me along.

I've attached the VIs for the application and the timer program.  The timer does have a stop button, but the main application still won't update unless I remove the timer completely from the block diagram.




Message Edited by tmunsell on 01-22-2008 01:09 PM
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
Download All
0 Kudos
Message 5 of 9
(3,455 Views)
Another note on the garbled data in Labview when running the DDE software driver.... the same problem is occuring when I run the Autonet system.  Autonet runs fine, but Labview data is messed up as soon as the Autonet system starts polling the Daytronic unit for data.  I'll definitely have to contact Daytronic about this one.  The other 3 PCs work fine together, but for some reason, the Labview system doesn't want to work with any of the others.
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 6 of 9
(3,446 Views)
Hi Todd,
It is hard to trouble shoot with only knowing this much about your system but I will attempt to provide some insight.  You said you were using serial to communicate with your instruments so you might look into what baud rates and data bits each program is expecting.  If either is set incorrectly this could explain your garbled data.  Also, it is curious that the LabVIEW data is correct until the other program starts running.  This is starting to sound like a serial issue to me.  You might want to consider posting on the instrument control board.
Eric A.
National Instruments
Distributed I/O Product Support Engineer
0 Kudos
Message 7 of 9
(3,443 Views)
Thanks Eric.  I'll try posting on that board.  I know the baud rates are all correct, by the way.  I triple checked them last night.  It's still odd that the other PCs work fine together and even when Labview is running.  Only the Labview app is messed up.  I'm waiting on an email from a Daytronic rep.  Maybe he'll have some more insight into this.
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 8 of 9
(3,436 Views)
I was able to get the app running perfectly with the other PCs now.  The problem was just a setting in the System 10.  Everything is working well now, except for the timer vi I tried to add to the main app.  Still no luck with that problem.

Thanks for your help!
Todd Munsell
Test Cell Manager
Wood Group Pratt & Whitney Industrial Turbine Services, LLC
Plattsburgh, NY
0 Kudos
Message 9 of 9
(3,386 Views)