LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

out of control thermocouples

Solved!
Go to solution

Hey, I've got a weird problem and I'm hoping someone can help. I've been using a program for about 6 months now that basically maintains a cold temperature at one side of a heat sink, and maintains a hot temperature at the other side.  Then I have 25 thermocouples hooked up in between to measure temperatures so I can do analysis on the material in the middle.  My problem is that all of a sudden the thermocouple readings have been out of control and unpredictable.  I was adding automation to the program so it could run multiple tests at once and in the process this problem developed.  The strange part is that the problem is also happening in the old version of the program now too, and that has been working perfectly for the last 6 months.  I have 25 thermocouples hooked up and the temperatures will all look about right, but then 3 to 5 of them will be completely wrong randomly.  What's interesting about this problem is that when I change the thermocouple that the heaters use to maintain the set point temperature, the values that were wrong become right again and some of the other thermocouples start giving invalid data.  The setup uses one NI 9213 and 3 NI 9211 inputs for the thermocouples.  It also uses a NI 9401 to control the heaters through a pulse width modulation electric box we have.  Anyone ever experience something like this or have any ideas?  Thanks for any help

0 Kudos
Message 1 of 4
(2,231 Views)

I also just got this error message when I stopped the program which hasn't ever happened before and might have something to do with it:

Error -200279 occurred at DAQmx Read (Analog 1D DBL NChan 1Samp).vi:1

Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeToCorresponding Value: Current Read PositionProperty: OffsetCorresponding Value: 0
Task Name: _unnamedTask<57>

0 Kudos
Message 2 of 4
(2,230 Views)

Hello acolbourn,

 

Have you tried hooking the thermocouples that were giving you bad data back into another port that you were previously getting good data with. This will help you figure out if the problem is the thermocouples or the card inputs. Since you said the issues were fixed by replacing the thermocouples, that makes me think the issue is the thermocouples...but I would still trying plugging the "bad" thermocouples into another port just to see if you still get bad data.

 

How do you have your code setup to read the signal? Do you have multiple tasks reading from the different cards, or do you have one task with all the inputs on it? I noticed you are only reading one sample at a time, you may want to try reading multiple samples so that you have a buffer and are less likely to get that error. Also, if you were in highlight execution, then this error would have happened because of the how much highlight execution slows down the program, and not because of an issue with the code. When you debug with DAQmx, data overwrite errors are common. This is mainly because most debugging involves slowing down the execution to see what's going on, but slowing down the execution causes timed events to not function correctly, so this may be the cause of the -200279 error.

 

I hope this helps!

 

-Nathan H   

Software Developer
National Instruments
Message 3 of 4
(2,200 Views)
Solution
Accepted by topic author acolbourn

Hey Nathan,

Thanks for the ideas.  I ended up switching to reading multiple samples like you suggeted and that error message hasn't popped up again, so hopefully that fixed that issue.  I think I resolved the weird thermocouple readings issue as well! I think I had a ground loop problem which I fixed by grounding all the thermocouples to a metal table.  For anyone out their getting weird unexplained readings, definitely experiment with grounding everything properly.  

0 Kudos
Message 4 of 4
(2,175 Views)