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

Camera error control #99

Closed ispielma closed 2 years ago

ispielma commented 2 years ago

In the IMAQdx camera class the option exception_on_failed_shot did not catch all the missing shot errors in the lab. The reason is that for some reason about 0.1% of the time with our gige cameras we would get an error "nivision.core.ImaqDxError: 3220606990: No acquisition in progress." I don't know why the acquisition would stop before taking all of the images, but sometimes it does. When this error occurs it pops up a big error box, which can be undesirable.

As a result I added exception_on_failed_shot into the IMAQdx_Camera class so it too can catch errors and respond just as IMAQdxCameraWorker already does.

In addition I added this attribute to all of the cameras that subclass IMAQdx_Camera BUT it does not do anything. This is so that IMAQdxCameraWorker's subclasses can still write the attribute without creating an error condition.

Also removed sorting of camera attributes because the actually need to be set in a specific order and sorting breaks this.

dihm commented 2 years ago

Perfect. Merging.