Matrix

The Matrix element provides an interface for matrix configuration. It represents a matrix that can be used to perform linear algebraic calculations on a set of input data, e.g. to perform coordinates transformations.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<Controller Name="Arcas 5EG-0">
  <Template Name="PositionControlTemplate" TemplateType="ProcessingBlock">
    <Updatable Name="Updatable">
      <FilePath>C:\your\path\to\PositionControlSimple-windows-x86_64.bin</FilePath>
    </Updatable>
  </Template>

  <AxisControl Name="X" Template="LogicalAxisControlStandard3rdOrderTemplate">
    <ProcessingBlock Name="PositionControl" Template="PositionControlTemplate">
      <Input Name="PositionSensor" Source="GantrySystem/PosX"/>
    </ProcessingBlock>
  </AxisControl>
  <AxisControl Name="Rx" Template="LogicalAxisControlStandard3rdOrderTemplate">
    <ProcessingBlock Name="PositionControl" Template="PositionControlTemplate">
      <Input Name="PositionSensor" Source="GantrySystem/PosRx"/>
    </ProcessingBlock>
  </AxisControl>

  <Matrix Name="GantrySystem" Rows="2" Columns="2" DataType="Float">
    <NamedMutation From="Output0" To="PosX"/>
    <NamedMutation From="Output1" To="PosRx"/>
    <NamedMutation From="Input0" To="EncX1"/>
    <NamedMutation From="Input1" To="EncX2"/>

    <Input Name="EncX1" Source="Cygnus Q3-48-10-1/EncX1/Actual"/>
    <Input Name="EncX2" Source="Cygnus Q3-48-10-1/EncX2/Actual"/>

    <Row Index="0">1 1</Row>
    <Row Index="1">1 -1</Row>
  </Matrix>

  <Controller Name="Cygnus Q3-48-10-1">
    <NamedMutation FromDefault="Enc1" To="EncX1"/>
    <NamedMutation FromDefault="Enc2" To="EncX2"/>
  </Controller>
</Controller>

Note

A Matrix is instantiated (and scoped) within a controller. If a Matrix with the provided name already exists in the controller where it is defined, then either:

  • if the exact same row and column dimensions are listed, then the matrix values are overwritten;

  • otherwise, initialization fails.

XML schema

Complex type MatrixType
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<xs:complexType name="MatrixType">
  <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Signal" type="SignalType"/>
    <xs:element name="Input" type="InputType"/>
    <xs:element name="Row" type="MatrixRowType"/>
    <xs:element name="Variant" type="MatrixVariantType"/>
    <xs:element name="NamedMutation" type="NamedMutationType"/>
  </xs:choice>
  <xs:attribute name="Name" type="xs:string" use="required"/>
  <xs:attribute name="Rows" type="xs:string"/>
  <xs:attribute name="Columns" type="xs:string"/>
  <xs:attribute name="DataType" type="xs:string"/>
</xs:complexType>

Attribute

Description

Name

Used to define a name for a Matrix block.

Rows

Used to define the number of rows of a Matrix block.

Columns

Used to define the number of columns of a Matrix block.

DataType

Used to define the data type of a Matrix block.

Complex type MatrixRowType
1
2
3
4
5
6
7
<xs:complexType name="MatrixRowType">
  <xs:simpleContent>
    <xs:extension base="xs:string">
      <xs:attribute name="Index" type="xs:string" use="required"/>
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>

Attribute

Description

Index

Defines the indexing of a matrix.

Complex type MatrixVariantType
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<xs:complexType name="MatrixVariantType">
  <xs:complexContent>
    <xs:extension base="BaseVariantType">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Signal" type="SignalType"/>
        <xs:element name="Input" type="InputType"/>
        <xs:element name="Row" type="MatrixRowType"/>
        <xs:element name="Variant" type="MatrixVariantType"/>
        <xs:element name="NamedMutation" type="NamedMutationType"/>
      </xs:choice>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

Attribute

Description

Name

Used to define a name for a parameter set block.