LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem splitting thermocouples and 4-20mA pulse

I'm running Labview with a PCI-6025e and an SCXI-1000 with an SCXI-1120/1320 and an SCXI-1121/1321. I have a variety of input signals - several thermocouples, a 4-20mA analog pulse output device and several 4-20mA analog devices. I built the attached vi's which work ok separately to acquire data from multiple thermocouples ("Thermocouple Temp Sensors.vi") and one to acquire the data from the analog pulse output flow meter ("Pulse Flow.vi"). I'm now trying to integrate these vi's to acquire data from all the devices simultaneously. It looks like the thermocouples are split out and reading ok, but I get errors on the "Pulse Measurements N chan.vi" - either 1) "Analysis: The waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels, and ref level units.", or 2) "Analysis: The amplitude of the waveform is zero, so the histogram method cannot be used.". I tried various settings in DAQmx for the counts and frequency (100 and 1000, 10 and 100, etc.), and tried a few different settings for the signal length in the sub vi (default of 1, also 0.1 and 0.01; all other sub vi settings are default).

The other problem with this vi is the output spreadsheets. Instead of writing only two spreadsheets, I get two spreadsheets every cycle. I'm thinking that this will require use of Signal Merge before writing the spreadsheet.

Thanks for the help.
0 Kudos
Message 1 of 6
(3,122 Views)

Hi Wosborn,

 

In order to prevent error 1, the VI ‘Pulse Measurements.vi’ requires a periodic waveform or array of periodic waveforms. I was able to reproduce this error by inputting a floating signal, and the error went away when I input a periodic sine wave. I could not reproduce the second error, but it again sounds like there is a signal going into the VI which is not acceptable.

For the spreadsheet problem, I would like to ask for more clarification. Eveytime I ran your VI ‘Temp and Water flow VI’, I did not get more than 2 files (and these were lvm files). Was there another VI which was not attached?

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 6
(3,083 Views)
Thanks for the reply. As to problem 1, can you suggest why my real signal would work with this vi on the first, single-input "pulse flow.vi", but not the combined vi? Could it be the timing and number of samples? I am running the pulse signal from one module and the temps from the second module, with different settings on each. The pulse signal is configured in DAQmx for continuous, 1k Hz and 100 samples. Does this need to be set to a discrete number of samples, instead of continuous, so that when the scan goes back to measuring temp it's not left hanging?

On problem 2, it sounds like this will be solved when problem 1 is solved.

Cheers,

Will
0 Kudos
Message 3 of 6
(3,070 Views)

Will,

 

I believe you may be seeing the problem because the VI’s are taking in two different inputs. Your Pulse Flow VI, you are measuring a signal from ai3 – see Pulse Flow.jpg. In your Temp and Water flow VI, you are sending a signal from ai1 to the Pulse Measurements vi. (You are splitting signals, and bringing the 3rd signal to the Pulse Measurements vi. However, in the DAQ assistant, the 3rd signal is ai1, and not ai3 – see Temp and Water Flow.jpg attached.)

You can change the order of signals by opening the DAQ assistant, clicking on the double blue arrows pointing left (“show details” is next to these arrows), and then using the up/down arrows as seen in my screenshots.

David L.
Systems Engineering
National Instruments
Download All
0 Kudos
Message 4 of 6
(3,064 Views)
Correcting the signal input has not resolved my problem. I am running 6 thermocouples on an  SCXI-1122, and DAQMX limits the sample rate on this module 14Hz. I run the pulse signal on an SCXI-1121, which works good when it is set to sample at 100 samples and 1kHz. However, when I combine these into one vi using the split signal I get an error saying "analysis: the waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels and reference level units. I'm guessing this is due to the slow sampling rate. Is it possible to get the 1121 to sample at a faster rate than the 1122 in the same vi? Is there any way to modify the pulse subvi to  work at this slower speed?
0 Kudos
Message 5 of 6
(3,015 Views)

wosborn,

Could you please verify that you have an SCXI 1122.  You did not mention that in the list of hardware in your first post.  As far as your questions are concerned :

>>Is it possible to get the 1121 to sample at a faster rate than the 1122 in the same vi?

Since you are using an E series device that only has one ADC and one timing engine, you can sample only at one rate, in your case the slower one.  Also, looking at the error that you are getting, it seems as if there might be some problems with the incoming signal.  Could you test it with a scope to be sure that the signal is working right, and you might have already done this.

>>Is there any way to modify the pulse subvi to  work at this slower speed?

You are using the express VIs to achieve this, you could however develop some of your own code to develop this as well.  The express VI cannot be editted though.  Below is a link about using the SCXI-1122 to measure multiple channels.

Incorrect Measurements with SCXI-1122 when Scanning Two or More Channels

Also, in the VI where the error is occurring, can you graph your data?  Please let us know if you notice the correct waveform that you expect to see on the graphs. Which VI is your error occurring on?  You can know this because as soon as the error occurs the subVI in which the error occurs will get highlighted. It does seem as if, only when you combine your VIs and try to sample on multiple channels you are seeing this behavior, am I correct?  If that is the case please follow some of the steps in the linked KB and let us know if that helps.

Raajit L
National Instruments
0 Kudos
Message 6 of 6
(2,967 Views)