Wrote README.md and created .gitignore

This commit is contained in:
2025-07-23 14:15:45 +02:00
parent 6d7adaa434
commit 8789c346bb
4 changed files with 101 additions and 4 deletions

26
example_custom_script.py Normal file
View File

@@ -0,0 +1,26 @@
#!/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 common 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.write_field('enable', 0)
# Wait a bit so the motor has been disabled
time.sleep(2)
# Reenable the motor
motor.write_field('enable', 0)