Specifying Hardware Trigger Information
To specify hardware trigger information in an IMDF file, use the
TriggerInfo
node. A TriggerInfo
node can be
the child of the ImageAcquisitionInfo
, Device
,
VideoFormat
, and Section
nodes.
You specify the source of the hardware trigger in a TriggerSource
node that is the child of the TriggerInfo
node. You specify the
conditions under which trigger fires in one or more TriggerCondition
nodes, which are children of the TriggerSource
node.
The following example outlines how to use these elements to specify trigger information. The words in italics represent text you define.
<ImageAcquisitionInfo> <Device device=devicename> <TriggerInfo> <TriggerSource id=ID name=triggername> <TriggerCondition id=ID name=conditionname> </TriggerInfo> </Device> . . . </ImageAcquisitionInfo>
The following table lists the elements used to specify hardware trigger information.
Element | Description | Attributes |
---|---|---|
| Defines information about a hardware trigger. | None |
| Defines the source of the hardware trigger. A
| |
| Defines a condition that must be met before a hardware
trigger fires. A |
Specifying Trigger Sources
When you define a hardware trigger, you must define the source (or sources) of the
hardware trigger in one or more TriggerSource
nodes. In a
TriggerSource
node, you specify values for two attributes:
name
and id
. The value of the
name
attribute is visible to users of the toolbox in the
display returned by the toolbox triggerinfo
function. It is
typically set to some value that is recognized by the device's SDK.
<TriggerSource id="1" name="extTrig"> </TriggerSource>
Specifying Trigger Conditions
When you define a hardware trigger, you must define the conditions that must be
met before the trigger fires. The parent TriggerSource
node
specifies the trigger. In a TriggerCondition
node, you specify
values for two attributes: name
and id
. The
value of the name
attribute is visible to users of the toolbox in
the display returned by the toolbox triggerinfo
function. It is
typically set to some value that is recognized by the device's SDK.
<TriggerCondition id="1" name="risingEdge"> </TriggerCondition>