Inserted 3rd Relay Board and PVs
This commit is contained in:
@@ -443,13 +443,27 @@ record(bo, "$(P)$(R)Buzzer" ) {
|
||||
field(OSV,"MINOR")
|
||||
}
|
||||
|
||||
######################################
|
||||
# Tor Power Supply Disable #
|
||||
# É desligado na emergência e em qualquer estado que
|
||||
# não seja Process ou Wait Shot.
|
||||
######################################
|
||||
record(bo, "$(P)$(R)Shot-TorPSDisable" ) {
|
||||
field(DESC,"Tor Power Supply Disable")
|
||||
####field( OUT, "$(P)$(R)PCF8574:61:REGISTER.B1 PP" )
|
||||
field(OUT,"$(P)$(R)SEEED4RELAY:19:REGISTER.B0 PP")
|
||||
field( ZNAM, "Enabled" )
|
||||
field( ONAM, "Disabled" )
|
||||
field(VAL,"0")
|
||||
field(OSV,"MINOR")
|
||||
}
|
||||
##############################
|
||||
# LIGHTS ON/OFF #
|
||||
##############################
|
||||
record(bo, "$(P)$(R)Lab-WarningLight" ) {
|
||||
field(DESC,"Luzes de sinalização, 220V ")
|
||||
# ####field(OUT, "$(P)$(R)PCF8574:60:REGISTER.B5 PP" )
|
||||
field(OUT,"$(P)$(R)SEEED4RELAY:19:REGISTER.B0 PP")
|
||||
field(OUT,"$(P)$(R)SEEED4RELAY:19:REGISTER.B1 PP")
|
||||
field(ZNAM,"OFF")
|
||||
field(ONAM, "ON")
|
||||
field(VAL, "0")
|
||||
@@ -460,20 +474,6 @@ record(bo, "$(P)$(R)Lab-WarningLight" ) {
|
||||
# field(VAL,"1")
|
||||
#}
|
||||
|
||||
######################################
|
||||
# Tor Power Supply Disable #
|
||||
# É desligado na emergência e em qualquer estado que
|
||||
# não seja Process ou Wait Shot.
|
||||
######################################
|
||||
record(bo, "$(P)$(R)Shot-TorPSDisable" ) {
|
||||
field(DESC,"Tor Power Supply Disable")
|
||||
####field( OUT, "$(P)$(R)PCF8574:61:REGISTER.B1 PP" )
|
||||
field(OUT,"$(P)$(R)SEEED4RELAY:19:REGISTER.B1 PP")
|
||||
field( ZNAM, "Enabled" )
|
||||
field( ONAM, "Disabled" )
|
||||
field(VAL,"0")
|
||||
field(OSV,"MINOR")
|
||||
}
|
||||
# field( ZNAM, "Off" )
|
||||
# field( ONAM, "On" )
|
||||
# field(VAL,"1")
|
||||
|
||||
@@ -18,10 +18,18 @@
|
||||
**/
|
||||
//%% #include "errlog.h"
|
||||
|
||||
program IsttokSeqExec
|
||||
program IsttokSeqExec ("output=logFile.txt")
|
||||
%{#include "errlog.h"}%
|
||||
%%#include <fcntl.h> /* for exit() */
|
||||
%%#include <stdio.h> /* for exit() */
|
||||
%%#include <stdlib.h> /* for exit() */
|
||||
/* CONSTANT DECLARATION*/
|
||||
/*Relays and INPUT (Valleman Board) have negative Logic!*/
|
||||
/*Relays and INPUT PVs on Valleman Board have negative Logic!*/
|
||||
/*=================== declarations =========================*/
|
||||
|
||||
int fd; /* file descriptor for logging */
|
||||
char *pmac; /* used to access program macros */
|
||||
|
||||
short PCF_RELAY_ON = 0;
|
||||
short PCF_RELAY_OFF= 1;
|
||||
short PCF_INPUT_ON = 0;
|
||||
@@ -142,12 +150,13 @@ assign IsttokRPump2_Motor to "ISTTOK:central:RPump2-Motor";
|
||||
|
||||
short IsttokRPump2_Valve;
|
||||
assign IsttokRPump2_Valve to "ISTTOK:central:RPump2-Valve";
|
||||
|
||||
/* No use for these, Controller does not respond
|
||||
short IsttokTMPump1_ControllerOff;
|
||||
assign IsttokTMPump1_ControllerOff to "ISTTOK:central:TMPump1-ControllerOff";
|
||||
|
||||
short IsttokTMPump1_ControllerOn;
|
||||
assign IsttokTMPump1_ControllerOn to "ISTTOK:central:TMPump1-ControllerOn";
|
||||
*/
|
||||
|
||||
short IsttokTMPump1_MotorOff;
|
||||
assign IsttokTMPump1_MotorOff to "ISTTOK:central:TMPump1-MotorOff";
|
||||
@@ -277,6 +286,23 @@ ss PulseSequence {
|
||||
/*********** State: init ****************** */
|
||||
state init {
|
||||
entry {
|
||||
fd = -1;
|
||||
/* Use parameter to define logging file */
|
||||
|
||||
pmac = macValueGet("output");
|
||||
if (pmac == 0 || pmac[0] == 0) {
|
||||
printf("No macro defined for \"output\"\n");
|
||||
fd = 1;
|
||||
}
|
||||
else {
|
||||
fd = open(pmac, (O_CREAT | O_WRONLY), 0664);
|
||||
/* if (fd == ERROR) { */
|
||||
if (fd == -1) {
|
||||
printf("Can't open %s\n", pmac);
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
dprintf(fd, "Starting program\n");
|
||||
strcpy(msg, "INIT: Sequence Entry");
|
||||
pvPut(msg);
|
||||
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
||||
@@ -326,13 +352,13 @@ ss PulseSequence {
|
||||
|
||||
Isttok_TorPSTrigger= OFF;
|
||||
pvPut(Isttok_TorPSTrigger);
|
||||
|
||||
/*
|
||||
IsttokTMPump1_ControllerOff = OFF;
|
||||
pvPut(IsttokTMPump1_ControllerOff);
|
||||
|
||||
IsttokTMPump1_ControllerOn = OFF;
|
||||
pvPut(IsttokTMPump1_ControllerOn);
|
||||
|
||||
*/
|
||||
IsttokTMPump1_MotorOff = OFF;
|
||||
pvPut(IsttokTMPump1_MotorOff);
|
||||
|
||||
@@ -457,7 +483,6 @@ ss PulseSequence {
|
||||
} state Emergency
|
||||
|
||||
when ( (pvStatus(IsttokRPump1_Pressure) != pvStatOK) || (pvStatus(IsttokTMPump1_Emergency) != pvStatOK) ) {
|
||||
//when ( pvStatus(IsttokRPump1_Pressure) != pvStatOK || pvStatus(IsttokRPump2_Pressure) != pvStatOK ||
|
||||
// pvStatus(IsttokTMPump1_Emergency) != pvStatOK || pvStatus(IsttokTMPump2_Emergency) != pvStatOK) {
|
||||
/* Vacuum emergency: Pulse state change to Stopping */
|
||||
/*IsttokOPREQ = STOP; State should recover from */
|
||||
@@ -466,8 +491,8 @@ ss PulseSequence {
|
||||
strcpy(msg, "State Idle to Stopping");
|
||||
pvPut(msg);
|
||||
errlogSevPrintf(MINOR, "%s\n", msg);
|
||||
sprintf(sendMail, "Rpump1 Pressure:%1.1e TMP1 Emergency:%d TMP1 Adm. Pressure:%4.2e",
|
||||
IsttokRPump1_Pressure, IsttokTMPump1_Emergency, IsttokTMPump1_Pressure);
|
||||
sprintf(sendMail, "Vacuum Emergency while Idle, Rpump1 Pressure:%1.1e, TMP1 Adm. Pressure:%4.2e, TMP1 Emergency:%d",
|
||||
IsttokRPump1_Pressure, IsttokTMPump1_Pressure, IsttokTMPump1_Emergency);
|
||||
pvPut(sendMail);
|
||||
} state Stopping
|
||||
|
||||
@@ -1394,6 +1419,14 @@ ss StoppingSequence {
|
||||
when (IsttokOPSTATE != POS_Stopping ) { } state NonStopping
|
||||
}
|
||||
}
|
||||
/* Exit procedure - close the log file
|
||||
exit {
|
||||
printf("close fd=%d\n", fd);
|
||||
if ((fd > 0) && (fd != ioGlobalStdGet(1)) )
|
||||
close(fd);
|
||||
fd = -1;
|
||||
}
|
||||
*/
|
||||
|
||||
/**** END PROGRAM ***/
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# autosave R5.3 Automatically generated - DO NOT MODIFY - 220204-153705
|
||||
# autosave R5.3 Automatically generated - DO NOT MODIFY - 220214-164146
|
||||
ISTTOK:central:PULSE-NUMBER.VAL 49468
|
||||
ISTTOK:central:LogMessage.VAL
|
||||
ISTTOK:central:LASTOPSTATE.VAL 2
|
||||
|
||||
@@ -83,4 +83,4 @@ asInit
|
||||
create_monitor_set("$(IOC).req", 30, "P=ISTTOK:,R=central:")
|
||||
|
||||
## Start any sequence programs , use safe mode
|
||||
seq IsttokSeqExec "unit=ISTTOK"
|
||||
seq IsttokSeqExec "unit=ISTTOK,node=central,output=logFile2"
|
||||
|
||||
Reference in New Issue
Block a user