This commit is contained in:
Sakbe
2021-12-14 14:23:29 +00:00
12 changed files with 363 additions and 217 deletions

View File

@@ -194,14 +194,14 @@ Process Variables in this IOC Server:
* Connected to PCF8574 Address = 60 (Top Valleman)
|PV Name | PV Type | Bit |
|PV Name | PV Type | Bit | Relay #/(NO/NC)|
|:----------|-------|---:|
|ISTTOK:central:RPump1-Motor| bo | 0 |
|ISTTOK:central:RPump1-Valve| bo | 1 |
|ISTTOK:central:RPump2-Motor| bo | 2 |
|ISTTOK:central:RPump2-Valve| bo | 3 |
|ISTTOK:central:VVessel-Filament| bo | 4 |
|ISTTOK:central:Clean-TorContactor| bo | 7 |
|ISTTOK:central:RPump1-Motor| bo | 0 | 5 / NC |
|ISTTOK:central:RPump1-Valve| bo | 1 | 4 / NC |
|ISTTOK:central:RPump2-Motor (Not Used/Disabled)| bo | 2 | |
|ISTTOK:central:RPump2-Valve (Not Used/Disabled| bo | 3 | |
|ISTTOK:central:VVessel-Filament| bo | 4 | 1 / NO|
|ISTTOK:central:Clean-TorContactor| bo | 7 | |
----------
@@ -242,8 +242,8 @@ Process Variables in this IOC Server:
- Vacuum Pfeiffer Sensors (RS485)
#### Hardware Platform
1. A Raspberry Pi 3, running a linux distribution..
* Has a USB/RS485 port for monitoring pressure sensors
1. A Raspberry Pi 2, running a raspian Buster distribution..
* Has a USB/RS485 interface for monitoring pressure sensors
#### Process Variables
Process Variables in this IOC Server:
@@ -270,7 +270,8 @@ Process Variables in this IOC Server:
## Download and configure CS-Studio
* Install JAVA JDK (version Java SE Development Kit 8)
* Install JAVA JDK (version Java SE Development Kit 8) or
openjdk-8-jre linux package
* Download ISTTOK EPICS Files to a working folder
* `git clone https://bernardo@git.ipfn.tecnico.ulisboa.pt/r/ISTTOK.git`
* Goto site [CS-Studio](http://download.controlsystemstudio.org/release/4.5/) and download latest version to your OS
@@ -289,7 +290,7 @@ Process Variables in this IOC Server:
### EPICS Channel Access Configuration
```
export EPICS_CA_ADDR_LIST=""192.168.1.110 192.168.1.120 192.168.1.152"
export EPICS_CA_ADDR_LIST="192.168.1.110 192.168.1.120 192.168.1.152"
export EPICS_CA_AUTO_ADDR_LIST="NO"
```

View File

@@ -228,9 +228,9 @@ record(calc, "$(P)$(R)Emergency" ) {
###############
###############
#############################
# ROTARY1 PUMP #
#############################
###################################
# ROTARY1 PUMP Relay 5 NC #
###################################
record( bo, "$(P)$(R)RPump1-Motor" ) {
field(DESC,"Power to Rotatory Pump 1. Relay 5")
field(OUT, "$(P)$(R)PCF8574:60:REGISTER.B0 PP" )
@@ -240,9 +240,9 @@ record( bo, "$(P)$(R)RPump1-Motor" ) {
field(ZSV,"MINOR")
}
#############################
# ROTARY1 VALVE #
#############################
####################################
# ROTARY1 VALVE Relay 4 NC #
####################################
record( bo, "$(P)$(R)RPump1-Valve" ) {
field(DESC,"Abre a valvula da bomba rot. Relay 4")
field(OUT, "$(P)$(R)PCF8574:60:REGISTER.B1 PP" )
@@ -252,11 +252,11 @@ record( bo, "$(P)$(R)RPump1-Valve" ) {
}
#############################
# ROTARY2 PUMP #
# ROTARY2 PUMP NO LONGUER USED (RESERVED) #
#############################
record( bo, "$(P)$(R)RPump2-Motor" ) {
field(DESC,"Power On Rotatory Pump 2")
field(OUT, "$(P)$(R)PCF8574:60:REGISTER.B2 PP" )
# field(OUT, "$(P)$(R)PCF8574:60:REGISTER.B2 PP" )
field(ZNAM, "Off" )
field(ONAM, "On" )
field(VAL,"1")
@@ -264,11 +264,11 @@ record( bo, "$(P)$(R)RPump2-Motor" ) {
}
#############################
# ROTARY2 VALVE #
# ROTARY2 VALVE NO LONGUER USED (RESERVED) #
#############################
record( bo, "$(P)$(R)RPump2-Valve" ) {
field(DESC," Abre a valvula da bomba rotatoria 2 ")
field(OUT,"$(P)$(R)PCF8574:60:REGISTER.B3 PP" )
# field(OUT,"$(P)$(R)PCF8574:60:REGISTER.B3 PP" )
field(ZNAM,"Closed" )
field(ONAM,"Open" )
field(VAL,"1")

View File

@@ -54,9 +54,10 @@ record( mbbiDirect, "$(P)$(R)PCF8574:57:REGISTER:READ" ) {
field(FLNK, "$(P)$(R)PCF8574:57:REGISTER:READ:FNOUT")
}
#####################################################
# ### Read/Write pcf8574 address 0x3c=60 register ### #
###################################################
################################################################
# ### Read/Write pcf8574 address 0x3c=60 register #
# I2C power up with output at 1 (Relay coils are de-energized)#
################################################################
record( mbboDirect, "$(P)$(R)PCF8574:60:REGISTER") {
field( DTYP, "stream")
field( OUT, "@pcf8574.proto wReg(60) $(BUS)")

View File

@@ -1,31 +1,44 @@
# 8/5/2021 Only sensor 2 is working. Running with dspIC
# 20/9/2021 sensors 1,2,3 are working. Running with dspIC
# 20/9/2021 sensors 1,2,3 are working. Running with tty USB
record (longin, "$(P)$(R)P001:M")
{
field (DESC, "getPressure001 $(bus)")
field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure001($(P)$(R)P001:E) $(bus)")
# field (SCAN, "I/O Intr")
field (SCAN, "1 second")
field (FLNK, "$(P)$(R)VVessel-Pressure")
field (FLNK, "$(P)$(R)TMPump1-PressureAdmission")
}
record (longin, "$(P)$(R)P001:E")
{
field (DESC, "Pressure001 exponent $(bus)")
}
record (calc, "$(P)$(R)VVessel-Pressure")
record (calc, "$(P)$(R)TMPump1-PressureAdmission")
{
field (DESC, "ISTTOK:central:VVessel-Pressure")
field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
field(INPA, "$(P)$(R)P001:M")
field(INPB, "$(P)$(R)P001:E")
field(CALC, "(A*0.001)*10.0**(B-20)")
field(CALC, "(A*0.001)* 10.0**(B-20)")
field(PREC, "3")
field(EGU, "mBar")
field(HIHI,"1.0e-2")
field(HIGH,"1.0e-3")
# field(LOW, "20.0")
# field(LOLO,"0.0")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
# field(LSV, "MINOR")
# field(LLSV,"MAJOR")
}
# out "0020074002=?107";
record (longin, "$(P)$(R)P002:M")
{
field (DESC, "getPressure002 $(bus)")
field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure002($(P)$(R)P002:E) $(bus)")
field (SCAN, "2 second")
# field (SCAN, "I/O Intr")
field (SCAN, "1 second")
field (FLNK, "$(P)$(R)RPump1-Pressure")
}
record (longin, "$(P)$(R)P002:E")
@@ -40,8 +53,8 @@ record (calc, "$(P)$(R)RPump1-Pressure")
field(CALC, "(A*0.001)*10.0**(B-20)")
field(PREC, "3")
field(EGU, "mBar")
# field(HIHI,"1.0e-1")
# field(HIGH,"5.0e-3")
field(HIHI,"1.0e-1")
field(HIGH,"5.0e-2")
# field(LOW, "20.0")
# field(LOLO,"0.0")
field(HHSV,"MAJOR")
@@ -50,6 +63,7 @@ record (calc, "$(P)$(R)RPump1-Pressure")
# field(LLSV,"MAJOR")
}
# out "0030074002=?108";
record (longin, "$(P)$(R)P003:M")
{
field (DESC, "getPressure003 Mantissa $(bus)")
@@ -57,30 +71,36 @@ record (longin, "$(P)$(R)P003:M")
field (INP, "@pfeiffer.proto getPressure003($(P)$(R)P003:E) $(bus)")
field (SCAN, "1 second")
# field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)TMPump1-PressureAdmission")
field (FLNK, "$(P)$(R)VVessel-Pressure")
}
record (longin, "$(P)$(R)P003:E")
{
field (DESC, "Pressure003 Exponent $(bus)")
}
record (calc, "$(P)$(R)TMPump1-PressureAdmission")
record (calc, "$(P)$(R)VVessel-Pressure")
{
field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
field (DESC, "ISTTOK:central:VVessel-Pressure")
field(INPA, "$(P)$(R)P003:M")
field(INPB, "$(P)$(R)P003:E")
field(CALC, "(A*0.001)* 10.0**(B-20)")
field(CALC, "(A*0.001)*10.0**(B-20)")
field(PREC, "3")
field(EGU, "mBar")
field(HIHI,"1.0e-1")
field(HIGH,"1.0e-2")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
}
# out "0040074002=?109";
# NOT connected 26/10/2021
record (longin, "$(P)$(R)P004:M")
{
field (DESC, "getPressure004 Mantissa $(bus)")
field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure004($(P)$(R)P004:E) $(bus)")
field (SCAN, "1 second")
# field (SCAN, "1 second")
# field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)RPump2-Pressure")
}
record (longin, "$(P)$(R)P004:E")
@@ -100,8 +120,8 @@ record (calc, "$(P)$(R)RPump2-Pressure")
# field(HIGH,"5.0e-3")
# field(LOW, "20.0")
# field(LOLO,"0.0")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
# field(HHSV,"MAJOR")
# field(HSV, "MINOR")
# field(LSV, "MINOR")
# field(LLSV,"MAJOR")
}

View File

@@ -21,6 +21,7 @@ record(mbbi, "$(P)$(R)OPSTATE") {
field(FRVL, "4")
field(FVVL, "5")
field(SXVL, "6")
field(SVVL, "7")
field(ZRST, "Stopped")
field(ONST, "Starting")
field(TWST, "Idle")
@@ -28,6 +29,7 @@ record(mbbi, "$(P)$(R)OPSTATE") {
field(FRST, "WaitShot")
field(FVST, "Stopping")
field(SXST, "Emergency")
field(SVST, "UPSEmergency")
field(VAL, "0")
}
record(mbbo, "$(P)$(R)LASTOPSTATE") {
@@ -40,6 +42,7 @@ record(mbbo, "$(P)$(R)LASTOPSTATE") {
field(FRVL, "4")
field(FVVL, "5")
field(SXVL, "6")
field(SVVL, "7")
field(ZRST, "Stopped")
field(ONST, "Starting")
field(TWST, "Idle")
@@ -47,6 +50,7 @@ record(mbbo, "$(P)$(R)LASTOPSTATE") {
field(FRST, "WaitShot")
field(FVST, "Stopping")
field(SXST, "Emergency")
field(SVST, "UPSEmergency")
# field(VAL, "0")
}

View File

@@ -1,23 +1,43 @@
Terminator=CR;
MaxInput = 20;
# CR and LF are control characters, respectively coded 0x0D (13 decimal) and 0x0A (10 decimal)
# CR and LF are control characters, respectively coded 0x0D (13 decimal) and 0x0A (10 decimal)
MaxInput = 30;
ExtraInput = Ignore;
# Values in millisecond
LockTimeout = 1000;
# Affects first out command in a protocol.
# If other records currently use the device, how many milliseconds to wait for
# exclusive access to the device before giving up?
#ReadTimeout = 1500;
ReplyTimeout = 400;
#PollPeriod = $ReplyTimeout;
#Integer. Affects first in command in I/O Intr mode (see chapter Record Processing).
PollPeriod = 200;
# in millisecond
#ReadTimeout = 2000;
ReplyTimeout = 250;
# Using redirection to read 2 records, mantissa and exponent
# TMPump1-PressureAdmission
getPressure001 {
out "0010074002=?106";
in "0011074006%4u%(\$1)2u%+<sum8>";
}
#RPump1-Pressure
getPressure002 {
out "0020074002=?107";
in "0021074006%4u%(\$1)2u%+<sum8>";
}
#VVessel-Pressure
getPressure003 {
out "0030074002=?108";
in "0031074006%4u%(\$1)2u%+<sum8>";
}
getPressure004 {
out "0040074002=?109";
in "0041074006%4u%(\$1)2u%+<sum8>";

View File

@@ -44,17 +44,17 @@ short CLNST_Cleaning5 = 5;
short WSHTST_NonShoting = 0;
short WSHTST_WaitTrg = 1;
short WSHTST_Shoting2 = 2;
short WSHTST_Shoting3 = 3;
short WSHTST_Shoting4 = 4;
short WSHTST_Shoting5 = 5;
short WSHTST_Shoting6 = 6;
short WSHTST_Shoting7 = 7;
short WSHTST_Shoting8 = 8;
short WSHTST_Shoting9 = 9;
short WSHTST_Shoting10 = 10;
short WSHTST_Shoting11 = 11;
short WSHTST_Shoting12 = 12;
short WSHTST_Shooting2 = 2;
short WSHTST_Shooting3 = 3;
short WSHTST_Shooting4 = 4;
short WSHTST_Shooting5 = 5;
short WSHTST_Shooting6 = 6;
short WSHTST_Shooting7 = 7;
short WSHTST_Shooting8 = 8;
short WSHTST_Shooting9 = 9;
short WSHTST_Shooting10 = 10;
short WSHTST_Shooting11 = 11;
short WSHTST_Shooting12 = 12;
short WSHTST_ShotEnd = 13;
short STPST_NonStopping = 0;
@@ -71,6 +71,7 @@ short POS_Clean =3;
short POS_WaitShot=4;
short POS_Stopping=5;
short POS_Emergency=6;
short POS_UPSEmergency=7;
short ON=1;
short OFF=0;
@@ -177,7 +178,8 @@ monitor IsttokTMPump2_Emergency;
*/
float IsttokRPump1_Pressure;
assign IsttokRPump1_Pressure to "ISTTOK:vacuum:RPump1-Pressure";
/*assign IsttokRPump1_Pressure to "ISTTOK:vacuum:RPump1-Pressure";*/
assign IsttokRPump1_Pressure to "ISTTOK:central:RPump1-Pressure";
monitor IsttokRPump1_Pressure;
/*
@@ -426,7 +428,7 @@ ss PulseSequence {
IsttokOPREQ = STOP;
pvPut(IsttokOPREQ);
/* State change to Stopping */
IsttokOPSTATE = POS_Stopping;
IsttokOPSTATE = POS_UPSEmergency;
pvPut(IsttokOPSTATE);
} state Stopping
@@ -517,15 +519,16 @@ ss PulseSequence {
pvPut(IsttokOPSTATE);
}
when (IsttokupsBatteryON == ON) {
strcpy(msg, "Power Emergency, go to Stopping");
strcpy(msg, "Power Emergency, go to UPSEmergency");
pvPut(msg);
errlogSevPrintf(MAJOR, "%s\n",msg);
IsttokOPREQ = STOP;
pvPut(IsttokOPREQ);
/* State change to Stopping */
IsttokOPSTATE = POS_Stopping;
/* State change to UPSEmergency */
IsttokOPSTATE = POS_UPSEmergency;
pvPut(IsttokOPSTATE);
} state Stopping
} state UpsEmergency
when(IsttokEmergency == ON){
strcpy(msg, "Emergency from WaitShot");
pvPut(msg);
@@ -558,6 +561,21 @@ ss PulseSequence {
state Stopping {
entry{
/*Just to be sure */
IsttokShotShot_TorPSDisable = PCF_RELAY_OFF;
pvPut(IsttokShotShot_TorPSDisable);
IsttokShotCapBank_Charge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Charge);
IsttokShotCapBank_Discharge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Discharge);
IsttokShotGasIS_Valves = PCF_RELAY_OFF;
pvPut(IsttokShotGasIS_Valves);
IsttokShotVVessel_Filament = PCF_RELAY_OFF;
pvPut(IsttokShotVVessel_Filament);
IsttokProcReq = STOP;
pvPut(IsttokProcReq);
@@ -655,9 +673,72 @@ ss PulseSequence {
pvPut(IsttokOPSTATE);
} state Stopped
}
/*State UpsEmergency*/
state UpsEmergency {
entry {
strcpy(msg, "Emergency Toroidal Shot Disable");
errlogSevPrintf(MAJOR, "%s\n",msg);
IsttokShotShot_TorPSDisable = PCF_RELAY_OFF;
pvPut(IsttokShotShot_TorPSDisable);
strcpy(msg, "EMERGENCY: CAPBANK Charge OFF");
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotCapBank_Charge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Charge);
strcpy(msg, "EMERGENCY: CAPBANK CrowBar Close");
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotCapBank_Discharge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Discharge);
strcpy(msg, "EMERGENCY: GIS Valves CLOSE");
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotGasIS_Valves = PCF_RELAY_OFF;
pvPut(IsttokShotGasIS_Valves);
strcpy(msg, "UPS EMERGENCY: Filament OFF");
pvPut(msg);
errlogSevPrintf(MAJOR, "%s\n",msg);
IsttokShotVVessel_Filament = PCF_RELAY_OFF;
pvPut(IsttokShotVVessel_Filament);
}
when (IsttokupsBatteryON == ON) {
/* Pulse state change to Stopping */
strcpy(msg, "State to Stopping");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokProcReq = STOP;
pvPut(IsttokProcReq);
IsttokOPSTATE = POS_Stopping;
pvPut(IsttokOPSTATE);
} state Stopping
when (delay(6.0) && (IsttokupsBatteryON == OFF) && (IsttokOPSTATE == POS_Idle)){
/* Pulse state change to Idle */
strcpy(msg, "State to Idle");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokOPSTATE = POS_Idle;
pvPut(IsttokOPSTATE);
} state Idle
/*
when (delay(6.0) && (IsttokupsBatteryON == OFF) &&
((IsttokOPSTATE == POS_Starting)) || (IsttokOPSTATE == POS_Stopping)){
// TODO Check these 2 transictions
strcpy(msg, "State to Stopping");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokOPREQ = STOP;
pvPut(IsttokOPREQ);
// Pulse state change to Stopping
IsttokOPSTATE = POS_Stopping;
pvPut(IsttokOPSTATE);
} state Stopping
*/
}
}
/* Starting State Set */
/*********** Starting SUB-State Set ************/
ss StartingSequence {
state NonStarting {
entry {
@@ -960,15 +1041,15 @@ ss ShotSequence {
pvPut(msg);
IsttokShotCountdown = -70;
pvPut(IsttokShotCountdown);
WSHOTINGSTATE = WSHTST_Shoting2;
WSHOTINGSTATE = WSHTST_Shooting2;
pvPut(WSHOTINGSTATE);
PulseNumber +=1;
pvPut(PulseNumber);
} state Shoting2
} state Shooting2
}
state Shoting2 {
state Shooting2 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting 2 Out");
strcpy(msg, "Shooting 2 Out");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
} state ShotWaitTrg
@@ -988,13 +1069,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotLab_WarningLight = PCF_RELAY_ON;
pvPut(IsttokShotLab_WarningLight);
WSHOTINGSTATE = WSHTST_Shoting3;
WSHOTINGSTATE = WSHTST_Shooting3;
pvPut(WSHOTINGSTATE);
} state Shoting3
} state Shooting3
}
state Shoting3 {
state Shooting3 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting3 Out");
strcpy(msg, "Shooting3 Out");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
} state ShotWaitTrg
@@ -1004,26 +1085,26 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotGasIS_Valves = PCF_RELAY_ON;
pvPut(IsttokShotGasIS_Valves);
WSHOTINGSTATE = WSHTST_Shoting4;
WSHOTINGSTATE = WSHTST_Shooting4;
pvPut(WSHOTINGSTATE);
} state Shoting4
} state Shooting4
}
state Shoting4 {
state Shooting4 {
when (IsttokOPSTATE != POS_WaitShot ) {
strcpy(msg, "Shoting4 Out");
strcpy(msg, "Shooting4 Out");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
pvPut(WSHOTINGSTATE);
} state NonShoting
when (IsttokShotCountdown == -59) {
WSHOTINGSTATE = WSHTST_Shoting5;
WSHOTINGSTATE = WSHTST_Shooting5;
pvPut(WSHOTINGSTATE);
} state Shoting5
} state Shooting5
}
state Shoting5 {
state Shooting5 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting5 Out");
strcpy(msg, "Shooting5 Out");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1035,13 +1116,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotCapBank_Charge = PCF_RELAY_ON;
pvPut(IsttokShotCapBank_Charge);
WSHOTINGSTATE = WSHTST_Shoting6;
WSHOTINGSTATE = WSHTST_Shooting6;
pvPut(WSHOTINGSTATE);
} state Shoting6
} state Shooting6
}
state Shoting6 {
state Shooting6 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting6 Out");
strcpy(msg, "Shooting6 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1053,13 +1134,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n", msg);
IsttokShotCapBank_Charge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Charge);
WSHOTINGSTATE = WSHTST_Shoting7;
WSHOTINGSTATE = WSHTST_Shooting7;
pvPut(WSHOTINGSTATE);
} state Shoting7
} state Shooting7
}
state Shoting7 {
state Shooting7 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting7 Out");
strcpy(msg, "Shooting7 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1076,13 +1157,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n",msg);
IsttokShotVVessel_Filament = PCF_RELAY_ON;
pvPut(IsttokShotVVessel_Filament);
WSHOTINGSTATE = WSHTST_Shoting8;
WSHOTINGSTATE = WSHTST_Shooting8;
pvPut(WSHOTINGSTATE);
} state Shoting8
} state Shooting8
}
state Shoting8 {
state Shooting8 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting8 Out");
strcpy(msg, "Shooting8 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1095,13 +1176,13 @@ ss ShotSequence {
// PS Trigger Pulse
IsttokShotShot_TorPSTrigger = ON;
pvPut(IsttokShotShot_TorPSTrigger);
WSHOTINGSTATE = WSHTST_Shoting9;
WSHOTINGSTATE = WSHTST_Shooting9;
pvPut(WSHOTINGSTATE);
} state Shoting9
} state Shooting9
}
state Shoting9 {
state Shooting9 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting9 Out");
strcpy(msg, "Shooting9 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1111,13 +1192,13 @@ ss ShotSequence {
strcpy(msg, "Ready for SHOT" );
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n", msg);
WSHOTINGSTATE = WSHTST_Shoting10;
WSHOTINGSTATE = WSHTST_Shooting10;
pvPut(WSHOTINGSTATE);
} state Shoting10
} state Shooting10
}
state Shoting10 {
state Shooting10 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting10 Out");
strcpy(msg, "Shooting10 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1129,13 +1210,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n", msg);
IsttokShotCapBank_Discharge = PCF_RELAY_OFF;
pvPut(IsttokShotCapBank_Discharge);
WSHOTINGSTATE = WSHTST_Shoting11;
WSHOTINGSTATE = WSHTST_Shooting11;
pvPut(WSHOTINGSTATE);
} state Shoting11
} state Shooting11
}
state Shoting11 {
state Shooting11 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting11 Out");
strcpy(msg, "Shooting11 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1152,13 +1233,13 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n", msg);
IsttokShotVVessel_Filament = 1;
pvPut(IsttokShotVVessel_Filament);
WSHOTINGSTATE = WSHTST_Shoting12;
WSHOTINGSTATE = WSHTST_Shooting12;
pvPut(WSHOTINGSTATE);
} state Shoting12
} state Shooting12
}
state Shoting12 {
state Shooting12 {
when (IsttokOPSTATE != POS_WaitShot) {
strcpy(msg, "Shoting6 Out");
strcpy(msg, "Shooting6 Out");
pvPut(msg);
errlogSevPrintf(MINOR, "%s\n",msg);
WSHOTINGSTATE = WSHTST_NonShoting;
@@ -1185,7 +1266,7 @@ ss ShotSequence {
}
}
/* Stopping State Set */
/* Stopping Sub-State Set */
ss StoppingSequence {
state NonStopping {
entry {
@@ -1260,12 +1341,12 @@ ss StoppingSequence {
strcpy(msg, "Toroidal Field Recovered" );
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n", msg);
WSHOTINGSTATE = WSHTST_Shoting12;
WSHOTINGSTATE = WSHTST_Shooting12;
pvPut(WSHOTINGSTATE);
} state Shoting12
state Shoting12 {
} state Shooting12
state Shooting12 {
when ((IsttokOPSTATE != POS_WaitShot ) && (IsttokShotCountdown == 160) ) {
strcpy(msg, "Shoting12 Out");
strcpy(msg, "Shooting12 Out");
pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n", msg);
WSHOTINGSTATE = WSHTST_NonShoting;

View File

@@ -12,6 +12,8 @@ ISTTOK:central:Shot-TorPSCurrent
ISTTOK:central:UPS-Shutdown
#ALARM Limits
ISTTOK:central:RPump1-Pressure.HIGH
ISTTOK:central:RPump1-Pressure.HIHI
#ISTTOK:central:RPump2-Pressure.HIGH
#ISTTOK:central:RPump2-Pressure.HIHI

View File

@@ -1,6 +1,11 @@
ISTTOK:central:PCF8591:72:ADC_CH1
ISTTOK:central:PCF8591:72:ADC_CH2
ISTTOK:central:PCF8591:72:ADC_CH3
ISTTOK:central:TMPump1-Power
ISTTOK:central:TMPump1-Emergency
ISTTOK:central:TMPump1-Acceleration
ISTTOK:central:TMPump1-NormalOperation
ISTTOK:central:TMPump2-Emergency
ISTTOK:central:TMPump2-Acceleration
ISTTOK:central:TTSystem-tzero
ISTTOK:central:Emergency-PhysButton
ISTTOK:central:UPS-OnBattery
ISTTOK:central:UPS-Shutdown
ISTTOK:central:OPREQ
@@ -36,6 +41,14 @@ ISTTOK:SR_heartbeat
ISTTOK:SR_i_am_alive
ISTTOK:SR_deadIfZero
ISTTOK:SR_disable
ISTTOK:central:TMPump1-ControllerOnInv
ISTTOK:central:TMPump1-ControllerOffInv
ISTTOK:central:TMPump1-MotorOnInv
ISTTOK:central:TMPump1-MotorOffInv
ISTTOK:central:BuzzerInv
ISTTOK:central:Shot-TorPSTriggerInv
ISTTOK:central:PCF8574:56:REGISTER:READ:FNOUT
ISTTOK:central:PCF8574:57:REGISTER:READ:FNOUT
ISTTOK:central:PULSE-NUMBER
ISTTOK:central:PCF8591:72:DAC
ISTTOK:central:TDA8444:32:DAC_CH0
@@ -55,8 +68,6 @@ ISTTOK:SR_5_State
ISTTOK:SR_6_State
ISTTOK:SR_7_State
ISTTOK:SR_disableMaxSecs
ISTTOK:central:PCF8574:56:REGISTER:READ:FNOUT
ISTTOK:central:PCF8574:57:REGISTER:READ:FNOUT
ISTTOK:central:OPCALCSTATE
ISTTOK:central:STARTCALCSTATE
ISTTOK:central:STOPPINGCALCSTATE
@@ -68,12 +79,22 @@ ISTTOK:central:PCF8591:72:BYTE2_CH1
ISTTOK:central:PCF8591:72:BYTE2_CH2
ISTTOK:central:PCF8591:72:BYTE2_CH3
ISTTOK:central:Emergency
ISTTOK:central:TMPump1-ControllerOnInv
ISTTOK:central:TMPump1-ControllerOffInv
ISTTOK:central:TMPump1-MotorOnInv
ISTTOK:central:TMPump1-MotorOffInv
ISTTOK:central:BuzzerInv
ISTTOK:central:Shot-TorPSTriggerInv
ISTTOK:central:TMPump1-PressureAdmission
ISTTOK:central:RPump1-Pressure
ISTTOK:central:VVessel-Pressure
ISTTOK:central:RPump2-Pressure
ISTTOK:central:TMPump2-Speed
ISTTOK:central:TMPump2-Current
ISTTOK:central:Shot-TorPSCurrentImage
ISTTOK:central:OPSTATE
ISTTOK:central:STARTINGSTATE
ISTTOK:central:CLEANINGSTATE
ISTTOK:central:WSHOTINGSTATE
ISTTOK:central:STOPPINGSTATE
ISTTOK:central:PCF8574:56:REGISTER:READ
ISTTOK:central:PCF8574:57:REGISTER:READ
ISTTOK:central:PCF8574:60:REGISTER:READ
ISTTOK:central:PCF8574:61:REGISTER:READ
ISTTOK:central:LASTOPSTATE
ISTTOK:SR_rebootStatus
ISTTOK:SR_status
@@ -85,28 +106,26 @@ ISTTOK:SR_4_Status
ISTTOK:SR_5_Status
ISTTOK:SR_6_Status
ISTTOK:SR_7_Status
ISTTOK:central:TMPump1-Power
ISTTOK:central:TMPump1-Emergency
ISTTOK:central:TMPump1-Acceleration
ISTTOK:central:TMPump1-NormalOperation
ISTTOK:central:TMPump2-Emergency
ISTTOK:central:TMPump2-Acceleration
ISTTOK:central:TTSystem-tzero
ISTTOK:central:Emergency-PhysButton
ISTTOK:central:PCF8574:56:REGISTER
ISTTOK:central:PCF8574:57:REGISTER
ISTTOK:central:PCF8574:60:REGISTER
ISTTOK:central:PCF8574:61:REGISTER
ISTTOK:central:PCF8591:72:CTRLREGISTER
ISTTOK:central:PCF8574:56:REGISTER:READ
ISTTOK:central:PCF8574:57:REGISTER:READ
ISTTOK:central:PCF8574:60:REGISTER:READ
ISTTOK:central:PCF8574:61:REGISTER:READ
ISTTOK:central:TMPump2-Speed
ISTTOK:central:TMPump2-Current
ISTTOK:central:Shot-TorPSCurrentImage
ISTTOK:central:CurrentTime
ISTTOK:central:PCF8591:72:ADC_CH1
ISTTOK:central:PCF8591:72:ADC_CH2
ISTTOK:central:PCF8591:72:ADC_CH3
ISTTOK:central:P001:M
ISTTOK:central:P001:E
ISTTOK:central:P002:M
ISTTOK:central:P002:E
ISTTOK:central:P003:M
ISTTOK:central:P003:E
ISTTOK:central:P004:M
ISTTOK:central:P004:E
ISTTOK:central:TraceMessage
ISTTOK:central:LogMessage
ISTTOK:central:RS485Debug
ISTTOK:central:sendmail
ISTTOK:SR_recentlyStr
ISTTOK:SR_rebootStatusStr
@@ -136,9 +155,3 @@ ISTTOK:SR_6_Time
ISTTOK:SR_7_Name
ISTTOK:SR_7_StatusStr
ISTTOK:SR_7_Time
ISTTOK:central:OPSTATE
ISTTOK:central:STARTINGSTATE
ISTTOK:central:CLEANINGSTATE
ISTTOK:central:WSHOTINGSTATE
ISTTOK:central:STOPPINGSTATE
ISTTOK:central:CurrentTime

View File

@@ -1,4 +1,4 @@
# autosave R5.3 Automatically generated - DO NOT MODIFY - 211129-172335
# autosave R5.3 Automatically generated - DO NOT MODIFY - 211214-141949
ISTTOK:central:PULSE-NUMBER.VAL 0
ISTTOK:central:LogMessage.VAL
ISTTOK:central:LASTOPSTATE.VAL 5
@@ -9,4 +9,6 @@ ISTTOK:central:Emergency-UserButton.VAL 0
ISTTOK:central:TMPump1-ManualValve.VAL 1
ISTTOK:central:Shot-TorPSCurrent 32
ISTTOK:central:UPS-Shutdown 0
ISTTOK:central:RPump1-Pressure.HIGH 0.05
ISTTOK:central:RPump1-Pressure.HIHI 0.1
<END>

View File

@@ -25,18 +25,18 @@ dbLoadRecords("db/ISTTOKtda8444.db","P=ISTTOK:,R=central:,BUS=I2C")
dbLoadRecords("db/ISTTOKmachineControl.db","P=ISTTOK:,R=central:")
## Load Serial drivers
#drvAsynSerialPortConfigure("RS0","/dev/ttyUSB0")
#drvAsynSerialPortConfigure("RS0","/dev/ttyAMA0")
#asynSetOption("RS0", 0, "baud", "9600")
#asynSetOption("RS0", 0, "bits", "8")
#asynSetOption("RS0", 0, "parity", "none")
#asynSetOption("RS0", 0, "stop", "1")
#asynSetOption("RS0", 0, "clocal", "Y")
#asynSetOption("RS0", 0, "crtscts", "N")
drvAsynSerialPortConfigure("RS0","/dev/ttyUSB0")
asynSetOption("RS0", 0, "baud", "9600")
asynSetOption("RS0", 0, "bits", "8")
asynSetOption("RS0", 0, "parity", "none")
asynSetOption("RS0", 0, "stop", "1")
asynSetOption("RS0", 0, "clocal", "Y")
asynSetOption("RS0", 0, "crtscts", "N")
# Pfeiffer sensor are connectoed to other RPI /(192.168.1.120)
#dbLoadRecords("db/ISTTOKpfeiffer.db","P=ISTTOK:,R=central:,bus=RS0")
dbLoadRecords("db/ISTTOKpfeiffer.db","P=ISTTOK:,R=central:,bus=RS0")
# connect to the MAIL server mail.ipfn.tecnico.ulisboa.pt
# ,priority,noAutoConnect,noProcessEos
@@ -45,8 +45,10 @@ drvAsynIPPortConfigure("L0","193.136.136.3:25",0,1,0)
dbLoadRecords("db/sendmail.db", "P=ISTTOK:,PORT=L0,R=central:,L=0,A=0")
# Uncomment to Debug STREAMDEVICE serial activity
# 2021/12/14 13:11:50.019969 RS0 ISTTOK:central:P002:M: No reply within 200 ms to "0020074002=?107<0d>
#var streamError 1
#var streamDebug 1
#with this no errors on pfeiffer bus
var streamDebug 1
streamSetLogfile("logfile.txt")
## Run this to trace the stages of iocInit

View File

@@ -19,7 +19,7 @@ SNCSEQ=$(SUPPORT)/seq-2-2
#
# SEQ is required for testIPServer
#SNCSEQ=$(SUPPORT)/seq-2-2-5
SNCSEQ=
#SNCSEQ=
## For sCalcout support in asynOctet - applications include asynCalc.dbd
#CALC=$(SUPPORT)/calc-3-7-3
@@ -30,5 +30,5 @@ PCRE=
#SSCAN=$(SUPPORT)/sscan-2-11-3
# EPICS_BASE 3.14.6 or later is required
EPICS_BASE=/home/pi/EPICS/epics-base
EPICS_BASE=/home/pi/Apps/epics7/epics-base