Behavior during hardware trigger input with multiple cameras

Continuing the discussion from How to use a common hardware trigger with multiple cameras:

General Information

  • Product: C57-6-M
  • Serial Number: 244888, 245218
  • Ensenso SDK Version: 4.0.1502
  • Operating System: Windows 10 64bit

Problem / Question

Please tell me the behavior when a hardware trigger occurs after opening the camera with the following code and applying the trigger.(One sensor is connected in parallel to two cameras.)

    NxLibItem camera1 = root[itmCameras][m_serial];
    NxLibItem camera2 = root[itmCameras][m_serial2];

    camera1[itmParameters][itmCapture][itmTriggerMode] = valFallingEdge;
    camera2[itmParameters][itmCapture][itmTriggerMode] = valFallingEdge;	

    nxLibSetString(&error, "/Execute/Parameters/Cameras", m_serial);
	nxLibSetString(&error, "/Execute/Command", "Open");
	nxLibSetString(&error, "/Execute/Parameters/Cameras", m_serial2);
	nxLibSetString(&error, "/Execute/Command", "Open");
	nxLibSetString(&error, "/Execute/Parameters/Cameras", m_serial_C);
	nxLibSetString(&error, "/Execute/Command", "Open");
	nxLibWaitForType(&error, "/Execute/Command", NxLibItemTypeNull, 1);
	nxLibSetString(&error, "/Execute/Parameters/Cameras", m_serial_C2);
	nxLibSetString(&error, "/Execute/Command", "Open");
	nxLibWaitForType(&error, "/Execute/Command", NxLibItemTypeNull, 1);

	NxLibCommand trigger(cmdTrigger);
	trigger.parameters()[itmSubset] = valAll;
	trigger.execute();

Q1. When the trigger is ON, does the projector of the cameras light up simultaneously, or does one camera light up first and then the other?

Q2. If they do not capture images simultaneously, is it possible to make them capture images at the same time?

Thank you.

Best regards,
K.N,

Hello,

In your setup, both cameras trigger at the same time, and thus the projectors light up simultaneously.

Keep in mind though that if both cameras are looking at overlapping areas of the same scene, their projectors will interfere with each other.

Best,
Bernhard

HI Bernhard

First, thanks a lot for your quick response!

As stated above, I received a response, but when I tested it on-site, the projector of the camera that was opened first lit up, and then 0.5 to 1 second later, the projector of the other camera lit up.

Looking at this profile, can you see that there is a delay in the illumination of the projectors from the two cameras? If so, could you please explain how to interpret the profile?

tmp_NxTreeEdit20260427-7(dipaari).zip (43.7 MB)

Best regards,
K.N,

Hello,

Unless you specified a trigger delay for one camera, they should trigger at the same time. Are the cameras properly wired together?

Just to make sure, you are not confusing the color sensor’s front light with the stereo projector?

I took a look at the log and I noticed that everything related to camera 245218 takes longer; triggering, retrieving, and computing the disparity map. That hits at a network configuration or camera settings issue.

I suggest two things:

  • Check the network configuration. If the two stereo cameras are transmitting simultaneously into a shared NIC, that might create a bottleneck. Please take a look at the network performance page in our manual.
  • Can you provide the camera tree for both cameras? Perhaps some individual camera’s settings are amiss.

Best,
Bernhard

HI Bernhard

I apologize for the delayed response. I was able to access the PC where the issue is occurring, so I’ve attached the Tree information. While capturing images with my custom software, I launched NxTreeEdit, selected “Copy value as JSON string” in the root directory, and saved it as a text file.

tree-edit20260512.txt (56.6 KB)

I’ve also attached the JsonFile settings from my custom software.

(The same settings are applied to both color cameras.)

cam1.json (17.0 KB)

cam2.json (17.0 KB)

color.json (5.5 KB)

Best regards,
K.N,