Using python to program a production line



Add the blue cans

The script already has defined variables for the inputs and outputs that are needed to control the right entry conveyor with blue cans. Try to implement the same functionality that already exists for the green cans, and make the system run with green and blue cans in sync.

Use the switch to select operating mode

The switch on the control box can be used to select which mode the system should operate in. It’s already connected to the controller and defined as ‘SWITCH_L’ and ‘SWITCH_R’ in the example program. Use those inputs to switch between these three modes:

1. Only green cans are allowed to pass. One can is let through every 3rd second.

2. Both green and blue cans are allowed to pass, but only one every 3rd second.

3. Only blue cans are allowed to pass. One can is let through every 3rd second.