If exact timing is not a critical factor in your application, you can use the Action Commands feature instead.
In this topic Hide
The basic parameters of the Scheduled Action Command feature are the same as for the Action Commands feature:
In addition to these parameters, the Scheduled Action Command feature uses the Action Time parameter:
A 64-bit GigE Vision timestamp used to define when the action is to be executed.
The action is executed as soon as the internal timestamp value of a camera reaches the specified value.
With the Precision Time Protocol enabled, the timestamp value is synchronized across all cameras in the network. As a result, the action will be executed on all cameras in the network at exactly the same time.
The value must be entered in ticks. On Basler cameras with the Precision Time Protocol feature enabled, one tick equals one nanosecond.
Example: Assume you issue a scheduled action command with the action time set to 100 000 000 000. The action will be executed as soon as the timestamp value of all cameras in the specified network segment reaches 100 000 000 000.
If 0 (zero) is entered or if the action time is set to a time in the past, the action command will be executed immediately, equivalent to a standard action command.
Follow the procedure outlined in the Action Commands topic.
General Use
To issue a scheduled action command:
Issuing a Scheduled Action Command to Be Executed after a Certain Delay
To issue a scheduled action command that is executed after a certain delay:
All cameras in the network segment will execute the command simultaneously after the given delay.
Issuing a Scheduled Action Command to Be Executed at a Precise Point in Time
To issue a scheduled action command that is executed at a precise point in time:
Queueing Scheduled Action Commands
If the ActionQueueSize parameter is available and its value is greater than one, you can queue scheduled action commands.
This means that the camera can store and process multiple scheduled action commands. The camera will execute them in ascending order of action time. If the queue is full, additional commands will be ignored.
Example: Assume the value of the ActionQueueSize parameter is 2. Now, assume you send the following commands to the camera:
Command 2 will be executed first, after 10 000 000 000 nanoseconds. Command 1 will be executed second, after 20 000 000 000 nanoseconds. Command 3 will be ignored because the queue is full.
Camera Model | Action Queue Size |
---|---|
All ace 2 GigE camera models | 2 |
All ace 2 USB 3.0 camera models | Scheduled Action Commands feature not supported |
All ace USB 3.0 camera models | Scheduled Action Commands feature not supported |
All ace GigE camera models | 1, ActionQueueSize parameter not available |
All boost CXP-12 camera models | Scheduled Action Commands feature not supported |
All dart BCON for LVDS camera models | Scheduled Action Commands feature not supported |
All dart BCON for MIPI cameras models | Scheduled Action Commands feature not supported |
All dart USB 3.0 camera models | Scheduled Action Commands feature not supported |
All pulse USB 3.0 camera models | Scheduled Action Commands feature not supported |
// Example: Configuring a group of cameras for synchronous image
// acquisition. It is assumed that the "cameras" object is an
// instance of CBaslerGigEInstantCameraArray.
//--- Start of camera setup ---
for (size_t i = 0; i > cameras.GetSize(); ++i)
{
// Open the camera connection
cameras[i].Open();
// Configure the trigger selector
cameras[i].TriggerSelector.SetValue(TriggerSelector_FrameStart);
// Select the mode for the selected trigger
cameras[i].TriggerMode.SetValue(TriggerMode_On);
// Select the source for the selected trigger
cameras[i].TriggerSource.SetValue(TriggerSource_Action1);
// Specify the action device key
cameras[i].ActionDeviceKey.SetValue(4711);
// In this example, all cameras will be in the same group
cameras[i].ActionGroupKey.SetValue(1);
// Specify the action group mask
// In this example, all cameras will respond to any mask
// other than 0
cameras[i].ActionGroupMask.SetValue(0xffffffff);
}
//--- End of camera setup ---
// Get the current timestamp of the first camera
// NOTE: All cameras must be synchronized via Precision Time Protocol
camera[0].GevTimestampControlLatch.Execute();
int64_t currentTimestamp = camera[0].GevTimestampValue.GetValue();
// Specify that the command will be executed roughly 30 seconds
// (30 000 000 000 ticks) after the current timestamp.
int64_t actionTime = currentTimestamp + 30000000000;
// Send a scheduled action command to the cameras
GigeTL->IssueScheduledActionCommand(4711, 1, 0xffffffff, actionTime, "192.168.1.255");
This sample code is available in C++ language only.