LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature Error in LabVIEW that isn't present in Measurement Studio

I have two applications that I am playing with just trying to learn some DAQ functionality with LabVIEW and MS for VB.NET.  They both input and output the same signals.  I am reading in a clock signal generated from one of the counters on my MIO card with ai1 (differential).  I have two thermocouples attached to an SCXI-1125 on channels Mod1/ai1:0.  Before I added the clock signal, LabVIEW read the correct values.  After, one of the thermocouple readings went nuts.  I then ran the VB program and the thermocouple readings were fine (though the clock signal either isn't being generated or isn't being read).  I have included two screen shots so you guys can see what I am talking about.  My question regards the thermocouple reading.  Why is it fine in MAX and VB, but crazy in LabVIEW even though all I did was add a clock signal?
 
 
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 1 of 12
(3,724 Views)
VB.NET
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 2 of 12
(3,723 Views)
Are there channels I can't read from on the MIO board when I'm using it to read an SCXI board?  I have the clock signal hooked up to channel ai1 on the 50 pin block and the two thermocouples on Mod1/ai0:1.  Ambient happens to be on channel Mod1/ai1.  Which physical channel does the MIO board use to read analog voltages from the SCXI chassis?
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 3 of 12
(3,712 Views)
Answered by Tom W.

Message Edited by Otis on 09-19-2005 11:28 AM

0 Kudos
Message 4 of 12
(3,673 Views)

Hello-

The reason you are seeing the ghosting of the counter output signal over your temperature channel is likely related to the method you are using to cable to your SCXI module.  The SCXI-1125 is capable of operating in parallel mode, so this means that all channels are physically connected to the DAQ board channels in the module (i.e. ai1 on the module connects to ai1 on the DAQ board). 

When running the module in multiplexed mode all SCXI readings are multiplexed to ai0 on the MIO board, but the physical connection between ai1 on the SCXI module still exists.  This creates a situation where the two signals are double-driving the input line as described in this KB.  To sum up the workaround, you basically either need to use an SCXI-1346 for chassis communication (instead of an SCXI-1349 that you are probably using now) or cable to a non-parallel mode capable module.  A list of parallel mode capable modules is available in this KB.

The fact that you are not seeing the problem in VB is probably fitting with your assumption that the signals are not being properly output.  If you connect your clock signal to a different ai channel that is not being driven by a TC then the problem should be avoided.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 5 of 12
(3,672 Views)
My clock output was not working in VB.  I fixed that and noticed the same results.  A guy I work with suggested that I not use the analog inputs on the 50 pin connector, but to use the SCXI module instead.
Thanks for the response.

Message Edited by SCXI and MS 2k3-VB.NET on 09-19-2005 12:40 PM

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 6 of 12
(3,663 Views)
Hello-
 
You can use the analog inputs on your SCXI module, but if you would like to use the lines on the 50-pin connector you should be able to see good results as long as you use a channel that is not being driven by an SCXI input as I mentioned before.
 
Regardless, I'm glad to hear you have found the root of the problem now.  Best of luck with the rest of your app-
Tom W
National Instruments
0 Kudos
Message 7 of 12
(3,658 Views)

I have a problem again.  If I run the VB application and then stop it, turn the SCXI chassis off, turn it back on and then run the program again the temperatures are almost twice what they should be.  If I then stop VB, open LabVIEW and run it the temperatures go back to normal.  Then I can run VB again and see the correct temperatures.

Is there some way I need to reset something?

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 8 of 12
(3,633 Views)

Hello-

The SCXI system does not automatically recover from power downs during operation.  You will need to call the DAQmxResetDevice to reset each SCXI module before you should expect to receive "good" readings again after you power down.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 9 of 12
(3,620 Views)

Can you give me the exact line of code?  I searched for that functionin the measurement studio help files and didn't find it.  The only thing I found was a device reset.

 

Thanks.

Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI
0 Kudos
Message 10 of 12
(3,614 Views)