Welcome to AGUC8’s documentation!¶
General Instructions¶
This software provides ARTIQ support for the Newport Agilis AGUC8 piezo motor controllers.
Note
The software is configured for RS232 communication. If using some other form of communication, change the baud rate setting in agPort .
Installation¶
Install the AGUC8 package to your environment using pip with git:
$ python -m pip install git+https://github.com/ARTIQ-Controllers/AGUC8
AG-UC8 Controller Usage Example¶
First, run the AGUC8 controller:
$ aqctl_AGUC8 --bind ::1 -p 3251 -s COM1
Note
Anything compatible with serial_for_url
can be given as a serial port in -s argument.
For instance, if you want to specify a host IP address and its port:
-s "socket://<host>:<port>".
for instance:
-d "socket://192.168.1.220:10001"
Then, send commands via the artiq_rpctool utility:
$ sipyco_rpctool ::1 3251 list-targets
Target(s): AGUC8
$ sipyco_rpctool ::1 3251 call move(15,15) # will move 15 steps in the positive direction along each axis
$ sipyco_rpctool ::1 3251 call move(-15,-15) # will move 15 steps in the negative direction along each axis
$ sipyco_rpctool ::1 3251 call moveUpUp() # will move to the upper limit of each axis, if device has a limit switch
$ sipyco_rpctool ::1 3251 call goToZero # will go to zero position
$ sipyco_rpctool ::1 3251 call close # close the device
API¶
-
class
AGUC8.driver.AGUC8(portName, activeChannels=['1'], axis1alias='X', axis2alias='Y', stepAmp1=50, stepAmp2=50)¶ Class that builds support for Agilis AGUC8 piezo motor controller. Creates an instance of a serial object using
AGPortParameters: - portName – Serial port (Uses pySerial serial_for_url)
- activeChannels – List of active channels on the AGUC8 controller. Defaults to [‘1’].
- axis1alias – Alias for Axis 1. Defualts to ‘X’.
- axis2alias – Alias for Axis 2. Defualts to ‘Y’.
- stepAmp1 – Axis 1 step amplitude. See AGUC8 docs. Defaults to 50.
- stepAmp2 – Axis 2 step amplitude. See AGUC8 docs. Defaults to 50.
PortName type: str
ActiveChannels type: list, optional
Axis1alias type: str
Axis2alias type: str
StepAmp1 type: int
StepAmp2 type: int
-
addAxis(channel, name, alias, stepAmp)¶ Assigns an axis to a channel.
Parameters: - channel – Channel number
- name – Axis number
- alias – Axis alias
- stepAmp – Axis step amplitude
Channel type: str
Name type: str
Alias type: str
StepAmp type: int
-
chchch(ch)¶ CHeck and CHange CHannel. Changes to channel ch if it isn’t already active.
Parameters: ch (str) – Desired channel number
-
close()¶ Close serial connection.
-
followApath(path, ch='def')¶ Follow a path.
Parameters: - path – Path to be followed. List of tuples defining relative moves.
- ch – Channel number. Defaults to ‘def’ and uses self.defChannel.
Path type: list
Ch type: str, optional
-
goToZero(ch='def')¶ Move to the zero position. If zero position hasn’t been defined, it will move to the initial position of the device when powered on.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
move(d1, d2, ch='def')¶ Relative move.
Parameters: - d1 – Axis 1 relative position
- d2 – Axis 2 relative position
- ch – Channel number. Defaults to ‘def’ and uses self.defChannel.
D1 type: int
D2 type: int
Ch type: str, optional
-
moveDownDown(ch='def')¶ Move to Axis 1 minimum, Axis 2 minimum.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
moveDownUp(ch='def')¶ Move to Axis 1 minimum, Axis 2 maximum.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
moveUpDown(ch='def')¶ Move to Axis 1 maximum, Axis 2 minimum.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
moveUpUp(ch='def')¶ Move to Axis 1 maximum, Axis 2 maximum.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
setZero(ch='def')¶ Set the zero position to the current position.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
stop(ch='def')¶ Stop ongoing motion.
Parameters: ch – Channel number. Defaults to ‘def’ and uses self.defChannel. Ch type: str, optional
-
class
AGUC8.agPort.AGPort(portName=None)¶ Class that extends the functionality of
Serialfor use with the Agilis controller commands. Creates an instance ofSerialParameters: portName – Serial port (Uses pySerial serial_for_url) PortName type: str -
amInull()¶ Returns whether port has been successfully opened.
Returns: True if port is open. False if not. Return type: bool
-
close()¶ Close serial connection.
-
isAquery(command)¶ Returns whether command is a query, as defined by Agilis command reference.
Parameters: command – Command to check Command type: str Returns: True if command is a query. False if not. Return type: bool
-
sendString(command)¶ Sends a serial command to the device. Returns a response if command is a query. Else returns 0.
Parameters: command – Command to send Command type: str Returns: Return reponse if command is a query. Else returns 0. Return type: str or int
-
ARTIQ Controller¶
Agilis AG-UC8 controller.
Use this controller to drive the AG-UC8 piezo motor controller.
usage: aqctl_AGUC8 [-h] [--bind BIND] [--no-localhost-bind] [-p PORT]
[-s SERIALPORT] [-v] [-q]
Named Arguments¶
| -s, --serialPort | |
| Serial port. See documentation for how to specify port. | |
network server¶
| --bind | additional hostname or IP address to bind to; use ‘*’ to bind to all interfaces (default: []) Default: [] |
| --no-localhost-bind | |
do not implicitly also bind to localhost addresses Default: False | |
| -p, --port | TCP port to listen on (default: 3251) Default: 3251 |
verbosity¶
| -v, --verbose | increase logging level Default: 0 |
| -q, --quiet | decrease logging level Default: 0 |
Acknowledgements¶
The driver files for the AGUC8 controller were taken from: https://github.com/dschick/pyagilis .
This was adapted from an original respository: https://github.com/elandini/pyagilis .