PLC help

engrgirl

Member
Join Date
Aug 2005
Location
new jersey
Posts
1
I thought I had a relatively easy PLC application, until I started programming for my first time.

The application is simple. A linear slide that moves left to right. On top, is a vertical actuator that moves up and down. The operation is to pick something up, move it up, then over, then down. Then the operation would reset itself for the next pickup.

Trying to program a Keyence KV40AR for first time. I have autoswitches on each side of the 2 cylinders. I thought that I could use those switches to signal the next step in the program, but it seems to be doing it all at once? So...I decided to use the PLC timers instead. Each operation is now timed to start one after the other - probably not the way to do it, but at least it works. Thing is, how to I get the program to repeat itself? It only works once - and that is it? Is there a funtion that will go back and start it all over again? Or perhaps reset the timers?
 
I have no knowledge of your PLC.
But it sounds like you need to reset your timers at the beginning of your ladder. That way the timers are always initialized at the start of each scan.

Wait, that's not right either!

Anyway you can convert your code to a .pdf and post it here?

Someone more knowledgable than I will answer

Rod
 
Start a counter at the end of your cycle, and increment by 1 each time the cycle completes. In your run-logic routine, compare your counter ACC to a pre-determined number of cycles, and it will be running consecutively unil that Counter has completed.
 
Engrgirl,

Your timer circuit can be made to be self-resetting. Add a NC bit from your last timer (or add another timer) that de-energizes (resets) the Start logic of your Cylinder Motion Control.

You were right on your first try. It is always best to use limit switches on the physical device to control the logic, if possible. Using timers only means that your controller is "dumb". The PLC does not really know what the cylinders are doing. In your case, the switches on the cylinders should be used. Typically, it make take a combination of switches and timers to control most circuits. In your case, your up/down cylinder starts and ends in the down position, so cannot use the "down" position only (by itself) as a control point. However you should be able to use the Left(?) end position switch as a "begin" switch, with proper programming. You can only use the cylinder Right switch as a control for the Up/Down if the motions are done in series and not in parallel (at same time), and then only if the cylinder needs to move far enough right to trip the switch. Even then, the switches should be used as Over-travel Limits in the program.

Make a simple flow diagram (sketch) of your physical devices, and print it to a PDF file, and upload it here. You will get more help than you ever imagined! :site:
 
Last edited:
This operation sounds like it would be a good candidate for stage programming using limit switches. The Keyence manual, if you have one, has pretty good instructions & examples.
 
I think engrgirl is having the same problem as Niles had in THIS thread... :nodi:

It doesn't matter what type of sequencing logic is used. There need to be an "I'm done" point in the cycle where you reset everything so it can begin again.

Grip
Gripped (or delay)
Move Up
Fully Up
Move Out
Fully Out
Move Down
Fully Down
Release
Released (or delay)
Note: This point is NOT the end of the cycle! You're not home yet.
Move Up
Fully Up
Move In
Fully In
Move Down
Fully Down
Now you're back where you started (home), so the next step is:
RESET SEQUENCE

🍻

-Eric
 
Eric,

I think you've hit the nail on the head. However I get the impression that the home position would be full up (over the initial pickup spot).

EngrGirl,

Does your Keyence have a durm function? This seems to be a stright through sequence, (no branching on the flow chart). It would be a good application for an event driven drum counter & make it real simple.
 
The software has a simulator function built into it, located up top near the download button. In the case of developing your programs you can use this to learn where you need to make program changes. Click on the simulator button once then the solid blue right arrow once, then one at a time double click on your inputs on the left side of the program. Observe the right side outputs. This way you can add timers and other outputs, etc. one at a time and kind of see whether they help or not. I find this feature invaluable. Oh I almost forgot, last time I checked they offered free technical help to their Customers, you can find that by going to their website, you can call them and ask specific questions concerning their PLC's and software (very helpful).
 
Oh I almost forgot, this is not to be confused with applying forces on line. The simulator feature is an offline programming feature, which you use when you are in the development phase of a project i.e. not connected to a processor. Thought I should clear that up.
 
All this talk of drum timers, all you need to do is this
set a memory bit at start perhaps a start button will set this
then use conditional logic like the following.
if start latch & in home position & part is present set memory bit step 1.
if step 1 clamp on
if part clamped set memory bit step 2, reset step 1
if memory bit step 2 & cylinder down & clamped set memory bit step 3
if step 3 cylinder up
if step 3 & cylinder up limit set step 4 reset step 3
& so on until back to home position then reset last step number
if cycle is to repeat then it will repeat starting at step 1
you could add timers in each step to give a little delay, these would reset themselves when the step flag enabling them reset.
stl type code
a start pb
a auto
s run

a stop pb
r run

a run
a cylinder down limit
a cylinder back limit
a grips open
a part in place
set step 1 (use this to control grip solenoid output)

a run
a step 1
a grip closed
set step 2 (use this to control Up solenoid)
reset step 1

a run
a step 2
a sol up limit
set step 3 (use this to control fwd solenoid)
reset step 2

a run
a step 3
a fwd solenoid limit
set step 4 (use this to control down solenoid
reset step 3

and so on
if you need to hold the steps then don't reset them until required
don't know the plc you are using so this is just an idea
 
A quick note on forces. I never use them and do not recommend using them.
I would never get a job commissioned without them. The other absolutely usefull feature I use is change timer/counter set point values and present values without having to go into online edit mode. So easy.
 
At long last, this is a real-world question about a classic process that I can use to illustrate the power of "Modularity" and rational process-control.

Or maybe, I'm simply, and finally, in the mood for doing so.

However... be aware... doing so is not easy work... "I'm workin' hard! It's hard work! I'm really workin' hard on this!".

Yeah, yeah, yeah,... so, OK... Maybe I'm on another really long vacation from the really hard work, or not. But I'm workin' while I'm on vacation... cuttin' back the sagebrush and whatever. This being on vacation stuff is hard work! Everybody knows that you always need a few extra days vacation from your vacation, after a vacation, before you get back to doin' the really hard work!

For those that might be offended... Choke on it! It is what it is!

Many of the earlier process questions (problems) were simply too grand in their extent. Or, maybe I was just too tired to fight against the flow.

At this point, I feel good about going through the effort of teaching the basics of Modularity. One has to learn the benefits of this in small steps and then learn to apply that learning to larger processes. This particular process provides a relatively simple way to describe the benefits of modularity.

I'm about half-way through developing the explanation.

Competent Programmers understand that the complete (or damned near complete) description of any process depends on an adequate description of the "Whats", the "Whys" and the "Therefores" of process activity.

The "Whats" are always the easiest things to explain and handle.

I'm gonna take the long road and in addition to explaining the "Whats", I will explain the "Whys", "Wherefores" and the "Therefores" associated with Modularity.

I hope that this provides, at long last, a general idea of what my idea of Process Development (in this limited respect) is all about.

Engrgirl...
Blow Off the timers... they are woefully inadequate in terms of real process control! You need to become more professional that that.

FLASH-ALERT...
Ooo, ooo, ooo, my wife just told me, this very minute, that the property that I've been wanting to buy for the last few years is finally available. We and the owners are personal friends and they would prefer to sell it to us rather than anyone else! Our debt would go up 50% but our holdings would go up 250%!

Ooo, ooo, ooo, I'm grabbin' my weiner! This is soooo coool!

Don't worry, if you might be so inclined, I'm still gonna follow through on this Modularity thing.
 

Similar Topics

I have a network with 4 PLCs PLC1 is controllogix and PLCs 2-4 are compactlogix and they all need to communicate. The current way I have this...
Replies
8
Views
223
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
99
Hi guys, I have no experience when working with AllenBradley PLC, but I hope someone could clarify the result of multiplication shown in the...
Replies
14
Views
2,132
To quickly test a plc output which is wired to a relay do I dob a cable between the output and 24vdc+ source I.e something with 24vdc+ live such...
Replies
6
Views
629
we have shihlin a1-20mr plc .now the plc show the program error indication due to battery train.i change the battery but till the error shown...
Replies
9
Views
826
Back
Top Bottom