Configuration Script Example
The following script configures Data Forwarding frame grabbers for synchronized line-scan acquisition:
for (var grabber of grabbers) {
if (grabber.InterfacePort.get("InterfaceID").includes('df-camera')) {
console.log("Configuring slave card");
// set the Width/Height/PixelFormat of the (virtual) remote device (on
// the slave card) equal to the Width/Height/PixelFormat of the (real)
// camera (connected to the master card)
grabber.RemotePort.set("Width", 8192);
grabber.RemotePort.set("Height", 1);
grabber.RemotePort.set("PixelFormat", "Mono8");
// configure the event input tool EIN1
grabber.InterfacePort.set("EventInputToolSource[EIN1]", "A");
grabber.InterfacePort.set("EventInputToolActivation[EIN1]", "StartOfScan");
// configure the event input tool EIN2
grabber.InterfacePort.set("EventInputToolSource[EIN2]", "A");
grabber.InterfacePort.set("EventInputToolActivation[EIN2]", "EndOfScan");
// configure start/end of scan triggers
grabber.StreamPort.set("StartOfScanTriggerSource", "EIN1");
grabber.StreamPort.set("EndOfScanTriggerSource", "ScanLength");
grabber.StreamPort.set("ScanLength", 1000);
} else {
console.log("Configuring master card");
grabber.RemotePort.set("TestPattern", "GreyDiagonalRampMoving");
grabber.RemotePort.set("CxpLinkConfiguration", "CXP6_X4");
grabber.RemotePort.set("CxpLinkConfigurationPreferredSwitch", "CXP6_X4");
grabber.RemotePort.set("TriggerSource", "CXPin");
grabber.RemotePort.set("TriggerMode", "On");
grabber.DevicePort.set("CameraControlMethod", "RG");
grabber.DevicePort.set("ExposureReadoutOverlap", "True");
grabber.DevicePort.set("CxpTriggerAckTimeout", "0");
grabber.DevicePort.set("StrobeDuration", "0");
grabber.DevicePort.set("ExposureTime", "20");
grabber.DevicePort.set("ExposureRecoveryTime", "0");
grabber.DevicePort.set("CycleMinimumPeriod", "50");
// configure start/end of scan triggers
grabber.StreamPort.set("StartOfScanTriggerSource", "Immediate");
grabber.StreamPort.set("EndOfScanTriggerSource", "ScanLength");
grabber.StreamPort.set("ScanLength", 1000);
}
}
Note: In this example, the start-of-scan trigger is the receipt of the start-of-scan event from the master, but the end-of-scan trigger is generated
locally. One alternative would be to use EIN2
as EndOfScanTriggerSource
.