From f79d211ca118b197e5d0aacc4b74b43855c63df8 Mon Sep 17 00:00:00 2001
From: EJ Dohmen <ezekiel.dohmen@ligo.org>
Date: Mon, 24 Jan 2022 16:18:58 -0800
Subject: [PATCH] Removing unused EPICS state notation programs

---
 src/epics/seq/daqConfig.st       | 145 --------------
 src/epics/seq/hepiWatchdog.st    | 311 ------------------------------
 src/epics/seq/hepiWatchdogBSC.st | 312 -------------------------------
 src/epics/seq/hepiWatchdogHMX.st | 312 -------------------------------
 src/epics/seq/hepiWatchdogHMY.st | 312 -------------------------------
 src/epics/seq/suswd.st           |  76 --------
 6 files changed, 1468 deletions(-)
 delete mode 100644 src/epics/seq/daqConfig.st
 delete mode 100644 src/epics/seq/hepiWatchdog.st
 delete mode 100644 src/epics/seq/hepiWatchdogBSC.st
 delete mode 100644 src/epics/seq/hepiWatchdogHMX.st
 delete mode 100644 src/epics/seq/hepiWatchdogHMY.st
 delete mode 100644 src/epics/seq/suswd.st

diff --git a/src/epics/seq/daqConfig.st b/src/epics/seq/daqConfig.st
deleted file mode 100644
index ce78508a5..000000000
--- a/src/epics/seq/daqConfig.st
+++ /dev/null
@@ -1,145 +0,0 @@
-program daqConfig
-
-#ifdef UNIX
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-
-#else
-%% #include <vxWorks.h>
-%% #include <ioLib.h>
-#endif
-
-%% #include <stdio.h>
-%% #include <string.h>
-%% #include <stdlib.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <daqmap.h>
-%% #include <param.h>
-
-
-int reload;
-assign reload to "{ifo}:DAQ-{sys}_LOAD_CONFIG";
-
-int dcmsg;
-assign dcmsg to "{ifo}:DAQ-{sys}_MSG";
-
-int chnCnt;
-assign chnCnt to "{ifo}:DAQ-{sys}_CHAN_CNT";
-
-int dataSize;
-assign dataSize to "{ifo}:DAQ-{sys}_TOTAL";
-
-%% static DAQ_INFO_BLOCK *info;
-%% static void *base;
-%% static DAQ_INFO_BLOCK infoTmp;
-%% static int sysnum;
-%% static char site[160];
-%% static char ifo[160];
-%% static char sys[160];
-%% extern pthread_mutex_t seq_lock;
-
-%% static void copy_info() {
-%%   int i;
-%%   for (i = 0; i < infoTmp.numChans; i++) {
-%%     info -> tp [i].tpnum = infoTmp.tp [i].tpnum;
-%%     info -> tp [i].dataType = infoTmp.tp [i].dataType;
-%%     info -> tp [i].dataRate = infoTmp.tp [i].dataRate;
-%%     info -> tp [i].dataGain = infoTmp.tp [i].dataGain;
-%%   }
-%%   info -> configFileCRC = infoTmp.configFileCRC;
-%%   info->numChans = infoTmp.numChans;
-%%   info->numChans = infoTmp.numEpicsInts;
-%%   info->numChans = infoTmp.numEpicsFloats;
-%%   info->numChans = infoTmp.numEpicsFilts;
-%%   info->numChans = infoTmp.numEpicsTotal;
-%% }
-
-ss daqConfigControl {
-
-state init
-{
-  when()
-    {
-%% 	extern void *findRfmCard(unsigned int);
-	sysnum = atoi(macValueGet("sysnum"));
-%%	if (sysnum < 0 || sysnum >= DCU_COUNT) {
-%%	  fprintf(stderr, "Invalid system number %d\n", sysnum);
-%%	  exit(1);
-%%	}
-	strcpy(site, macValueGet("site"));
-	strcpy(ifo, macValueGet("ifo"));
-	strcpy(sys, macValueGet("sys"));
-%%	info = ((DAQ_INFO_BLOCK *)((base = (volatile void *)findRfmCard(0)) + DAQ_INFO_ADDRESS));
-%%	printf("daq info at 0x%lx\n",(long)info);
-%%	memset(&infoTmp, 0, sizeof(infoTmp));
-%%	info->reconfig = 0;
-%%	if (loadDaqConfigFile(&infoTmp, site, ifo, sys)) {
-%%	   copy_info();
-%%	   printf("%s%s daqConfig info is at rfm offset 0x%x\n", ifo, sys, ((char *)info) - ((char *)base));
-%%	   info -> reconfig = 1;
-%%	   dcmsg = infoTmp.configFileCRC;
-%%	   chnCnt = infoTmp.numChans;
-%%	   dataSize = 0;
-%%	   { int i; 
-%%		for(i=0; i < infoTmp.numChans; i++) {
-%%			dataSize += infoTmp.tp[i].dataRate * DAQ_DATA_TYPE_SIZE(infoTmp.tp[i].dataType);
-%%		}
-%%	   }
-%%	   dataSize /= 1024;
-%%	} else {
-%%	   dcmsg = 0xffffffff;
-%%	   chnCnt = 0;
-%%	   dataSize = 0;
-%%	}
-        pvPut(dcmsg);
-        pvPut(chnCnt);
-        pvPut(dataSize);
-    } state process
-}
-
-
-state process
-{
-  when(delay(0.2))
-    {
-%%	pthread_mutex_lock (&seq_lock);
-	pvGet(reload);
-%%	pthread_mutex_unlock (&seq_lock);
-	if (reload)
-%%	  {
-%%	    info -> reconfig = 0;
-%%	    if (loadDaqConfigFile(&infoTmp, site, ifo, sys)) {
-%%	      copy_info();
-%%	      printf("%s%s daqConfig info is at rfm offset 0x%x\n", ifo, sys, ((char *)info) - ((char *)base));
-%%	      info -> reconfig = 1;
-%%	      dcmsg = infoTmp.configFileCRC;
-%%	      chnCnt = infoTmp.numChans;
-%%	      dataSize = 0;
-%%	      { int i;
-%%		for(i=0; i < infoTmp.numChans; i++) {
-%%			dataSize += infoTmp.tp[i].dataRate * DAQ_DATA_TYPE_SIZE(infoTmp.tp[i].dataType);
-%%		}
-%%	      }
-%%	      dataSize /= 1024;
-%%	    } else {
-%%	      dcmsg = 0xffffffff;
-%%	      chnCnt = 0;
-%%	      dataSize = 0;
-%%	    }
-            pvPut(dcmsg);
-            pvPut(chnCnt);
-            pvPut(dataSize);
-%%	  }
-	reload = 0;
-        pvPut(reload);
-    } state process
-}
-}
diff --git a/src/epics/seq/hepiWatchdog.st b/src/epics/seq/hepiWatchdog.st
deleted file mode 100644
index 0c20fee05..000000000
--- a/src/epics/seq/hepiWatchdog.st
+++ /dev/null
@@ -1,311 +0,0 @@
-program hepiWatchdog
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-%% #include <unistd.h>
-
-%% #define MAX_MODULES 1
-#define MAX_MODULES 1
-
-%% #include "fm10Gen.h"
-%% #include <feComms.h>
-%% #include <hepi.h>
-%% #include <stdio.h>
-%% #include <stdlib.h>
-%% #include <string.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <fpvalidate.h>
-
-%% extern pthread_mutex_t seq_lock;
-
-%% #define rfm_assign(a,b) if ((a) != (b)) { a = (b); }
-%% #define HEPI_OK		0
-%% #define HEPI_TRIP_RAMP	1
-%% #define HEPI_TRIP_STS_OFF	2
-%% #define HEPI_TRIP_LOOP_OFF	3
-%% #define HEPI_TRIP_LOOP_RESET	4
-%% #define HEPI_TRIP_MASTER_OFF	5
-%% #define HEPI_TRIP_RESET	6
-%% #define HEPI_TRIP_CHM	7
-
-/* WD Reset requests from operator. */
-int wdReset;
-assign wdReset to "{ifo}:{sys}-BSC_WD_M_RESET";
-
-/* WD status to operator screens. */
-int wdState;
-assign wdState to "{ifo}:{sys}-BSC_WD_M_STATUS";
-
-/* STS_X Output filter ramp times. */
-float trampX;
-assign trampX to "{ifo}:{sys}-BSC_FIR_X_OUT_TRAMP";
-
-/* STS_Y Output filter ramp times. */
-float trampY;
-assign trampY to "{ifo}:{sys}-BSC_FIR_Y_OUT_TRAMP";
-
-/* STS_X Output filter gains. */
-float gainX;
-assign gainX "{ifo}:{sys}-BSC_FIR_X_OUT_GAIN";
-
-/* STS_Y Output filter gains. */
-float gainY;
-assign gainY to "{ifo}:{sys}-BSC_FIR_Y_OUT_GAIN";
-
-/* STS_X Output filter on/off switches. */
-int swX;
-assign swX to "{ifo}:{sys}-BSC_FIR_X_OUT_SW2";
-
-/* STS_Y Output filter on/off switches. */
-int swY;
-assign swY to "{ifo}:{sys}-BSC_FIR_Y_OUT_SW2";
-
-/* STS_X Output filter on/off switch readbacks. */
-int swXr;
-assign swXr to "{ifo}:{sys}-BSC_FIR_X_OUT_SW2R";
-
-/* STS_Y Output filter on/off switch readbacks. */
-int swYr;
-assign swYr to "{ifo}:{sys}-BSC_FIR_Y_OUT_SW2R";
-
-/* Loop output on/off switch settings. */
-int modalSw;
-assign modalSw to "{ifo}:{sys}-BSC_LOOP_SW";
-
-/* Master output on/off switch settings. */
-int masterSw;
-assign masterSw to "{ifo}:{sys}-BSC_ACT_SW";
-
-/* Master output on/off switch settings. */
-int tiltSw;
-assign tiltSw to "{ifo}:{sys}-BSC_TILTCORR_SW";
-
-%% static volatile CDS_EPICS *pEpics;		/* Pointer to HEPI epics in SHM. */
-%% static volatile RFM_FE_COMMS *pRfm;		/* Pointer to epicsShm 		*/
-%% static int ii, jj;
-%% static int tripState;			/* Holds WD trip status.	*/
-%% static int tripMonitor;			/* WD status to operator display.*/
-%% static int tripCounter;			/* Counter for timing transision between
-						   WD fault states.			*/
-%% static float gainXhold,gainYhold;	/* Saved state of STS out gains. 	*/
-%% static float trampHoldX,trampHoldY;	/* Saved state of STS out ramp times. 	*/
-%% static int tripped;
-%% static int susMonitor;
-%%      extern void *findRfmCard(unsigned int);
-
-ss monitorWD{
-
-state init
-{
-  when() {
-	/* Init pointer to HEPI EPICS in RFM. */
-	%%  pRfm = (RFM_FE_COMMS *)(findRfmCard(0));
-	%%  pEpics = (CDS_EPICS *)(&pRfm->epicsSpace);
-
-    /* Clear WD variables on startup. */
-        wdReset = 0;
-        pvPut(wdReset);
-        wdState = 0;
-        pvPut(wdState);
-%%	tripState = 0;
-%%	tripMonitor = 0;
-%%	tripCounter = 0;
-%%	tripped = 0;
-
-  }state monWD
-}
-	/* end state init */
-
-/* Perform WD monitoring */
-state monWD{
-
-  when(delay(.2)){
-
-    /* Process operator requests for WD reset, Loop on/off, master on/off. */
-%%      pthread_mutex_lock (&seq_lock);
-        pvGet(wdReset);
-%%      pthread_mutex_unlock (&seq_lock);
-%%      if(wdReset == 1) 
-%%	{
-		/* Send WD reset to front end. */
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-		/* Indicate WD being reset */
-%%		tripMonitor = 32;
-%%		wdState = tripMonitor;
-		pvPut(wdState);
-		/* Clear the reset command. */
-                wdReset = 0;
-                pvPut(wdReset);
-
-		/* Put back the sts output filter gains and ramp times. */
-%%		if(tripped == 1)
-%%		{
-%%			gainX = gainXhold;
-%%			gainY = gainYhold;
-%%			trampX = trampHoldX;
-%%			trampY = trampHoldY;
-			pvPut(gainX);
-			pvPut(gainY);
-			pvPut(trampX);
-			pvPut(trampY);
-%%			tripped = 0;
-%%      	}
-
-		/* Allow time for front end to reset its fault counters. */
-%%		usleep(2000000);
-
-		/* Reset trip counters and WD state. */
-%%		tripState = HEPI_OK;
-%%		tripMonitor = 0;
-%%		tripCounter = 0;
-%%      }
-
-	/* Read in Loop On/Off Request */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(modalSw);
-%%      pthread_mutex_unlock (&seq_lock);
-	/* If WD at or past LOOP_OFF state, clear the request */
-%%	if(modalSw && (tripState >= HEPI_TRIP_LOOP_OFF))
-%%	{
-		modalSw = 0;
-		pvPut(modalSw);
-%%	}
-
-	/* Read master on/off switch request. */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-
-	/* If WD has tripped off master switch, clear any ON requests. */
-%%	if(masterSw && (tripState == HEPI_TRIP_MASTER_OFF))
-%%	{
-		masterSw = 0;
-		pvPut(masterSw);
-%%	}
-
-    /* Process WD monitoring and actions. *************************************	*/
-	/* If this is first detected fault, not due to CHM, ...  */
-%%	if((pEpics->sei.BSC_WD_M.trip) && (tripState == HEPI_OK))
-%%	{
-
-%%		tripState = HEPI_TRIP_RAMP;
-%%		tripMonitor |= 1;
-%%		tripped = 1;
-		/* Get present sts output filter ramp time and gain settings.
-		   These will be put back on WD reset.				*/
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(gainX);
-		pvGet(gainY);
-		pvGet(trampX);
-		pvGet(trampY);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		gainXhold = gainX;
-%%		gainYhold = gainY;
-%%		trampHoldX = trampX;
-%%		trampHoldY = trampY;
-
-		/* Set sts output filter ramp times to 10 seconds. */
-		trampX = 10;
-		trampY = 10;
-		pvPut(trampX);
-		pvPut(trampY);
-		/* Allow time for ramp times to get to front end.  */
-%%		usleep(1000000);
-		/* Load gain settings to start sts output filter ramping. */
-		gainX = 0.0;
-		gainY = 0.0;
-		pvPut(gainX);
-		pvPut(gainY);
-%%	}
-%%	if(tripState != 0) tripCounter ++;
-
-	/* STS output filters should have ramped down by now, so turn
-	   off the output filters. */
-%%	if((tripState == HEPI_TRIP_RAMP) && (tripCounter > 50))
-%%	{
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(swXr);
-		pvGet(swYr);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		swX = (swXr & 0x400);
-		pvPut(swX);
-%%		swY = (swYr & 0x400);
-		pvPut(swY);
-%%		tripState = HEPI_TRIP_STS_OFF;
-%%		tripMonitor |= 2;
-%%		tripCounter = 0;
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-%%	}
-
-	/* Next fault will turn off loop output */
-%%	if((tripState == HEPI_TRIP_STS_OFF) && (tripCounter > 50))
-%%	{
-		/* Fault detected */
-%%		if(pEpics->sei.BSC_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_LOOP_OFF;
-%%			tripMonitor |= 4;
-			modalSw = 0;
-			pvPut(modalSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault. Check again next cycle thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* After shutting off loop output, wait for a time period, then
-	   reset front end faults. */
-%%	if((tripState == HEPI_TRIP_LOOP_OFF) && (tripCounter > 50))
-%%	{
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-%%		tripCounter = 40;
-%%		tripState = HEPI_TRIP_LOOP_RESET;
-%%	}
-
-	/* Next fault condition detected will trip master output switch. */
-%%	if((tripState == HEPI_TRIP_LOOP_RESET) && (tripCounter > 50))
-%%	{
-		/* Fault detected, trip off master switch */
-%%		if(pEpics->sei.BSC_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_MASTER_OFF;
-%%			tripMonitor |= 8;
-			masterSw = 0;
-			pvPut(masterSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault detected, check again next time thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* If WD has tripped master or due to channel hop, stay in
-	   present state.						*/
-%%	if(tripState == HEPI_TRIP_MASTER_OFF) tripCounter = 0;
-
-
-	/* Write WD status to EPICS records */
-%%	wdState = tripMonitor;
-	pvPut(wdState);
-
-/* ****************************************************************************	*/
-/* Check for Suspension watchdog trips.						*/
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-%%	if(masterSw == 0)
-%%	{
-		tiltSw = 0;
-		pvPut(tiltSw);
-%%	}
-
-  }state monWD
-}	/* end state monWD */
-}	/* end monitor WD  */
-
diff --git a/src/epics/seq/hepiWatchdogBSC.st b/src/epics/seq/hepiWatchdogBSC.st
deleted file mode 100644
index aa84c7f34..000000000
--- a/src/epics/seq/hepiWatchdogBSC.st
+++ /dev/null
@@ -1,312 +0,0 @@
-program hepiWatchdogBSC
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-%% #include <unistd.h>
-
-%% #define MAX_MODULES 1
-#define MAX_MODULES 1
-
-%% #include "fm10Gen.h"
-%% #include <feComms.h>
-%% #include <hepi.h>
-%% #include <stdio.h>
-%% #include <stdlib.h>
-%% #include <string.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <fpvalidate.h>
-
-%% extern pthread_mutex_t seq_lock;
-
-%% #define rfm_assign(a,b) if ((a) != (b)) { a = (b); }
-%% #define HEPI_OK		0
-%% #define HEPI_TRIP_RAMP	1
-%% #define HEPI_TRIP_STS_OFF	2
-%% #define HEPI_TRIP_LOOP_OFF	3
-%% #define HEPI_TRIP_LOOP_RESET	4
-%% #define HEPI_TRIP_MASTER_OFF	5
-%% #define HEPI_TRIP_RESET	6
-%% #define HEPI_TRIP_CHM	7
-
-/* WD Reset requests from operator. */
-int wdReset;
-assign wdReset to "{ifo}:{sys}-{subsys}_WD_M_RESET";
-
-/* WD status to operator screens. */
-int wdState;
-assign wdState to "{ifo}:{sys}-{subsys}_WD_M_STATUS";
-
-/* STS_X Output filter ramp times. */
-float trampX;
-assign trampX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_TRAMP";
-
-/* STS_Y Output filter ramp times. */
-float trampY;
-assign trampY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_TRAMP";
-
-/* STS_X Output filter gains. */
-float gainX;
-assign gainX "{ifo}:{sys}-{subsys}_FIR_X_OUT_GAIN";
-
-/* STS_Y Output filter gains. */
-float gainY;
-assign gainY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_GAIN";
-
-/* STS_X Output filter on/off switches. */
-int swX;
-assign swX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2";
-
-/* STS_Y Output filter on/off switches. */
-int swY;
-assign swY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2";
-
-/* STS_X Output filter on/off switch readbacks. */
-int swXr;
-assign swXr to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2R";
-
-/* STS_Y Output filter on/off switch readbacks. */
-int swYr;
-assign swYr to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2R";
-
-/* Loop output on/off switch settings. */
-int modalSw;
-assign modalSw to "{ifo}:{sys}-{subsys}_LOOP_SW";
-
-/* Master output on/off switch settings. */
-int masterSw;
-assign masterSw to "{ifo}:{sys}-{subsys}_ACT_SW";
-
-/* Master output on/off switch settings. */
-int tiltSw;
-assign tiltSw to "{ifo}:{sys}-{subsys}_TILTCORR_SW";
-
-%% static volatile CDS_EPICS *pEpics;		/* Pointer to HEPI epics in SHM. */
-%% static volatile RFM_FE_COMMS *pRfm;		/* Pointer to epicsShm 		*/
-%% static int ii, jj;
-%% static int tripState;			/* Holds WD trip status.	*/
-%% static int tripMonitor;			/* WD status to operator display.*/
-%% static int tripCounter;			/* Counter for timing transision between
-						   WD fault states.			*/
-%% static float gainXhold,gainYhold;	/* Saved state of STS out gains. 	*/
-%% static float trampHoldX,trampHoldY;	/* Saved state of STS out ramp times. 	*/
-%% static int tripped;
-%% static int susMonitor;
-%%      extern void *findRfmCard(unsigned int);
-
-ss monitorWD{
-
-state init
-{
-  when() {
-	/* Init pointer to HEPI EPICS in RFM. */
-	findSharedMemory(macValueGet("sys"));
-	%%  pRfm = (RFM_FE_COMMS *)(findRfmCard(0));
-	%%  pEpics = (CDS_EPICS *)(&pRfm->epicsSpace);
-
-    /* Clear WD variables on startup. */
-        wdReset = 0;
-        pvPut(wdReset);
-        wdState = 0;
-        pvPut(wdState);
-%%	tripState = 0;
-%%	tripMonitor = 0;
-%%	tripCounter = 0;
-%%	tripped = 0;
-
-  }state monWD
-}
-	/* end state init */
-
-/* Perform WD monitoring */
-state monWD{
-
-  when(delay(.2)){
-
-    /* Process operator requests for WD reset, Loop on/off, master on/off. */
-%%      pthread_mutex_lock (&seq_lock);
-        pvGet(wdReset);
-%%      pthread_mutex_unlock (&seq_lock);
-%%      if(wdReset == 1) 
-%%	{
-		/* Send WD reset to front end. */
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-		/* Indicate WD being reset */
-%%		tripMonitor = 32;
-%%		wdState = tripMonitor;
-		pvPut(wdState);
-		/* Clear the reset command. */
-                wdReset = 0;
-                pvPut(wdReset);
-
-		/* Put back the sts output filter gains and ramp times. */
-%%		if(tripped == 1)
-%%		{
-%%			gainX = gainXhold;
-%%			gainY = gainYhold;
-%%			trampX = trampHoldX;
-%%			trampY = trampHoldY;
-			pvPut(gainX);
-			pvPut(gainY);
-			pvPut(trampX);
-			pvPut(trampY);
-%%			tripped = 0;
-%%      	}
-
-		/* Allow time for front end to reset its fault counters. */
-%%		usleep(2000000);
-
-		/* Reset trip counters and WD state. */
-%%		tripState = HEPI_OK;
-%%		tripMonitor = 0;
-%%		tripCounter = 0;
-%%      }
-
-	/* Read in Loop On/Off Request */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(modalSw);
-%%      pthread_mutex_unlock (&seq_lock);
-	/* If WD at or past LOOP_OFF state, clear the request */
-%%	if(modalSw && (tripState >= HEPI_TRIP_LOOP_OFF))
-%%	{
-		modalSw = 0;
-		pvPut(modalSw);
-%%	}
-
-	/* Read master on/off switch request. */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-
-	/* If WD has tripped off master switch, clear any ON requests. */
-%%	if(masterSw && (tripState == HEPI_TRIP_MASTER_OFF))
-%%	{
-		masterSw = 0;
-		pvPut(masterSw);
-%%	}
-
-    /* Process WD monitoring and actions. *************************************	*/
-	/* If this is first detected fault, not due to CHM, ...  */
-%%	if((pEpics->sei.BSC_WD_M.trip) && (tripState == HEPI_OK))
-%%	{
-
-%%		tripState = HEPI_TRIP_RAMP;
-%%		tripMonitor |= 1;
-%%		tripped = 1;
-		/* Get present sts output filter ramp time and gain settings.
-		   These will be put back on WD reset.				*/
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(gainX);
-		pvGet(gainY);
-		pvGet(trampX);
-		pvGet(trampY);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		gainXhold = gainX;
-%%		gainYhold = gainY;
-%%		trampHoldX = trampX;
-%%		trampHoldY = trampY;
-
-		/* Set sts output filter ramp times to 10 seconds. */
-		trampX = 10;
-		trampY = 10;
-		pvPut(trampX);
-		pvPut(trampY);
-		/* Allow time for ramp times to get to front end.  */
-%%		usleep(1000000);
-		/* Load gain settings to start sts output filter ramping. */
-		gainX = 0.0;
-		gainY = 0.0;
-		pvPut(gainX);
-		pvPut(gainY);
-%%	}
-%%	if(tripState != 0) tripCounter ++;
-
-	/* STS output filters should have ramped down by now, so turn
-	   off the output filters. */
-%%	if((tripState == HEPI_TRIP_RAMP) && (tripCounter > 50))
-%%	{
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(swXr);
-		pvGet(swYr);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		swX = (swXr & 0x400);
-		pvPut(swX);
-%%		swY = (swYr & 0x400);
-		pvPut(swY);
-%%		tripState = HEPI_TRIP_STS_OFF;
-%%		tripMonitor |= 2;
-%%		tripCounter = 0;
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-%%	}
-
-	/* Next fault will turn off loop output */
-%%	if((tripState == HEPI_TRIP_STS_OFF) && (tripCounter > 50))
-%%	{
-		/* Fault detected */
-%%		if(pEpics->sei.BSC_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_LOOP_OFF;
-%%			tripMonitor |= 4;
-			modalSw = 0;
-			pvPut(modalSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault. Check again next cycle thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* After shutting off loop output, wait for a time period, then
-	   reset front end faults. */
-%%	if((tripState == HEPI_TRIP_LOOP_OFF) && (tripCounter > 50))
-%%	{
-%%              pEpics->sei.BSC_WD_M.trip = 0;
-%%		tripCounter = 40;
-%%		tripState = HEPI_TRIP_LOOP_RESET;
-%%	}
-
-	/* Next fault condition detected will trip master output switch. */
-%%	if((tripState == HEPI_TRIP_LOOP_RESET) && (tripCounter > 50))
-%%	{
-		/* Fault detected, trip off master switch */
-%%		if(pEpics->sei.BSC_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_MASTER_OFF;
-%%			tripMonitor |= 8;
-			masterSw = 0;
-			pvPut(masterSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault detected, check again next time thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* If WD has tripped master or due to channel hop, stay in
-	   present state.						*/
-%%	if(tripState == HEPI_TRIP_MASTER_OFF) tripCounter = 0;
-
-
-	/* Write WD status to EPICS records */
-%%	wdState = tripMonitor;
-	pvPut(wdState);
-
-/* ****************************************************************************	*/
-/* Check for Suspension watchdog trips.						*/
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-%%	if(masterSw == 0)
-%%	{
-		tiltSw = 0;
-		pvPut(tiltSw);
-%%	}
-
-  }state monWD
-}	/* end state monWD */
-}	/* end monitor WD  */
-
diff --git a/src/epics/seq/hepiWatchdogHMX.st b/src/epics/seq/hepiWatchdogHMX.st
deleted file mode 100644
index fb214f35a..000000000
--- a/src/epics/seq/hepiWatchdogHMX.st
+++ /dev/null
@@ -1,312 +0,0 @@
-program hepiWatchdogHMX
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-%% #include <unistd.h>
-
-%% #define MAX_MODULES 1
-#define MAX_MODULES 1
-
-%% #include "fm10Gen.h"
-%% #include <feComms.h>
-%% #include <hepi.h>
-%% #include <stdio.h>
-%% #include <stdlib.h>
-%% #include <string.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <fpvalidate.h>
-
-%% extern pthread_mutex_t seq_lock;
-
-%% #define rfm_assign(a,b) if ((a) != (b)) { a = (b); }
-%% #define HEPI_OK		0
-%% #define HEPI_TRIP_RAMP	1
-%% #define HEPI_TRIP_STS_OFF	2
-%% #define HEPI_TRIP_LOOP_OFF	3
-%% #define HEPI_TRIP_LOOP_RESET	4
-%% #define HEPI_TRIP_MASTER_OFF	5
-%% #define HEPI_TRIP_RESET	6
-%% #define HEPI_TRIP_CHM	7
-
-/* WD Reset requests from operator. */
-int wdReset;
-assign wdReset to "{ifo}:{sys}-{subsys}_WD_M_RESET";
-
-/* WD status to operator screens. */
-int wdState;
-assign wdState to "{ifo}:{sys}-{subsys}_WD_M_STATUS";
-
-/* STS_X Output filter ramp times. */
-float trampX;
-assign trampX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_TRAMP";
-
-/* STS_Y Output filter ramp times. */
-float trampY;
-assign trampY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_TRAMP";
-
-/* STS_X Output filter gains. */
-float gainX;
-assign gainX "{ifo}:{sys}-{subsys}_FIR_X_OUT_GAIN";
-
-/* STS_Y Output filter gains. */
-float gainY;
-assign gainY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_GAIN";
-
-/* STS_X Output filter on/off switches. */
-int swX;
-assign swX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2";
-
-/* STS_Y Output filter on/off switches. */
-int swY;
-assign swY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2";
-
-/* STS_X Output filter on/off switch readbacks. */
-int swXr;
-assign swXr to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2R";
-
-/* STS_Y Output filter on/off switch readbacks. */
-int swYr;
-assign swYr to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2R";
-
-/* Loop output on/off switch settings. */
-int modalSw;
-assign modalSw to "{ifo}:{sys}-{subsys}_LOOP_SW";
-
-/* Master output on/off switch settings. */
-int masterSw;
-assign masterSw to "{ifo}:{sys}-{subsys}_ACT_SW";
-
-/* Master output on/off switch settings. */
-int tiltSw;
-assign tiltSw to "{ifo}:{sys}-{subsys}_TILTCORR_SW";
-
-%% static volatile CDS_EPICS *pEpics;		/* Pointer to HEPI epics in SHM. */
-%% static volatile RFM_FE_COMMS *pRfm;		/* Pointer to epicsShm 		*/
-%% static int ii, jj;
-%% static int tripState;			/* Holds WD trip status.	*/
-%% static int tripMonitor;			/* WD status to operator display.*/
-%% static int tripCounter;			/* Counter for timing transision between
-						   WD fault states.			*/
-%% static float gainXhold,gainYhold;	/* Saved state of STS out gains. 	*/
-%% static float trampHoldX,trampHoldY;	/* Saved state of STS out ramp times. 	*/
-%% static int tripped;
-%% static int susMonitor;
-%%      extern void *findRfmCard(unsigned int);
-
-ss monitorWD{
-
-state init
-{
-  when() {
-	/* Init pointer to HEPI EPICS in RFM. */
-        findSharedMemory(macValueGet("sys"));
-	%%  pRfm = (RFM_FE_COMMS *)(findRfmCard(0));
-	%%  pEpics = (CDS_EPICS *)(&pRfm->epicsSpace);
-
-    /* Clear WD variables on startup. */
-        wdReset = 0;
-        pvPut(wdReset);
-        wdState = 0;
-        pvPut(wdState);
-%%	tripState = 0;
-%%	tripMonitor = 0;
-%%	tripCounter = 0;
-%%	tripped = 0;
-
-  }state monWD
-}
-	/* end state init */
-
-/* Perform WD monitoring */
-state monWD{
-
-  when(delay(.2)){
-
-    /* Process operator requests for WD reset, Loop on/off, master on/off. */
-%%      pthread_mutex_lock (&seq_lock);
-        pvGet(wdReset);
-%%      pthread_mutex_unlock (&seq_lock);
-%%      if(wdReset == 1) 
-%%	{
-		/* Send WD reset to front end. */
-%%              pEpics->sei.HMX_WD_M.trip = 0;
-		/* Indicate WD being reset */
-%%		tripMonitor = 32;
-%%		wdState = tripMonitor;
-		pvPut(wdState);
-		/* Clear the reset command. */
-                wdReset = 0;
-                pvPut(wdReset);
-
-		/* Put back the sts output filter gains and ramp times. */
-%%		if(tripped == 1)
-%%		{
-%%			gainX = gainXhold;
-%%			gainY = gainYhold;
-%%			trampX = trampHoldX;
-%%			trampY = trampHoldY;
-			pvPut(gainX);
-			pvPut(gainY);
-			pvPut(trampX);
-			pvPut(trampY);
-%%			tripped = 0;
-%%      	}
-
-		/* Allow time for front end to reset its fault counters. */
-%%		usleep(2000000);
-
-		/* Reset trip counters and WD state. */
-%%		tripState = HEPI_OK;
-%%		tripMonitor = 0;
-%%		tripCounter = 0;
-%%      }
-
-	/* Read in Loop On/Off Request */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(modalSw);
-%%      pthread_mutex_unlock (&seq_lock);
-	/* If WD at or past LOOP_OFF state, clear the request */
-%%	if(modalSw && (tripState >= HEPI_TRIP_LOOP_OFF))
-%%	{
-		modalSw = 0;
-		pvPut(modalSw);
-%%	}
-
-	/* Read master on/off switch request. */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-
-	/* If WD has tripped off master switch, clear any ON requests. */
-%%	if(masterSw && (tripState == HEPI_TRIP_MASTER_OFF))
-%%	{
-		masterSw = 0;
-		pvPut(masterSw);
-%%	}
-
-    /* Process WD monitoring and actions. *************************************	*/
-	/* If this is first detected fault, not due to CHM, ...  */
-%%	if((pEpics->sei.HMX_WD_M.trip) && (tripState == HEPI_OK))
-%%	{
-
-%%		tripState = HEPI_TRIP_RAMP;
-%%		tripMonitor |= 1;
-%%		tripped = 1;
-		/* Get present sts output filter ramp time and gain settings.
-		   These will be put back on WD reset.				*/
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(gainX);
-		pvGet(gainY);
-		pvGet(trampX);
-		pvGet(trampY);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		gainXhold = gainX;
-%%		gainYhold = gainY;
-%%		trampHoldX = trampX;
-%%		trampHoldY = trampY;
-
-		/* Set sts output filter ramp times to 10 seconds. */
-		trampX = 10;
-		trampY = 10;
-		pvPut(trampX);
-		pvPut(trampY);
-		/* Allow time for ramp times to get to front end.  */
-%%		usleep(1000000);
-		/* Load gain settings to start sts output filter ramping. */
-		gainX = 0.0;
-		gainY = 0.0;
-		pvPut(gainX);
-		pvPut(gainY);
-%%	}
-%%	if(tripState != 0) tripCounter ++;
-
-	/* STS output filters should have ramped down by now, so turn
-	   off the output filters. */
-%%	if((tripState == HEPI_TRIP_RAMP) && (tripCounter > 50))
-%%	{
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(swXr);
-		pvGet(swYr);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		swX = (swXr & 0x400);
-		pvPut(swX);
-%%		swY = (swYr & 0x400);
-		pvPut(swY);
-%%		tripState = HEPI_TRIP_STS_OFF;
-%%		tripMonitor |= 2;
-%%		tripCounter = 0;
-%%              pEpics->sei.HMX_WD_M.trip = 0;
-%%	}
-
-	/* Next fault will turn off loop output */
-%%	if((tripState == HEPI_TRIP_STS_OFF) && (tripCounter > 50))
-%%	{
-		/* Fault detected */
-%%		if(pEpics->sei.HMX_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_LOOP_OFF;
-%%			tripMonitor |= 4;
-			modalSw = 0;
-			pvPut(modalSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault. Check again next cycle thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* After shutting off loop output, wait for a time period, then
-	   reset front end faults. */
-%%	if((tripState == HEPI_TRIP_LOOP_OFF) && (tripCounter > 50))
-%%	{
-%%              pEpics->sei.HMX_WD_M.trip = 0;
-%%		tripCounter = 40;
-%%		tripState = HEPI_TRIP_LOOP_RESET;
-%%	}
-
-	/* Next fault condition detected will trip master output switch. */
-%%	if((tripState == HEPI_TRIP_LOOP_RESET) && (tripCounter > 50))
-%%	{
-		/* Fault detected, trip off master switch */
-%%		if(pEpics->sei.HMX_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_MASTER_OFF;
-%%			tripMonitor |= 8;
-			masterSw = 0;
-			pvPut(masterSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault detected, check again next time thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* If WD has tripped master or due to channel hop, stay in
-	   present state.						*/
-%%	if(tripState == HEPI_TRIP_MASTER_OFF) tripCounter = 0;
-
-
-	/* Write WD status to EPICS records */
-%%	wdState = tripMonitor;
-	pvPut(wdState);
-
-/* ****************************************************************************	*/
-/* Check for Suspension watchdog trips.						*/
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-%%	if(masterSw == 0)
-%%	{
-		tiltSw = 0;
-		pvPut(tiltSw);
-%%	}
-
-  }state monWD
-}	/* end state monWD */
-}	/* end monitor WD  */
-
diff --git a/src/epics/seq/hepiWatchdogHMY.st b/src/epics/seq/hepiWatchdogHMY.st
deleted file mode 100644
index db9bc0215..000000000
--- a/src/epics/seq/hepiWatchdogHMY.st
+++ /dev/null
@@ -1,312 +0,0 @@
-program hepiWatchdogHMY
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-%% #include <unistd.h>
-
-%% #define MAX_MODULES 1
-#define MAX_MODULES 1
-
-%% #include "fm10Gen.h"
-%% #include <feComms.h>
-%% #include <hepi.h>
-%% #include <stdio.h>
-%% #include <stdlib.h>
-%% #include <string.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <fpvalidate.h>
-
-%% extern pthread_mutex_t seq_lock;
-
-%% #define rfm_assign(a,b) if ((a) != (b)) { a = (b); }
-%% #define HEPI_OK		0
-%% #define HEPI_TRIP_RAMP	1
-%% #define HEPI_TRIP_STS_OFF	2
-%% #define HEPI_TRIP_LOOP_OFF	3
-%% #define HEPI_TRIP_LOOP_RESET	4
-%% #define HEPI_TRIP_MASTER_OFF	5
-%% #define HEPI_TRIP_RESET	6
-%% #define HEPI_TRIP_CHM	7
-
-/* WD Reset requests from operator. */
-int wdReset;
-assign wdReset to "{ifo}:{sys}-{subsys}_WD_M_RESET";
-
-/* WD status to operator screens. */
-int wdState;
-assign wdState to "{ifo}:{sys}-{subsys}_WD_M_STATUS";
-
-/* STS_X Output filter ramp times. */
-float trampX;
-assign trampX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_TRAMP";
-
-/* STS_Y Output filter ramp times. */
-float trampY;
-assign trampY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_TRAMP";
-
-/* STS_X Output filter gains. */
-float gainX;
-assign gainX "{ifo}:{sys}-{subsys}_FIR_X_OUT_GAIN";
-
-/* STS_Y Output filter gains. */
-float gainY;
-assign gainY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_GAIN";
-
-/* STS_X Output filter on/off switches. */
-int swX;
-assign swX to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2";
-
-/* STS_Y Output filter on/off switches. */
-int swY;
-assign swY to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2";
-
-/* STS_X Output filter on/off switch readbacks. */
-int swXr;
-assign swXr to "{ifo}:{sys}-{subsys}_FIR_X_OUT_SW2R";
-
-/* STS_Y Output filter on/off switch readbacks. */
-int swYr;
-assign swYr to "{ifo}:{sys}-{subsys}_FIR_Y_OUT_SW2R";
-
-/* Loop output on/off switch settings. */
-int modalSw;
-assign modalSw to "{ifo}:{sys}-{subsys}_LOOP_SW";
-
-/* Master output on/off switch settings. */
-int masterSw;
-assign masterSw to "{ifo}:{sys}-{subsys}_ACT_SW";
-
-/* Master output on/off switch settings. */
-int tiltSw;
-assign tiltSw to "{ifo}:{sys}-{subsys}_TILTCORR_SW";
-
-%% static volatile CDS_EPICS *pEpics;		/* Pointer to HEPI epics in SHM. */
-%% static volatile RFM_FE_COMMS *pRfm;		/* Pointer to epicsShm 		*/
-%% static int ii, jj;
-%% static int tripState;			/* Holds WD trip status.	*/
-%% static int tripMonitor;			/* WD status to operator display.*/
-%% static int tripCounter;			/* Counter for timing transision between
-						   WD fault states.			*/
-%% static float gainXhold,gainYhold;	/* Saved state of STS out gains. 	*/
-%% static float trampHoldX,trampHoldY;	/* Saved state of STS out ramp times. 	*/
-%% static int tripped;
-%% static int susMonitor;
-%%      extern void *findRfmCard(unsigned int);
-
-ss monitorWD{
-
-state init
-{
-  when() {
-	/* Init pointer to HEPI EPICS in RFM. */
-        findSharedMemory(macValueGet("sys"));
-	%%  pRfm = (RFM_FE_COMMS *)(findRfmCard(0));
-	%%  pEpics = (CDS_EPICS *)(&pRfm->epicsSpace);
-
-    /* Clear WD variables on startup. */
-        wdReset = 0;
-        pvPut(wdReset);
-        wdState = 0;
-        pvPut(wdState);
-%%	tripState = 0;
-%%	tripMonitor = 0;
-%%	tripCounter = 0;
-%%	tripped = 0;
-
-  }state monWD
-}
-	/* end state init */
-
-/* Perform WD monitoring */
-state monWD{
-
-  when(delay(.2)){
-
-    /* Process operator requests for WD reset, Loop on/off, master on/off. */
-%%      pthread_mutex_lock (&seq_lock);
-        pvGet(wdReset);
-%%      pthread_mutex_unlock (&seq_lock);
-%%      if(wdReset == 1) 
-%%	{
-		/* Send WD reset to front end. */
-%%              pEpics->sei.HMY_WD_M.trip = 0;
-		/* Indicate WD being reset */
-%%		tripMonitor = 32;
-%%		wdState = tripMonitor;
-		pvPut(wdState);
-		/* Clear the reset command. */
-                wdReset = 0;
-                pvPut(wdReset);
-
-		/* Put back the sts output filter gains and ramp times. */
-%%		if(tripped == 1)
-%%		{
-%%			gainX = gainXhold;
-%%			gainY = gainYhold;
-%%			trampX = trampHoldX;
-%%			trampY = trampHoldY;
-			pvPut(gainX);
-			pvPut(gainY);
-			pvPut(trampX);
-			pvPut(trampY);
-%%			tripped = 0;
-%%      	}
-
-		/* Allow time for front end to reset its fault counters. */
-%%		usleep(2000000);
-
-		/* Reset trip counters and WD state. */
-%%		tripState = HEPI_OK;
-%%		tripMonitor = 0;
-%%		tripCounter = 0;
-%%      }
-
-	/* Read in Loop On/Off Request */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(modalSw);
-%%      pthread_mutex_unlock (&seq_lock);
-	/* If WD at or past LOOP_OFF state, clear the request */
-%%	if(modalSw && (tripState >= HEPI_TRIP_LOOP_OFF))
-%%	{
-		modalSw = 0;
-		pvPut(modalSw);
-%%	}
-
-	/* Read master on/off switch request. */
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-
-	/* If WD has tripped off master switch, clear any ON requests. */
-%%	if(masterSw && (tripState == HEPI_TRIP_MASTER_OFF))
-%%	{
-		masterSw = 0;
-		pvPut(masterSw);
-%%	}
-
-    /* Process WD monitoring and actions. *************************************	*/
-	/* If this is first detected fault, not due to CHM, ...  */
-%%	if((pEpics->sei.HMY_WD_M.trip) && (tripState == HEPI_OK))
-%%	{
-
-%%		tripState = HEPI_TRIP_RAMP;
-%%		tripMonitor |= 1;
-%%		tripped = 1;
-		/* Get present sts output filter ramp time and gain settings.
-		   These will be put back on WD reset.				*/
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(gainX);
-		pvGet(gainY);
-		pvGet(trampX);
-		pvGet(trampY);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		gainXhold = gainX;
-%%		gainYhold = gainY;
-%%		trampHoldX = trampX;
-%%		trampHoldY = trampY;
-
-		/* Set sts output filter ramp times to 10 seconds. */
-		trampX = 10;
-		trampY = 10;
-		pvPut(trampX);
-		pvPut(trampY);
-		/* Allow time for ramp times to get to front end.  */
-%%		usleep(1000000);
-		/* Load gain settings to start sts output filter ramping. */
-		gainX = 0.0;
-		gainY = 0.0;
-		pvPut(gainX);
-		pvPut(gainY);
-%%	}
-%%	if(tripState != 0) tripCounter ++;
-
-	/* STS output filters should have ramped down by now, so turn
-	   off the output filters. */
-%%	if((tripState == HEPI_TRIP_RAMP) && (tripCounter > 50))
-%%	{
-%%      pthread_mutex_lock (&seq_lock);
-		pvGet(swXr);
-		pvGet(swYr);
-%%      pthread_mutex_unlock (&seq_lock);
-%%		swX = (swXr & 0x400);
-		pvPut(swX);
-%%		swY = (swYr & 0x400);
-		pvPut(swY);
-%%		tripState = HEPI_TRIP_STS_OFF;
-%%		tripMonitor |= 2;
-%%		tripCounter = 0;
-%%              pEpics->sei.HMY_WD_M.trip = 0;
-%%	}
-
-	/* Next fault will turn off loop output */
-%%	if((tripState == HEPI_TRIP_STS_OFF) && (tripCounter > 50))
-%%	{
-		/* Fault detected */
-%%		if(pEpics->sei.HMY_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_LOOP_OFF;
-%%			tripMonitor |= 4;
-			modalSw = 0;
-			pvPut(modalSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault. Check again next cycle thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* After shutting off loop output, wait for a time period, then
-	   reset front end faults. */
-%%	if((tripState == HEPI_TRIP_LOOP_OFF) && (tripCounter > 50))
-%%	{
-%%              pEpics->sei.HMY_WD_M.trip = 0;
-%%		tripCounter = 40;
-%%		tripState = HEPI_TRIP_LOOP_RESET;
-%%	}
-
-	/* Next fault condition detected will trip master output switch. */
-%%	if((tripState == HEPI_TRIP_LOOP_RESET) && (tripCounter > 50))
-%%	{
-		/* Fault detected, trip off master switch */
-%%		if(pEpics->sei.HMY_WD_M.trip)
-%%		{
-%%			tripState = HEPI_TRIP_MASTER_OFF;
-%%			tripMonitor |= 8;
-			masterSw = 0;
-			pvPut(masterSw);
-%%			tripCounter = 0;
-%%		}
-		/* No fault detected, check again next time thru loop. */
-%%		else tripCounter = 50;
-%%	}
-
-	/* If WD has tripped master or due to channel hop, stay in
-	   present state.						*/
-%%	if(tripState == HEPI_TRIP_MASTER_OFF) tripCounter = 0;
-
-
-	/* Write WD status to EPICS records */
-%%	wdState = tripMonitor;
-	pvPut(wdState);
-
-/* ****************************************************************************	*/
-/* Check for Suspension watchdog trips.						*/
-%%      pthread_mutex_lock (&seq_lock);
-	pvGet(masterSw);
-%%      pthread_mutex_unlock (&seq_lock);
-%%	if(masterSw == 0)
-%%	{
-		tiltSw = 0;
-		pvPut(tiltSw);
-%%	}
-
-  }state monWD
-}	/* end state monWD */
-}	/* end monitor WD  */
-
diff --git a/src/epics/seq/suswd.st b/src/epics/seq/suswd.st
deleted file mode 100644
index 876ccde62..000000000
--- a/src/epics/seq/suswd.st
+++ /dev/null
@@ -1,76 +0,0 @@
-program suswd
-
-%% #define UINT32 unsigned int
-%% #define UINT16 unsigned short
-%% #define OK 1
-%% #define ERROR 0
-%% #define FALSE 0
-%% #define TRUE 1
-%%
-%% #include <errno.h>
-%% #include <unistd.h>
-%% #include <epicsTime.h>
-%% #include <cadef.h>
-%% #include <ezca.h>
-
-%% #define MAX_MODULES 1
-#define MAX_MODULES 1
-
-%% #include "fm10Gen.h"
-%% #include <feComms.h>
-%% #include <sus.h>
-%% #include <stdio.h>
-%% #include <stdlib.h>
-%% #include <string.h>
-%% #include <math.h>
-%% #include <pthread.h>
-%% #include <fpvalidate.h>
-
-%% #define rfm_assign(a,b) if ((a) != (b)) { a = (b); }
-
-/* WD Reset requests from operator. */
-int wdSwitch;
-assign wdSwitch to "{ifo}:{sys}-Q1_WD_SW";
-
-
-%% static volatile CDS_EPICS *pEpics;		/* Pointer to HEPI epics in SHM. */
-%% static volatile RFM_FE_COMMS *pRfm;		/* Pointer to epicsShm 		*/
-%% static int ii, jj;
-%%      extern void *findRfmCard(unsigned int);
-
-ss susWD{
-
-state init
-{
-  when() {
-	/* Init pointer to HEPI EPICS in RFM. */
-	%%  pRfm = (RFM_FE_COMMS *)(findRfmCard(0));
-	%%  pEpics = (CDS_EPICS *)(&pRfm->epicsSpace);
-
-    /* Clear WD variables on startup. */
-
-  }state monWD
-}
-	/* end state init */
-
-/* Perform WD monitoring */
-state monWD{
-
-  when(delay(.2)){
-
-    /* Process operator requests for WD reset, Loop on/off, master on/off. */
-%%      ii = pEpics->sus.Q1_WD;
-%%	if(ii == 0) {
-		wdSwitch = 0;	
-		pvPut(wdSwitch);
-%%		{
-%%			short s[1];
-%%			s[0] = 0;
-%%  			ezcaPut("M1:SEI-BSC_ACT_SW", ezcaShort, 1, s);
-%%		}
-%%	}
-
-  }state monWD
-}	/* end state monWD */
-}	/* end monitor WD  */
-
-- 
GitLab