12-11-2014 10:08 AM
I'm using a daq to collect current signals coming from 8 different machines and translating this information into temperature. My VI needs to do a few things and everything seems to be working just fine except for the part where it actually reads the current signals. I had tested this a few weeks ago with only one channel and everything seemed to be working fine. Now that I have compiled all of the individual sections, I can't seem to get the temperature readings to work. I believe the problem is within the daq mx section, but I could be wrong. Is there anything that seems wrong with it? Thank you!
12-11-2014 10:17 AM
Try wiring a DAQmx Start Task outside the While loop, but after the DAQmx Timing VI.
There are some other useful DAQmx tips located at http://www.ni.com/white-paper/2835/en/
12-11-2014 10:39 AM
Are you getting any errors?
30 second loop rate!!! Why so large? My guess is that is where your problems are. You are continuously sampling data at 1200 samples per second and then only reading it every 30 seconds. That's 36k samples. That may be causing a buffer over run.
12-11-2014 11:10 AM
@crossrulz wrote:
Are you getting any errors?
30 second loop rate!!! Why so large? My guess is that is where your problems are. You are continuously sampling data at 1200 samples per second and then only reading it every 30 seconds. That's 36k samples. That may be causing a buffer over run.
I have a 30 second loop rate because I don't need to make readings very often. I am not receiving any errors. The only thing wrong is that all of my "exit temp" and "mid temp" readings are saying "0" in my labview code. However, I am getting around a 5ma reading for most of them when I use the test panels in NI MAX, so I know that there is no problem with the devices themselves or with the daq. The problem exists in my code. What would you recommend changing the samples/second to? Or, is the problem with the 30 second loop rate? I will play around with those to see if they give me the fix that I'm looking for in the meanwhile. Thank you!
12-11-2014 11:11 AM
@Heiso wrote:
Try wiring a DAQmx Start Task outside the While loop, but after the DAQmx Timing VI.
There are some other useful DAQmx tips located at http://www.ni.com/white-paper/2835/en/
Tried it and nothing changed :/. Thanks for the suggestion, though.
12-11-2014 12:55 PM
It's strange that no buffer overflow is thrown out in this case. You should probe the error wire at the output of the DAQmx.vi. Also, try adding the Available samples per channel property to the DAQmx Read property node and check how many samples are available to read (0?). Also put a probe on the waveform wire that connect to a numeric indicator, I think the last of the y-values will be displayed.
Ben64
12-11-2014 01:17 PM
@ben64 wrote:
It's strange that no buffer overflow is thrown out in this case. You should probe the error wire at the output of the DAQmx.vi. Also, try adding the Available samples per channel property to the DAQmx Read property node and check how many samples are available to read (0?). Also put a probe on the waveform wire that connect to a numeric indicator, I think the last of the y-values will be displayed.
Ben64
I've probed at just about every node I can imagine and I get nothing but zero values, which is very odd to me because this isn't the case in the NI MAX test panels.
12-11-2014 01:55 PM
The only way to stop your vi is to press the abort button because of the false constant wired to the stop terminal of the loop that contain the event structure. If you stop your vi like this the error will not be displayed.
Now, what are the differences when you are using MAX? In MAX you are running a single channel at a sampling rate of 12.5 Hz which is quite different that in your vi.
Also, right-click the Array To Cluster function and change the cluster size from 9 to 8.
What modules are you using in your compact DAQ?
Ben64
12-11-2014 04:59 PM
@ben64 wrote:
The only way to stop your vi is to press the abort button because of the false constant wired to the stop terminal of the loop that contain the event structure. If you stop your vi like this the error will not be displayed.
Now, what are the differences when you are using MAX? In MAX you are running a single channel at a sampling rate of 12.5 Hz which is quite different that in your vi.
Also, right-click the Array To Cluster function and change the cluster size from 9 to 8.
What modules are you using in your compact DAQ?
Ben64
When I use MAX, I get a reading of about 5ma but when I run my VI, the readings are all at a steady zero. I actually just changed the constant value hooked up to the daqmx read "number of samples per channel" from "-1" to "2" and now I am getting readings for "exit temp" and "mid temp"s but now there is no graph and the "hot" and "cold" strings are also not showing. I have no idea why this is. Any thoughts?
12-12-2014 12:57 PM
jmejiagusmer,
I highly recommend checking out some of our DAQmx examples built-into LabVIEW. If you go to Help->Find Examples, you'll bring up the Example Finder. There are several Current Input examples under Hardware Input and Output->DAQmx->Analog Input. I recommend trying the Current-Continuous Input example. I think looking at an example might help you understand how continuous current input should be formatted.