Complete the code to start the conveyor motor when the start button is pressed.
IF StartButton = TRUE THEN
ConveyorMotor := [1];
END_IF;The conveyor motor should be turned ON when the start button is pressed.
Complete the code to stop the conveyor motor when the stop button is pressed.
IF StopButton = TRUE THEN
ConveyorMotor := [1];
END_IF;The conveyor motor should be turned OFF when the stop button is pressed.
Fix the error in the code to activate the sorting arm when an item is detected.
IF ItemSensor = TRUE THEN
SortingArm := [1];
END_IF;The sorting arm should be ACTIVATED when an item is detected by the sensor.
Fill both blanks to check if the conveyor is running and the emergency stop is not pressed.
IF ConveyorMotor = [1] AND EmergencyStop = [2] THEN SystemStatus := 'Running'; END_IF;
The conveyor motor should be ON and the emergency stop should be FALSE (not pressed) for the system to be running.
Fill all three blanks to create a dictionary that maps item colors to sorting bin numbers, only for bins greater than 0.
SortingBins = { [1]: [2] for [1], [2] in ItemColors if [2] [3] 0 }The dictionary maps each color to its bin number, but only includes bins with numbers greater than 0.
