Error second time use of startSequenceAcquisition
felix92 opened this issue · 5 comments
Hallo,
I use the MicroManager2.0 to control a Hamamatsu Camera with python.
When I use the function startSequenceAcquisition with NumberofImages = 1 the first time after initialization an image is recorded. When I use his function a second time an error is throwing.
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Micro-Manager-2.0gamma\MMCorePy.py", line 5532, in startSequenceAcqui sition return _MMCorePy.CMMCore_startSequenceAcquisition(self, *args) MMCorePy.CMMError: Error in device "camera": Unknown error in the device (1)
I hope somebody can help me.
Thanks,
Felix
Just out of curiosity: did you try calling stopSequenceAcquisition() before starting a Sequence the second time?
Yes, I tried it but I got the same error.
Here is something I tried.
`
import MMCorePy
mmc = MMCorePy.CMMCore()
mmc.loadDevice('camera','HamamatsuHam','HamamatsuHam_DCAM')
mmc.initializeDevice('camera')
mmc.setCameraDevice('camera')
mmc.setExposure('camera', 500)
mmc.getRemainingImageCount()
0
mmc.startSequenceAcquisition(1,1,False)
mmc.getRemainingImageCount()
1
mmc.getLastImage()
array([[232, 216, 214, ..., 304, 319, 309],
[205, 241, 268, ..., 317, 345, 301],
[249, 204, 224, ..., 342, 320, 264],
...,
[136, 166, 206, ..., 205, 236, 213],
[163, 171, 162, ..., 244, 209, 206],
[139, 152, 178, ..., 213, 220, 215]], dtype=uint16)
mmc.stopSequenceAcquisition()
mmc.getRemainingImageCount()
1
mmc.startSequenceAcquisition(1,1,False)
Traceback (most recent call last):
File "", line 1, in
File "C:\Micro-Manager-2.0gamma\MMCorePy.py", line 5532, in startSequenceAcqui
sition
return _MMCorePy.CMMCore_startSequenceAcquisition(self, *args)
MMCorePy.CMMError: Error in device "camera": Unknown error in the device (1)
`
Do you get the same error, when you run this code from a Beanshell script (i.e., within the MM GUI)?
I second @nicost's question; it is especially worth testing if this is caused by the fact that you are manually "loading" the camera device instead of using a config file via mmc.loadSystemConfiguration()
. This is because a (correct) config file contains lines that "reset" the Core in addition to loading the devices.
And just to confirm, this is specific to Hamamatsu (i.e. doesn't happen if you run the same code with DemoCamera), correct?
Closing inactive issues. Please reopen with results from latest versions if the problem persists.