Compute difference between two thermocouple readings

laserjim

Member
Join Date
Aug 2010
Location
Central Texas
Posts
11
Hi,
Hope someone can give me advice on what I thought was going to be easy, but I have not got there yet. A customer has two process readings and wants an alarm when the difference between them is > 10 degrees. If I knew one of the readings would always be greater than the other, it seems a LES or GRT would work, but he says that is not always the case. This is a AB 1400 Micrologix that I am working with with a 1764-IT4 thermocouple add on card. Any help would be greatly appreciated.

Jim
 
Calculate the difference between the two signals and then take the absolute value of the result. Then you can use the GRT function to check the magnitude of the difference.

If your PLC doesn't have an absolute value function, roll your own by checking for a negative value of the difference between the two signals and multiplying by -1 if the difference is negative.
 
The ML1400 has ABS. It also has the CPT, so I would use that.

CPT N7:0 ABS(I:1.0-I:1.1)


Another way would be to do the sub and then check bit 15 of the result. If bit 15 is set then the result is negative so MUL result by -1.
SUB I:1.0 I:1.1 N7:0
XIC N7:0/15 MUL N7:0 -1 N7:0
 
Unfortunately CMP is not available on any RSLogix500 based platforms. I have no idea why Rockwell wouldn't include it - considering some have have a CPT instruction then a CMP should be trivial.
 
I don't have RSLogix 500 installed on this computer right now, but it seems like you could take the difference and shove it into a LIM command. It's been a while, but I also think that if you put -10 as hi limit and 10 as the low limit (yes... that's exactly what I meant), it will give you an output if the difference is more than 10, either direction.
 
Ozee, the LIM command seems to work that way (limits 10 and -10, lowest value put in as high limit). If the temperature difference is 10 or more, LIM output will be true.

Because Jim wanted an alarm if the temperature difference was GREATER than 10, then (strictly speaking) LIM limits would have to be adjusted, maybe 11 to -11.
 
To get temperature difference you can also wire the T/C's back-to-back and let them do the EMF subtraction. Doing so constitutes a two element thermopile.

2w5u4vk.jpg


When both T/C's are the same temp, output is zero.

When one T/C is hotter than the other, the output is positive, difference displayed in degrees

When that same T/C is colder than the other, the output is negative, difference displayed in degrees

Requisite conditions for doing so are:
- same type T/C (can't mix and match a J with a K)
- to read values in temperature units, the analog input is has to be a thermocouple input
(can be mV input, but the reading is then mV, no temp units)
- both T/C (+) wires are connected together
- remaining negative (-) leads wired to the (+) and (-) terminals on the analog input.
- any integral cold junction compensation for the analog/thermocouple input card has to be turned off, otherwise a zero temperature difference will appear as the terminal connection temperature, not zero as expected. A selection of "External CJ compensation" even though there is none accomplishes this. Not all devices have the option, though.

The issue of a 10 degree difference, plus or minus, still exists.

My device has
- an absolute value calc
- multiple alarms: low alarm and/or high alarm.
- deviation alarm: ± around a setpoint value
Depends on what's available, as discussed above.
 
Thanks to all for the great ideas. I don't have the processor yet as it is still in the panel shop and this is the first call we have had for a 1400, but it looks like I will have it two weeks. I am probably going to try CPT N7:0 ABS(I:1.0-I:1.1)first. I will let you know how it works.

Thanks again,
Jim
 

Similar Topics

Is there an easy way to compute time difference between 2 events in PLC5 enhanced. In Softlogix there is a TDF function that does exactly this.
Replies
0
Views
2,077
I am trying to add 9 DINT values with the CPT instruction in ControlLogix and I keep getting errors. I am just choosing each tag with an add...
Replies
13
Views
2,320
I am using a legacy Allen Bradley PLC5/40E Series F CPU Having issue with compute instruction syntax with the expression Doing a divide by...
Replies
7
Views
1,769
I've got a print-out of old code (PLC-5/250) that I am trying to decipher. I am hung up on an expression in one of the compute blocks. The block...
Replies
7
Views
3,232
I have written control logic for several situations recently where I have used a compute statement instead of a PID loop. My statement looks...
Replies
11
Views
3,568
Back
Top Bottom