I am using a Pointgrey Firefly MV (FFMV-03M2M/C to be precise) and want to trigger some external device with every shutter start. According to the datasheet, the camera supports IIDC 1.31 and also provides four GPIOs usable as a trigger and/or strobe signal outputs. As described in section 4.11.3 of the IIDC standard it should be possible to configure those strobe signal outputs using IIDC.
My application is implemented in C++ and uses libdc1394 to access and control the camera. So far, everything works quite nicely, but I cannot manage to configure the strobe signal outputs. As far as I understand libdc and IIDC it should be possible to enable the first output as follows (camera
is a pointer to a valid dc1394camera_t
):
dc1394error_t err;
uint64_t strobe_offset = 0x200;
uint32_t strobe_settings = 0;
err = dc1394_get_strobe_register(camera, strobe_offset, &strobe_settings);
if (err == DC1394_SUCCESS) {
/* Set bits 6 (strobe on) and 7 (active-high level)
IIDC uses msb 0, so we need to shift by 25/24 instead of 6/7 */
strobe_settings = strobe_settings | (1 << 25) | (1 << 24);
err = dc1394_set_strobe_register(camera, strobe_offset, strobe_settings);
}
if (err != DC1394_SUCCESS) {
log(LOG_ERROR, "Failed to set strobe.");
}
This does not generate any errors, but it also does not turn on the strobe signal output (even though the camera is capturing frames). I also tried all the other outputs by using a different offset (0x204, 0x208 and 0x20C) but to no avail. Then I checked all the availability inquiry fields at Strobe_CTRL_Inq
and Strobe_[0123]_Inq
but they all report that the strobe signal outputs are present. But interestingly, the On/Off_Inq
field in Strobe_[0123]_Inq
tells me that it is not possible to switch the output on or off while the Polarity_Inq
tells me that I could change the polarity setting (which I actually can't because you can only change settings when the strobe signal output is switched on). I tried configuring the outputs using the windows based driver utility provided by Pointgrey and there it works without any problems.
Any ideas what I might be doing wrong? Or is this camera not IIDC compatible in this regard?
Update: Ok, I tried three ways to enable the strobe output: Using my orignal code, using the absolute offset 0x1300 as suggested in the answer and using the offset 0x1110/0x1114 as written in the PointGrey register reference manual. I also tried setting delays, durations and/or directions (even though PIOs are not to be confused with the strobe outputs). No combination of registers and flags works so far. Maybe it is a bug in libdc1394 or PointGrey does some other magic in their proprietary driver. For now I give up and will try to find a different solution for triggering an external device.