Sequencing help for nooby

Chilltrans

Member
Join Date
Feb 2014
Location
West coast
Posts
32
I got a sg2-20 controller to handle operating a few relays on a machine I am building/modifying.

I'm new to ladder logic but not programming. I've got the basics and not much more.

The machine I am controlling extends pneumatic rods into a barrel, which is shaped very much like a revolver. The barrel houses 4 cylinders, and is turned, pneumatically via 24 volt relays.

There are sensors at both limits of the rod's travel for all 4 rods.

The cylinder turns pneumatically by activation of a relay, and enters the loading position when the relay is deactivated.

There is a sensor that verifies the cylinder is in a loading position. This sensor will switch off as the revolving cylinders moves. It will switch back on as the barrel is in a loading position.


My problem is in how to sequence the moving of theses rods in conjunction with the cylinder turning..

The process is as follows:

Verify all rods are in retracted position
Verify barrel is in parked position
Energize rotation of barrel solenoid
Verify barrel has moved away from parked position
De-energize barrel solenoid

Energize wrapper injector
Verify injector extended
De energize wrapper injector
Verify injector retracted

Extend candy fill #1 injector
Verify extended
De energize #2
Verify retracted

Etcetera for candy fill #2 injector


And a final wrapper injection

Go back to beginning and start over



Any and all suggestions would be appreciated as I don't have the experience to do this without some help. I've been at it a few days, and realize that this ladder logic is a little different than the programming I have learned....


Thanks
 
Any and all suggestions would be appreciated as I don't have the experience to do this without some help. I've been at it a few days, and realize that this ladder logic is a little different than the programming I have learned....


Thanks
Based on this comment I would suggest you check out the ONLINE TUTORIAL link at the top of this page. The PLC scan cycle trips up a lot of newcomers.
 
I have read them, and I read them again this morning.

The problems I have are related to the scan cycle. How do I program these things to operate sequentially when the entire ladder is read at every scan? The scanning process happens faster than any individual action that my machine is performing. A general overview of sequencing might be too complicated, as I found nothing related to the sequencing of individual actions in the tutorial.

I am not formally a student or in the automation industry. I need to get one Plc programmed and be able to troubleshoot it.

I would be happy to pay anybody who can get this programmed for me.. I'm not bent on learning this ladder logic intimately. I only have one project, and my goal is to complete the process of automating this machine.

Thanks again
 
The problems I have are related to the scan cycle. How do I program these things to operate sequentially when the entire ladder is read at every scan? The scanning process happens faster than any individual action that my machine is performing.
It may seem strange but that is exactly what's supposed to happen. The faster the PLC can scan and execute its program the more it appears that it is actually solving all the rungs simultaneously - so the machine smoothly does what is intended of it.

An odd comparison might be with a television system. The separate pictures comprising the image are printed on the screen so fast that the retentivity of the eye perceives it as a moving image.
A general overview of sequencing might be too complicated, as I found nothing related to the sequencing of individual actions in the tutorial.
No, the tutorial is intended only to put forth general concepts like addressing programming elements (input contacts and output coils), scanning inputs, processing, and turning outputs on/off. These things are just the building blocks by which a sequencer, or any other function desired, COULD be implemented.
I would be happy to pay anybody who can get this programmed for me..
That's exactly what a lot of people on this site do for a living. Perhaps this reply will attract the attention of one of those types and an arrangement can be worked out. Or, they may know of someone in your area who does such work. If no help appears that way I'd suggest starting a new thread explicitly stating that you're willing to pay for help to get a working system.
I'm not bent on learning this ladder logic intimately. I only have one project, and my goal is to complete the process of automating this machine.

Thanks again
Then getting someone who is knowledgeable to do it for you is the way to go IMHO. To become proficient at this takes time, which would delay the completion of the project. Good luck!
 
Two questions come to mind. Are you committed to the SG2 controller? Most people on the forum are most familiar with AB or Siemens. Could you attach a pic or link to a youtube video of a machine in action or make a simplified sketch and attach that? That would help a lot toward understanding your machine.
 
Last edited:
It appears that there are 8 models in the SG-20 line. Which one do you have? I hope it is one on the list below, because they have 8 or more Inputs. You will need at least 8 Inputs for the 2 sensors on each of the 4 rods, and probably 3 or 4 extras for Start, Stop, and stuff. Hopefully you have the SG2-20CR-D programmalble relay.

SG2-20KR-D = 8 DC Inputs, 8 relay outputs
SG2-20CR-D = 12 DC Inputs, 8 relay outputs

With a programmable relay, your program will be limited to simple logic.
 
Last edited:
Candy-Making Injector Barrel Controller from Chilltrans at PLCtalk.net

Inputs for the SG-20CR-D Programmable Relay

  • Injector #1 Retracted
  • Injector #1 Extended
  • Injector #2 Retracted
  • Injector #2 Extended
  • Injector #3 Retracted
  • Injector #3 Extended
  • Injector #4 Retracted
  • Injector #4 Extended
  • Cylinder Loading Position Sensor
  • Wrapper Injector Retracted
  • Wrapper Injector Extended
  • System On/Off Switch
The SG-20CR-D Programmable Relay base unit has twelve 24 VDC Input terminals.

Outputs for the SG-20CR-D Programmable Relay

  • Candy Fill #1 Injector Solenoid
  • Candy Fill #2 Injector Solenoid
  • Candy Fill #3 Injector Solenoid
  • Candy Fill #4 Injector Solenoid
  • Cylinder Rotation Solenoid
  • Wrapper Injector Extend Solenoid
  • System RUN Indicator Light
The SG-20CR-D Programmable Relay base unit has 8 Output relays.


I would be happy to pay anybody who can get this programmed for me.
I might take it on. When do you need it? How much are you offering?
 
Last edited:
And a final wrapper injection
What does "And a final wrapper injection" mean? Does each piece of candy in each injector get a beginning wrapper and a final wrapper, or what?
 
I think I got it figured out.

I'm putting each sequence behind a switch to turn on that event. When that event is on, no other rungs are on. When it completes, it turns its own switch off and turns on the switch for the next event.

I appreciate all of the answers. Of course. I might still have trouble......I'm sure my solution offers some unintended consequences, as is common with my limited experience in the matter
 
I'm putting each sequence behind a switch to turn on that event.
That will allow you to step through a program manually. But what happens when you are not THERE to flip the switches? (Hint: Use "Step" relays to step through the program just as if your hand was controlling each one, except let the PLC SET the next Step Relay, and RESET the current Step Relay.

I worked it out, and used 16 "M" step relays, for
Steps 1A, 1B, 1C, 1D
Steps 2A, 2B, 2C, 2D
Steps 3A, 3B, 3C, 3D
Steps 4A, 4B, 4C, 4D

where Numbers = Injectors 1 to 4, and A = Rotate, B = Wrap, C = Inject, D = Wrap again. I used 84 rungs, quite a bit more than needed in most PLCs due to the rung limits of only allowing 4 devices per horizontal rung. To determine if it is "OK to Rotate" takes 3 rungs, and to determine if it is Step 1A required a whopping 8 rungs!

This SG programmable relay has a "Shift" coil (S-type) that allows doing up to 8 sequential steps by shifting from one relay to the next, but I could not see how to use that to help with this problem with 16 steps. I suppose that two Shifts could be used in series to get the 16 steps, but then how it works would be hidden from the user and more difficult to troubleshoot.

I modified your description to allow easier dividing into 4 easy steps for each injector. I also attached a list of Input and Output assignments that I used. I ran my program on the built-in Simulator, and after 1 address correction, it worked great. A print-out to a PDF file is attached.
 
Last edited:
Checking it again in more detail, there were 2 additional errors (Reused Wrap 1 relays in Rungs 55 and 68 instead of Wrap 2). Here is the corrected version.

Chilltrans, if you find a way to use the SHIFT relays to step through the 16 steps, then I would be interested in seeing how that could be done with this program. I tried a version using SHIFT, but could not see any way to use one Pulse event (as the SHIFT relay uses), because every step in this program has a different trigger event.
 
Last edited:

Similar Topics

I'm new to the forum so first hi all. Ok I need some help with some fans that I'm trying to sequence. First I'm using a ABB PM573-ETH PLC...
Replies
30
Views
6,290
This is a great website! I have a vacuum lift that is going to be used to pick and place sheets of plywood. I am using RSLogix 5000. I have five...
Replies
8
Views
4,595
Anyone have any tips on a program that can stage on four discrete outputs one at a time based on a variable. These outputs must come on...
Replies
10
Views
5,172
Does anyone have sample logic with conveyors that start and stop according to product on the line?
Replies
1
Views
115
Hello, I am struggling to figure out some logic. I have an analog pressure sensor coming into the PLC and would like to have multiple timing...
Replies
4
Views
165
Back
Top Bottom