LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MCC DAQs stop reading input analog voltage when VI is running

SETUP:

I have a set of twelve thermistor circuits with an input voltage of 5V who's voltages are being read through three different DAQs. One of the DAQs is an NI USB-6008 which encounters no issues. The other two are a Measurement Computing USB-1208FS and a USB-201. I have written a VI which sets up all the DAQs to read analog voltage and uses the Steinhart- Hart equation to convert that voltage to a temperature. Since I am not interested in quick variations of temperature and to increase the resolution of my temperature readings I store one temperature reading every second for 1000 seconds and then average them. That average temperature every 1000 seconds is then written to a file. 

 

PROBLEM:

The problem I am having is that the two MCC DAQs will occasionally act as if they are reading 0 volts which corresponds to a temperature reading of roughly -450 F. They will continue to read this temperature until I restart the VI. This problem occurs independently for each DAQ so even if it is happening with one it is not necessarily happening with the other. I believe I have set up the DAQs correctly based on ULx examples on reading input analog voltages. I have tried my VI with and without the ULx Start VI since I've read it may not be necessary depending on the application and the problem persists in both cases. The VI I have attached includes all of the thermistors but I have also written VIs that only use one DAQ at a time and the same problem occurs.

 

FILES:

I have attached a set of VIs that show what I have written for one of the MCC DAQ systems. The main file is what sets up the DAQ and performs the readout, averaging, and recording of the data. The sub-VIs handle the temperature calculation for each thermistor on the particular DAQ separately. There is no difference between the VIs for this MCC DAQ system and the other so any issue found on this VI will correspond to the same problem on the other.

 

Please note, the system I am working an is older, refurbished system which runs LabView 2009 SP1 so if you need a more up to date version just let me know and I will upload that. If there is any more information you need let me know.

 

Thank you

0 Kudos
Message 1 of 6
(2,285 Views)

Although I don't think this has anything to do with your problem, but

 

Why are you creating a 1 element 1-D array on all those values inside the For Loop?

 

Get rid of that, and instead of a sum of a 2-D array divided by 1000, just replace it with Mean.VI.

 

Instead of using the Split Signal and coercing the waveform array into dynamic data wires, just use Index Array.

And you are just using a single sample anyway, when the dynamic data type gets coerced to a scalar at your subVI's, so just use analog N channels, 1 sample, 1-D array as your Analog Read function.

Message 2 of 6
(2,266 Views)

Are you reading the values from the MMC DAQ anywhere else in your system? I had an issue many years ago with an MCC thermocouple reader (if I remember right) that showed up when I had two programs reading from the DAQ at the same time. I had one program doing an automated test, but I opened up a test panel or something to view an instant temperature (while debugging) and that would corrupt my readings. The driver back in the day wasn't thread-safe, so it didn't show any errors. If you run this same VI multiple times accessing the same driver, you will probably throw an error.

 

I would recommend wiring your Stop condition for the While loop to an OR with the error wire. If you get an error on your error wire, none of the measurement VI's will return anything, but the loop will still just sit there spinning until you stop it at which point the error is displayed. If you add an OR, it'll stop if it sees an error. I bet your VI's are throwing an error and just sitting there spinning, and 0 is probably the default value... but if you don't actually catch the error in the loop, you'll never see it unless you stop the VI first.

 

(RavensFan's suggestions are good as well, lose the Dynamic Data Type stuff, lose the Initialize Array, etc. Just good coding practice.)

Message 3 of 6
(2,261 Views)

I've only done these things because I'm ignorant of better options as well as any issues with dynamic data types. I would also still consider myself a LabView beginner. Thanks for your suggestions!

0 Kudos
Message 4 of 6
(2,257 Views)

@BertMcMahan

 

There are no other processes being performed on the MCC DAQs but I will wire the stop condition to an error wire and see if the illuminates the issue. Thanks! I'll update the thread with any error that may be showing up.

0 Kudos
Message 5 of 6
(2,256 Views)

@djhuth wrote:

I've only done these things because I'm ignorant of better options as well as any issues with dynamic data types. I would also still consider myself a LabView beginner. Thanks for your suggestions!


No worries! The dynamic data type stuff is in a lot of LV's expressVI and "beginner" materials, but many people (myself included) think they make things more confusing by trying to hide what's really going on. It sort of becomes this magic data type that is a little unclear and seems to have a mind of its own. Many people, again myself included, started with dynamic wires but quickly learned that having actual control over the data is better in nearly all cases 🙂

0 Kudos
Message 6 of 6
(2,249 Views)