Timeout error with ximea
I’m trying to get the ximea camera plugin to take pictures whenever the quantum composer (pulse generator) sendsa signal to the camera. However, I got this error
Traceback (most recent call last):
File "c:\users\labadmin\desktop\gasjetscripts - this one\gasjetcontrols.py", line 171, in automatedExperiment
camera.getVal(d)
RuntimeError: Error invoking function getVal with error message:
ximea m3api error 'Timeout' (pxiGetImage
I included my code in the file section. The hardware is not the problem
Comments (12)
-
-
reporter Yes, I am using the quantum composer to send the signal to the camera to take a picture (I set the voltage amplitude to 10 V and it works). It works when I run the camera from the ximea cam app but now I’m trying to integrate that as part of the interface on ITOM. The error comes in when I add the code to operate the camera from ITOM rather than from the ximea app.
-
Which Ximea API Version is used in the Ximea App? Which itom Version are you using?
-
Hi William,
at first, I recommend setting the trigger settings before calling startDevice. However, it should also work after having called startDevice for the first time.
I think that you should also configure the input port, that should be used for triggering, by the parameter gpi_mode. You can request the configuration state
of all input pins by getParam(“gpi_mode”). This should return a list, whose size is equal to the number of available input pins. Every value is either 0 (nothing configured),
1 (trigger) or 2 (external signal input, probably not implemented by the plugin). If you would like to set the 2nd input port for triggering, you have to set something like this (assuming that your camera has 4 input ports):yourCam.setParam("gpi_mode", [0, 1, 0, 0])
For more information see those resources:
- https://www.ximea.com/support/wiki/apis/xiapi_manual#XI_PRM_TRG_SOURCE-or-trigger_source
- https://itom.bitbucket.io/plugindoc/plugins/grabber/ximea.html#parameters
You can also try to continously request the current value at each input port by
yourCam.getParam("gpi_level")
I hope that this helps.
-
BTW. I sah you are using the quantum composer via the serial interface.
I have implemented in the last months an itom dataIO plugin for the QuantumComposer.This plugin is added to the new itom setup itom4.2 which was build this week.
-
reporter I set the gpi mode [1]. Apparently it said I only got 1 input pin when I wrote camera.getParam(“gpi_mode”) . I also set the trigger_selector parameter to 0 (exposure start time), which was what I used in the ximea cam app. This still returned the same time-out error so the error is in this image-saving section of the code I believe:
#______________________
#image saving code
for j in range(0,20):
camera.acquire()
camera.getVal(d)
result.append(d.copy())
-
reporter Ah I see what happened. The quantum composer burst # is 20 and I want the loop to go to 20, which isn’t possible for the camera. It works when I set the loop to in range (0,10). Thank you everyone!
-
- changed status to resolved
-
reporter By the way, which model is the quantum composer for the itom 4.2 plugin? I’m currently using qunatum composer model 9600+
-
I have implemented/tested it with a 9520 model. In principel the RS232 Interface must be the same, but without Testing I can not guarantee it works. If you test the plugin with the 9600 model, can you let us know if it works?
-
reporter Thanks for letting me know. I will test the plugin with the 9600 model and get back to you about it
-
Now also the QuantumComposer plugin docu is online:
3.3. QuantumComposer — itom Documentation - Log in to comment
You are using the quantum composer as the camera trigger? I think the quantum composer does not operate at 24V which is for some Ximea camera the voltage range for the trigger input.