Skip to content

instruments.auber_syl53x2p

Jack Sankey edited this page Aug 28, 2020 · 4 revisions

Getting Started

mcphysics.instruments.auber_syl53x2p provides a scriptable graphical user interface for the Auber SYL-53X2P. To create an instance,

import mcphysics
a = mcphysics.instruments.auber_syl53x2p()

This should pop up a window that looks something like this:

Along the top you can choose the appropriate COM port (or 'Simulation' to test the software without a device), the device's address (a number between 0-255 that must match the device's internal settings; try 1 first), the baud rate (must also match the device's internal settings; try 9600 first), and the timeout (how long to wait for responses before giving up). For this particular device, the manual states the timeout should be at least 300 ms, but we recommend a few seconds. Click Connect, the lower controls will enable, and it will start periodically asking the instrument for its setpoint and measured temperature, updating the controls and appending the data to the plot below:

You're then free to change the setpoint and watch the device respond, save / load the shown data, or change how the Databox Plotter shows the data.

It is usually a very good idea to continuously dump the data to a file. To do so, push the Log Data button at the bottom; this will pop up a dialog asking you for an output file path, save all the accumulated data (plus some header information, including whatever is in the "Note" box), and then start appending to that file at each step. The output format of the dump file is comma delimited (csv).

Scripting

Everything you can do manually can be scripted. For example, to get or set the current temperature setpoint:

a.number_setpoint.get_value()     # Shorthand: a.number_setpoint()
a.number_setpoint.set_value(27.0) # Shorthand: a.number_setpoint(27.0)

or to get the shown measured temperature:

a.number_temperature.get_value() # Shorthand: a.number_temperature()

The plot is a Databox Plotter stored in a.plot. You should be able to find the other controls using code completion (e.g., from the IPython console), and to help navigate, we always start number boxes with number_, buttons with button_, plots with plot_ and so on.