Machine Control Logic

jthornton

Member
Join Date
Jul 2002
Location
Poplar Bluff, MO
Posts
295
I am working on some machine control logic. I have tried to confuse or fool the logic with the inputs and think that I have it bullet resistant. I have tested it with the start button staying stuck after it is pressed etc. Can anyone see any thing that I missed or might improve on?

The Flow Chart is:
packflow.jpg


The descriptions of each fucntion is:
packfun.jpg


The Ladder Logic is:
pack01.jpg

pack02.jpg

pack03.jpg


Thanks
John
 
Please ignore the typo on the rung 4 comment. It should be:
"When Function 2 M is On and Startup Error Bit is Off or Function 4 M is On and Stop Button is Off (pressed in) initiate Transition 3 M"
 
I know you are attempting to learn more about PLC's but may I ask what is the purpose of this bullet resistant logic?
 
rsdoran said:
I know you are attempting to learn more about PLC's but may I ask what is the purpose of this bullet resistant logic?

This is the main logic for a case packer that I designed and built. It takes the product boxes and inserts them into a master case. This part of the logic just puts it into the auto mode or takes it out of auto and does the startup checks when power is applied.

Thanks
John
 
Nice first sequencer.

You could use some better annotation. Clarifying what you are trying to do by clarifying what you are calling something is one key to success.

Terry posted an excellent <strike>rant</strike> <strike>diatribe</strike> essay on naming techniqes, at THIS LINK.

It looks like you're using a simple sealing sequencer (if you change F1_M to ON_STEP_1, F2_M to ON_STEP_2, etc., and T1_M to GOTO_STEP_1, etc.

When doing sequences like that, I include the step number as well as the transition from that step in the "set" condition logic:

ON_STEP_X TRANS_FROM_X TRANS_FROM_Y ON_STEP_Y
----+----| |---------| |-----+------|/|------------( )
| |
| ON_STEP_Y |
+---| |------------------+



.
while you just have

TRANS_FROM_X TRANS_FROM_Y ON_STEP_Y
----+------| |-----+------|/|------------( )
| |
| ON_STEP_Y |
+-----| |------+



.
Instead, you put that condition on the Transition coil. That's OK. It's mostly a stylistic difference. Logically they are about the same thing. But there are two advantages to doing it my way:

First, it makes it easier to follow the order of the sequencer when it's jumping around. I would be able to tell that you can get to step 3 (Red Light) from either step 2 (Wait for Start) or step 4 (Running), without having to go to the transition logic.

Second, it allows you to reuse transition conditions. It's not important in this example, but it can get redundant to do the same "Is tank pressure < 0.5 PSIG" test for half the transitions in a sequence.

One thing I see is that once you check for safties on startup, you aren't checking for them again. I would expect that at any time a safety is lost, you go to step 2 (blink red light). At least from step 3 (Red light). That's just a guess. Without knowing the specifics of the machine, I'm only speculating.

Your flow chart is fine, but a better way of describing the process is with a sequential function chart (SFC).

Startup
|
-+- T1_M
|
+---+---+
| F1_M |
+---+---+
|
-+- T2_M
|
+---+---+
| F2_M |
+---+---+
|
-+- T3_M
|
|<-----<-----+
+---+---+ |
| F3_M | |
+---+---+ ^
| |
-+- T4_M |
| |
+---+---+ ^
| F4_M | |
+-------+ |
| ^
-+- T3_M |
| |
+------>-----+



It says the same thing, without all the looping back to the same step on the No of the decision trees. The pointer can't leave a box until the transition condition is met.
 
Allen Nelson said:
Nice first sequencer.

You could use some better annotation. Clarifying what you are trying to do by clarifying what you are calling something is one key to success.

Terry posted an excellent <strike>rant</strike> <strike>diatribe</strike> essay on naming techniqes, at THIS LINK.

Thanks for taking the time to comment on my efforts. I really do appreciate it. The link was very informative.

Allen Nelson said:

It looks like you're using a simple sealing sequencer (if you change F1_M to ON_STEP_1, F2_M to ON_STEP_2, etc., and T1_M to GOTO_STEP_1, etc.


It makes more sense reading the code when I change the Symbols to ON_STEP_1M and GOTO_STEP_2M. What do you mean by "simple sealing sequencer"? Is that the type of code that I have or the machine?
Inquiring minds want to know....

Originally posted by Allen Nelson
One thing I see is that once you check for safties on startup, you aren't checking for them again. I would expect that at any time a safety is lost, you go to step 2 (blink red light). At least from step 3 (Red light). That's just a guess. Without knowing the specifics of the machine, I'm only speculating.

What I am doing is to check that the cylinders are in the home position (the air is on, no hoses reversed, the MRS on the cyclinder is working at least on one end, etc.) and that the buttons are correct (the start button is not stuck on etc.) and that I am getting the correct logic back from the prox's and photo's (someone didn't cut the cable etc.). This is only done during startup just to make sure we at least start with everything proper.

That is a very good suggestion to reverify the the safeties on step 3. Two heads are always better than one...

Originally posted by Allen Nelson
Your flow chart is fine, but a better way of describing the process is with a sequential function chart (SFC).

Startup
|
-+- T1_M
|
+---+---+
| F1_M |
+---+---+
|
-+- T2_M
|
+---+---+
| F2_M |
+---+---+
|
-+- T3_M
|
|<-----<-----+
+---+---+ |
| F3_M | |
+---+---+ ^
| |
-+- T4_M |
| |
+---+---+ ^
| F4_M | |
+-------+ |
| ^
-+- T3_M |
| |
+------>-----+



It says the same thing, without all the looping back to the same step on the No of the decision trees. The pointer can't leave a box until the transition condition is met.

It looks like the SFC is a better way to get the BIG picture of the flow of the program. I like that.

When I tried your suggestion as to adding the "ON_STEP_1M" to the step logic I ran into a solution that I have not found yet. In the next message I will post the code.

Thanks a million Allen.
John
 
Allen Nelson said:

When doing sequences like that, I include the step number as well as the transition from that step in the "set" condition logic:

ON_STEP_X TRANS_FROM_X TRANS_FROM_Y ON_STEP_Y
----+----| |---------| |-----+------|/|------------( )
| |
| ON_STEP_Y |
+---| |------------------+



.
while you just have

TRANS_FROM_X TRANS_FROM_Y ON_STEP_Y
----+------| |-----+------|/|------------( )
| |
| ON_STEP_Y |
+-----| |------+



.
Instead, you put that condition on the Transition coil. That's OK. It's mostly a stylistic difference. Logically they are about the same thing. But there are two advantages to doing it my way:

First, it makes it easier to follow the order of the sequencer when it's jumping around. I would be able to tell that you can get to step 3 (Red Light) from either step 2 (Wait for Start) or step 4 (Running), without having to go to the transition logic.

Second, it allows you to reuse transition conditions. It's not important in this example, but it can get redundant to do the same "Is tank pressure < 0.5 PSIG" test for half the transitions in a sequence

Allen,

When I Inserted the step number into the logic what happeded was:
On scan 1 GOTO_STEP_1M came on which turned on ON_STEP_1M
On scan 2 GOTO_STEP_2M came on which turned off ON_STEP_1M.
On scan 3 ON_STEP_1M is off so the program stopped there.

I assume that I misunderstand exactly what you are telling me to do.

Here is the ladder showing 5 steps.

pack01a.jpg

pack02a.jpg


By the way it is much easier to read now using your suggestions for the symbols. You guys have been a great help in getting me out of the "brute force" method of programming that I learned over the years at the school of Hard Knocks University. When I got comfortable with Stages in Automation Direct PLC's at least I could group my code into blocks that made it easier to follow. I really feel sorry for the guy who has to work on the first PLC I programmed... Thanks to some resources on the web (collage level materials) that I am studying and help from guys here I am progressing to the next level.

Thanks
John
 

Similar Topics

Did any one have the logic diagram(or program code) to control Blocks Machine (Masa Group); the block machine consist of (one elevator then a...
Replies
0
Views
1,252
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
840
An outside contracting firm designed a machine for our company. There are several devices connected through Ethernet/IP. This includes a Panel...
Replies
4
Views
180
My boss has come up with the idea of renting machines and charging on a per use / per hour basis, so I'm looking into it - just getting my feet...
Replies
14
Views
3,912
please can you help me to find these screen for blowing plastic machine thanks
Replies
4
Views
1,579
Back
Top Bottom