Lesson Overview
You will learn how safety controls can be built into an automated workcell. This example uses a signal tower button to stop robot motion, display a message, and change tower lights when control has stopped.
Learn how safety procedures, restricted zones, emergency stops, and safe operating habits protect people and equipment in automated systems.
You will learn how safety controls can be built into an automated workcell. This example uses a signal tower button to stop robot motion, display a message, and change tower lights when control has stopped.
Review the code, copy it when needed, and add comments before submitting your final version.
def on_signal_tower_pressed():
arm10.set_control_stop(True)
brain.screen.clear_screen()
brain.screen.set_cursor(1, 1)
brain.screen.print("Stop you goofball!")
def arm_control_stopped():
# Change colors of tower to show a stop has happened.
signal_tower_6.set_color(SignalTower.GREEN, SignalTower.OFF)
signal_tower_6.set_color(SignalTower.RED, SignalTower.BLINK)
signal_tower_6.pressed(on_signal_tower_pressed)
arm10.control_stopped(arm_control_stopped)
wait(15, MSEC)
while True:
arm10.move_to(0, 150, 50)
wait(500, MSEC)
arm10.move_to(220, 0, 220)
wait(500, MSEC)