To specify information about a particular device in an IMDF
file, use the Device
element. You can include as
many Device
nodes in an IMDF file as you want but
they must all be children of the root node.
In a Device
node, you specify the name of
the device as an attribute. The name is typically a character vector
defined by the device's SDK. Using other IMDF elements as children
of the Device
node, you can specify information
about device-specific properties, video formats, and trigger information.
The following example outlines how to use these elements to
create Device
nodes. The words in italics represent
text you define.
<ImageAcquisitionInfo> <Device device=devicename> <VideoFormat name=formatname> </VideoFormat> <Property constraint=constraint_value deviceSpecific=true_or_false name=property_name readOnly=always_never_or_whileRunning type=cell_double_int_or_string min=minimum_value max=maximum_value optional=on_or_off default=default_value> </Property> <TriggerInfo> <TriggerSource id=ID name=string> <TriggerCondition id=ID name=string/> </TriggerSource> </TriggerInfo </Device> . . . </ImageAcquisitionInfo>
The following table summarizes the elements that can be children of a Device node, in the order they must be specified. For an example, see Example: Device Node.
Element | Description | Attributes |
---|---|---|
| Specifies information about a video format. This is an
optional element. A |
|
| Include a |
|
| Groups a set of nodes into a |
|
| Describes the properties of a device. This is an optional
element. A | |
| Defines the source of video data. This is an optional element. | |
| Provides information about hardware triggers, such as source and condition. This is an optional element. Note:
A |
The following example creates a Device
node
containing property and trigger information. For more information
about the Property
element, see Specifying Property Information. For more information about
the TriggerInfo
element, see Specifying Hardware Trigger Information.
<Device name="PCVision"> <Property optional="on" constraint="enum" deviceSpecific="true" name="SyncSource" readOnly="whileRunning" type="string"> <EnumConstraintValue id="1" name="strippedSync" /> <EnumConstraintValue id="2" name="separateSync" /> <EnumConstraintValue id="3" name="compositeSync" /> <EnumConstraintValue id="4" name="variableScan" /> </Property> <Property optional="on" constraint="enum" deviceSpecific="true" name="FieldStart" readOnly="whileRunning" type="string"> <EnumConstraintValue id="0" name="evenField" /> <EnumConstraintValue id="1" name="oddField" /> </Property> <TriggerInfo> <TriggerSource id="1" name="extTrig"> <TriggerCondition id="0" name="risingEdge"/> <TriggerCondition id="1" name="fallingEdge"/> </TriggerSource> </TriggerInfo> </Device>