Wrapper to communicate with a Synrad UC-2000 Universal Laser Controller through the REMOTE port. A UC-2000 controller controls Synrad 48 Series CO2 lasers.
- Python >= 3.8.5
- [OPTIONAL] If using
Synrad-UC2000with a LabJack, then theLabJack-DAQmodule is required. Please visit the repository for further installation guidelines.
Only written and tested with LabJack DAQ control and 48-2 and 48-5 lasers in mind.
To install simply clone the git directory using the following commands:
git clone https://github.com/TobyBi/Synrad-UC2000Move the file uc2000 to your program location and import it.
The main points to interface with the laser and controller are
percentfor the % of the PWM width,lasefor the lasing state of the laser, andshootwhich fires a chosen number of shots at a givenpercentandshot_time.
The less frequently changed settings of the laser and controller are:
- PWM frequency,
- gate logic,
- max PWM percent,
- lase on power up,
- controller mode, and
- checksum.
Refer to the documentation for the available options of each.
For pwm_freq, gate_logic, lase, lase_on_power_up, max_pwm, mode, and percent are treated as class variables and are set with the following syntax
laser = UC2000Controller(25)
laser.pwm_freq = 5
laser.mode = "manual"The shoot function is used like this
laser = UC2000Controller(25)
laser.shoot(
percent=50 # in %
shot_time=1000 # in ms
num_shots=1
)If you are using lase and percent functions with any other modules that include premature termination of the program, make sure to execute the commands within a context manager e.g.
laser = UC2000Controller(25)
with laser:
laser.percent = 10
laser.lase = True
# Program is blockedIf the program is terminated using a KeyboardInterrupt, then the laser will always turn off. This is featured directly in the shoot function so using the context manager is not required there.
Refer to the documentation for more details.
- Lua scripting for better timings
- Default to PySerial without any DAQ