User Actions Tool

Applies to all firmware variants of Coaxlink and Grablink Duo frame grabbers

The User Actions Tool allow the application software to perform the following User Actions:

Setting high, setting low or toggling any bit of the UserOutputRegister,
Generate any one or more UserEvent.

To generate actions, the user application has to proceed in two steps:

1. Define a set of one or more User Actions in the UserActionsRegister.
2. Schedule the execution:
a. For an Immediate execution, use the ExecuteUserActions GenApi feature.
b. For a Deferred execution, use the ScheduleUserActions GenApi feature of any available UserActionsScheduler.

User Actions Tool functional block diagram

User output register

Coaxlink and Grablink Duo frame grabbers provide an 8-bit1 User Output Register where bits are named UserOutput0UserOutput7.

Any User Output Register bit can drive any one or more output-capable GPIO lines.

The user application has two options to define the state of the User Output Register bits :

The User Actions option allows to change the state of each bit individually.
Setting a value to the UserOutputValueAll to define the state of all bits.

Getting the value of UserOutputValueAll allows the user application to get the state of all User Output Register bits.

User events

Coaxlink and Grablink Duo frame grabbers provide a generator for 4 user-defined events named UserEvent1UserEvent4.

User-defined events can be used by various consumers:

To trigger a camera cycle using CycleTriggerSource feature
To trigger the start or the end of an acquisition sequence using StartOfSequenceTriggerSource and EndOfSequenceTriggerSource features
To trigger the start or the end of a line-scan acquisition using StartOfScanTriggerSource and EndOfScanTriggerSource features
As an event source for the Divider, Multiplier/Divider and the Delay tool using DividerToolSource, DelayToolSource<1:2> and MultiplierDividerToolSource features
As trigger source on the C2C-Link using the C2CLinkSynchronizationToolSource feature
As notification context using EventNotificationContext<1:3> features

User actions register

The User Actions Register is a 32-bit register that defines a set of User Actions that will be executed simultaneously.

The ClearUserActions feature allows to clear the register.

The AddUserActions feature allows the application to compose the actions set one by one:

Assert a user event using the UserEvent<1:4> values
Set any user output bit high using UserOutput<0:7>_High
Set any user output bit low using UserOutput<0:7>_Low
Toggle user output bit high using UserOutput<0:7>_Toggle

User actions scheduler

User actions scheduler functional diagram

The User Actions Scheduler (UAS) function block allows an application software to postpone the execution of the actions at predefined time or position.

Prior to schedule any user actions, the user application has to setup the UAS:

1. Define the SchedulerReference
2. Initialize the ScheduledActionsPool

Scheduler reference

The scheduler reference is a 32-bit value that can be a time or a position. It is defined by setting UserActionsSchedulerReference as follows:

InternalTime selects the frame grabber local time: a monotonic time base that increments by 1 every 1 microsecond and wraps around after about 71 minutes when it reaches the maximum value of 4,294,967,295.
QDC<1:4>Position select the Position Counter of the Quadrature Decoder tools QDC<1:4> respectively. In that case,

For correct operation of the UAS with a position reference:

The position counter must increment monotonically and not faster than every microsecond.
To ensure monotonic increments of the QDC position counter:
set properly QuadratureDecoderToolForwardDirection such that the counter increments when the object moves in the forward direction.
If it exists any backward motion, prevent the position counter to decrement by setting the QuadratureDecoderToolOutputMode to ForwardOnly or to FirstPassForwardOnly.

Scheduled user actions pool

The Scheduled User Actions Pool is a memory area where the Scheduled User Actions Sets are stored by the user application.

The pool is sub-divided into two sections:

1. A 512-locations FIFO
2. A 64-locations RING

FIFO operation

New Scheduled User Actions are first written to the FIFO before being automatically transferred to the RING when it contains at least one free location.

The first (oldest) entry is transferred first. The entries are not reordered!

The ScheduledUserActionsPoolStatus reports an AlmostFull value when the FIFO is almost full and is unable to accept a new entry.

Adding new Scheduled User Actions

To add a new Scheduled User Actions to the Pool, the user application must:

1. Ensure that there is at least one free location by getting the value of the ScheduledUserActionsPoolStatus GenApi feature,
2. Define a User Actions Set,
3. Determines the time/position 32-bit value when the actions are to be executed,
4. Set this value to ScheduledUserActions GenApi feature.

Removing Scheduled User Actions

Scheduled User Actions are removed from the pool when they are executed.

The pool can be cleared at any time by executing the DiscardScheduledUserActions GenICam command.

NOTE: It is not possible to remove a specific entry!

RING operation

At every increment of the 32-bit (time or position) reference counter, the Scanner reads all the locations and compares the scheduled reference time/position with the current time/position count value.

When the values are identical, the Scheduled User Actions Set is elected for execution at the end of the scan and removed from the pool.

When multiple sets are elected for execution, their actions are merged.

Merging a set low and a set high action on the same User Output Register bit results into a toggle action.

At the end of the scan, the merged elected actions are executed simultaneously. The time delay from the reference tick up to the execution of the elected actions is very small (sub-microsecond) and constant.