Add scan commands for diSPIM #7
adamkglaser
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For diSPIM operation, we need to add serial commands to TigerASI for the scan related commands. These program the stage to perform a constant velocity stage scan, with a specified start/stop position. These commands are only meant to be applied to the 'stage scan' optimized axis which is set by ASI at the factory. For us, and by default, this is the X axis.
The details and syntax for the serial commands are here.
I have done a preliminary implementation of these in the dev branch of Tiger-ASI.
Added lines in device_codes.py
Added lines in tiger_controller.py.
They include:
SCANR [X=start] [Y=stop] [Z=enc_divide] [F= #_pixels]. This sets up the 'fast' axis, i.e. the X axis. Encoder divide sets the number of encoder pulses to count before sending the next TTL pulse. Our X axis has a stage encoder resolution of 22 nm, so Z=32 would give us a frame spacing of 704 nm which is about what we want. If we set F, it will override the Y position and instead calculate the length of the stage scan based on the number of pixels (where whatever Z is set to is 1 pixel).
SCANV [X=start] [Y=stop] [Z=number_of_lines] [F=overshoot_factor]. This sets up the 'slow' axis, i.e. the Y axis of the stage. We do not want to automate along this direction, so we would set X = Y, and this would be set to whatever Y position we want to grab data from. Z=1 since we just want 1 one. And the overshoot factor F could be left as a default, this controls the characteristics of the velocity ramp up and down at the end of the stage scan. No need to tune this unless we see issues.
SCAN [X=scan_axis for X] [Y=scan_axis for Y] [Z=scan_axis for Z] [F=pattern]. This command actually starts and executes the scan. Analogous to issuing a move command, it is a non-blocking call. No need to set X, Y, or Z since these are set at the factory and we can't scan along anything other than X. F controls the scanning pattern, which is 0 for raster (i.e. it backs up and always goes from the same direction), and 1 is serpentine (i.e. the stage will alternate scanning directions). I think this is linked to whether or not the stage backs up automatically at the end of a stage scan, and if we wanted to prevent that from happening, we would set F=1 for serpentine.
@micahwoodard it would be good to.
SCANR X=0 Y=1 Z=32
SCANV X=0 Y=0 Z=1
SCAN
The python syntax would be different than above.
Beta Was this translation helpful? Give feedback.
All reactions