pausing a program

csides

Member
Join Date
May 2003
Posts
2
I am still working on my first ladder program and I am trying to find a way to stop execution when a certain input relay is activated. Mainly I need a way to pause my timers and counters without losing their values, my plc however (Keyence KV-16AR), does not have retentative timers.
 
The classic method to create a retentive timer in a PLC that doesn't have them is to copy the timer ACC value to a holding register when the enabling logic for the timer goes false, then copy the holding register to the timer ACC when the enabling logic goes true. Be sure to use one-shots to trigger the copying, and be sure to add reset logic to drive the holding register to zero.

BTW, a semantic point is in order here. You don't pause your PLC program, you pause your sequence. If the PLC program isn't running, then it's not controlling your sequence.
 
Last edited:
I have just been talking about same problem with Mit the cheap FX range. I have found it needs two data rather than one.

---| |----|----------(T1 k5000)---
x1 |
|------[mov t1 d1]------
|
|------[mov d1 d2]------
Time is stored in d2 but one would expect it to be stored in d1 also but when x1 switches off d1 goes to 0 but d2 is held. I use it to measure the speed of a convayor so it will auto adjust using DIV command to give a set distance down a tray before it pours but I got idea from Mit book on how to retain a time using mov again when it restarts to set T1 to part way through its time.

Hope that helps Eric
 
Ya what Steve said!! You need to keep the program scanning.

Another way to do the timer thing would be to run a time-base timer to key the save. For instance, your looking to see one second events so you make a timer that free runs and resets once a second. Use the DONE bit for a rising edge and have that incrument your register until you get the amount of seconds you need then do what ever logic you want and clear the register. Sorta like this:

A out (if your output is on)
R out (turn it off...this makes your output one shoot)

An = timer (if your incrument timer isn't done)
end (end here....Else)

L +1 (get a value of one)
L accu (get the regester holding the time)
+I (add them up)
T accu (save)
L target (get the value you are counting to)
< (if not there yet)
BEC (end here...else)
S out (set your output to on)
L +0 (get a zero)
T accu (clear your holding register)

The L's are loads, the T's are transfers, S is a set and R is a reset. This can all be done in Ladder logic...I just don't know how to represent ladder in this forum.

Lenny
 

Similar Topics

I am using LogixPro Sim. and cant seem to get my program to pause then resume at same point, it always starts at the beginnig of program. Any...
Replies
4
Views
1,274
For practice I am writing some code. In this code I want to be able to press a button and "Pause" the execution of the PLC until I press a...
Replies
17
Views
18,466
There was no great way to describe the behavior this temperature input is demonstrating, so I attached a video. It ramps, then hesitates, then...
Replies
17
Views
5,237
At issue: I'm trying to get multiple trends to pause (and also hopefully navigate) at the same time from one set of buttons on a display. This is...
Replies
0
Views
1,199
Hello, To make it short, the current system setup is a compact logic with a high speed counter 1769-HSC input module reading pulses from a flow...
Replies
12
Views
1,955
Back
Top Bottom