Hi,
I have an arduino producing pwm at a given frequency (fps), from a digital pin, and I can do hardware trigger for each frame using the generated pwm via line 3 of the camera. My setup works fine on SpinView with the following settings. When I change the frequency of the pwm from arduino, I can see the exact fps at the live camera streaming.

Now, I want to do it in PySpin. I am trying the following but the camera doesn't wait for the hardware trigger for some reason and disregards the hardware trigger. Do you know what might be going wrong here?
```
nodemap = self.camera.GetNodeMap()
# set trigger selector
trigger_selector=PySpin.CEnumerationPtr(nodemap.GetNode("TriggerSelector"))
trigger_selector.SetIntValue(trigger_selector.GetEntryByName("FrameStart").GetValue())
# Set trigger mode to On
trigger_mode=PySpin.CEnumerationPtr(nodemap.GetNode("TriggerMode"))
trigger_mode.SetIntValue(trigger_mode.GetEntryByName("On").GetValue())
trigger_source=PySpin.CEnumerationPtr(nodemap.GetNode("TriggerSource"))
trigger_source.SetIntValue(trigger_source.GetEntryByName("Line3").GetValue())
trigger_activation=PySpin.CEnumerationPtr(nodemap.GetNode("TriggerActivation"))
trigger_activation.SetIntValue(trigger_activation.GetEntryByName("RisingEdge").GetValue())
# Set trigger overlap to ReadOut (optional)
trigger_overlap=PySpin.CEnumerationPtr(nodemap.GetNode("TriggerOverlap"))
trigger_overlap.SetIntValue(trigger_overlap.GetEntryByName("ReadOut").GetValue())
# Ensure frame rate control is disabled
frame_rate_enable=PySpin.CBooleanPtr(nodemap.GetNode("AcquisitionFrameRateEnable"))
if PySpin.IsAvailable(frame_rate_enable) andPySpin.IsWritable(frame_rate_enable):
frame_rate_enable.SetValue(False)
pg.set_value(nodemap, 'ExposureMode', self.cam['options']['ExposureMode'])
pg.set_value(nodemap, 'ExposureAuto', self.cam['options']['ExposureAuto'])
pg.set_value(nodemap, 'ExposureTime', self.cam['options']['ExposureTime'])
acquisition_mode=PySpin.CEnumerationPtr(nodemap.GetNode("AcquisitionMode"))
acquisition_mode.SetIntValue(acquisition_mode.GetEntryByName("Continuous").GetValue())
# set trigger selector
acq_status_selector=PySpin.CEnumerationPtr(nodemap.GetNode("AcquisitionStatusSelector"))
acq_status_selector.SetIntValue(acq_status_selector.GetEntryByName("FrameTriggerWait").GetValue())
```
Thanks in advance!
Best,
Emre
Comments
1 comment