Program Critique request

PCS1

Member
Join Date
Dec 2008
Location
Flint, Michigan
Posts
9
Anyone out there with Automation Direct DirectSoft 5 experience willing to give a "look over" of a TOTAL NEWBIE's first stages of writing a PLC ladder logic?

Disclaimer should be obvious, but let me bolster it with this thought/fact.
"I have no idea what I am doing. Sure wish the boss would have providing a training class"


If you would like to critique this fine work and offer some pointers (other than "Take a class"), I'd be glad to send you the prj file and any other details that would help you understand the purpose of the program.

email me direct if interested.
Thanks, Dave
[email protected]
 
PCS1,

Just zip it up and attach it to your reply to this post. Be sure to include all the files not just the .prj file. For example .ESX, .LCD, .LCX, etcetera, etcetera. A description of the "process" will be necessary also.

I challenge you to find a post that ridiculed someone for trying.

Edit: Trying to get their homework done for free does not count.

Oh! And welcome to the forum!
 
Last edited:
Hopefully this compressed folder is correct and what is needed to review program.

The basics of the machine are this (and yes a picture is worth 1000 words).

The basic operation of this machine is to move packages through a series of holding stations until they get to the human operator who does nothing more than unbundle the package, move the contents to a washing line and then transfer the top and bottom pallet of the package to a transfer line.

There are three zones/lines. The first and last have six stations. The second has three stations. Each zone has it's own carriage to move the packages from station to station.
It has a lift cylinder that raises the carriage with the package, then a servo motor to move it to the designated station. It can only move to the next available open station.
Once there, the cylinder retracts, dropping the package in that station until the next move.

The carriage is free to go to another station and move other packages along at that point.

There are proximity switch sensors at each station which will tell the PLC at which location the carriage is at.

There are also photoswitches that tell the PLC when there is a package in a station so you know when a station is full or empty and if a new one has arrived at station 1.

I'll focus on zone 1 which is what I have written so far (some instructions for zone 2 were included).

Station 1 is where a fork truck will deliver
the dunage (or package). Station 6 is at the end of the
line/zone and where a person removes pieces from the package and places them into a washer. The top and bottom
of the package (the trays if you will) are then moved to zone to to be transferred.

The priorities for the zone are thus:
1. If Station 6 is empty, get a package moved there asap
2. If a new package arrives in Station 1, go get it and move it in sequence to the next open station
3. If station 6 is full then shuffle the other packages along the zone so that they are stacked in sequence as close to
station 6 as possible and leave station 1 open so a new package can be delivered.


What I wrote out is single rungs with no grouping of conditons
that could be grouped because of either a common output or a common input.

I also do NOT cover ever possible situation.

There should be time enough to allow the program to do the shuffle routine (keeping stations 2 - 5 loaded contiguously) without always dropping everything to satisfy station 6 being empty or 1 being full immediately.

In the compressed attachment is also the addressing scheme for the plc with description, so the program will make more sense.

I don't expect you or anyone to spend a lot of time on this, I know there are things missing, but what I don't fully know is
what I don't know. SO I am hoping experienced people can say, "you need to have such and such in place before it will work" or "looks good keep going" or maybe - " give up, hire an expert"

There are also things that have not even been considered yet - like what happens when an Emergency Stop button is pushed and how to recover from that?

And interfacing to a Uticore screen (another "what is that?" for me).

So enjoy, and don't worry about offending me. I literally have NO experience in any of this, all I have learned was gleaned from Online tutorials, which are nothing more than ads for formal training - something I desparately need if I am to become productive in this new arena.

Cheers.
Dave (PCS1)
 
PCS1,

This looks like a cool project! I think there are several members of this forum that wish they were in your shoes, me included.

Does the carriage need the precision or speed of a servo? Are the mechanicals already in place?

I don't expect you or anyone to spend a lot of time on this,

Don't worry, I do this at lunch and break time.

Edit: Here is an example of this forum helping someone who had never worked with a PLC before. As you can see Paula's willingness to do the work was essential to getting help from this forum.
http://www.plctalk.net/qanda/showthread.php?t=11015&page=1&highlight=learning
 
Last edited:
The mechanicals are in place, most of the wiring is run, the actual photoswitches and prox switches have not arrived to hook up. The Opticore (sp?) touch screen needs to be coded.

Besides finishing the programming and debugging, there is communications to a touch screen and programming of servos to be done.

Now be aware that I am pretty much parroting back what I have heard from our floor mechanical guy. I have never laid eyes on any of this equipment let alone know how to make it work with each other.

But I am glad you and possibly others are envious to be in my shoes. Although I suspect it is because what I am describing is on the basic side of things compared to what you normally deal with and therefore you could write this program while watching re-runs of I love Lucy and never take your eyes off the TV.

The other question I have (and you would see why when looking at the program outputs) is this: How do I "group" or "combine" my binary outputs so that as a combination they give the servo the right command.

For example, 'A' = stop, 'B' = go, but outputs A+B = move from station 1 to station 6.. If it reads my outputs separately you can see the obvious problem.
 
The other question I have (and you would see why when looking at the program outputs) is this: How do I "group" or "combine" my binary outputs so that as a combination they give the servo the right command.

One issue with PLC outputs is you should only have one output for each address. If you have multiple outs for an address the last rung with that output is the winner. So If you had "Y0" in six places as outputs in the ladder, Only the last one would decide whether it was on or off.

So what programmers do in that situation is use internal bits. In the case of Direct soft, "C" bits
multout.jpg
Then in another rung
anotherrung.jpg

Ooops! I used Y0 in the pic and I should have used Y12. But you get the idea.

I am glad you and possibly others are envious to be in my shoes.

With some of us it's a disease. To the systems integrator types it's a job. To the students, it's well, they are just lost. To the end user types all I can say is some of us are infected.

Although I suspect it is because what I am describing is on the basic side of things compared to what you normally deal

Oh no. This would be something I have never done before. But if I get into trouble someone else will step in and get it right.

If you read the thread "learn by doing" then you will see that there were many contributors.

I have a question. If a load was just placed at station #6 by a forklift, and there are loads in 2, 3, 4, 5, can the carriage place the load at station #1 without disturbing the stations in between? Or is this what you meant by "shuttling" That the load in #2 must be moved to #1, and the load in #3 must be moved to #2 ect. ect.? And finally the load at #6 can be moved to #5?
 
Hmmm.
After looking at the notes on the snapshots, I think I need to describe more of what I *thought* I was trying to do with these rungs. (These are two separate rungs in the picture you captured). The first is to direct the carriage from station 6 to station 1.
The next is to direct the carriage from station 1 to station 5.


The first output That was Y12 is a command that is input slot C on the servo. which means move from position 6 to 1

The other rung that had Y12 as well is to operate in
combination with Y10 to give a different command to the servo.

Y10 is servo input A and when added to Y12 (servo input C) creates command AC which is - move from position 1 to 5.

So what I am looking to avoid is what you described where it looks at the last entry of an input to the command (as stand alone) and then acts on that command alone. I need a way to make Y10 (A) and Y12 (C) combined to make the PLC output read as an A+C input to the servo so it does the actions ascribed. In theory.

What I am finding out however is my theory is not PLC reality.
So are you aware of anyway to do this 'combining' output signals as I describe?

Thanks for any direction.
 
Hey, I revamped my rungs to separate the lift function, move function, and lower cylinder function into separate rungs and outputs. Now would this work better, keeping in mind that to have both Y10 and Y11 outputs in conjunction equals a specific move command, where as if I only had Y10 (or Y11) On it's own it would be a different move command.

see attached image of the separated rungs.

ScreenShot006.jpg
 
The other question I have (and you would see why when looking at the program outputs) is this: How do I "group" or "combine" my binary outputs so that as a combination they give the servo the right command.

For example, 'A' = stop, 'B' = go, but outputs A+B = move from station 1 to station 6.. If it reads my outputs separately you can see the obvious problem.
PCS1,

I realized on the drive home last night that I left out some details of how to do this.

The spreadsheet that you also attached has the matrix that we will apply the internal bits to the outputs that will control the servo.

There is one point I am not clear on. You said

There are three zones/lines. The first and last have six stations. The second has three stations. Each zone has it's own carriage to move the packages from station to station.
It has a lift cylinder that raises the carriage with the package, then a servo motor to move it to the designated station. It can only move to the next available open station.
Once there, the cylinder retracts, dropping the package in that station until the next move.


The carriage is free to go to another station and move other packages along at that point.

It might be just me but I'm having trouble with understanding the sequence.

Correct me if I'm wrong on the priority sequence.

1. All the stations are empty.
2. The forklift places a load at station #1.
3. If the carriage is not at station #1 it needs to go to station #1
4. Here is where I run into trouble. Does the Y0, RAISE lift Cylinder Solenoid need to activate at this point?
5. Run servo to station #6.
6. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
7. Forklift places a load at station #1
8. Run servo to station #1
9. RAISE lift Cylinder Solenoid?
10. Run servo to station #5
11. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
12. Now station #6 is empty.
13. Run servo to station #5
14. RAISE lift Cylinder Solenoid?
15. Now the fork lift places another load at station #1 (ignore this until the carriage has placed the load at station #6)
16. Run servo to station #6
17. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
18. Run servo to station #1
19. RAISE lift Cylinder Solenoid?
20. Run servo to station #5
21. Meanwhile, there is another load at station #1 (ignore this until the load that is on the carriage is placed at station #5)
22. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
23. Run carriage to station #1
24. RAISE lift Cylinder Solenoid?
25. Run carriage to station #4
26. Meanwhile, there is another load at station #1 (ignore this until the load that is on the carriage is placed at station #4)
27. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
28. Run carriage to station #1
29. RAISE lift Cylinder Solenoid?
30. Run carriage to station #3
31. Meanwhile, there is another load at station #1 (ignore this)
32. Ooops! station #6 is empty continue servo run to station #3
33. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
34. Run carriage to station #5
35. RAISE lift Cylinder Solenoid?
36. Run carriage to station #6
37. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
38. Run carriage to station #4
39. RAISE lift Cylinder Solenoid?
40. Run carriage to station #5
41. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
42. Run carriage to station #3
43. RAISE lift Cylinder Solenoid?
44. Meanwhile, there is another load at station #6 (ignore this)
45. Run carriage to station #4
46. Zone 1 Carriage, LOWER lift Cylinder Solenoid?
47. Run carriage to station #1
48. RAISE lift Cylinder Solenoid?
49. Run carriage to station #3
50. Zone 1 Carriage, LOWER lift Cylinder Solenoid?

Have I got this correct?

Priority rules:
1. The station with the highest number has priority.
2. All loads are "shuffled" down to the highest station number.
3. The carriage cannot move one load past another load.

Have I got this correct?

Question: Does the carriage servo need to run at different speeds, loaded, unloaded? I do not see any spreadsheet listing for this. Depending on how the program works out this might be hard to change later.

Last question for now: I'm concerned about the entire scope of this project. Something just does not add up. Some one has put together an I/O list with a servo matrix inputs. Generally this list is not considered by newbies. I cannot put my finger on what does not seem right. I get the feeling something has been left out of the description of the project.

Edit: I see you have posted after I wrote this (but I did not have a chance to post a reply). I will try to address your concerns later. The answer is at the top of my post but it may not make sense to you. I have to go back to work now!
 
Hello Vaughn,
We are starting an empty zone with carriage in station 6 (as if last delivery of the day was there) or possibly the homing position which would be station 2, so that station 1 would be empty of the carriage and fork truck can deliver unincumbered.

We are assuming that delivery to station 1 with the carriage present and lift in retracted position would not cause a problem, but at the same time, planning for errant or careless drivers :(

Thanks,
Dave
 
PCS1,

There appears to be quite a few "holes" in your servo move matrix. Is there a "command acknowledge" from the servo? Do the "binary signals" need to be on for the entire move? I see there is a servo stopped command. Does this mean the servo has reached the commanded position? does it mean the servo is not powered?
 
Thanks Vaughn,
All things I didn't think about and didn't even know I had to think about. As well, I don't know what most of this means.
So I need to do some research.

At this time a slightly modified version of what you see has been sent off to some contracted experts to use as a starting point (if practical) to creating a workable program.

So we'll see what they come back with. Anxious to learn from what they develop.

But as a more basic question I have, does my approach even make sense?

Also, am I correct to use X0, X1, ETC. AND Y0, Y1, Y.... as my input and Outputs? (as I have seen the use of C0, C1 for outputs - and I just don't have enough understanding of the differences).

Thanks for all your interest and help thus far. I will try to post status and updates as we progress with the experts.

Thanks again,
Dave (PCS1)
 

Similar Topics

Was wondering if i put a program from logix Pro on here you guys would give to Crtitical Feedback on my programs. I just want to know if my...
Replies
5
Views
2,478
Hi, I am new to ladder logic. I have completed a code in the Xinje PLC XC3-32RT-E for one of the machines I am developing. Currently the program...
Replies
5
Views
94
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
136
I can't seem to get the Panel View Plus 7 standard edition to downgrade to V_11, when I check the AB downloads and compatibility websites for this...
Replies
1
Views
93
Hello all, I have an ABB PLC (PM573) and it has without MC card. I need to take backup from PLC to PC (in automation builder v2.7 ). My...
Replies
5
Views
158
Back
Top Bottom