Viewer XML Details

Introduction

viewer.xml defines the views available to the Viewer tool. The elements in the XML define the user interface and layout as rendered in the View.

Data Record Sources

Viewer elements use data record fields to update their value. The data record, as defined in record.xml defines data fields referenced by the s attribute.

The viewer elements also use the s attribute to reference the data record fields defined in record.xml. If the data record contains no field with the given s attribute, the element will not be rendered in the Viewer.

The Element Tags


<viewer version="2.0">

This is the XML root element. It contains the version of the viewer syntax.


<views>

<views key="DMC40_0, DMC50_0, DMC41_3, DMC18_6, DMC18_2, DMC21_2, DMC30_0, DMC31_0, DMC42_0, DMC52_0">

Defines a group of views.


<view>

<view i="A" name="Axis A">

Defines a single view for rendering in a viewer tab.

The <view> element has one mandatory attribute, name. This is the name used to reference the view.


<v>

<v title="Profiler">

All elements within a <v> element are placed in the view in a vertical, top-to-bottom layout.

The optional attribute title causes the contents to be enclosed in a group box with the value of the title as the group box title. An empty string will provide a group box without a title.

In the abscence of an <h> or <v> element, all elements are laid out first in a horizontal, left-to-right layout. If the view area is too narrow to accomodate all the elements, the layout wraps top-to-bottom. This allows the Viewer to dock well in either format.


<h>

<h title="I/O">

All elements within an <h> element are placed in the view in a non-breaking, horizontal, left-to-right layout.

The optional attribute title causes the contents to be enclosed in a group box with the value of the title as the group box title. An empty string will provide a group box without a title.

In the abscence of an <h> or <v> element, all elements are laid out first in a horizontal, left-to-right layout. If the view area is too narrow to accomodate all the elements, the layout wraps top-to-bottom. This allows the Viewer to dock well in either format.


<vr />

<vr />

Draws a vertical rule.


<hr />

<hr />

Draws a horizontal rule.


<value>

<value s="_RPE" animation="motor" />

Displays the scaled value of a data record field. The field's description is printed along with the scaled value. If the field has a value map, the label will be two lines. The second line will show the appropriate mapped string for the current unscaled value.

The mandatory attribute s provides the data record field source from record.xml.

The optional attribute animation allows for an animated indicator. The valid values for this attribute are the following.

  • "motor" displays a rotating circle to indicate a motor. The circle turns whenever the value changes.

<motion>

<motion s="AXISA" />

Provides a graphical representation of the axis status data. This element is designed specifically for this particular field, namely AXISA, AXISB, AXISC, AXISD, AXISE, AXISF, AXISG, and AXISH.

The mandatory attribute s provides the data record field source from record.xml.


<led>

<led s="TA16" type="error"/>

Displays the value of a data record field as an array of soft LEDs. The number of LEDs displayed is dependent on the data type of the data record field.

The mandatory attribute s provides the data record field source from record.xml.

The optional attribute type changes the behaviour of the LED(s). The valid values for this attribute are the following.

  • "error" displays the active state of the LED in a different color to differentiate error state from others.

<scale>

<scale s="_LMT" max="31" orientation="vertical" key="DMC30_0, DMC31_0" />

Displays the scaled value of a data record field on a linear scale similar to an analog thermometer.

The mandatory attribute s provides the data record field source from record.xml.

The optional attribute max defines the maximum value of the scale. If omitted, the maximum value is determined from the field data type.

The optional attribute min defines the minimum value of the scale. If omitted, the minimum value is determined from the field data type.

The optional attribute orientation changes the look of the scale. The valid values for this attribute are the following.

  • "vertical" displays the scale vertically
  • "horizontal" displays the scale horizontally. This is the default if no attribute is provided.

<lcd>

<lcd s="_TPA" />

Displays the scaled value of a data record field in a retro-looking LCD style similar to a digital readout (DRO).

The mandatory attribute s provides the data record field source from record.xml.