Open philipstarkey opened 5 years ago
Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
Ian suggest a keyword argument block_until
to instructions, which seems like a good name to disambiguate from other instruction time intervals like the duration of the ramp. block_until
sounds like it takes an absolute time, so the argument should be an absolute time, or named block_for
or similar if its a duration.
Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).
An issue that wasted a lot of time for someone here is that they intended to set an output to a value for some amount of time, but it turned out that a function being called later in the script was setting the same output to some other value "in advance", something like:
Ideally one would be able to specify a duration to the
.constant()
method instage_1()
so that any instructions to the same output within some duration will result in a compile time error.Also, a ramp instruction should be able to have a duration provided that exceeds the actual ramping duration, so that the final value being held as a constant can also be guaranteed by the compiler not be be cut short of some desired length of time.
Not sure how easy this will be to add to labscript as is, so whilst anyone should feel free to hack it in if they want, I'll try to include it in labscript 3.