Main Content

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

<TriggerInfo>

Defines information about a hardware trigger.

None

<TriggerSource>

Defines the source of the hardware trigger. A Triggerinfo node must contain or more TriggerSource nodes.

See Specifying Trigger Sources.

<TriggerCondition>

Defines a condition that must be met before a hardware trigger fires. A TriggerSource node can contain zero or more TriggerCondition nodes.

See Specifying Trigger Conditions.

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>