API to controll StackShot3X on Python
- Python 3.8
- PyFtdi 0.54.0
-
You need to install libusb-win32 or libusbK to controll StackShot3X. The following is the procedure for installing the driver using Zadig.
-
Install pip package for this API
pip install pyftdi -
By installing PySide6, you can operate StackShot3X using the GUI for testing.
pip install PySide6 python test.py
The following is an implementation based on this.
Start communication with StackShot3X specified for the
deviceconnected via USB. If no device is specified (device=None), communication start with one of the StackShot3X devices connected via USB.Parameters:
device(Device): FTDI USB device(PyUSB instance)Return type:
None
Close connection with StackShot3X.
Return type:
None
Get the state of the StackShot specified in
axis.Parameters:
axis(RailAxis): Axis of the rail.Return Type:
RailStatusReturns: Status of the rail.
Move the StackShot specified in
axisParameters:
axis(RailAxis): Axis of movement.dir(RailDir): Direction of movement.dist(float): Distance of movement.units(RailUnits): Units of distance specified indist.Return Type:
None
Stop the movement of the StackShot specified in
axis.Parameters:
axis(RailAxis): StackShot to stop.Return Type:
None
Shutter Fire.
Parameters:
num_pulses(int): The number of pulses to generate on the shutter output.pulse_duration(float): The "on" time of each pulse, in seconds.pulse_off_time(float): The "off" time of each pulse, in seconds.Return Type:
None
Enum class representing the status of the rail on a particular axis
Enum class representing the status of StackShot3X
Enum class representing the axis of a StackShot3X rail
Enum class representing each command in StackShot3X
Enum class representing actions for StackShot3X
Enum class representing directions of travel on the rail
Enum class representing units of distance to move the rail
This software was supported by JSPS Grant-in-Aid for Scientific Research (B)22H03710.


