Program Management, Timers, and Counters in Ladder Logic

Technology

Member
Join Date
Jan 2023
Location
USA
Posts
5
https://www.youtube.com/watch?v=zTOOYWMJg9M . Specifically see 1:46 to 2:11.

3. The Cell PLC is in constant communication with two other field devices; the Cell Robot and Conveyor PLC. The Cell PLC communicates with the Cell Robot through the RobotInputs and RobotOutputs registers. The Cell PLC communicates with the Conveyor PLC through the ConveyorInputs and ConveyorOutputs registers.
4. System I/O:
a. Inputs
i. X0 – Cycle Start Button
ii. X1 – Cycle Stop Button
iii. X2 – Emergency Stop Button
iv. X3 – Perimeter Fence Gate Closed
v. X4 – Package ready for pickup at conveyor #1
vi. X5 – Package ready for pickup at conveyor #2
vii. X6 – Package ready for pickup at conveyor #3
viii. X7 – Package ready for pickup at conveyor #4
ix. X8 – Exit conveyor #5 full
x. X9 – Exit conveyor #6 full
xi. X10 – Exit conveyor #7 full
xii. X11 – Exit conveyor #8 full
b. Outputs
i. Y0 – System Running Lamp (Green)
ii. Y1 – System Error Lamp (Yellow)
iii. Y2 – System E-stop Lamp (Red)
iv. Y3 – Robot Running Automatic Operation (Blue)
c. Robot Inputs (Cell PLC -> Robot)
i. RobotInputs0-2 - Pickup Conveyor Selection (3-bit signal)
ii. RobotInputs3-5 - Place Conveyor Selection (3-bit signal)
iii. RobotInputs6 – Cycle Start
iv. RobotInputs7 – Cycle Stop
v. RobotInputs8 – Pick and Place Complete Handshake
d. Robot Outputs (Robot -> Cell PLC)
i. RobotOutputs0 – Robot Ready
ii. RobotOutputs1 – Robot Busy
iii. RobotOutputs2 – Robot E-stop
iv. RobotOutputs3 – Robot Cycle Start Handshake
v. RobotOutputs4 – Robot Pick and Place Complete
e. Conveyor Outputs (Conveyor PLC -> Cell PLC)
i. ConveyorOutputs0 – Place location for Infeed conveyor 1
ii. ConveyorOutputs1 – Place location for Infeed conveyor 2
iii. ConveyorOutputs2 – Place location for Infeed conveyor 3
iv. ConveyorOutputs3 – Place location for Infeed conveyor 4
f. Conveyor Inputs (Cell PLC -> Conveyor PLC)
i. ConveyorInputs0 – Conveyor 1 is full
ii. ConveyorInputs1 – Conveyor 2 is full
iii. ConveyorInputs2 – Conveyor 3 is full
iv. ConveyorInputs3 – Conveyor 4 is full

Program Requirements:
1. Count the number of packages picked from each of the four conveyors, and count the number of packages placed on each of the four conveyors. The result of each of the eight counters should be stored in registers D0 – D7.
2. Set the appropriate ConveyorInputs bit ON when sensor bits X4 - X7 are ON, to signal to the Conveyor PLC not to send additional packages until the robot has unloaded the conveyor.
3. The sequence of operations is as follows:
a. Packages arrive at random intervals on the four incoming conveyors, setting sensor inputs X4 – X7 ON.
b. The Cell PLC program will call the robot to pick up the package and place it on the exit conveyor. Once the robot has completed the pick and place operation, the PLC program will loop and call the robot to pick and place the next package.
i. Set the Pickup Conveyor Selection bits to a value of 1-4 according to which conveyor the package is to be picked up from. The Cell PLC may unload the conveyors in any order.
ii. Set the Place Conveyor Selection bits to a value of 1-4 specified by the appropriate ConveyorOutputs register.
iii. The PLC will then set the robot Cycle Start output ON until the Cycle Start Handshake is returned from the robot.
iv. The PLC will set the Cycle Start output OFF.
v. The robot will set Robot Busy ON, then proceed to perform the pick and place operation.
vi. When the robot is finished with the pick and place operation, the robot will set the Pick and Place Complete signal ON.
vii. The PLC will then set the Pick and Place Handshake signal ON. When the robot subsequently turns the Pick and Place Complete signal OFF, the Cell PLC will turn the Handshake signal OFF.
4. Create an additional subprogram called “System Status Outputs” and add ladder logic that performs the following functions. Call the new subprogram on the first rung of the Main ladder logic program.
a. While cell is actively running automatic cycles, turn on output Y0.
b. While any exit conveyor is not ready to accept a package, turn on output Y1.
c. While the emergency stop button input is OFF, turn on output Y2.
d. While the robot is busy, flash output Y3 on a 500ms pulse interval (500ms on, 500ms off).


Store a running count of the number of packages picked and placed on all four conveyors together in register D10.



Any help will be greatly appreciated! Thank you so much!
(Note: we normally use the 'Do-more Designer' program if that helps.

Untitled.jpg
 

Attachments

  • Program Management, Timers, and Counters in Ladder Logic.revised.pdf
    233 KB · Views: 19
If you want help on a specific bit of logic, show your work in detail.

Posting your class assignment verbatim is more likely to result in a round of criticism about your personality and ethics than in someone doing your homework for you.
 
Posting your class assignment verbatim is more likely to result in a round of criticism about your personality and ethics than in someone doing your homework for you.

Some call it **** taking... :) LOL

I'll pitch in with some help though. You're going to have to use edge detection to count the number of packages.
 
I understand. My career is not in PLC, but in CADD. This course for my Mechanical degree, and many students are struggling. I also consider this to be really hard, as I'm not a coder. I just want to learn, and there's not many resources around including people to teach and help. Which is why I posted here. Even a start and an explaination would help. I know I'm taking up peoples time, but do trust when I say I want to learn.

If we all had to learn the hard way, we won't need a forum. This is why this is here, or at least is my belief. I just need more help then a regular. I recognize that, and am taking action in every possible way I know how.
 
Oh, bull. That's not "showing your work".

>not many resources around including people to teach and help.

If your class doesn't include enough lectures, textbooks, or instruction to get you further than "call a subroutine", then you need to drop that class and take it again when you have sufficient time to read the materials and analyze the project, or consider getting out of the program entirely because the institution can't teach the subject.
 
Oh, bull. That's not "showing your work".



If your class doesn't include enough lectures, textbooks, or instruction to get you further than "call a subroutine", then you need to drop that class and take it again when you have sufficient time to read the materials and analyze the project, or consider getting out of the program entirely because the institution can't teach the subject.

:ROFLMAO::ROFLMAO::ROFLMAO::ROFLMAO:
 
This course for my Mechanical degree, and many students are struggling. I just want to learn, and there's not many resources around including people to teach and help.

You don't need us then... you need a very good lawyer to bring your school to court over fraud.

Which is why I posted here. Even a start and an explaination would help. I know I'm taking up peoples time, but do trust when I say I want to learn.
If we all had to learn the hard way, we won't need a forum. This is why this is here, or at least is my belief.

The forum is here to help. Doing your homework is not helping, it's the exact opposite. Sure, it's also morally wrong in an academic setting, but the main point is that by doing this for you, you're the one being screwed even if it doesn't look like that now.

I just need more help then a regular. I recognize that, and am taking action in every possible way I know how.

You need a teacher. Without going into a lot of detail, you have to break down each of those individual requirements into separate problems and solve them one by one and then group them together into your solution. Sure, it sounds ridiculously easy, but it really is how you start.

Example, write the logic where you take the start/stop buttons and create a variable that remains high after start is pushed and goes low when stop is pushed. You can then use this variable as a condition for all other problems to work since it's the Machine Running indication.
 
4) Do you understand the difference between

  • a discrete variable that, at any given time, can have only two possible values, 0 or 1 (input or output or internal bit; also called a boolean), and
  • an "analog" variable that, at any given time, can have one of many (typically 655536) different numerical values (input or output or internal register; also called an integer)?
4.1) Do you understand how the registers (RobotInputs, RobotOutputs, ConveyorOutputs, ConveyorInputs) are integers that comprise (i.e. are made up of) bits?

5) Do you have a mental model of how this system is supposed to work?

5.1) Can you identify the inputs to the Cell PLC?

5.2) Can you identify the outputs from the Cell PLC?

5.3) If not the whole system, do you understand any of the individual subsystems?

5.3.1) For example, task "2. Set the appropriate ConveyorInputs bit ON when sensor bits X4 - X7 are ON," is a straightforward task:

  • X4-X7 are discrete inputs to the Cell PLC;
  • ConveyorInputs is a register output (that is not a typo) from the Cell PLC;
  • the task involves assigning a single (integer) value to register ConveyorInputs that is dependent on the current state of the four discrete inputs X4-X7.
  • Can you say what the value of the ConveyorInputs register would be
    • if all of the discrete inputs X4-X7 are 0s (zeros)?
    • if all of the discrete inputs X4-X7 are 1s (ones)?
 
... You're going to have to use edge detection to count the number of packages.

Excellent; what a fantastic segue!

@Technology:

6) Do you understand all of the individual words in that sentence?

6.1) Do you understand all of the phrases and concepts in that sentence e.g. "edge detection?"

6.2) @carosocea is right of course, but can you, @Technology, tell me why your PLC program will need to use edge detection to count the number of packages?
 

Similar Topics

Hello, i'm still fairly new in this field and I'm trying to figure out if there is any way or free programs in which multiple pc's can access, so...
Replies
10
Views
2,119
Hello All, I was looking at Rockwell's FactoryTalk Asset Centre as a solution to our PLC program management, change control, and configuration...
Replies
3
Views
2,616
hi guys I need help with how to set up a plc program management, we are looking into documenting plc changes ,back ups and mods but im not sure...
Replies
3
Views
2,055
I've been programming plcs for several years now and I'm at that point that I want to streamline. All of our machines are custom, but all are...
Replies
18
Views
8,720
Hi all. We are an OEM manufacturer and I do most of the plc programming for our machines. When I write a program on my desktop I save it to our...
Replies
5
Views
10,312
Back
Top Bottom