Temperature fall & raise detect from ladder program?

flyers

Member
Join Date
Sep 2006
Location
Amk
Posts
295
Hi guys,

I've an application where the temperature will be feeding back to the PLC. Upon PLC detected 3 times of the temperature of the product fall & raised back (refer to attachment in red circle), the PLC must give a contact to the digital output. Can we write a ladder prigram to do this?

If the fall & raise is within the low & high limit (we'll fix this in the PLC program) we'll take into account.

Please advise. Thank you.

log1.JPG
 
If you know the approximate cycle time, then yes you can. Run a timer for some period less than the cycle time, say for a cycle of 60 seconds, run a free-running timer for a period of 3 seconds. Every time the timer fires off, move take the current temperature, subtract it from the last cycle's temperature, and check the sign of the difference. If the polarity of the difference reverses for one cycle,and you have a magnitude of a significant portion of the range, you have found where the slope changes, corresponding to a peak of valley.

You might want to send the signal through a low pass filter if you have many slight bumps in the temperature. Also, you might want to make sure that after a transition, the slope remains in the new polarity for a few cycles.
 
You can also use DIFF UP/DOWN (rising and falling edge) into some code to increment and/or decrement a register or use a counter.
 
If you are wanting to simply check to see when the temperature is out of limits, say, 3 times, drive a counter (CTU) with a value check, either a GRT, LES, or a LIM instruction (AB instructions).

For time comparison, if you want to see if it is out of limits, say, 3 times in an hour, that's a little trickier. There's some complicated FIFO stuff you could do, or you could decrement the counter by one count every so often. (CTD using same address as your CTU.) You can use the internal clock, and store the time on the each event, and time from the first one. If you don't receive 3 out of limit tics within the time span, decrement the counter, and calculate the time from the second event, making it the first...

If you only care about 3 times in a clock hour, rather than from the first event, it becomes much simpler. Just reset the timer every hour. 3 counts before time is done, set your output.
 
Hi all,


sorry for long delay in reply, due to long week break.

Managed to get the ladder program working and done a simulation.

I use a free running clock, move 2 values into integer file, always comparing the two value, I can know if the curve of temperature is going down or up. Then use a counter to check if 3 times down and up again, i'll give and output :)

Thanks all.
 

Similar Topics

Hi All Using Step 7, ladder logic. I need to program the following sequence: If temperature starts to fall, open internal fuel gate to feed...
Replies
4
Views
2,583
Hi!! I'm looking for Temperature rise calculation software from Rockwell, I just download "Product selection toolbox 2022" but this software is...
Replies
1
Views
203
I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
13
Views
578
I am looking for temperature/humidity sensor recommendations. Would like the sensor to display temp and humidity. Need to connect to a Contrologix...
Replies
4
Views
218
I have an old Chinese Temperature PID controller XMT 8038c2kp that am able to send and receive requests via Modbus poll test center in this format...
Replies
0
Views
438
Back
Top Bottom