-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_rc
33 lines (23 loc) · 1.26 KB
/
.bash_rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# JohnMPhys here, these are the basic alias' for setting up the X-Y table controller
# ==============================
# Alias for X-Y table controller
# ==============================
# Permit reading and writing of XY controller
alias permitxy="ls -l /dev/ttyUSB0; sudo chmod o+rw /dev/ttyUSB0; ls -l /dev/ttyUSB0"
# Read output from XY controller
alias readxy="cat -v < /dev/ttyUSB0"
# Initialise XY controller
alias initxy="echo -ne 'INIT\n' > /dev/ttyUSB0; echo -ne '*CLS\n' > /dev/ttyUSB0; echo -ne '*IDN?\n' > /dev/ttyUSB0"
# Calibrate XY controller
alias calibratexy="echo -ne 'REF\n' > /dev/ttyUSB0"
# Show error and clear errors for XY controller
alias errorxy="echo -ne 'SYST:ERR?\n' > /dev/ttyUSB0"
alias clearxy="echo -ne '*CLS\n' > /dev/ttyUSB0"
# Find x and y absolute positions
alias xyposxy="echo -ne 'X:ABS?\n' > /dev/ttyUSB0; echo -ne 'Y:ABS?\n' > /dev/ttyUSB0; echo 'Posted coordinates to cat terminal.'"
# Enable and disable laser function
alias laseronxy="echo -ne 'LASER ON\n' > /dev/ttyUSB0"
alias laseroffxy="echo -ne 'LASER OFF\n' > /dev/ttyUSB0"
# Disable motors
alias motoroffxy="echo -ne 'X:DISABLE\n' > /dev/ttyUSB0; echo -ne 'Y:DISABLE\n' > /dev/ttyUSB0"
alias motoronxy="echo -ne 'X:ENABLE\n' > /dev/ttyUSB0; echo -ne 'Y:ENABLE\n' > /dev/ttyUSB0