PySpin Trigger.py gives error.
AnsweredHello,
I am using the PySpin with my Flir A35 camera for image acquisition without a problem. But now I want to use the hardware trigger via GPIO Line 0. I am able to set it True using 24V via an external controller, which I see in Spinview. I just need to make the Trigger.py work and then customize it for my needs. But the Trigger.py does not work at all and it gives the error below. I am doing something wrong but I could not find out! Any help is appreciated. Thanks in advance.
Library version: 4.0.0.116
Number of cameras detected: 1
Running example for camera 0...
*** DEVICE INFORMATION ***
DeviceID: (Deleted intentionally)
DeviceSerialNumber: (Deleted intentionally)
DeviceUserID:
DeviceVendorName: FLIR Systems AB
DeviceModelName: FLIR AX5
DeviceVersion: Version 1.0 (02.05.15)
DeviceBootloaderVersion: Node not readable
DeviceType: GigEVision
DeviceDisplayName: FLIR Systems AB FLIR AX5
DeviceAccessStatus: OpenReadOnly
DeviceLinkSpeed: Node not readable
DeviceDriverVersion: CorGigeFilter.sys : 6.0.0.1401
DeviceIsUpdater: 0
GenICamXMLLocation: Device
GenICamXMLPath:
GUIXMLLocation: Device
GUIXMLPath: Input.xml
GevCCP: OpenAccess
GevDeviceMACAddress: (Deleted intentionally)
GevDeviceIPAddress: (Deleted intentionally)
GevDeviceSubnetMask: (Deleted intentionally)
GevDeviceGateway: (Deleted intentionally)
GevVersionMajor: 1
GevVersionMinor: 2
GevDeviceModeIsBigEndian: 1
GevDeviceReadAndWriteTimeout: 200000
GevDeviceMaximumRetryCount: 3
GevDevicePort: 30224
GevDeviceDiscoverMaximumPacketSize: Node not readable
GevDeviceMaximumPacketSize: 1500
GevDeviceIsWrongSubnet: 0
GevDeviceAutoForceIP: 0
GevDeviceForceIP: 0
GevDeviceForceIPAddress: 0
GevDeviceForceSubnetMask: 0
GevDeviceForceGateway: 0
*** CONFIGURING TRIGGER ***
Note that if the application / user software triggers faster than frame time, the trigger may be dropped / skipped by the camera.
If several frames are needed per trigger, a more reliable alternative for such case, is to use the multi-frame mode.
Hardware trigger chose ...
Unable to disable trigger mode (node retrieval). Aborting...
Camera 0 example complete...
Done! Press Enter to exit...
-
Official comment
Hello Erdem,
It does not seems trigger.py would work directly on this camera as some of these node features (including trigger mode) are not present. Could you explain the step used to configure camera via spinView GPIO to capture frames? Exploring camera user manual may aid in understanding how to trigger the camera via gpio line https://www.flir.eu/support/products/a35/?vertical=rd+science&segment=solutions#Documents
My team focus more on machine vision/spherical/PCT camera and not expert on this camera. If this is first experience configuring trigger on this camera, you may have to open support ticket with thermal imaging team to further assist you on this.Thanks,
Ifeanyi
-
After tracking down the error, I see that both of these come False:
PySpin.IsReadable(node_trigger_mode)
PySpin.IsWritable(node_trigger_mode)
Thus the the code just stops running with the error 'Unable to disable trigger mode (node retrieval). Aborting...'.
But still I do not have any solutions yet.
0 -
Hello Erdem,
What is the exact function call (i.e configure_trigger(...) or reset_trigger(...)) that throws this exception? Is camera opened in SpinView or any other application while executing Trigger.py example? Which GPIO line do you intend to use to trigger camera externally?
Please note, camera trigger source from Trigger.py example (see "configure_trigger(...)") is pre-configured to Line0. This may require to be updated if different from actual trigger line.
Thanks,
Ifeanyi
0 -
Hello Ifeanyi,
Thanks for your answer. The function that throws the exception is with "cam" input as follows: configure_trigger(cam). The Trigger.py script runs fine till it gets into the configure_trigger() and starts running lines 77-80 as seen below:
node_trigger_mode = PySpin.CEnumerationPtr(nodemap.GetNode('TriggerMode'))
if not PySpin.IsReadable(node_trigger_mode) or not PySpin.IsWritable(node_trigger_mode):
print('Unable to disable trigger mode (node retrieval). Aborting...')
return FalseThis happens even with fresh system restart and without any related software (like Spinview) running in the background. By the way, Line0 is the one that I want to use via Hardware trigger because I am going to trigger the camera with 24V using an external controller. I have tested it by applying 24V and checking the Line0 status on Spinview GPIO which turns True by applying the voltage. See the image attached:
0 -
Erdem,
Would you mind sharing what software you installed to get PySpin to work with your A35 camera and how you connected it?
0 -
Hello Erdem,
I presume the camera is still working fine or is there any question you will like us to discuss with the current state of the camera?
Hi Christian,
Are you having issue running A35 camera model with PySpin? Which spinnaker version is installed in this PC, and python version you are targetting with your project?
Thanks,
Best regards,
Ifeanyi
0 -
Ifeanyi,
Myself i am trying to get a A400 thermal camera connected. I have tried spinnaker version 3 and 4. Both cant find the camera. (Neither can SpinView). I am using python 3.6. and tried python 3.8 with the according python-spinnaker version but without success.
Any other suggestions?
-Christian
0
Please sign in to leave a comment.
Comments
7 comments