labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 58 forks source link

Pulseblaster transition_to_buffered tweak #61

Closed dihm closed 2 years ago

dihm commented 4 years ago

This PR "fixes" labscript-suite/labscript-devices#23.

Basically, some older PB firmware will blank all outputs when in programming mode. The current code always enters programming mode to be compatible with the 'pb_stop_programming/STOP' scheme.

This tweak shuffles things around so pb_start_programming() is only called if necessary: either for programming or for the 'pb_stop_programming/STOP' scheme. Combined with the 'pb_start/BRANCH' scheme, the outputs will not blank between shots if there are no updates to the programming when using the old firmware.

We have tested this on PBs with and without this issue for a long time without problems, though we don't use the 'pb_stop_programming/STOP' scheme. This helps the experiment to generally stay warm without changing any real functionality that I can see.

dihm commented 2 years ago

This is a golden oldie of a PR that I'd like to actually merge. As far as I can tell, it doesn't change any actual functionality other than limiting the number of unnecessary calls to pb_start_programming. As such, I consider it basically harmless and will merge in a few days unless there are objections from somebody.