added Inficon gauges

Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
Bernardo Carvalho
2024-12-11 17:00:23 +00:00
parent 0ea59f7cfe
commit 17bab67ce7
7 changed files with 177 additions and 106 deletions

View File

@@ -0,0 +1,43 @@
# vim: sta:et:sw=4:ts=4:sts=4
# 11/12/2024 Initial configuration
#record (ai, "$(P)$(R)Inficon1")
# field (DESC, "ISTTOK:central:Inficon1")
record (ai, "$(P)$(R)VVessel-Pressure")
{
field (DESC, "ISTTOK:central:VVessel-Pressure")
field (DTYP, "stream")
field (INP, "@inficon.proto readIonGauge1 $(bus)")
field (SCAN, "1 second")
field(PHAS, "2")
field(EGU, "mBar")
field(HIHI,"1.0e-2")
field(HIGH,"1.0e-3")
field(LOW,"1.0e-9")
field(LOLO,"0.5e-9")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV,"MAJOR")
}
#record (ai, "$(P)$(R)Inficon3")
record (ai, "$(P)$(R)TMPump1-PressureAdmission")
{
# field (DESC, "ISTTOK:central:Inficon3")
field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
field (DTYP, "stream")
field (INP, "@inficon.proto readIonGauge3 $(bus)")
field (SCAN, "1 second")
field(PHAS, "2")
field(EGU, "mBar")
field(HIHI,"1.0e-2")
field(HIGH,"1.0e-3")
field(LOW,"1.0e-9")
field(LOLO,"0.5e-9")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV,"MAJOR")
}

View File

@@ -21,17 +21,25 @@ record(mbbi, "$(P)$(R)MARTe2-Status")
field(ZRVL, "0") field(ZRVL, "0")
field(ONVL, "1") field(ONVL, "1")
field(TWVL, "2") field(TWVL, "2")
field(FFVL, "15")
#
field(ZRST, "IDLE") field(ZRST, "IDLE")
field(ONST, "RUN") field(ONST, "WAITING_FOR_PRE")
field(TWST, "ERROR") field(TWST, "PULSING")
field(FFST, "ERROR")
field(ONSV, "MINOR")
field(TWSV, "MINOR")
field(FFSV, "MAJOR")
} }
record(mbbo, "$(P)$(R)MARTe2-Command") record(mbbo, "$(P)$(R)MARTe2-Command")
{ {
field(DTYP, "Soft Channel") field(DTYP, "Soft Channel")
field(ZRVL, "0") field(ZRVL, "0")
field(ONVL, "1") field(ONVL, "1")
field(ZRST, "GOTOIDLE") field(TWVL, "2")
field(ONST, "GOTORUN") field(ZRST, "GOTO_IDLE")
field(ONST, "GOTO_WAITING_FOR_PRE")
field(TWST, "GOTO_PULSING")
field(VAL, "0") field(VAL, "0")
} }
record( longin, "$(P)$(R)MARTe2-Reset") record( longin, "$(P)$(R)MARTe2-Reset")

View File

@@ -2,47 +2,49 @@
# 8/5/2021 Only sensor 2 is working. Running with dspIC # 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 dspIC
# 20/9/2021 sensors 1,2,3 are working. Running with tty USB # 20/9/2021 sensors 1,2,3 are working. Running with tty USB
record (longin, "$(P)$(R)P001:M") # 11/12/2024 replaced with Inficon Probes
{ #record (longin, "$(P)$(R)P001:M")
field (DESC, "getPressure001 $(bus)") #{
field (DTYP, "stream") # field (DESC, "getPressure001 $(bus)")
field (INP, "@pfeiffer.proto getPressure001($(P)$(R)P001:E) $(bus)") # field (DTYP, "stream")
# field (INP, "@pfeiffer.proto getPressure001($(P)$(R)P001:E) $(bus)")
# field (SCAN, "I/O Intr") # field (SCAN, "I/O Intr")
field (SCAN, "1 second") # field (SCAN, "1 second")
field(PHAS, "1") # field(PHAS, "1")
field (FLNK, "$(P)$(R)VVessel-Pressure") # field (FLNK, "$(P)$(R)VVessel-Pressure")
} #}
record (longin, "$(P)$(R)P001:E") #record (longin, "$(P)$(R)P001:E")
{ #{
field (DESC, "Pressure001 exponent $(bus)") # field (DESC, "Pressure001 exponent $(bus)")
} #}
record (calc, "$(P)$(R)VVessel-Pressure") #record (ao, "$(P)$(R)VVessel-Pressure")
{ #{
field (DESC, "ISTTOK:central:VVessel-Pressure") # field (DESC, "ISTTOK:central:VVessel-Pressure")
# Maximize Status and Severity, MSS propagate all alarms #
field(INPA, "$(P)$(R)P001:M MSS") # field(VAL,"2.0E-9")
field(INPB, "$(P)$(R)P001:E") # # Maximize Status and Severity, MSS propagate all alarms
field(CALC, "(A*0.001)* 10.0**(B-20)") # field(INPA, "$(P)$(R)P001:M MSS")
field(PREC, "3") # field(INPB, "$(P)$(R)P001:E")
field(EGU, "mBar") # field(CALC, "(A*0.001)* 10.0**(B-20)")
field(HIHI,"1.0e-2") # field(PREC, "3")
field(HIGH,"1.0e-3") # field(EGU, "mBar")
field(LOW,"1.0e-9") # field(HIHI,"1.0e-2")
field(LOLO,"0.5e-9") # field(HIGH,"1.0e-3")
# field(LOW,"1.0e-9")
# field(LOLO,"0.5e-9")
# field(LOW, "20.0") # field(LOW, "20.0")
# field(LOLO,"0.0") # field(LOLO,"0.0")
field(HHSV,"MAJOR") # field(HHSV,"MAJOR")
field(HSV, "MINOR") # field(HSV, "MINOR")
field(LSV, "MINOR") # field(LSV, "MINOR")
field(LLSV,"MAJOR") # field(LLSV,"MAJOR")
} #}
# out "0020074002=?107"; # out "0020074002=?107";
record (longin, "$(P)$(R)P002:M") record (longin, "$(P)$(R)P002:M")
{ {
field (DESC, "getPressure002 $(bus)") field (DESC, "getPressure002 $(bus)")
field (DTYP, "stream") field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure002($(P)$(R)P002:E) $(bus)") field (INP, "@pfeiffer.proto getPressure002($(P)$(R)P002:E) $(bus)")
# field (SCAN, "I/O Intr")
field (SCAN, "1 second") field (SCAN, "1 second")
field(PHAS, "0") field(PHAS, "0")
field (FLNK, "$(P)$(R)RPump1-Pressure") field (FLNK, "$(P)$(R)RPump1-Pressure")
@@ -69,74 +71,43 @@ record (calc, "$(P)$(R)RPump1-Pressure")
# field(LLSV,"MAJOR") # field(LLSV,"MAJOR")
} }
# out "0030074002=?108"; # # out "0030074002=?108";
record (longin, "$(P)$(R)P003:M") #record (longin, "$(P)$(R)P003:M")
{ #{
field (DESC, "getPressure003 Mantissa $(bus)") # field (DESC, "getPressure003 Mantissa $(bus)")
field (DTYP, "stream") # field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure003($(P)$(R)P003:E) $(bus)") # field (INP, "@pfeiffer.proto getPressure003($(P)$(R)P003:E) $(bus)")
field (SCAN, "1 second")
field(PHAS, "2")
# field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)TMPump1-PressureAdmission")
}
record (longin, "$(P)$(R)P003:E")
{
field (DESC, "Pressure003 Exponent $(bus)")
}
record (calc, "$(P)$(R)TMPump1-PressureAdmission")
{
field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
field(INPA, "$(P)$(R)P003:M MSS")
field(INPB, "$(P)$(R)P003:E")
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(LOW,"1.0e-9")
field(LOLO,"0.5e-9")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV,"MAJOR")
}
# 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(PHAS, "2")
# field (SCAN, "I/O Intr") # field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)RPump2-Pressure") # field (FLNK, "$(P)$(R)TMPump1-PressureAdmission")
} #}
record (longin, "$(P)$(R)P004:E")
{
field (DESC, "Pressure004 Exponent $(bus)")
}
record (calc, "$(P)$(R)RPump2-Pressure") #record (longin, "$(P)$(R)P003:E")
{ #{
field(DESC, "ISTTOK:central:RPump2-Pressure") # field (DESC, "Pressure003 Exponent $(bus)")
field(INPA, "$(P)$(R)P004:M MSS") #}
field(INPB, "$(P)$(R)P004:E") #
field(CALC, "(A*0.001)* 10.0**(B-20)") #record (calc, "$(P)$(R)TMPump1-PressureAdmission")
field(PREC, "3") #{
field(EGU, "mBar") # field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
# field(INPA, "$(P)$(R)P003:M MSS")
# field(INPB, "$(P)$(R)P003:E")
# field(CALC, "(A*0.001)*10.0**(B-20)")
# field(PREC, "3")
# field(EGU, "mBar")
# field(HIHI,"1.0e-1") # field(HIHI,"1.0e-1")
# field(HIGH,"5.0e-3") # field(HIGH,"1.0e-2")
# field(LOW, "20.0") # field(LOW,"1.0e-9")
# field(LOLO,"0.0") # field(LOLO,"0.5e-9")
# field(HHSV,"MAJOR") # field(HHSV,"MAJOR")
# field(HSV, "MINOR") # field(HSV, "MINOR")
# field(LSV, "MINOR") # field(LSV, "MINOR")
# field(LLSV,"MAJOR") # field(LLSV,"MAJOR")
} #}
# out "0040074002=?109";
# NOT connected 26/10/2021
record(stringout,"$(P)$(R)RS485Debug") { record(stringout,"$(P)$(R)RS485Debug") {
field(DESC, "") field(DESC, "")

View File

@@ -19,6 +19,8 @@ DB += sendmail.proto
DB += pcf8574.proto DB += pcf8574.proto
DB += pfeiffer.proto DB += pfeiffer.proto
DB += seeed4relay.proto DB += seeed4relay.proto
DB += inficon.proto
DB += ISTTOKinficon.db
# If <anyname>.db template is not named <anyname>*.template add # If <anyname>.db template is not named <anyname>*.template add
# <anyname>_TEMPLATE = <templatename> # <anyname>_TEMPLATE = <templatename>

View File

@@ -0,0 +1,38 @@
# CR and LF are control characters, respectively coded 0x0D (13 decimal) and 0x0A (10 decimal)
Terminator = CR;
inTerminator = CR;
MaxInput = 30;
#MaxInput = 20;
ExtraInput = Ignore;
# Values in millisecond
LockTimeout = 500;
# 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?
# Protocol for the Inficon BAG302-S
#ReadTimeout = 1500;
ReplyTimeout = 300;
#PollPeriod = $ReplyTimeout;
#Integer. Affects first in command in I/O Intr mode (see chapter Record Processing).
PollPeriod = 200;
#out *03 7.97E-07
# Using redirection to read 2 records, mantissa and exponent
#-Pressure
readIonGauge1{
out "#01RD";
in "*01 %E";
}
readIonGauge3{
out "#03RD";
in "*03 %E";
}

View File

@@ -97,6 +97,11 @@ short MINOR=1;
short MAJOR=2; short MAJOR=2;
short INVALID=3; short INVALID=3;
short MARTeIdle=0;
short MARTeWaitingForPre=1;
short MARTePulsing=2;
short MARTeError=15;
/* PV variables */ /* PV variables */
short IsttokOPSTATE; short IsttokOPSTATE;
assign IsttokOPSTATE to "ISTTOK:central:OPSTATE"; assign IsttokOPSTATE to "ISTTOK:central:OPSTATE";
@@ -278,7 +283,7 @@ monitor IsttokUpsShutdown;
short IsttokMARTe2Status; short IsttokMARTe2Status;
assign IsttokMARTe2Status "ISTTOK:central:MARTe2-Status"; assign IsttokMARTe2Status "ISTTOK:central:MARTe2-Status";
monitor IsttokMARTe2Status; // monitor IsttokMARTe2Status;
//string tmp1_stat; //string tmp1_stat;
short IsttokMARTe2Command; short IsttokMARTe2Command;
@@ -480,7 +485,7 @@ ss PulseSequence {
pvPut(Isttok_TorPSDisable); pvPut(Isttok_TorPSDisable);
IsttokProcReq = STOP; IsttokProcReq = STOP;
pvPut(IsttokProcReq); pvPut(IsttokProcReq);
IsttokMARTe2Command = STOP; IsttokMARTe2Command = MARTeIdle;
pvPut(IsttokMARTe2Command); pvPut(IsttokMARTe2Command);
} }
when (IsttokUpsShutdown == ON) { when (IsttokUpsShutdown == ON) {
@@ -1166,7 +1171,7 @@ ss ShotSequence {
pvPut(WSHOTINGSTATE); pvPut(WSHOTINGSTATE);
IsttokWaitTimerDisa = 1; IsttokWaitTimerDisa = 1;
pvPut(IsttokWaitTimerDisa); pvPut(IsttokWaitTimerDisa);
IsttokMARTe2Command = STOP; IsttokMARTe2Command = MARTeIdle;
pvPut(IsttokMARTe2Command); pvPut(IsttokMARTe2Command);
// strcpy(IsttokWaitTimerScan, "Passive"); // strcpy(IsttokWaitTimerScan, "Passive");
// pvPut(IsttokWaitTimerScan); // pvPut(IsttokWaitTimerScan);
@@ -1345,7 +1350,7 @@ ss ShotSequence {
// PS Trigger Pulse // PS Trigger Pulse
Isttok_TorPSTrigger = ON; Isttok_TorPSTrigger = ON;
pvPut(Isttok_TorPSTrigger); pvPut(Isttok_TorPSTrigger);
IsttokMARTe2Command = START; // ~1.2 s before Btor. ~ 4 sec before TSHOT IsttokMARTe2Command = MARTeWaitingForPre; // ~1.2 s before Btor. ~ 4 sec before TSHOT
pvPut(IsttokMARTe2Command); pvPut(IsttokMARTe2Command);
WSHOTINGSTATE = WSHTST_SShot; WSHOTINGSTATE = WSHTST_SShot;
pvPut(WSHOTINGSTATE); pvPut(WSHOTINGSTATE);
@@ -1363,6 +1368,8 @@ ss ShotSequence {
strcpy(msg, "Ready for SHOT" ); strcpy(msg, "Ready for SHOT" );
pvPut(msg); pvPut(msg);
errlogSevPrintf(NO_ALARM, "%s\n", msg); errlogSevPrintf(NO_ALARM, "%s\n", msg);
IsttokMARTe2Command = MARTePulsing;
pvPut(IsttokMARTe2Command);
WSHOTINGSTATE = WSHTST_Shooting10; WSHOTINGSTATE = WSHTST_Shooting10;
pvPut(WSHOTINGSTATE); pvPut(WSHOTINGSTATE);
} state Shooting10 } state Shooting10
@@ -1405,7 +1412,7 @@ ss ShotSequence {
errlogSevPrintf(NO_ALARM, "%s\n", msg); errlogSevPrintf(NO_ALARM, "%s\n", msg);
IsttokVVessel_Filament = 1; IsttokVVessel_Filament = 1;
pvPut(IsttokVVessel_Filament); pvPut(IsttokVVessel_Filament);
IsttokMARTe2Command = STOP; IsttokMARTe2Command = MARTeIdle;
pvPut(IsttokMARTe2Command); pvPut(IsttokMARTe2Command);
WSHOTINGSTATE = WSHTST_Shooting12; WSHOTINGSTATE = WSHTST_Shooting12;
pvPut(WSHOTINGSTATE); pvPut(WSHOTINGSTATE);

View File

@@ -33,7 +33,7 @@ dbLoadRecords("db/seeed4relay.db","P=ISTTOK:,R=central:,A=19")
#drvAsynSerialPortConfigure("RS0","/dev/ttyAMA0") #drvAsynSerialPortConfigure("RS0","/dev/ttyAMA0")
#drvAsynSerialPortConfigure("RS0","/dev/ttyUSB0") #drvAsynSerialPortConfigure("RS0","/dev/ttyUSB0")
drvAsynSerialPortConfigure("RS0","/dev/ttyUSB0") drvAsynSerialPortConfigure("RS0","/dev/tty_rs485USB0")
asynSetOption("RS0", 0, "baud", "9600") asynSetOption("RS0", 0, "baud", "9600")
asynSetOption("RS0", 0, "bits", "8") asynSetOption("RS0", 0, "bits", "8")
asynSetOption("RS0", 0, "parity", "none") asynSetOption("RS0", 0, "parity", "none")
@@ -41,8 +41,10 @@ asynSetOption("RS0", 0, "stop", "1")
asynSetOption("RS0", 0, "clocal", "Y") asynSetOption("RS0", 0, "clocal", "Y")
asynSetOption("RS0", 0, "crtscts", "N") asynSetOption("RS0", 0, "crtscts", "N")
# Pfeiffer sensor are connectoed to other RPI /(192.168.1.120) # Pfeiffer sensor were 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")
dbLoadRecords("db/ISTTOKinficon.db","P=ISTTOK:,R=central:,bus=RS0")
# connect to the MAIL server mail.ipfn.tecnico.ulisboa.pt # connect to the MAIL server mail.ipfn.tecnico.ulisboa.pt
# ,priority,noAutoConnect,noProcessEos # ,priority,noAutoConnect,noProcessEos