This can be useful to control external events or devices, e.g., a light source.
To configure the status of all output lines in a single operation, use the User Output Value All feature.
The line source of the desired output line must be set to a User Output signal.
How to set the output line status depends on how many User Output line sources are available on your camera model.
One User Output line source is available ("User Output"):
Multiple User Output line sources are available (e.g., "User Output 1", "User Output 2"):
// Select Line 2 (output line)
camera.LineSelector.SetValue(LineSelector_Line2);
// Set the source signal to User Output 1
camera.LineSource.SetValue(LineSource_UserOutput1);
// Select the User Output 1 signal
camera.UserOutputSelector.SetValue(UserOutputSelector_UserOutput1);
// Set the User Output Value for the User Output 1 signal to true.
// Because User Output 1 is set as the source signal for Line 2,
// the status of Line 2 is set to high.
camera.UserOutputValue.SetValue(true);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 2 (output line)
CEnumerationPtr(nodemap.GetNode("LineSelector"))->FromString("Line2");
// Set the source signal to User Output 1
CEnumerationPtr(nodemap.GetNode("LineSource"))->FromString("UserOutput1");
// Select the User Output 1 signal
CEnumerationPtr(nodemap.GetNode("UserOutputSelector"))->FromString("UserOutput1");
// Set the User Output Value for the User Output 1 signal to true.
// Because User Output 1 is set as the source signal for Line 2,
// the status of Line 2 is set to high.
CBooleanPtr(nodemap.GetNode("UserOutputValue"))->SetValue(true);
// Select Line 2 (output line)
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line2);
// Set the source signal to User Output 1
camera.Parameters[PLCamera.LineSource].SetValue(PLCamera.LineSource.UserOutput1);
// Select the User Output 1 signal
camera.Parameters[PLCamera.UserOutputSelector].SetValue(PLCamera.UserOutputSelector.UserOutput1);
// Set the User Output Value for the User Output 1 signal to true.
// Because User Output 1 is set as the source signal for Line 2,
// the status of Line 2 is set to high.
camera.Parameters[PLCamera.UserOutputValue].SetValue(true);
// Select Line 2 (output line)
Pylon.DeviceFeatureFromString(hdev, "LineSelector", "Line2");
// Set the source signal to User Output 1
Pylon.DeviceFeatureFromString(hdev, "LineSource", "UserOutput1");
// Select the User Output 1 signal
Pylon.DeviceFeatureFromString(hdev, "UserOutputSelector", "UserOutput1");
// Set the User Output Value for the User Output 1 signal to true.
// Because User Output 1 is set as the source signal for Line 2,
// the status of Line 2 is set to high.
Pylon.DeviceSetBooleanFeature(hdev, "UserOutputValue", true);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Select Line 2 (output line) */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line2");
CHECK(errRes);
/* Set the source signal to User Output 1 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSource", "UserOutput1");
CHECK(errRes);
/* Select the User Output 1 signal */
errRes = PylonDeviceFeatureFromString(hdev, "UserOutputSelector", "UserOutput1");
CHECK(errRes);
/* Set the User Output Value for the User Output 1 signal to true. */
/* Because User Output 1 is set as the source signal for Line 2, */
/* the status of Line 2 is set to high. */
errRes = PylonDeviceSetBooleanFeature(hdev, "UserOutputValue", 1);
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.