Certainly! Let's work through the steps to create a PLC program using RSLogix 500 that fulfills the requirements of your lab. We'll address each requirement one by one, explaining how to implement it and providing sample ladder logic diagrams.
Input and Output Assignments
Discrete Inputs:
- I:0/0 - Conveyor Stop Button
- I:0/1 - Conveyor Start Button
- I:0/2 - Photo Eye 1 (PE1)
- I:0/3 - Photo Eye 2 (PE2)
- I:0/4 - Conveyor Running Feedback Signal
- I:0/5 - Alarm Reset Switch
Relay Outputs:
- O:0/0 - Conveyor Start/Stop (Lightbulb 0)
Step 1: Conveyor Start/Stop Control
Requirement: When the start button is pressed, the conveyor should start (assuming there are no alarms). The conveyor should stop when the stop button is pressed.
Implementation:
- Use a latching relay to maintain the conveyor's running state.
- Ensure that the conveyor doesn't start if there's an active alarm.
Ladder Logic:
Rung 1: Start Conveyor
| Start PB | Conveyor Running Alarm Active |
|---||-------+-------|/|--------|/|------(Set Conveyor Run Bit)|
|
| Conveyor Run Bit |
|---||--------------|
- Start PB (I:0/1): Normally open contact for the start button.
- Conveyor Run Bit (B3:0/0): Internal bit to indicate the conveyor is running.
- Alarm Active (B3:0/1): Internal bit to indicate an alarm condition.
Rung 2: Stop Conveyor
| Stop PB |------------------------------------(Reset Conveyor Run Bit)|
- Stop PB (I:0/0): Normally open contact for the stop button.
Rung 3: Conveyor Output
| Conveyor Run Bit |---------------------------( Output O:0/0 )|
Step 2: Motor Fail-to-Start Alarm
Requirement: If the conveyor fails to start within 2 seconds after receiving the start signal, trigger a motor fail-to-start alarm.
Implementation:
- Use a Timer On Delay (TON) to detect if the conveyor starts within 2 seconds.
- Monitor the Conveyor Running Feedback Signal (I:0/4).
- If the feedback signal isn't received within 2 seconds, set the alarm bit.
Ladder Logic:
Rung 4: Start Monitoring Conveyor Start
| Conveyor Run Bit | Conveyor Running Feedback |
|---||----------------|/|----------(TON T4:0)|
- Conveyor Running Feedback (I:0/4): Normally open contact; closed when the conveyor is running.
- T4:0: Timer with a preset of 2 seconds.
Rung 5: Set Alarm if Conveyor Fails to Start
| T4:0/DN |------------------------------------(Set Alarm Active Bit)|
- T4:0/DN: Done bit of the timer T4:0.
Rung 6: Prevent Conveyor from Starting if Alarm is Active
Modify Rung 1 to include the Alarm Active bit (B3:0/1) as a normally closed contact.
Step 3: Alarm Reset
Requirement: The conveyor should stay off until the alarm is reset and the start button is pressed again.
Implementation:
- Use the Alarm Reset Switch (I:0/5) to reset the alarm.
Ladder Logic:
Rung 7: Reset Alarm
| Alarm Reset Switch |-------------------------(Reset Alarm Active Bit)|
- Alarm Reset Switch (I:0/5): Normally open contact for the alarm reset button.
Step 4: Timing the Length of the Paper Roll
Requirement: When PE1 detects the paper roll, start timing. Use an RTO timer so the timer doesn't reset if the conveyor stops.
Implementation:
- Use an RTO (Retentive Timer On) timer to accumulate time while the roll is in front of PE1.
- The timer starts when PE1 is activated and the conveyor is running.
Ladder Logic:
Rung 8: Start Timing Roll Length
| Conveyor Run Bit | PE1 |-----------------------(RTO T4:1)|
- PE1 (I:0/2): Normally open contact; closed when paper roll is detected.
- T4:1: Retentive timer to time the length of the roll.
Rung 9: Store Accumulated Time When Roll Clears PE1
| Conveyor Run Bit | PE1 | One-Shot |
|---||--------------|/|----[ONS]----(MOV T4:1.ACC to N7:0)|
(Reset T4:1.ACC)|
- PE1: Normally closed contact because we want to detect when the roll leaves PE1.
- One-Shot (ONS): Ensures the MOV and Reset instructions execute only once when PE1 changes from true to false.
- N7:0: Integer register to store the accumulated time.
Step 5: Calculating the Center of the Roll
Requirement: Allow the PLC to calculate when the center of the roll reaches PE2.
Implementation:
- Since the conveyor speed is constant, calculate half of the accumulated time to determine when the center will reach PE2.
- Use a Compute (CPT) instruction.
Ladder Logic:
Rung 10: Calculate Half the Accumulated Time
| On Condition |-------------------------------(CPT N7:1 = N7:0 / 2)|
- On Condition: This could be a contact that's always true or controlled based on when you want the calculation to occur.
- N7:1: Register to store half the accumulated time.
Step 6: Stopping the Conveyor at the Center of the Roll
Requirement: PE2 will trigger a second timer to stop the conveyor at the center of the roll.
Implementation:
- When PE2 is activated, start a timer with the preset value calculated (N7:1).
- Use TON because we want it to reset if conditions change.
Ladder Logic:
Rung 11: Start Centering Timer When PE2 is Triggered
| Conveyor Run Bit | PE2 |--------------------------------(TON T4:2)|
- PE2 (I:0/3): Normally open contact; closed when roll is detected by PE2.
- T4:2: Timer to wait until the center of the roll reaches PE2.
Rung 12: Set Preset of Centering Timer
| PE2 |---------------------------------------(MOV N7:1 to T4:2.PRE)|
- Ensure this rung executes when PE2 is triggered to set the timer's preset value.
Rung 13: Stop Conveyor When Center is Reached
| T4:2/DN |------------------------------------(Reset Conveyor Run Bit)|
Step 7: Ensuring Timers Don't Reset Unnecessarily
Requirement: Use RTO timers where necessary and control resets carefully.
Implementation:
- T4:1 is an RTO, so it won't reset if the conveyor stops.
- Only reset T4:1 after moving the accumulated time.
- T4:2 is a TON because we want it to reset if PE2 is deactivated.
Step 8: Final Program Verification
Check the following:
- Conveyor Start/Stop Logic:
- Conveyor starts when Start button is pressed and there is no alarm.
- Conveyor stops when Stop button is pressed.
- Motor Fail-to-Start Alarm:
- Alarm is triggered if the conveyor doesn't start within 2 seconds.
- Conveyor cannot be started until the alarm is reset.
- Paper Roll Timing:
- RTO timer starts when PE1 detects the roll.
- Timer stops and value is stored when roll clears PE1.
- Centering Logic:
- When PE2 detects the roll, a timer starts with the preset value of half the accumulated time.
- Conveyor stops when the timer is done, indicating the center is at PE2.
- Timers and Resets:
- RTO timers retain their accumulated value if the conveyor stops.
- Timers reset appropriately when their conditions are no longer met.
Additional Notes
- Safety Precautions:
- Always include safety interlocks and ensure that the system is safe to operate before testing.
- Use physical disconnects and follow lockout/tagout procedures when working with actual equipment.
- Testing:
- Simulate inputs using switches or buttons to test your program.
- Monitor timers and registers to verify correct operation.
- Documentation:
- Comment your ladder logic for clarity.
- Label all rungs with descriptions of their functionality.
Example Ladder Logic Snapshot
Here's a simplified representation of the ladder logic:
Rung Descriptions:
- Start Conveyor Logic
- Stop Conveyor Logic
- Conveyor Output Control
- Monitor Conveyor Start with Timer for Alarm
- Set Alarm if Conveyor Fails to Start
- Reset Alarm Logic
- Start Timing Roll Length with RTO Timer
- Store Accumulated Time and Reset Timer When Roll Clears PE1
- Calculate Half the Roll Length
- Start Centering Timer When PE2 is Triggered
- Set Preset Value of Centering Timer
- Stop Conveyor When Center is Reached
Conclusion
By following this guide, you should be able to create the PLC program that meets the lab requirements. Remember to:
- Test each section individually to ensure it works before integrating everything.
- Use the RSLogix 500 Help function to get more details on instructions like RTO, TON, MOV, and CPT.
- Simulate the operation if possible before applying it to the actual PLC to prevent any unintended consequences.
If you have any questions or need further clarification on any steps or instructions, feel free to ask!