labscript-suite-temp / labscript

The labscript Python library provides a translation from simple Python code to complex hardware instructions. The library is used to construct a "connection table" containing information about what hardware is being used and how it is interconnected. Devices described in this connection table can then have their outputs set by using a range of functions, including arbitrary ramps.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Shutter commands can be reordered due to shutter delays #2

Open philipstarkey opened 10 years ago

philipstarkey commented 10 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


The simplistic implementation of shutter delays can result in undesired results.

For example if the delays are:

#!python

open_delay = 3e-3
close_delay = 5e-3

and you call:

#!python

shutter.open(t)
shutter.close(t+1e-3)

then the command to close the shutter ends up coming before the command to open it.

This will result in the shutter opening at the correct time, but never closing.

Similarly the delays may be such that the open command is overwritten by the close command, so the shutter will never open (though in this case labscript will at least warn the user).

philipstarkey commented 10 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Aim to fix in labscript 2.0

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: pstarkey).


Aim to fix in labscript v3 now (or whatever version we introduce a better instruction class that doesn't throw timing information away)

There has been some discussion regarding this issue in pull request #9 (which was approved, then backed out due to performance issues)