added UPD records

Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
Bernardo Carvalho
2021-11-29 17:36:02 +00:00
15 changed files with 188 additions and 31 deletions

6
epics/iocs/ISTTOKrpi2/.gitignore vendored Normal file
View File

@@ -0,0 +1,6 @@
O.*
bin/*
iocBoot/iocISTTOKrpi2/save/*
db
dbd
configure

View File

@@ -1,31 +1,42 @@
# 8/5/2021 Only sensor 2 is working. Running with dspIC
# 20/9/2021 sensors 1,2,3 are working. Running with dspIC
record (longin, "$(P)$(R)P001:M") record (longin, "$(P)$(R)P001:M")
{ {
field (DESC, "getPressure001 $(bus)") field (DESC, "getPressure001 $(bus)")
field (DTYP, "stream") field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure001($(P)$(R)P001:E) $(bus)") field (INP, "@pfeiffer.proto getPressure001($(P)$(R)P001:E) $(bus)")
field (SCAN, "1 second") field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)VVessel-Pressure") # field (SCAN, "1 second")
field (FLNK, "$(P)$(R)TMPump1-PressureAdmission")
} }
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 (calc, "$(P)$(R)TMPump1-PressureAdmission")
{ {
field (DESC, "ISTTOK:central:VVessel-Pressure") field(DESC, "ISTTOK:central:TMPump1-PressureAdmission")
field(INPA, "$(P)$(R)P001:M") field(INPA, "$(P)$(R)P001:M")
field(INPB, "$(P)$(R)P001:E") 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(PREC, "3")
field(EGU, "mBar") 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")
} }
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, "2 second") field (SCAN, "I/O Intr")
# field (SCAN, "2 second")
field (FLNK, "$(P)$(R)RPump1-Pressure") field (FLNK, "$(P)$(R)RPump1-Pressure")
} }
record (longin, "$(P)$(R)P002:E") record (longin, "$(P)$(R)P002:E")
@@ -40,8 +51,8 @@ record (calc, "$(P)$(R)RPump1-Pressure")
field(CALC, "(A*0.001)*10.0**(B-20)") field(CALC, "(A*0.001)*10.0**(B-20)")
field(PREC, "3") field(PREC, "3")
field(EGU, "mBar") field(EGU, "mBar")
# field(HIHI,"1.0e-1") field(HIHI,"1.0e-1")
# field(HIGH,"5.0e-3") field(HIGH,"5.0e-2")
# field(LOW, "20.0") # field(LOW, "20.0")
# field(LOLO,"0.0") # field(LOLO,"0.0")
field(HHSV,"MAJOR") field(HHSV,"MAJOR")
@@ -55,23 +66,27 @@ 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 (SCAN, "1 second")
# field (SCAN, "I/O Intr") field (SCAN, "I/O Intr")
field (FLNK, "$(P)$(R)TMPump1-PressureAdmission") field (FLNK, "$(P)$(R)VVessel-Pressure")
} }
record (longin, "$(P)$(R)P003:E") record (longin, "$(P)$(R)P003:E")
{ {
field (DESC, "Pressure003 Exponent $(bus)") 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(INPA, "$(P)$(R)P003:M")
field(INPB, "$(P)$(R)P003:E") 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(PREC, "3")
field(EGU, "mBar") field(EGU, "mBar")
field(HIHI,"1.0e-1")
field(HIGH,"1.0e-2")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
} }
@@ -80,7 +95,8 @@ record (longin, "$(P)$(R)P004:M")
field (DESC, "getPressure004 Mantissa $(bus)") field (DESC, "getPressure004 Mantissa $(bus)")
field (DTYP, "stream") field (DTYP, "stream")
field (INP, "@pfeiffer.proto getPressure004($(P)$(R)P004:E) $(bus)") 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") field (FLNK, "$(P)$(R)RPump2-Pressure")
} }
record (longin, "$(P)$(R)P004:E") record (longin, "$(P)$(R)P004:E")
@@ -100,8 +116,8 @@ record (calc, "$(P)$(R)RPump2-Pressure")
# field(HIGH,"5.0e-3") # field(HIGH,"5.0e-3")
# 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")
} }

View File

@@ -6,6 +6,7 @@ include $(TOP)/configure/CONFIG
#---------------------------------------------------- #----------------------------------------------------
# Create and install (or just install) into <top>/db # Create and install (or just install) into <top>/db
# databases, templates, substitutions like this # databases, templates, substitutions like this
#DB += xxx.db
DB += ISTTOKpfeiffer.db DB += ISTTOKpfeiffer.db
DB += pfeiffer.proto DB += pfeiffer.proto

View File

@@ -1,25 +1,30 @@
Terminator=CR; Terminator=CR;
MaxInput = 20; MaxInput = 30;
ExtraInput = Ignore;
# in millisecond # in millisecond
#ReadTimeout = 2000; #ReadTimeout = 1500;
ReplyTimeout = 250; #ReplyTimeout = 100;
#PollPeriod = $ReplyTimeout;
#Integer. Affects first in command in I/O Intr mode (see chapter Record Processing).
PollPeriod = 250;
# Using redirection to read 2 records, mantissa and exponent # Using redirection to read 2 records, mantissa and exponent
getPressure001 { getPressure001 {
out "0010074002=?106"; # out "0010074002=?106";
in "0011074006%4u%(\$1)2u%+<sum8>"; in "0011074006%4u%(\$1)2u%+<sum8>";
} }
# out "0020074002=?107";
getPressure002 { getPressure002 {
out "0020074002=?107";
in "0021074006%4u%(\$1)2u%+<sum8>"; in "0021074006%4u%(\$1)2u%+<sum8>";
} }
getPressure003 { getPressure003 {
out "0030074002=?108"; # out "0030074002=?108";
in "0031074006%4u%(\$1)2u%+<sum8>"; in "0031074006%4u%(\$1)2u%+<sum8>";
} }
getPressure004 { getPressure004 {
out "0040074002=?109"; # out "0040074002=?109";
in "0041074006%4u%(\$1)2u%+<sum8>"; in "0041074006%4u%(\$1)2u%+<sum8>";
} }
# #

View File

@@ -0,0 +1,8 @@
TOP = ..
include $(TOP)/configure/CONFIG
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Src*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *db*))
DIRS := $(DIRS) $(filter-out $(DIRS), $(wildcard *Db*))
include $(TOP)/configure/RULES_DIRS

View File

@@ -0,0 +1,23 @@
/* ISTTOKrpi2Main.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
epicsThreadSleep(.2);
}
iocsh(NULL);
epicsExit(0);
return(0);
}

View File

@@ -20,10 +20,13 @@ ISTTOKrpi2_DBD += base.dbd
ISTTOKrpi2_DBD += asyn.dbd ISTTOKrpi2_DBD += asyn.dbd
ISTTOKrpi2_DBD += stream.dbd ISTTOKrpi2_DBD += stream.dbd
ISTTOKrpi2_DBD += drvAsynSerialPort.dbd ISTTOKrpi2_DBD += drvAsynSerialPort.dbd
ISTTOKrpi2_DBD += asSupport.dbd
# Add all the support libraries needed by this IOC # Add all the support libraries needed by this IOC
#ISTTOKrpi2_LIBS += xxx
ISTTOKrpi2_LIBS += asyn ISTTOKrpi2_LIBS += asyn
ISTTOKrpi2_LIBS += stream ISTTOKrpi2_LIBS += stream
ISTTOKrpi2_LIBS += autosave
# ISTTOKrpi2_registerRecordDeviceDriver.cpp derives from ISTTOKrpi2.dbd # ISTTOKrpi2_registerRecordDeviceDriver.cpp derives from ISTTOKrpi2.dbd
ISTTOKrpi2_SRCS += ISTTOKrpi2_registerRecordDeviceDriver.cpp ISTTOKrpi2_SRCS += ISTTOKrpi2_registerRecordDeviceDriver.cpp

View File

@@ -0,0 +1,31 @@
# Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG
# Directories to build, any order
DIRS += configure
DIRS += $(wildcard *Sup)
DIRS += $(wildcard *App)
DIRS += $(wildcard *Top)
DIRS += $(wildcard iocBoot)
# The build order is controlled by these dependency rules:
# All dirs except configure depend on configure
$(foreach dir, $(filter-out configure, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += configure))
# Any *App dirs depend on all *Sup dirs
$(foreach dir, $(filter %App, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS))))
# Any *Top dirs depend on all *Sup and *App dirs
$(foreach dir, $(filter %Top, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS))))
# iocBoot depends on all *App dirs
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
# Add any additional dependency rules here:
include $(TOP)/configure/RULES_TOP

View File

@@ -0,0 +1,6 @@
TOP = ..
include $(TOP)/configure/CONFIG
DIRS += $(wildcard *ioc*)
DIRS += $(wildcard as*)
include $(CONFIG)/RULES_DIRS

View File

@@ -0,0 +1,5 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = $(EPICS_HOST_ARCH)
TARGETS = envPaths
include $(TOP)/configure/RULES.ioc

View File

@@ -0,0 +1,8 @@
epicsEnvSet("IOC","iocISTTOKrpi2")
epicsEnvSet("TOP","/home/pi/ISTTOK/epics/iocs/ISTTOKrpi2")
epicsEnvSet("EPICS_BASE","/home/pi/EPICS/epics-base")
epicsEnvSet("HOME","/home/pi")
epicsEnvSet("SUPPORT","/home/pi/EPICS/support")
epicsEnvSet("ASYN","/home/pi/EPICS/support/asyn")
epicsEnvSet("STREAM","/home/pi/EPICS/support/stream")
epicsEnvSet("AUTOSAVE","/home/pi/EPICS/support/autosave")

View File

@@ -0,0 +1,4 @@
#ALARM Limits
ISTTOK:vacuum:RPump1-Pressure.HIGH
ISTTOK:vacuum:RPump1-Pressure.HIHI

View File

@@ -0,0 +1,4 @@
# autosave R5.3 Automatically generated - DO NOT MODIFY - 211011-110712
ISTTOK:vacuum:RPump1-Pressure.HIGH 0.05
ISTTOK:vacuum:RPump1-Pressure.HIHI 0.1
<END>

View File

@@ -5,6 +5,7 @@
< envPaths < envPaths
epicsEnvSet( "STREAM_PROTOCOL_PATH", "$(TOP)/db" ) epicsEnvSet( "STREAM_PROTOCOL_PATH", "$(TOP)/db" )
epicsEnvSet( "SAVE_DIR", "$(TOP)/iocBoot/$(IOC)" )
cd "${TOP}" cd "${TOP}"
@@ -26,9 +27,27 @@ asynSetOption("RS0", 0, "clocal", "Y")
asynSetOption("RS0", 0, "crtscts", "N") asynSetOption("RS0", 0, "crtscts", "N")
dbLoadRecords("db/ISTTOKpfeiffer.db","P=ISTTOK:,R=vacuum:,bus=RS0") dbLoadRecords("db/ISTTOKpfeiffer.db","P=ISTTOK:,R=vacuum:,bus=RS0")
# Uncomment to Debug STREAM serial activity
#var streamError 1
#var streamDebug 1
#streamSetLogfile("stream_logfile.txt")
#save_restoreSet_status_prefix("$(IOC):")
save_restoreSet_status_prefix("ISTTOK:")
set_requestfile_path("$(SAVE_DIR)")
set_savefile_path("$(SAVE_DIR)/save")
save_restoreSet_NumSeqFiles(3)
save_restoreSet_SeqPeriodInSeconds(600)
set_pass0_restoreFile("$(IOC).sav")
set_pass1_restoreFile("$(IOC).sav")
#dbLoadRecords("$(AUTOSAVE)/asApp/Db/save_restoreStatus.db", "P=ISTTOK:")
cd "${TOP}/iocBoot/${IOC}" cd "${TOP}/iocBoot/${IOC}"
iocInit iocInit
# Create request file and start periodic 'save
# makeAutosaveFileFromDbInfo("$(SAVE_DIR)/$(IOC).req", "autosaveFields")
create_monitor_set("$(IOC).req", 30)
## Start any sequence programs ## Start any sequence programs
#seq sncxxx,"user=pi" #seq sncxxx,"user=pi"

View File

@@ -1,5 +1,6 @@
#RELEASE Location of external products #RELEASE Location of external products
HOME=/home/pi HOME=/home/pi
<<<<<<< HEAD
SUPPORT=$(HOME)/Apps/epics7/support SUPPORT=$(HOME)/Apps/epics7/support
# #
# #
@@ -16,15 +17,32 @@ AUTOSAVE = $(SUPPORT)/autosave
#STREAM_WORKAROUND = 1 #STREAM_WORKAROUND = 1
DRVASYNI2C =$(SUPPORT)/drvAsynI2C DRVASYNI2C =$(SUPPORT)/drvAsynI2C
SNCSEQ=$(SUPPORT)/seq-2-2 SNCSEQ=$(SUPPORT)/seq-2-2
=======
>>>>>>> 514eb82e224779361fbe0844aaaa5c63fd4fd03f
SUPPORT=$(HOME)/EPICS/support
# IPAC is only necessary if support for Greensprings IP488 is required
# IPAC release V2-7 or later is required. # IPAC release V2-7 or later is required.
# IPAC=$(SUPPORT)/ipac-2-15
#IPAC= #IPAC=
#$(SUPPORT)/ipac-2-15
# ASYN=$(SUPPORT)/asyn
# # SEQ is required for testIPServer STREAM=$(SUPPORT)/stream
#$(SUPPORT)/seq-2-2-5 AUTOSAVE = $(SUPPORT)/autosave
# #
# SEQ is required for testIPServer
#SNCSEQ=$(SUPPORT)/seq-2-2-5
SNCSEQ=
## For sCalcout support in asynOctet - applications include asynCalc.dbd
#CALC=$(SUPPORT)/calc-3-7-3
CALC= CALC=
PCRE= PCRE=
#
EPICS_BASE=$(HOME)/Apps/epics7/epics-base # If CALC was built with SSCAN support then SSCAN must be defined for testEpicsApp
#SSCAN=$(SUPPORT)/sscan-2-11-3
# EPICS_BASE 3.14.6 or later is required
EPICS_BASE=/home/pi/EPICS/epics-base