Beginner

Thread Starter

fyD

Hey! I'm someone in college who has been enrolled in a plc program and what we have done so far I've really enjoyed and I would genuinely love to learn a lot more about it. I don't currently have my own plc (working on it) but I have been playing around with the digital Allen Bradley 850 in CCW. If anyone would be willing to just talk about plcs I would be so down because I'm just tryna learn as much as I can and I just have such a genuine interest in this!
 
Welcome to the forum! We're generally a lot better at answering questions than lecturing. Take a look at the tutorial on the site and ask for clarification of the things you don't understand.
 
You do not really need a real PKLc if your programming software has a simulator, although there is nothing like seeing flashy lights actually doing something.
substitute the inputs with internal bits then write a seperate program block that simulates the real world for example a simple pick & place robot that has two axis, a down/up, forward/reverse, a gripper & two nests one for picking a part up, one for placing the part down. so you write your program in a program block, write a program block that simulates the actions to manipulate the inputs.
so you have two program blocks, one for the actual control code & one that simulates the the inputs.
An example:
Assume each pneumatic cylinder has two sensors i.e. up/down, back forward.
The steps are as follows
Cylinder 1 up & cylinder 2 back (start position)
Part placed in pick nest (sensor to detect part)
Cylinder 1 energises down.
When cylinder 1 down, grap part.
Cylinder 1 up.
When cylinder 1 is up (sensor)
Energise cylinder 2 forward.
When cylinder 2 is forward (sensor)
Send cylinder 1 down.
When cylinder 2 down (sensor)
Release gripper,
Send cylinder 1 up
When cylinder 1 is up (sensor)
Send cylinder 2 back
When cylinder 2 is back wait for another part.
In the simulation block
Use the substitute inputs (internal bits) to create the simulation as below
When cylinder 1 is told to energise down, i.e. output x start a timer, when timer up set the cylinder sensor down bit, do the same for the up i.e. reset the down sensor & after a time delay set the up sensor bit, this simulates the real world actions.
So the simulator program block uses timers to control the simulated inputs (the reason for using internal bits is that in most PLC's real inputs cannot be forced).
The timers in the simulation can be adjusted to effectively slow down the operation so it is easy to see the operations helpful when trying to debug a program.
Some simulators have these functions where you can manipulate inputs with time delays, however, I find that some are a little limited & can take longer to setup than writing your own.
 
Here is a simple process. The draw conveyor carries coils and moves from right to left in the video; its motion alternates with the unloader conveyor dividers hanging from above that slide the coils from left to right i.e. perpendicular to and off of the draw conveyor.

There are three discrete inputs
  • draw_home_px - the draw conveyor index paddle (proximity sensor), when the coils on the draw conveyor are in line with the unloader conveyor dividers
  • unload_home_px - the unloader conveyor home position paddle (proximity sensor) is active when the dividers are at a point where the unloader conveyor can stop and the draw conveyor and move the coils in between the unloader conveyor dividers
  • unload_decel_px - the unloader conveyor deceleration paddle (proximity sensor), is active for a brief time just before the unloader conveyor home position paddle goes active, to tell the process when to start decelerating the unloader conveyor VFD so it can stop at the home position
All of those inputs are repeating signals i.e. each will transition between inactive and active many times in one complete cycle of the entire conveyor, but once for each coil on the conveyors.

There are three discrete outputs
  • draw_cv_run - the draw conveyor run signal, to tell the draw conveyor VFD to move the coils
  • unload_cv_run - the unload conveyor run signal, to tell the unload conveyor VFD to push the coils off the draw conveyor
  • decel_unload - the unload conveyor decelerate signal, to tell the unload conveyor VFD to slow down so the unload conveyor will not miss the home position paddle
The process runs through these steps
  • assuming the unload conveyor is at its home position, index (move) the draw conveyor by one home position, to put a new set of coils in line with the unload conveyor dividers
  • once the draw conveyor reaches its home position and stops, index the unload conveyor three times, each time by one home position to move a coil off the draw conveyor
    • the index motion is controlled via feedback from the unload paddles
      • initially, the unload home paddle will be active and require the VFD to move the unload conveyor (output unload_cv_run output value will be written as 1; decel_unload output value will be written as 0) while that home paddle is active until it goes inactive
      • the VFD will continue to move the unload conveyor at full speed until the decel paddle goes active, at which point the decel_unload output value will be written as 1 while the unload_cv_run output value will remain written 1
      • the VFD will continue to move the unload conveyor at reduced speed, and the decel paddle will go inactive
      • the VFD will continue to move the unload conveyor at reduced speed, and eventually the unload home paddle will go active, which will stop the unload conveyor (unload_cv_run and decel_unload output values will both be written as 0)
      • that completes one index of the unload conveyor.
    • each index of the unload conveyor lasts about 2.6s to move from one Home Position to the next Home Position
    • the first index of the unload conveyor must start as soon as the draw conveyor reaches it home position and stops
    • the second index of the unload conveyor must not start until 4.2s after the first index started
    • the third index of the unload conveyor must not start until 4.2s after the second index started.
    • so the unload conveyor will pause for about 1.6s twice, once between the first and second indexes, and once between the second and third indexes
    • there is no pause after the third index; the process should repeat from the start with the next index of the draw conveyor.
    • the three unload conveyor indexes will typically complete in about 11s (4.2s + 4.2x + 2.5s), but there should be a timer that stops the process if the third index is not completed within 15s of the draw conveyor finishing its index i.e. reaching a new home position
A trend of the unload conveyor's three index set is shown below (the draw conveyor signals are not shown).
  • The horizontal axis is time
  • The vertical axis is unloader position for the blue line, and offset 0-1 values for the discrete inputs and outputs
  • the blue line is the unload conveyor position from the last home paddle activation
    • It starts at 0 and increases until it hits the next home position, at which point it resets to 0.
    • the blue line is a modeled unload conveyor position, there is no analog input signal for position of the unload conveyor
  • the gold line is the unload home paddle input; it is 1 when the unload conveyor is at a home position
  • the green line is the unload decel paddle input; it is 1 when the unload conveyor is approaching the home position, but returns to 0 before that home position
  • the green line is the unload VFD run output; when it is 1, the unload conveyor moves; when it is 0, the unload conveyor stops
  • the magenta line the unload decel output; when it is 1, the unload conveyor decelerates to some low speed.
This is an actual process, but it is simple enough (almost 100% relay logic only) to be tackled by all but the most rank beginners. It involves contacts, coils, counters (or integer values), and timers.

There are several approaches to implement this control system, and I would encourage anyone to try as many as they can think of in order to find the one that is the most clear and easily understood. It can be done with about half a dozen rungs and 2-3 dozen instructions and so-so clarity; it can also be done with less but clarity suffers; it might be possible to do it with more but still improve the clarity. I have a feeling I am missing an approach that would be both very simple and very clear.

unloadX3_drawX1_plot.png
 

Similar Topics

Post: Hi everyone, I’m pretty new to PLCs and industrial automation, and I’m trying to figure out the best way to get started. I’ve seen a lot...
43
Replies
2,644
Views
I have a powerflex 525 reset to the factory settings. Then I wired a normally closed switch from terminal 11 to terminal 1. with a jumper to a...
16
Replies
1,279
Views
Hi everyone, I'm new to the PLC world and currently learning step by step alongside my friend, who is a PLC programmer. I come from a mechanical...
5
Replies
851
Views
Interested getting into learning PLC. Thinking of getting factory I/O and a beginner and budget friendly PLC to start. Not sure what PLC to get do...
3
Replies
731
Views
Is there a site or repository with project examples of Siemens TIA S7-1200? Or just any good resource to learn to program the S7-1200. I have...
9
Replies
3,997
Views
Top