{{{#!/bin/perl -w

use strict; #use EpicsTools;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - # This PERL script watches the PSL and does some stuff. # # 1) Watches the FSS and runs the FSS Autolock if the # Refcav breaks lock. # # 2) Watches the PMC and runs the PMC Autolock script # if the PMC is out of lock. # # 3) Same, but for the MZ. All of these require that the # appropriate Lock Acquisition buttons be on. # # 4) Add the ISS to this script. # - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# setup env my $read = "tdsread"; my $write = "tdswrite"; my $step = "ezcastep"; my $switch = "ezcaswitch"; my $scripts = "/cvs/cds/caltech/scripts"; my $pezcabit = "$scripts/general/pezcabit";

my $ifo = "C1"; my $lsc = "${ifo}:LSC"; my $sus = "${ifo}:SUS"; my $ioo = "${ifo}:IOO"; my $psl = "${ifo}:PSL";

# state channel bits my $fss_bit = 0; my $pmc_bit = 1; my $mz_bit = 2; my $imc_bit = 3; my $ifo_bit = 4; my $ad_bit = 5; # not needed in this script my $omc_bit = 6; # not needed in this script

# various numbers my $ifo_state = "${ifo}:IFO-STATE";

# how are these set? my $fss_state = "${ifo}:PSL-FSS_STATE"; my $pmc_state = "${ifo}:PSL-PMC_STATE"; my $mz_state = "${ifo}:PSL-MZ_STATE";

# IFO readback channels (set by state code) my $imc_state = "${ifo}:IOO-MC_LOCK"; my $FSS_la_chan = "${psl}-FSS_LOCK"; my $PMC_la_chan = "${psl}-PMC_LOCK"; my $MZ_la_chan = "${psl}-MZ_LOCK";

# ??? my $FSS_la = 0; my $PMC_la = 0; my $MZ_la = 0;

# various commands my $dateCmd = "date";

# initalize state my $tNow = $dateCmd;

# initialize loop variables my $tDiff = 0; my $isRClocked = 0; my $isPMClocked = 0; my $isMZlocked = 0; my $isIMClocked = 0;

# main watch loop while ( 1 ) {

} }}}

PSLwatch_script (last edited 2012-01-03 23:02:43 by localhost)