Piezosystem jena PX 38 SG
The piezo stage connects to a PC via serial port. It has been configured in spec on the Linux machine in the phase-contrast room. The necessary macros (functions) for operating the piezo are found on GitLab: https://version.helsinki.fi/xraylab/imaging/phase-contrast/phase-grating-control. Clone the repository to the Linux PC, for example to:
The macros for controlling the piezo are located in the piezo.mac file. It can be read into spec with the command:
Spec config
To configure the device in spec, first launch spec and type "config". Navigate to the "Interface configuration" tab either by pressing c (multiple times) or shift+I on your keyboard. Add the device under "serial". The device location/name should be something like /dev/ttyS0, and to be sure, you can give it your own name by creating a symbolic link as explained here. The "baud" parameter should be 9600, and the "mode" raw. The spec macros assume that the device has number/ID "1" in the configuration.
Basic usage
- Turn on the power supply from the (physical) on/off-switch. The display should light up.
- Turn on external control and "closed loop" operation mode by running the command piezoinit in spec.
The power supply display now shows the piezo position in micrometers. From spec, the piezo postion can be printed with (don't forget the parenthesis):
p piezoget()The piezo can be moved to a desired absolute position x (in micrometers) with:
piezomv(x)This function applies a constant offset to the given value to correct for misspositioning that was noticed with this piezo.
Closed loop operation and external control can be turned off with the piezoexit macro.
Piezo stepping
Currently, the operation of the Varex 1207 detector is done through the Windows PC in the phase-contrast room. However, the Linux PC can communicate with the Windows PC via the lab network. Movement of the piezo has been implemented in the phase stepping macros in stepping.mac.