Documentation Center

  • Trial Software
  • Product Updates

Contents

Specifying Device Information

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 text string 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

<VideoFormat>

Specifies information about a video format. This is an optional element. A Device node can contain multiple VideoFormat nodes.

name=formatname, where formatname is a text string that identifies a particular device

<Include>

Include a Section node in another node. This is an optional element. A Device node can contain multiple Include nodes.

tag=sectionname, where sectionname is a text string that identifies a particular Section node

<Section>

Groups a set of nodes into a Section node. This is an optional element. A Device node can contain multiple Section nodes.

name=sectionname, where sectionname is the name you want to assign to the group of nodes

<Property>

Describes the properties of a device. This is an optional element. A Device node can contain multiple Property nodes.

See Specifying Property Information.

<Source>

Defines the source of video data. This is an optional element.

See Specifying Video Sources

<TriggerInfo>

Provides information about hardware triggers, such as source and condition. This is an optional element.

Note: A Device node can contain only one TriggerInfo node.

See Specifying Hardware Trigger Information.

Example: Device Node

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>
Was this topic helpful?