<?xml version="1.0" encoding="ISO-8859-1"?>
<device image="Mh.gif" initsequence="set 0 128;set 1 128;set 2 0;set 3 0;set 4 0;set 5 0;set 6 0;set 7 0;set 8 0;sebbt 9 0;set 10 0;set 11 0">
	<information>
		<name>PHS-250</name>
		<vendor>Futurelight</vendor>
		<author>DMXControl Projects e.V.</author>
		<version>2</version>
	</information>
	<channels>
		<function channel="0"  minvalue="0" maxvalue="255" name="Pan"             fade="yes" type="pan"                         />
		<function channel="1"  minvalue="0" maxvalue="255" name="Tilt"            fade="yes" type="tilt"                        />
		<function channel="2"  minvalue="0" maxvalue="255" name="Geschwindigkeit" fade="no"                 action="GetGeschw"  />
		<function channel="3"  minvalue="0" maxvalue="255" name="Farbe"           fade="no"  type="color"   action="GetColor"   />
		<function channel="4"  minvalue="0" maxvalue="255" name="stat Gobo"       fade="no"  type="gobo"    action="GetGobostat"/>
		<function channel="5"  minvalue="0" maxvalue="255" name="rot Gobo"        fade="no"                 action="GetGoborot" />
		<function channel="6"  minvalue="0" maxvalue="255" name="Goborotation"    fade="no"  type="gobo"    action="GetRotate"  />
		<function channel="7"  minvalue="0" maxvalue="255" name="Prisma"          fade="no"                 action="GetPrisma"  />
		<function channel="8"  minvalue="0" maxvalue="255" name="Focus"           fade="yes"                                    />
		<function channel="9"  minvalue="0" maxvalue="255" name="Shutter"         fade="no"                 action="GetShutter" />
		<function channel="10" minvalue="0" maxvalue="255" name="Dimmer"          fade="yes" type="dimmer"                      />
		<function channel="11" minvalue="0" maxvalue="255" name="Multifunktion"   fade="no"                                     />
		<function channel="12" minvalue="0" maxvalue="255" name="a"               fade="yes"                                    />
		<function channel="13" minvalue="0" maxvalue="255" name="b"               fade="yes"                                    />
		<function channel="14" minvalue="0" maxvalue="255" name="c"               fade="yes"                                    />
		<function channel="15" minvalue="0" maxvalue="255" name="Iris"            fade="yes"                                    />
	</channels>
	<form width="390" height="322">
		<deviceimage top="0" left="0" width="33" height="33"/>
		<devicename top="0" left="40" width="129" height="17"/>
		<deviceadress top="16" left="40" width="129" height="17"/>
		<position top="60" left="8" height="177" width="177"/>
		<command top="40" left="0" width="65" caption="Lampe an" clicksequence="save 11;set 11 64;hold 5500;restore 11"/>
		<command top="40" left="66" width="80" caption="Lampe aus" clicksequence="save 11;set 11 224;hold 5500;restore 11"/>
		<command top="40" left="147" width="40" caption="Reset" clicksequence="save 11;set 11 80;hold 5500;restore 11"/>
		<label top="240" left="0" caption="Geschwindigkeit (Kanal 3)"/>
		<dropdown top="256" left="0" width="130" name="geschw" action="SetGeschw">
			<item caption="Max. Gechwindigkeit" value="0"/>
			<item caption="Abnehm. Geschwindigkeit" value="15"/>
			<item caption="Blackout Pan/Tilt-Beweg" value="226"/>
			<item caption="Blackout Farb/Gobowechs" value="236"/>
			<item caption="Keine Funktion" value="246"/>
		</dropdown>
		<label top="240" left="145" caption=" Speed"/>
		<slider top="256" left="130" height="25" width="65" startvalue="0" endvalue="210" tickfreq="55" smallchange="1" largechange="25" name="geschw_speed" action="SetGeschw"/>
		<label top="280" left="0" caption="Farbe (Kanal 4)"/>
		<dropdown top="296" left="0" width="130" name="color_color" action="SetColor">
			<item caption="Weiss" value="0"/>
			<item caption="Hellblau" value="14"/>
			<item caption="Rot" value="28"/>
			<item caption="Blau" value="42"/>
			<item caption="Grün" value="56"/>
			<item caption="Gelb" value="70"/>
			<item caption="Magenta" value="84"/>
			<item caption="Hellgrün" value="98"/>
			<item caption="Rainbow vorwärts" value="128"/>
			<item caption="keine Rotation" value="188"/>
			<item caption="Rainbow rückwärts" value="194"/>
		</dropdown>
		<label top="280" left="145" caption=" Speed"/>
		<slider top="296" left="130" height="25" width="65" startvalue="0" endvalue="59" tickfreq="9" smallchange="1" largechange="5" name="color_speed" action="SetColor"/>
		<label top="0" left="200" caption="statisches Gobo (Kanal 5)"/>
		<dropdown top="16" left="200" width="121" name="gobos_gobo" action="SetGobo">
			<item caption="Offen" value="0"/>
			<item caption="Gobo 1" value="14"/>
			<item caption="Gobo 2" value="28"/>
			<item caption="Gobo 3" value="42"/>
			<item caption="Gobo 4" value="56"/>
			<item caption="Gobo 5" value="70"/>
			<item caption="Gobo 6" value="84"/>
			<item caption="Gobo 7" value="98"/>
			<item caption="Gobo 1 Shake" value="112"/>
			<item caption="Gobo 2 Shake" value="128"/>
			<item caption="Gobo 3 Shake" value="144"/>
			<item caption="Gobo 4 Shake" value="160"/>
			<item caption="Gobo 5 Shake" value="176"/>
			<item caption="Gobo 6 Shake" value="192"/>
			<item caption="Gobo 7 Shake" value="208"/>
			<item caption="rot. Goborad" value="224"/>
			<item caption="rot. Goborad schnell" value="240"/>
		</dropdown>
		<label top="0" left="335" caption=" Speed  "/>
		<slider top="16" left="320" height="25" width="65" startvalue="0" endvalue="15" tickfreq="9" smallchange="1" largechange="5" name="gobos_speed" action="SetGobo"/>
		<label top="40" left="200" caption="rotierendes Gobo (Kanal 6)"/>
		<dropdown top="56" left="200" width="121" name="gobos_goborot" action="SetGoborot">
			<item caption="Offen" value="0"/>
			<item caption="rot Gobo 1" value="10"/>
			<item caption="rot Gobo 2" value="20"/>
			<item caption="rot Gobo 3" value="30"/>
			<item caption="rot Gobo 4" value="40"/>
			<item caption="rot Gobo 5" value="50"/>
			<item caption="rot Gobo 6" value="60"/>
			<item caption="rot Gobo 1 Shake" value="70"/>
			<item caption="rot Gobo 2 Shake" value="90"/>
			<item caption="rot Gobo 3 Shake" value="110"/>
			<item caption="rot Gobo 4 Shake" value="130"/>
			<item caption="rot Gobo 5 Shake" value="150"/>
			<item caption="rot Gobo 6 Shake" value="170"/>
			<item caption="rot Goborad S1" value="190"/>
			<item caption="rot Goborad S2" value="210"/>
			<item caption="rot Goborad S3" value="230"/>
		</dropdown>
		<label top="40" left="335" caption=" Speed  "/>
		<slider top="56" left="320" height="25" width="65" startvalue="0" endvalue="19" tickfreq="9" smallchange="1" largechange="5" name="gobos_speedrot" action="SetGoborot"/>
		<label top="80" left="200" caption="Goborotation (Kanal 7)"/>
		<dropdown top="96" left="200" width="121" name="rotate" action="SetRotate">
			<item caption="Indizierung aus" value="0"/>
			<item caption="Indizierung 1" value="1"/>
			<item caption="Indizierung 2" value="63"/>
			<item caption="Vorwärtsrotation" value="128"/>
			<item caption="Rotation aus" value="190"/>
			<item caption="Rückwärtsrotation" value="194"/>
		</dropdown>
		<label top="80" left="335" caption=" Speed  "/>
		<slider top="96" left="320" height="25" width="65" startvalue="0" endvalue="61" tickfreq="10" smallchange="1" largechange="25" name="rotate_speed" action="SetRotate"/>
		<label top="120" left="200" caption="Prisma (Kanal 8)"/>
		<dropdown top="136" left="200" width="121" name="PrismaSet" action="SetPrisma">
			<item caption="Offen" value="0"/>
			<item caption="Prismarot. vorwärts" value="4"/>
			<item caption="keine Rotation" value="64"/>
			<item caption="Prismarot. rückwärts" value="68"/>
			<item caption="Marko 1" value="128"/>
			<item caption="Marko 2" value="136"/>
			<item caption="Marko 3" value="144"/>
			<item caption="Marko 4" value="152"/>
			<item caption="Marko 5" value="160"/>
			<item caption="Marko 6" value="168"/>
			<item caption="Marko 7" value="176"/>
			<item caption="Marko 8" value="184"/>
			<item caption="Marko 9" value="192"/>
			<item caption="Marko 10" value="200"/>
			<item caption="Marko 11" value="208"/>
			<item caption="Marko 12" value="216"/>
			<item caption="Marko 13" value="224"/>
			<item caption="Marko 14" value="232"/>
			<item caption="Marko 15" value="240"/>
			<item caption="Marko 16" value="248"/>
		</dropdown>
		<label top="120" left="335" caption=" Speed  "/>
		<slider top="136" left="320" height="25" width="65" startvalue="0" endvalue="59" tickfreq="10" smallchange="1" largechange="25" name="prisma_speed" action="SetPrisma"/>
		<label top="160" left="200" caption="Fokus (Kanal 9)"/>
		<slider top="176" left="192" height="25" width="193" startvalue="0" endvalue="255" tickfreq="20" smallchange="1" largechange="25" name="focus" channel="8" />
		<label top="200" left="200" caption="Shutter (Kanal 10)"/>
		<dropdown top="216" left="200" width="121" name="shutter" action="SetShutter">
			<item caption="Geschlossen" value="0"/>
			<item caption="Dimmer aktiv" value="32"/>
			<item caption="Strobo Effekt" value="-1"/>
			<item caption="Strobo Zufall" value="-2"/>
			<item caption="Offen" value="-3"/>
		</dropdown>
		<label top="200" left="335" caption=" Speed  "/>
		<slider top="216" left="320" height="25" width="65" startvalue="0" endvalue="95" tickfreq="10" smallchange="1" largechange="25" name="strobe_speed" action="SetShutter"/>
		<label top="240" left="200" caption="Dimmer (Kanal 11)"/>
		<slider top="256" left="192" height="25" width="193" startvalue="0" endvalue="255" tickfreq="20" smallchange="1" largechange="25" name="dimmer_speed" channel="11" />
		<label top="280" left="200" caption="Multifunktion (Kanal 12)"/>
		<dropdown top="296" left="200" width="182" name="multi" channel="11">
			<item caption="Norm-Farbw./Pos-Su kürz Weg" value="0"/>
			<item caption="Norm-Farbw./Pos-Su Uhr-Sinn" value="16"/>
			<item caption="Farbw jed.Pos/Pos-Su kürz Weg" value="32"/>
			<item caption="Farbw jed.Pos/Pos-Su Uhr-Sinn" value="48"/>
			<item caption="Internes Prog. 1" value="96"/>
			<item caption="Internes Prog. 2" value="112"/>
			<item caption="Internes Prog. 3" value="128"/>
			<item caption="Internes Prog. 4" value="144"/>
			<item caption="Internes Prog. 5" value="160"/>
			<item caption="Internes Prog. 6" value="176"/>
			<item caption="Internes Prog. 7" value="192"/>
			<item caption="Internes Prog. 8" value="208"/>
		</dropdown>
	</form>
	<code>
		<procedure name="INITCONTROLS">
   !call|GetGeschw$
   !call|GetColor$
   !call|GetGobostat$
   !call|GetGoborot$
   !call|GetRotate$
   !call|GetPrisma$
   !call|GetShutter$
		</procedure>
		<procedure name="GetGeschw">
 !if|{channel_2} &lt; 1|
  !set_control|geschw|{channel_2}$
  !set_control|geschw_speed|0$
|
 !if|({channel_2} = 15) and ({channel_2} &lt; 226)|
  !set_control|geschw|-1$
  !set_control|geschw_speed|({channel_2} -15)$
 $
$
		</procedure>
		<procedure name="SetGeschw">
!if|{geschw}|gt|-1|
 !set_channel|2|{geschw}$
$
!if|{geschw}|eq|-1|
 !set_channel|2|(15+{geschw_speed})$
$
		</procedure>
		
		<procedure name="GetColor">
 !if|{channel_3} &lt; 128|
 !set_control|color_color|{channel_3}$
 !set_control|color_speed|0$
|
 !if|{channel_3} = 128|
 !set_control|color_color|{channel_3}$
 !set_control|color_speed|0$
$
 !if|({channel_3} &gt; 127) and ({channel_3} &lt; 188)|
  !set_control|color_color|-1$
  !set_control|color_speed|({channel_3}-128)$
 $

  !if|{channel_3} = 194|
 !set_control|color_color|{channel_3}$
 !set_control|color_speed|0$
$
 !if|({channel_3} &gt; 193) and ({channel_3} &lt; 256)|
  !set_control|color_color|-2$
  !set_control|color_speed|({channel_3}-194)$
 $
$
		</procedure>
		<procedure name="SetColor">
!if|{color_color}|gt|-1|
 !set_channel|3|{color_color}$
$
 !if|{color_color}|eq|-1|
  !set_channel|3|(128+{color_speed})$
 $

 !if|{color_color}|eq|-2|
  !set_channel|3|(194+{color_speed})$
 $

		</procedure>
		<procedure name="GetGobostat">
!if|{channel_4} &lt; 112|
 !set_control|gobos_gobo|{channel_4}$
 !set_control|gobos_speed|0$
|
 !if|({channel_4} = 112) and ({channel_4} &lt; 128)|
  !set_control|gobos_gobo|-1$
  !set_control|gobos_speed|({channel_4}-112)$
 $
 !if|({channel_4} = 128) and ({channel_4} &lt; 144)|
  !set_control|gobos_gobo|-2$
  !set_control|gobos_speed|({channel_4}-128)$
 $
!if|({channel_4} = 144) and ({channel_4} &lt; 160)|
  !set_control|gobos_gobo|-3$
  !set_control|gobos_speed|({channel_4}-144)$
 $
!if|({channel_4} = 160) and ({channel_4} &lt; 176)|
  !set_control|gobos_gobo|-4$
  !set_control|gobos_speed|({channel_4}-160)$
 $
!if|({channel_4} = 176) and ({channel_4} &lt; 192)|
  !set_control|gobos_gobo|-5$
  !set_control|gobos_speed|({channel_4}-176)$
 $
!if|({channel_4} = 192) and ({channel_4} &lt; 208)|
  !set_control|gobos_gobo|-6$
  !set_control|gobos_speed|({channel_4}-192)$
 $
!if|({channel_4} = 208) and ({channel_4} &lt; 224)|
  !set_control|gobos_gobo|-7$
  !set_control|gobos_speed|({channel_4}-208)$
 $
 !if|({channel_4} = 224) and ({channel_4} &lt; 240)|
  !set_control|gobos_gobo|-8$
  !set_control|gobos_speed|({channel_4}-224)$
 $ 
 !if|({channel_4} = 240) and ({channel_4} &lt; 256)|
  !set_control|gobos_gobo|-9$
  !set_control|gobos_speed|({channel_4}-240)$
 $
$
		</procedure>
		<procedure name="SetGobo">
!if|{gobos_gobo}|gt|-1|
 !set_channel|4|{gobos_gobo}$
$
!if|{gobos_gobo}|eq|-1|
 !set_channel|4|(112+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-2|
 !set_channel|4|(128+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-3|
 !set_channel|4|(144+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-4|
 !set_channel|4|(160+{gobos_speed})$
$
 !if|{gobos_gobo}|eq|-5|
 !set_channel|4|(176+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-6|
 !set_channel|4|(192+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-7|
 !set_channel|4|(208+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-8|
 !set_channel|4|(224+{gobos_speed})$
$
!if|{gobos_gobo}|eq|-9|
 !set_channel|4|(240+{gobos_speed})$
$

		</procedure>
		<procedure name="GetGoborot">
!if|{channel_5} &lt; 70|
 !set_control|gobos_goborot|{channel_5}$
 !set_control|gobos_speedrot|0$
|
 !if|({channel_5} = 70) and ({channel_5} &lt; 90)|
  !set_control|gobos_goborot|-1$
  !set_control|gobos_speedrot|({channel_5}-70)$
 $
 !if|({channel_5} = 90) and ({channel_5} &lt; 110)|
  !set_control|gobos_goborot|-2$
  !set_control|gobos_speedrot|({channel_5}-90)$
 $
!if|({channel_5} = 110) and ({channel_5} &lt; 130)|
  !set_control|gobos_goborot|-3$
  !set_control|gobos_speedrot|({channel_5}-110)$
 $
!if|({channel_5} = 130) and ({channel_5} &lt; 150)|
  !set_control|gobos_goborot|-4$
  !set_control|gobos_speedrot|({channel_5}-130)$
 $
!if|({channel_5} = 150) and ({channel_5} &lt; 170)|
  !set_control|gobos_goborot|-5$
  !set_control|gobos_speedrot|({channel_5}-150)$
 $
!if|({channel_5} = 170) and ({channel_5} &lt; 190)|
  !set_control|gobos_goborot|-6$
  !set_control|gobos_speedrot|({channel_5}-170)$
 $
!if|({channel_5} = 190) and ({channel_5} &lt; 210)|
  !set_control|gobos_goborot|-7$
  !set_control|gobos_speedrot|({channel_5}-190)$
 $
 !if|({channel_5} = 210) and ({channel_5} &lt; 230)|
  !set_control|gobos_goborot|-8$
  !set_control|gobos_speedrot|({channel_5}-210)$
 $ 
 !if|({channel_5} = 230) and ({channel_5} &lt; 256)|
  !set_control|gobos_goborot|-9$
  !set_control|gobos_speedrot|({channel_5}-230)$
 $
$
		</procedure>
		<procedure name="SetGoborot">
!if|{gobos_goborot}|gt|-1|
 !set_channel|5|{gobos_goborot}$
$
!if|{gobos_goborot}|eq|-1|
 !set_channel|5|(70+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-2|
 !set_channel|5|(90+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-3|
 !set_channel|5|(110+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-4|
 !set_channel|5|(130+{gobos_speedrot})$
$
 !if|{gobos_goborot}|eq|-5|
 !set_channel|5|(150+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-6|
 !set_channel|5|(170+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-7|
 !set_channel|5|(190+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-8|
 !set_channel|5|(210+{gobos_speedrot})$
$
!if|{gobos_goborot}|eq|-9|
 !set_channel|5|(230+{gobos_speedrot})$
$

		</procedure>
		
<procedure name="GetRotate">
  !if|({channel_6} = 0) or ({channel_6} = 190)|
    !set_control|rotate|{channel_6}$
    !set_control|rotate_speed|0$
  |
  !if|({channel_6} &gt; 0) and ({channel_6} &lt; 62)|
    !set_control|rotate|1$
    !set_control|rotate_speed|({channel_6} -1)$
  $
  !if|({channel_6} &gt; 62) and ({channel_6} &lt; 127)|
    !set_control|rotate|63$
    !set_control|rotate_speed|({channel_6}-63)$
  $
  !if|({channel_6} &gt; 127) and ({channel_6} &lt; 189)|
    !set_control|rotate|128$
    !set_control|rotate_speed|({channel_6}-128)$
  $
  !if|({channel_6} &gt; 193) and ({channel_6} &lt; 256)|
    !set_control|rotate|194$
    !set_control|rotate_speed|({channel_6}-194)$
  $
  $
</procedure>

<procedure name="SetRotate">
  !if|({rotate} = 0) or ({rotate} = 190)|
    !set_channel|6|{rotate}$
  $
  !if|{rotate}|eq|1|
    !set_channel|6|(1+{rotate_speed})$
  $
  !if|{rotate}|eq|63|
    !set_channel|6|(63+{rotate_speed})$
  $
  !if|{rotate}|eq|128|
    !set_channel|6|(128+{rotate_speed})$
  $
  !if|{rotate}|eq|194|
    !set_channel|6|(194+{rotate_speed})$
  $
</procedure>

<procedure name="GetPrisma">
  !if|{channel_7} &lt; 4|
    !set_control|PrismaSet|{channel_7}$
    !set_control|prisma_speed|0$
  |
  !if|({channel_7} &gt; 3) and ({channel_7} &lt; 64)|
    !set_control|PrismaSet|4$
    !set_control|prisma_speed|({channel_7} -4)$
  $
  !if|({channel_7} &gt; 67) and ({channel_7} &lt; 128)|
    !set_control|PrismaSet|68$
    !set_control|prisma_speed|({channel_7}-68)$
  $
  $
</procedure>

<procedure name="SetPrisma">
  !if|{PrismaSet}|lt|4|
    !set_channel|7|{PrismaSet}$
  $
  !if|{PrismaSet}|eq|64|
    !set_channel|7|{PrismaSet}$
  $
  !if|{PrismaSet}|gt|127|
    !set_channel|7|{PrismaSet}$
  $
  !if|{PrismaSet}|eq|4|
    !set_channel|7|(4+{prisma_speed})$
  $
  !if|{PrismaSet}|eq|68|
    !set_channel|7|(68+{prisma_speed})$
  $
</procedure>

		<procedure name="GetShutter">

!if|({channel_9} &gt; -1) and ({channel_9} &lt; 32)|
 !set_control|shutter|0$
 !set_control|strobe_speed|0$

$
!if|({channel_9} &gt; 31) and ({channel_9} &lt; 64)|
 !set_control|shutter|32$
 !set_control|strobe_speed|0$
 $

!if|({channel_9} &gt; 63) and ({channel_9} &lt; 160)|
 !set_control|shutter|-1$
  !set_control|strobe_speed|({channel_9}-64)$
$

!if|({channel_9} &gt; 191) and ({channel_9} &lt; 224)|
 !set_control|shutter|-2$
 !set_control|strobe_speed|(({channel_9}-192)*3)$
$

!if|({channel_9} &gt; 223) and ({channel_9} &lt; 256)|
 !set_control|shutter|-3$
 !set_control|strobe_speed|0$
$

		</procedure>
		<procedure name="SetShutter">

!if|({shutter} = 0)|
 !set_channel|9|{shutter}$
 !set_control|10|{dimmer_speed}|0$
$
!if|({shutter} = 32)|
 !set_channel|9|{shutter}$
$
 !if|({shutter} = -1)|
  !set_channel|9|(64+{strobe_speed})$
 $
!if|({shutter} = -2)|
  !set_channel|9|(192+({strobe_speed}/3))$
 $
 !if|({shutter} = -3)|
  !set_channel|9|224$
 $
		</procedure>
	</code>
</device>
