Relations

From GDTF Development
Jump to: navigation, search

<< GDTF File Tutorial

Relations describe the dependencies between DMX channels and channel functions. Relations can be used to describe mode dependencies or virtual attribute channels, for example. Virtual attributes can be added to a fixture by adding the attribute as normal but without giving the attribute relative DMX patch addresses in the Coarse, Fine, or Ultra column. Virtual attributes are often dimmer attributes that act as virtual master intensity control in fixtures that do not have this attribute. It could be a LED fixture that only has Red (ColorRGB1), Green (ColorRGB2), and Blue (ColorRGB3) attributes.

Virtual Attributes

Example: Fixture type with three color attributes and a virtual dimmer.
If there is a virtual attribute, the type of the relation is "Multiply". Every channel function has to have one relation per DMX channel it is to affect.
Only the DMX channels that control the color have a relative DMX patch address. The DMX channel of the dimmer does not. Every relation has a Master and a Slave. The Master links to the DMX channel while the Slave links to the channel function.
In this example the Master links to the dimmer and the Slave links to the color channel functions. Master is the "Name of the DMX channel"; Slave is "Name of the DMX channel.Name of the logical channel.Name of the channel function".

The name of the DMX channel is composed from the name of the linked geometry and the first logical channel.
Example:
Base_Dimmer

The name of the logical channel is the name of its attribute.

The name of the channel function can be edited by the user. By default, the name is composed from the name of the subattribute and an enumerated count that depends on the index of the channel function.
Example:
Dim 1
Dim 2
Strobe 3

Here, the Master is "Base_Dimmer"; the Slave is "Base_Dimmer.Dimmer.Dim 2"

xml code of this example:

       <DMXModes>
           <DMXMode Name="Mode 1" Geometry="Body">
               <DMXChannels>
                   <DMXChannel Coarse="1" Default="255/1" Highlight="255/1" Geometry="Pixel">
                       <LogicalChannel Attribute="ColorRGB1" >
                           <ChannelFunction SubAttribute="ColorRGB1" DMXFrom="0/1" PhysicalFrom="0" PhysicalTo="1" />
                       </LogicalChannel>
                   </DMXChannel>
                   <DMXChannel Coarse="2" Default="255/1" Highlight="255/1" Geometry="Pixel">
                       <LogicalChannel Attribute="ColorRGB2" >
                           <ChannelFunction SubAttribute="ColorRGB2" DMXFrom="0/1" PhysicalFrom="0" PhysicalTo="1" />
                       </LogicalChannel>
                   </DMXChannel>
                   <DMXChannel Coarse="3" Default="255/1" Highlight="255/1" Geometry="Pixel">
                       <LogicalChannel Attribute="ColorRGB3" >
                           <ChannelFunction SubAttribute="ColorRGB3" DMXFrom="0/255" PhysicalFrom="0" PhysicalTo="1" />
                       </LogicalChannel>
                   </DMXChannel>
                   <DMXChannel Highlight="255/1" Geometry="Pixel">
                       <LogicalChannel Attribute="Dimmer" >
                           <ChannelFunction SubAttribute="Dim" DMXFrom="0/1" PhysicalFrom="0" PhysicalTo="1" />
                       </LogicalChannel>
                   </DMXChannel>
               </DMXChannels>
               <Relations>
                   <Relation Name="Virtual Dimmer R" Master="Pixel_Dimmer" Slave="Pixel_ColorRGB1.ColorRGB1.ColorRGB1 1" Type="Multiply" />
                   <Relation Name="Virtual Dimmer G" Master="Pixel_Dimmer" Slave="Pixel_ColorRGB2.ColorRGB2.ColorRGB2 1" Type="Multiply" />
                   <Relation Name="Virtual Dimmer B" Master="Pixel_Dimmer" Slave="Pixel_ColorRGB3.ColorRGB3.ColorRGB3 1" Type="Multiply" />
               </Relations>
           </DMXMode>

Mode Dependency

Some attributes change function based on the value of a different attribute. An attribute that controls the rotation mode of a gobo, for example. Imagine a fixture that has an attribute that is used to select a gobo on a gobo wheel. First half of the DMX range will select the different gobos on the wheel, but the gobos are in an "index" mode. A second attribute controls the rotation of the gobo. When the selected gobo is in index mode, the rotation is set to be a degree number. The second half of the selection attribute also selects all the gobos on the wheel, but now in a continuous rotation mode. The rotation attribute will now control the rotation speed and direction.

The following example describes the rotating gobo of a device. There are two DMX channels that are used to control this unit. The logical channel of the first DMX channel (attribute Gobo1) has two channel functions. The first channel function (subattribute SlotSelect) describes the selection of indexed and rotating gobos. There are two value ranges that describe the selection of the individual gobos in indexed or continuous rotation mode. The second channel function (subattribute Spin) is used to describe the continuous rotation of the whole gobo wheel. The logical channel (attribute Gobo1Pos) of the second DMX channel has two channel functions. The first channel function (subattribute Index) describes the indexed mode of the rotating gobos. The second channel function (subattribute Rotation) describes the continuous rotation mode of the rotating gobos.
The functionality of these different ranges of the two DMX channels is linked by relations.
If an indexed gobo is selected on the first DMX channel, the second channel controls the index rotation. If a continuous rotating gobo is selected on the first channel, the second channel controls the direction and the speed of the rotating gobo.
The DMX value range of the selection of an indexed gobo on channel 1 goes from DMX 0/1 to DMX 60/1; The value range of the selection of rotating gobos goes from DMX 61/1 to DMX 110/1. Here, you need two relations to link these ranges.

xml code of this example:

       <DMXModes>
           <DMXMode Name="Default" Geometry="Head">
               <DMXChannels>

First DMX channel: selection of index or continuous rotating gobos / continuous rotation of the entire gobo wheel

                   <DMXChannel Coarse="1"  Geometry="Head">
                       <LogicalChannel Attribute="Gobo1">
                           <ChannelFunction SubAttribute="SlotSelect" DMXFrom="0/1" Wheel="GoboWheel1">

Start of the first range of values: selection of indexed gobos

                               <ChannelSet Name="Open" DMXFrom="0/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="1" />
                               <ChannelSet Name="Gobo 1 index" DMXFrom="11/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="2" />
                               <ChannelSet Name="Gobo 2 index" DMXFrom="21/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="3" />
                               <ChannelSet Name="Gobo 3 index" DMXFrom="31/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="4" />
                               <ChannelSet Name="Gobo 4 index" DMXFrom="41/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="5" />
                               <ChannelSet Name="Gobo 5 index" DMXFrom="51/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="6" />

Start of the second range of values: selection of continuous rotating gobos

                               <ChannelSet Name="Gobo 1 rot" DMXFrom="61/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="2" />
                               <ChannelSet Name="Gobo 2 rot" DMXFrom="71/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="3" />
                               <ChannelSet Name="Gobo 3 rot" DMXFrom="81/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="4" />
                               <ChannelSet Name="Gobo 4 rot" DMXFrom="91/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="5" />
                               <ChannelSet Name="Gobo 5 rot" DMXFrom="101/1" PhysicalFrom="0" PhysicalTo="0" WheelSlotIndex="6" />
                           </ChannelFunction>
                           <ChannelFunction SubAttribute="Spin" DMXFrom="111/1" >
                               <ChannelSet Name="CCW" DMXFrom="111/1" PhysicalFrom="-60" PhysicalTo="0" />
                               <ChannelSet Name="Stop" DMXFrom="183/1" PhysicalFrom="0" PhysicalTo="0" />
                               <ChannelSet Name="CW" DMXFrom="184/1" PhysicalFrom="0" PhysicalTo="60" />
                           </ChannelFunction>
                       </LogicalChannel>
                   </DMXChannel>

Second DMX channel: angle of indexed rotation of gobo / direction and speed of continuous rotation

                   <DMXChannel Coarse="2" Geometry="Head">
                       <LogicalChannel Attribute="Gobo1Pos">

First channel function: angle of indexed rotation of gobo

                           <ChannelFunction SubAttribute="Index" DMXFrom="0/1" PhysicalFrom="0" PhysicalTo="540" />

Second channel function: direction and speed of continuous rotation

                           <ChannelFunction SubAttribute="Rotation" DMXFrom="0/1" PhysicalFrom="-150" PhysicalTo="150" 
                               <ChannelSet Name="CW" DMXFrom="0/1" PhysicalFrom="-150" PhysicalTo="0" />
                               <ChannelSet Name="Stop" DMXFrom="128/1" PhysicalFrom="0" PhysicalTo="0" />
                               <ChannelSet Name="CCW" DMXFrom="129/1" PhysicalFrom="0" PhysicalTo="150"/>
                           <ChannelFunction/>
                       </LogicalChannel>
                   </DMXChannel>
               </DMXChannels>
               <Relations>

First relation describes the index mode. If the DMX value of the Master "Head_Gobo1" is within the range DMX 0/1 to DMX 60/1, the channel function "Index 1" is active. If the DMX value of the Master "Head_Gobo1" is within the range DMX 61/1 to 110/1, the channel function "Rotation 2" is active.

                   <Relation Name="Gobo Index" Master="Head_Gobo1" Slave="Head_Gobo1Pos.Gobo1Pos.Index 1" Type="Mode" DMXfrom="0/1" DMXTo="60/1" />
                   <Relation Name="Gobo Rotation" Master="Head_Gobo1" Slave="Head_Gobo1Pos.Gobo1Pos.Rotation 2" Type="Mode" DMXFrom="61/1" DMXTo="110/1" />
               </Relations>
           </DMXMode>
       </DMXModes>