New temperature IOC ans systemd start script
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
146
epics/iocs/dsPICTemp/ISTTOKApp/Db/ISTTOKtemperature.db
Normal file
146
epics/iocs/dsPICTemp/ISTTOKApp/Db/ISTTOKtemperature.db
Normal file
@@ -0,0 +1,146 @@
|
||||
###################################################################
|
||||
# This records is the dspPIC uptime in seconds from last reset #
|
||||
###################################################################
|
||||
record(longin, "$(P)$(R)Uptime")
|
||||
{
|
||||
field(DESC, "Reads dsPIC Uptime")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getUP $(PORT)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(FLNK,"$(P)$(R)Diff_Uptime") #Link to update Diff_Uptime
|
||||
field(ADEL,100)
|
||||
field(MDEL,0)
|
||||
}
|
||||
|
||||
record(calc, "$(P)$(R)Diff_Uptime") {
|
||||
field(DESC, "Uptime diff. between I/O Intr scans")
|
||||
field(CALC,"B-A")
|
||||
field(SCAN,"Passive")
|
||||
field(INPA,"$(P)$(R)Last_Uptime.VAL NPP")
|
||||
field(INPB,"$(P)$(R)Uptime")
|
||||
field(FLNK,"$(P)$(R)Last_Uptime")
|
||||
field(HIHI,"100.0")
|
||||
field(HIGH,"2.0")
|
||||
field(LOW, "0.0")
|
||||
field(LOLO,"-10.0")
|
||||
}
|
||||
|
||||
record(calc, "$(P)$(R)Last_Uptime") {
|
||||
field(DESC, "Last Uptime for diff. calc")
|
||||
field(CALC,"A")
|
||||
field(SCAN,"Passive")
|
||||
field(INPA,"$(P)$(R)Uptime")
|
||||
}
|
||||
###################################################################
|
||||
# These records read Temperatures #
|
||||
###################################################################
|
||||
record(ai, "$(P)$(R)VVessel-Temperature")
|
||||
{
|
||||
field(DESC, "Reads TE01 Temperature")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getTE01 $(PORT) $(A)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(EGU, "C")
|
||||
field(PREC, "4")
|
||||
field(LINR, "LINEAR")
|
||||
# field(ESLO, "0.00001163358")
|
||||
# See https://paulscherrerinstitute.github.io/StreamDevice/ai.html
|
||||
# field(EGUL, "-1.02376")
|
||||
# x 30
|
||||
field(ESLO, "0.000349007")
|
||||
#field(EGUL, "-30.71")
|
||||
field(EOFF, "-30.71")
|
||||
field(HOPR, "140.0")
|
||||
field(LOPR, "0.0")
|
||||
field(HIHI,"120.0")
|
||||
field(HIGH,"100.0")
|
||||
field(LOW, "0.0")
|
||||
field(LOLO,"-10.0")
|
||||
field(HHSV,"MAJOR")
|
||||
field(HSV, "MINOR")
|
||||
# field(LSV, "MINOR")
|
||||
# field(LLSV,"MAJOR")
|
||||
field(ADEL, "1.0") # Archive Deadband
|
||||
}
|
||||
# Precision
|
||||
# Engineering Units
|
||||
# field(EGU, "Raw")
|
||||
# Convertion
|
||||
# val = val * ESLO + EGUL
|
||||
# field(ESLO, "0.000011633582866550557")
|
||||
# field(DESC,"Thermocouple 0")
|
||||
# field(HIHI,"90.0")
|
||||
# field(HIGH,"50.0")
|
||||
# field(LOW, "20.0")
|
||||
# field(LOLO,"0.0")
|
||||
# field(HHSV,"MAJOR")
|
||||
# field(HSV, "MINOR")
|
||||
# field(LSV, "MINOR")
|
||||
# field(LLSV,"MAJOR")
|
||||
# field(MDEL, "0.0") # Monitor Deadband
|
||||
|
||||
record(ai, "$(P)$(R)Temperature_1")
|
||||
{
|
||||
field(DESC, "Reads TE02 Temperature")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getTE02 $(PORT) $(A)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(EGU, "C")
|
||||
field(PREC, "4")
|
||||
field(LINR, "LINEAR")
|
||||
# field(CALC,"A*0.000011633582866550557-1.02376")
|
||||
field(ESLO, "0.00001163358")
|
||||
field(EGUL, "-1.02376")
|
||||
}
|
||||
record(ai, "$(P)$(R)Temperature_2")
|
||||
{
|
||||
field(DESC, "Reads TE03 Temperature")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getTE03 $(PORT)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(EGU, "C")
|
||||
field(PREC, "4")
|
||||
field(LINR, "LINEAR")
|
||||
field(ESLO, "0.00001163358")
|
||||
field(EGUL, "-1.02376")
|
||||
}
|
||||
record(ai, "$(P)$(R)Temperature_3") {
|
||||
field(DESC, "Reads TE04 Temperature")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getTE04 $(PORT)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(EGU, "C")
|
||||
field(PREC, "4")
|
||||
field(LINR, "LINEAR")
|
||||
field(ESLO, "0.00001163358")
|
||||
field(EGUL, "-1.02376")
|
||||
}
|
||||
record(ai, "$(P)$(R)Capbank_Voltage") {
|
||||
field(DESC, "Reads PRD01, Capitor bank Voltage PWM")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getPRD01 $(PORT)")
|
||||
field(SCAN, "I/O Intr")
|
||||
field(LINR, "LINEAR")
|
||||
# # val = val * ESLO + EGUL
|
||||
field(ESLO, "1.0")
|
||||
field(EGUL, "0.0")
|
||||
# Precision
|
||||
field(PREC, "1")
|
||||
# Units
|
||||
field(EGU, "V")
|
||||
# # Alarms
|
||||
}
|
||||
record(stringin, $(P)$(R)idn) {
|
||||
field(DESC, "Debug info blabla")
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@dspic.proto getStr $(PORT) $(A)")
|
||||
field(SCAN, "I/O Intr")
|
||||
}
|
||||
|
||||
record(stringin, "$(P)$(R)CurrentTime") {
|
||||
field(DESC, "Current Date and Time of the IOC")
|
||||
field(SCAN, "1 second")
|
||||
field(DTYP, "Soft Timestamp")
|
||||
field(PINI, "YES")
|
||||
field(INP, "@%d/%m/%Y %H:%M:%S")
|
||||
}
|
||||
20
epics/iocs/dsPICTemp/ISTTOKApp/Db/Makefile
Normal file
20
epics/iocs/dsPICTemp/ISTTOKApp/Db/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
TOP=../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
|
||||
#----------------------------------------------------
|
||||
# Create and install (or just install) into <top>/db
|
||||
# databases, templates, substitutions like this
|
||||
#DB += xxx.db
|
||||
DB += ISTTOKtemperature.db
|
||||
DB += dspic.proto
|
||||
|
||||
#----------------------------------------------------
|
||||
# If <anyname>.db template is not named <anyname>*.template add
|
||||
# <anyname>_template = <templatename>
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
37
epics/iocs/dsPICTemp/ISTTOKApp/Db/dspic.proto
Normal file
37
epics/iocs/dsPICTemp/ISTTOKApp/Db/dspic.proto
Normal file
@@ -0,0 +1,37 @@
|
||||
# https://epics.anl.gov/tech-talk/2013/msg02051.php
|
||||
Terminator = CR LF;
|
||||
MaxInput = 110;
|
||||
ReadTimeout = 200;
|
||||
#ExtraInput = Ignore;
|
||||
|
||||
getTE01 {
|
||||
in "TE01_%10u TE02_%*10u %*80c";
|
||||
}
|
||||
|
||||
getTE02 {
|
||||
# in "TE01_%*s TE02_%10u TE03_%*10u %*70c";
|
||||
in "TE01_%*u TE02_%10u TE03_%*10u TE04_%*10u PRD01_%*10u UP_%*10u %*u %+<sum8>";
|
||||
}
|
||||
|
||||
getTE03 {
|
||||
# in "TE01_%*s TE02_%*10u TE03_%10u %*80c";
|
||||
in "TE01_%*u TE02_%*10u TE03_%10u TE04_%*10u PRD01_%*10u UP_%*10u %*u %+<sum8>";
|
||||
}
|
||||
|
||||
getTE04 {
|
||||
# in "TE01_%*s TE02_%*10u TE03_%*10u TE04_%10u %*40c";
|
||||
in "TE01_%*u TE02_%*10u TE03_%*10u TE04_%10u PRD01_%*10u UP_%*10u %*u %+<sum8>";
|
||||
}
|
||||
|
||||
getPRD01 {
|
||||
# in "TE01_%*s TE02_%*10u TE03_%*10u TE04_%*10u PRD01_%10u %*30c";
|
||||
in "TE01_%*s TE02_%*10u TE03_%*10u TE04_%*10u PRD01_%10u UP_%*10u %*u %+<sum8>";
|
||||
}
|
||||
|
||||
getUP {
|
||||
in "TE01_%*s TE02_%*10u TE03_%*10u TE04_%*10u PRD01_%*10u UP_%10u %*u %+<sum8>";
|
||||
}
|
||||
|
||||
getStr{
|
||||
in "TE01_%10s%*93c";
|
||||
}
|
||||
Reference in New Issue
Block a user