Commit f2e8fcd8 authored by Jörg Weingrill's avatar Jörg Weingrill
Browse files

new cryotiger startup procedure

parent 2c8c11ef
......@@ -4,33 +4,32 @@
<Declaration><![CDATA[PROGRAM MainControls
VAR
// Controls the relay for the CryoTiger power switch
CryoTigerPower: BOOL := TRUE;
CryoTigerPower: BOOL := FALSE;
// Controls the relay for the CCDController power switch
DomeLight: BOOL := False;
CCDPower: BOOL := TRUE;
CryoTigerStartDelay: TON;
CCDPowerStartDelay: TON;
RSCryoTiger: RS;
SRCryoTiger: SR;
DomeLightTimer: FB_LightTimer;
CryoTigerEvent,
CCDPowerEvent,
DomeLightEvent: FB_Eventlog;
MainVoltageL1,
MainVoltageL2,
MainVoltageL3: REAL;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[// turn on CryTiger with a delay of 10 seconds
// TODO: Software control for signals?
RSCryoTiger(SET := ThermoControl.dewar_setpoint <= -70.0,
RESET1 := ThermoControl.dewar_setpoint > -70.0,
Q1 => CryoTigerPower);
SRCryoTiger(SET1 := (ABS(ConvertEnvironment.CryoDifference)) < 0.1 OR CryoTigerPower,
RESET := ThermoControl.dewar_setpoint > -70.0 ,
Q1 => GVL_MainControl.CryoTiger);
CryoTigerStartDelay(IN := CryoTigerPower,
CCDPowerStartDelay( IN := CCDPower AND ThermoControl.avg_temperature < 0.0,
PT := T#10S,
Q => GVL_MainControl.CryoTiger);
CCDPowerStartDelay( IN := CCDPower,
PT := T#20S,
Q => GVL_MainControl.CCDPower);
DomeLightTimer( IN := GVL_MainControl.LightSwitch,
......@@ -38,7 +37,7 @@ DomeLightTimer( IN := GVL_MainControl.LightSwitch,
Q => );
GVL_MainControl.LightDome := DomeLightTimer.Q OR DomeLight;
CryoTigerEvent( Trigger := CryoTigerStartDelay.Q,
CryoTigerEvent( Trigger := GVL_MainControl.CryoTiger,
Level := ADSLOG_MSGTYPE_HINT,
FormatString := 'CryoTiger power: %s',
OnMessage := 'ON',
......@@ -55,7 +54,12 @@ DomeLightEvent( Trigger := GVL_MainControl.LightDome,
Level := ADSLOG_MSGTYPE_HINT,
FormatString := 'Dome light: %s',
OnMessage := 'ON',
OffMessage := 'OFF');]]></ST>
OffMessage := 'OFF');
MainVoltageL1 := GVL_MainControl.MainVoltageL1;
MainVoltageL2 := GVL_MainControl.MainVoltageL2;
MainVoltageL3 := GVL_MainControl.MainVoltageL3;
]]></ST>
</Implementation>
<LineIds Name="MainControls">
<LineId Id="6" Count="0" />
......@@ -63,8 +67,7 @@ DomeLightEvent( Trigger := GVL_MainControl.LightDome,
<LineId Id="97" Count="0" />
<LineId Id="93" Count="0" />
<LineId Id="100" Count="1" />
<LineId Id="91" Count="0" />
<LineId Id="7" Count="6" />
<LineId Id="10" Count="3" />
<LineId Id="24" Count="2" />
<LineId Id="5" Count="0" />
<LineId Id="39" Count="0" />
......@@ -78,6 +81,9 @@ DomeLightEvent( Trigger := GVL_MainControl.LightDome,
<LineId Id="56" Count="0" />
<LineId Id="52" Count="3" />
<LineId Id="51" Count="0" />
<LineId Id="122" Count="1" />
<LineId Id="125" Count="1" />
<LineId Id="124" Count="0" />
</LineIds>
</POU>
</TcPlcObject>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment