![]() ![]() ![]() ![]() ![]() ![]() |
||
![]() |
||
![]() ![]() ![]() ![]() This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc. |
||
![]() |
![]() |
#1 |
Member
![]() ![]() Join Date: Jan 2023
Location: USA
Posts: 5
|
Program Management, Timers, and Counters in Ladder Logic
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. |
![]() |
![]() |
#2 |
Lifetime Supporting Member + Moderator
|
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. |
![]() |
![]() |
#3 | |
Member
![]() ![]() Join Date: Nov 2016
Location: Fields of corn
Posts: 2,571
|
Quote:
![]() I'll pitch in with some help though. You're going to have to use edge detection to count the number of packages. |
|
![]() |
![]() |
#4 |
Member
![]() ![]() Join Date: Jan 2023
Location: USA
Posts: 5
|
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. |
![]() |
![]() |
#5 |
Member
![]() ![]() Join Date: Jan 2023
Location: USA
Posts: 5
|
Here is as far as I could get on my own. Any help would be greatly appreciated.
|
![]() |
![]() |
#6 | |
Lifetime Supporting Member + Moderator
|
Oh, bull. That's not "showing your work".
Quote:
|
|
![]() |
![]() |
#7 | |
Member
|
Quote:
![]() ![]() ![]() ![]() |
|
![]() |
![]() |
#8 |
Lifetime Supporting Member + Moderator
![]() ![]() Join Date: Sep 2010
Location: In The VAT Shed
Posts: 727
|
That has got to be the best PLC program I have ever seen.
I can't actually believe it's not working as intended. |
![]() |
![]() |
#9 | |||
Member
![]() ![]() Join Date: Nov 2016
Location: Fields of corn
Posts: 2,571
|
Quote:
Quote:
Quote:
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. |
|||
![]() |
![]() |
#10 |
Lifetime Supporting Member
|
1) Do you any programming experience (it sounds like the answer is no)?
2) Has the class covered the PLC scan cycle?
__________________
_ Brian T. Carcich i) Take care of the bits, and the bytes will take care of themselves. ii) There is no software problem that cannot be solved with another layer of indirection. iii) Measurement is hard. iv) I solemnly swear that I am up to no good ![]() v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
![]() |
![]() |
#11 |
Member
![]() ![]() Join Date: Jan 2013
Location: Leipzig, Germany
Posts: 1,366
|
> picked and placed on all four conveyors
But there are eight conveyors... |
![]() |
![]() |
#12 |
Lifetime Supporting Member
|
4) Do you understand the difference between
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:
__________________
_ Brian T. Carcich i) Take care of the bits, and the bytes will take care of themselves. ii) There is no software problem that cannot be solved with another layer of indirection. iii) Measurement is hard. iv) I solemnly swear that I am up to no good ![]() v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
![]() |
![]() |
#13 | |
Lifetime Supporting Member
|
Quote:
@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?
__________________
_ Brian T. Carcich i) Take care of the bits, and the bytes will take care of themselves. ii) There is no software problem that cannot be solved with another layer of indirection. iii) Measurement is hard. iv) I solemnly swear that I am up to no good ![]() v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ![]() vi) Hakuna matata. vii) Bookkeeping. viii) But I should be ignored. |
|
![]() |
![]() |
#14 |
Lifetime Supporting Member + Moderator
|
Its missing the DWIM command.
__________________
≈ There are 2 kinds of people in the world... (1) Those that can derive answers from incomplete Data |
![]() |
![]() |
#15 |
Lifetime Supporting Member
|
Followed by
"THAT's NOT WHAT I MEANT"
__________________
"When nothing is going right, go left." "Even a fish wouldn't get into trouble if it kept its mouth shut." (I should probably look into this) |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Timers and counters | annicat1 | LIVE PLC Questions And Answers | 1 | August 20th, 2013 05:58 AM |
I need help with simple ladder logic. | dennisc | LIVE PLC Questions And Answers | 44 | December 14th, 2007 01:48 PM |
I need help with simple ladder logic. | dennisc | LIVE PLC Questions And Answers | 3 | December 11th, 2007 03:44 PM |
Questions abt Siemens S7 200 | Preeya | LIVE PLC Questions And Answers | 3 | April 9th, 2007 09:39 AM |
counters and Timers of Allen Bradley Program | ronpittc | LIVE PLC Questions And Answers | 15 | July 4th, 2003 04:12 AM |