You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In developing works-out-of-the-box (and without any connected hardware) functionality and examples (#52, #53, #54), I've largely re-implemented subsets of existing labscript device code. As an alternative (or to supplement this), we could instead have a mock flag for (more) existing devices, which allows the functionality to be tested without that device being physically present. A good example of this is labscript_devices.IMAQdxCamera, which can be instantiated with:
# We then initiate an IMAQdxCamera using this RemoteBLACS instance# using mock=True to bypass any attempts to commmunicate with an# actual cameraIMAQdxCamera(
name='camera',
parent_device=camera_trigger,
connection='trigger',
serial_number=0xDEADBEEF,
worker=test_remote,
mock=True,
)
With this virtual device, one can even call labscript methods and simulated data will be generated in the shot file during transition_to_manual, e.g.
This has the benefit of being able to simulate control and automation workflows, which is obviously super useful for demonstration, training, etc.
On the other hand, extracting the minimal subset from actual labscript device code into dedicated dummy devices assists developers in writing new labscript device code for unsupported devices.
The text was updated successfully, but these errors were encountered:
In developing works-out-of-the-box (and without any connected hardware) functionality and examples (#52, #53, #54), I've largely re-implemented subsets of existing labscript device code. As an alternative (or to supplement this), we could instead have a
mock
flag for (more) existing devices, which allows the functionality to be tested without that device being physically present. A good example of this islabscript_devices.IMAQdxCamera
, which can be instantiated with:With this virtual device, one can even call labscript methods and simulated data will be generated in the shot file during
transition_to_manual
, e.g.This has the benefit of being able to simulate control and automation workflows, which is obviously super useful for demonstration, training, etc.
On the other hand, extracting the minimal subset from actual labscript device code into dedicated dummy devices assists developers in writing new labscript device code for unsupported devices.
The text was updated successfully, but these errors were encountered: