#!/usr/bin/env python3 # This script instructs the "lin1" motor (first axis of the sinqtest Turbo PMAC # controller) to drive to -20 mm. Once it arrives, it then drives to -30 mm. # Afterwards, the motor is disabled and then reenabled import time from setup.classes import TurboPMAC motor = TurboPMAC('turboPmac1', 'lin1') # Drive to position -20 mm motor.move_and_wait(-20) # Drive to position -30 mm motor.move_and_wait(-30) # Disable the motor motor.put_pv('enable', 0) # Wait a bit so the motor has been disabled time.sleep(2) # Reenable the motor motor.put_pv('enable', 1)