2 hour oven batch

kevin91172

Member
Join Date
Feb 2007
Location
NEEDVILLE,TEXAS
Posts
48
PLC 06



I am trying to program a 2 hour oven batch timer using 1 60 timer that counts up a minute counter that counts up a hour counter. Next I want to display this 2 hour count down on a EZ-T10C-F HMI.Now how can I not put preset minutes the counter and just put 2 in the hour counter for this thing to work. I am just confusing myself. Any suggestions? The below is just not working for me.





// Rung 1
// Address 0
STR SP0
LD K400
OUT V700
LDA O2000
OUT V701
LD K0
OUT V703
OUT V704
OUT V706

// Rung 2
// Address 9
STRN T0
TMRF T0 K1000

// Rung 3
// Address 13
STR T0
LD V3005
BTOR
DIVR R4.0949998
RTOB
BCD
OUT V1400

// Rung 4
// Address 22
STRN T0
TMRF T1 V1400

// Rung 5
// Address 25
STR X30
SET C0

// Rung 6
// Address 27
STR CT1
AND CT3
RST C0

// Rung 7
// Address 30
STRN T1
ANDNE TA1 K0
AND X1
AND V2002 K5000
OUT Y0

// Rung 8
// Address 37
STR V2000 V3002
AND C0
STRN C0
OR T2
TMRA T2 K20

// Rung 9
// Address 45
STR T2
STRN C0
OR CT0
CNT CT0 V5000

// Rung 10
// Address 50
STR CT0
STR CT3
CNT CT3 K3

// Rung 11
// Address 55
STR CT0
STRN C0
CNT CT1 V5002

// Rung 12
// Address 59
STR SP1
ANDN CT3
LD V5000
SUB CTA0
OUT V4000

// Rung 13
// Address 64
STR SP1
LD V5002
SUB CTA1
OUT V4002

// Rung 14
// Address 68
END

// Rung 15
// Address 69
NOP


#BEGIN ELEMENT_DOC
"X1","","","WE HAVE AIR FLOW"
"X2","","","ELEMENT TEMPERATURE TO HIGH"
"X30","","TOUCH SCREEN","START CYCLE"
"X31","","TOUCH SCREEN","RESET CYCLE"
"X41","","TOUCH SCREEN",""
"Y0","","","HEATERS"
"Y1","","","CYCLE IS DONE"
"C0","","","START CYCLE"
"C1","","","RESET CYCLE"
"T0","","","PID LOOP 1 TIMER #1"
"T1","","","PID LOOP 1 TIMER #2"
"CT0","","","Minute counter"
"CT1","","","Hour counter"
"CT2","","","second counter"
"V2000","","","OVEN TEMPERATURE"
"V2002","","","ELEMENT TEMPERATURE"
"V3002","","","OVEN TEMPERATURE SET POINT"



#END
 
I find it hard to read your post, you have words missing. I think what your are trying to do is use one timer/counter instead of what you have.

Consider this: 2 hours=120 minutes=7200 seconds....so,

SP*3600=SP in seconds, move into a timer preset
now to do countdown you can do: SP(secs)-Timer(accumulated)=Time left

Hope this helps
 
kevin91172,

Try this

PLC 06

// Rung 1
// Address 0
STRN SP1
STRPD C100
STR C103
UDC CT2 V2002

// Rung 2
// Address 5
STR C102
ANDE CTA2 K0
ORPD C102
LD K60
OUT CTA2

// Rung 3
// Address 11
STRE CTA2 K0
PD C101

// Rung 4
// Address 14
STRN SP1
STR C101
AND C102
STR C103
UDC CT0 V2000

// Rung 5
// Address 20
END

// Rung 6
// Address 21
NOP


#BEGIN ELEMENT_DOC
"C100","","","1 minute tick"
"C101","","","minutes at zero OS"
"C102","process ""on""","",""
"C103","","","timer reset"
"CT0","hours","","hours"
"CT2","minutes","","minutes"
"CTA2","","","minutes accumulator"

#END
 
Milldrone,

I was not able to import it, I an error on line (50____)is not a legal instrution for the specified PLC type (58720258). In my code I have to put minutes in the minute counter or it won't work.. I would like to have the option not to and just need to put 2 hours in my hour counter and it loads remaining minutes in minute counter as the hour counter counts down. On my HMI I want a read like this.____ Hours Remaining(V4002)___Minutes Remaining(V4000)
 
Kevin,

Let me try again

On this version you will need to load the hours from the HMI into "CTA2" or "v1002"

PLC 06

// Rung 1
// Address 0
STR SP0
LD K400
OUT V700
LDA O2000
OUT V701
LD K0
OUT V703
OUT V704
OUT V706

// Rung 2
// Address 9
STRN T0
TMRF T0 K1000

// Rung 3
// Address 13
STR T0
LD V3005
BTOR
DIVR R4.095
RTOB
BCD
OUT V1400

// Rung 4
// Address 22
STRN T0
TMRF T1 V1400

// Rung 5
// Address 25
STR X30
SET C0

// Rung 6
// Address 27
STRE CTA0 K0
ANDE CTA2 K0
PD C5

// Rung 7
// Address 32
STR C5
RST C0

// Rung 8
// Address 34
STRN T1
ANDNE TA1 K0
AND X1
AND V2002 K5000
OUT Y0

// Rung 9
// Address 41
STR V2000 V3002
AND C0
STRN C0
OR T2
TMRA T2 K600

// Rung 10
// Address 49
STR C0
PD C2

// Rung 11
// Address 51
#BEGIN COMMENT
"This rung's purpose is to reload 60 minutes into the up down counter ( the actual "
"reloading is done on the next rung down)"
#END
STR CTA2 K1
ANDE CTA0 K0
PD C4

// Rung 12
// Address 56
#BEGIN COMMENT
" This rung loads 60 minutes into the up down counter"
#END
STR C2
OR C4
LD K60
OUT CTA0

// Rung 13
// Address 60
#BEGIN COMMENT
"Kevin,"
""
"This rung is for the minutes"
""
"do not use address ct1 or address cta1 as these are part of ""CT0"" "
#END
STRN SP1
STR T2
STR C1
UDC CT0 V5000

// Rung 14
// Address 65
STRE CTA0 K0
PD C3

// Rung 15
// Address 68
#BEGIN COMMENT
"Kevin,"
""
"Load the hours into ""CTA2"""
""
"Do not use address ""CT3"" or address ""CTA3"" as these are part of ""CT2"""
#END
STRN SP1
STR C3
STR C1
UDC CT2 V5002

// Rung 16
// Address 73
STR SP1
LD CTA0
OUT V4000

// Rung 17
// Address 76
STR SP1
LD CTA2
OUT V4002

// Rung 18
// Address 79
END

// Rung 19
// Address 80
NOP


#BEGIN ELEMENT_DOC
"X1","","","WE HAVE AIR FLOW"
"X2","","","ELEMENT TEMPERATURE TO HIGH"
"X30","","TOUCH SCREEN","START CYCLE"
"X31","","TOUCH SCREEN","RESET CYCLE"
"X41","","TOUCH SCREEN",""
"Y0","","","HEATERS"
"Y1","","","CYCLE IS DONE"
"C0","","","START CYCLE"
"C1","","","RESET CYCLE"
"C2","","","start cycle OS"
"C3","","","""0"" minutes OS"
"C4","","","1 hour or more left and minutes counter just went to zero OS"
"C5","","","""process timed out"" OS"
"T0","","","PID LOOP 1 TIMER #1"
"T1","","","PID LOOP 1 TIMER #2"
"T2","","","minutetimer"
"T3","","","do not use this address "
"CT0","","","Minute counter"
"CT1","","","do not use this address"
"CT2","","","Hour counter"
"CT3","","","do not use this address"
"CTA0","","","count down minutes accumulator"
"CTA2","","","count down hours accumulator"
"V2000","_v2000","","OVEN TEMPERATURE"
"V2002","_2002","","ELEMENT TEMPERATURE"
"V3002","_v3002","","OVEN TEMPERATURE SET POINT"

#END
 
Ok how about stratching the minute/hour counters,using one timer accumulater to preset 72000.But I still have problems on my hours/minutes remaing on my HMI.Tak a look at this tangling of code!and what format should I use on my numeric entry on my HMI Unsigned decimal or BCD ?
 
Hey looks good but has a mistake on line 176 of illegal instrution and can not import it.Where is line 176?No mistake jumps out at me

Apparently you are not importing the files correctly. You must set your PLC type to DL-06 before importing the text. I was able to "Insert Instructions from File" for Mildrone's last program and did not get any error messages. Here are the DL-06 files saved in a ZIP version.
 

Similar Topics

Hello, I am trying to setup on plc so If I enter 60 jph (job per hour) it will send the vfd hertz based on what jph is entered by...
Replies
2
Views
152
Hi team, I am setting up my first E200 overload unit. I came across parameter 205 StartsPerHour. The default setting is 2. I presume, the motor...
Replies
2
Views
490
Hello, I have inherited an old machine with a PLC unit that needs to be reset after a batter replacement. I don't know what I'm doing! Here's...
Replies
5
Views
1,027
We have 6 pumps for which we calculated running hours from run feedback. We need to start these pumps based on demand in auto sequence for a day...
Replies
4
Views
1,546
HELLO i am working on a logic in which i have to record number of hours a DI bit is enabled and record it to vijeo citect 7.4. in simple words i...
Replies
3
Views
2,266
Back
Top Bottom