added RPi2 IOC
This commit is contained in:
115
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/ISTTOKpfeiffer.db
Normal file
115
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/ISTTOKpfeiffer.db
Normal file
@@ -0,0 +1,115 @@
|
||||
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, "1 second")
|
||||
field (FLNK, "$(P)$(R)VVessel-Pressure")
|
||||
}
|
||||
record (longin, "$(P)$(R)P001:E")
|
||||
{
|
||||
field (DESC, "Pressure001 exponent $(bus)")
|
||||
}
|
||||
record (calc, "$(P)$(R)VVessel-Pressure")
|
||||
{
|
||||
field (DESC, "ISTTOK:central:VVessel-Pressure")
|
||||
field(INPA, "$(P)$(R)P001:M")
|
||||
field(INPB, "$(P)$(R)P001:E")
|
||||
field(CALC, "(A*0.001)*10.0**(B-20)")
|
||||
field(PREC, "3")
|
||||
field(EGU, "mBar")
|
||||
}
|
||||
|
||||
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 (FLNK, "$(P)$(R)RPump1-Pressure")
|
||||
}
|
||||
record (longin, "$(P)$(R)P002:E")
|
||||
{
|
||||
field (DESC, "Pressure002 exponent $(bus)")
|
||||
}
|
||||
record (calc, "$(P)$(R)RPump1-Pressure")
|
||||
{
|
||||
field (DESC, "ISTTOK:central:RPump1-Pressure")
|
||||
field(INPA, "$(P)$(R)P002:M")
|
||||
field(INPB, "$(P)$(R)P002:E")
|
||||
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(LOW, "20.0")
|
||||
# field(LOLO,"0.0")
|
||||
field(HHSV,"MAJOR")
|
||||
field(HSV, "MINOR")
|
||||
# field(LSV, "MINOR")
|
||||
# field(LLSV,"MAJOR")
|
||||
}
|
||||
|
||||
record (longin, "$(P)$(R)P003:M")
|
||||
{
|
||||
field (DESC, "getPressure003 Mantissa $(bus)")
|
||||
field (DTYP, "stream")
|
||||
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")
|
||||
}
|
||||
|
||||
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")
|
||||
field(INPB, "$(P)$(R)P003:E")
|
||||
field(CALC, "(A*0.001)* 10.0**(B-20)")
|
||||
field(PREC, "3")
|
||||
field(EGU, "mBar")
|
||||
}
|
||||
|
||||
|
||||
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 (FLNK, "$(P)$(R)RPump2-Pressure")
|
||||
}
|
||||
record (longin, "$(P)$(R)P004:E")
|
||||
{
|
||||
field (DESC, "Pressure004 Exponent $(bus)")
|
||||
}
|
||||
|
||||
record (calc, "$(P)$(R)RPump2-Pressure")
|
||||
{
|
||||
field(DESC, "ISTTOK:central:RPump2-Pressure")
|
||||
field(INPA, "$(P)$(R)P004:M")
|
||||
field(INPB, "$(P)$(R)P004:E")
|
||||
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(LOW, "20.0")
|
||||
# field(LOLO,"0.0")
|
||||
field(HHSV,"MAJOR")
|
||||
field(HSV, "MINOR")
|
||||
# field(LSV, "MINOR")
|
||||
# field(LLSV,"MAJOR")
|
||||
}
|
||||
|
||||
record(stringout,"$(P)$(R)RS485Debug") {
|
||||
field(DESC, "")
|
||||
field(DTYP, "stream")
|
||||
field(OUT, "@pfeiffer.proto debug $(bus)")
|
||||
field(VAL,"")
|
||||
}
|
||||
|
||||
19
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/Makefile
Normal file
19
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
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 += ISTTOKpfeiffer.db
|
||||
DB += pfeiffer.proto
|
||||
|
||||
#----------------------------------------------------
|
||||
# If <anyname>.db template is not named <anyname>*.template add
|
||||
# <anyname>_template = <templatename>
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
40
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/pfeiffer.proto
Normal file
40
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/Db/pfeiffer.proto
Normal file
@@ -0,0 +1,40 @@
|
||||
Terminator=CR;
|
||||
MaxInput = 20;
|
||||
|
||||
# in millisecond
|
||||
#ReadTimeout = 2000;
|
||||
ReplyTimeout = 250;
|
||||
|
||||
# Using redirection to read 2 records, mantissa and exponent
|
||||
getPressure001 {
|
||||
out "0010074002=?106";
|
||||
in "0011074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure002 {
|
||||
out "0020074002=?107";
|
||||
in "0021074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure003 {
|
||||
out "0030074002=?108";
|
||||
in "0031074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
getPressure004 {
|
||||
out "0040074002=?109";
|
||||
in "0041074006%4u%(\$1)2u%+<sum8>";
|
||||
}
|
||||
#
|
||||
# in "0031074006%4u%(\$1)2u%*3u";
|
||||
#
|
||||
#getPressureE003 {
|
||||
# in "0031074006%*4u%2u%*3u";
|
||||
#}
|
||||
|
||||
# Connect a stringout record to this to get
|
||||
# a generic command interface.
|
||||
# After processing finishes, the record contains the reply.
|
||||
|
||||
debug {
|
||||
ExtraInput = Ignore;
|
||||
out "%s"; in "%39c"
|
||||
}
|
||||
|
||||
46
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/src/Makefile
Normal file
46
epics/iocs/ISTTOKrpi2/ISTTOKrpi2App/src/Makefile
Normal file
@@ -0,0 +1,46 @@
|
||||
TOP=../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
#----------------------------------------
|
||||
# ADD MACRO DEFINITIONS AFTER THIS LINE
|
||||
#=============================
|
||||
|
||||
#=============================
|
||||
# Build the IOC application
|
||||
|
||||
PROD_IOC = ISTTOKrpi2
|
||||
# ISTTOKrpi2.dbd will be created and installed
|
||||
DBD += ISTTOKrpi2.dbd
|
||||
|
||||
# ISTTOKrpi2.dbd will be made up from these files:
|
||||
ISTTOKrpi2_DBD += base.dbd
|
||||
|
||||
# Include dbd files from all support applications:
|
||||
#ISTTOKrpi2_DBD += xxx.dbd
|
||||
ISTTOKrpi2_DBD += asyn.dbd
|
||||
ISTTOKrpi2_DBD += stream.dbd
|
||||
ISTTOKrpi2_DBD += drvAsynSerialPort.dbd
|
||||
|
||||
# Add all the support libraries needed by this IOC
|
||||
ISTTOKrpi2_LIBS += asyn
|
||||
ISTTOKrpi2_LIBS += stream
|
||||
|
||||
# ISTTOKrpi2_registerRecordDeviceDriver.cpp derives from ISTTOKrpi2.dbd
|
||||
ISTTOKrpi2_SRCS += ISTTOKrpi2_registerRecordDeviceDriver.cpp
|
||||
|
||||
# Build the main IOC entry point on workstation OSs.
|
||||
ISTTOKrpi2_SRCS_DEFAULT += ISTTOKrpi2Main.cpp
|
||||
ISTTOKrpi2_SRCS_vxWorks += -nil-
|
||||
|
||||
# Add support from base/src/vxWorks if needed
|
||||
#ISTTOKrpi2_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
|
||||
|
||||
# Finally link to the EPICS Base libraries
|
||||
ISTTOKrpi2_LIBS += $(EPICS_BASE_IOC_LIBS)
|
||||
|
||||
#===========================
|
||||
|
||||
include $(TOP)/configure/RULES
|
||||
#----------------------------------------
|
||||
# ADD RULES AFTER THIS LINE
|
||||
|
||||
34
epics/iocs/ISTTOKrpi2/iocBoot/iocISTTOKrpi2/st.cmd
Executable file
34
epics/iocs/ISTTOKrpi2/iocBoot/iocISTTOKrpi2/st.cmd
Executable file
@@ -0,0 +1,34 @@
|
||||
#!../../bin/linux-arm/ISTTOKrpi2
|
||||
|
||||
#- You may have to change ISTTOKrpi2 to something else
|
||||
#- everywhere it appears in this file
|
||||
|
||||
< envPaths
|
||||
epicsEnvSet( "STREAM_PROTOCOL_PATH", "$(TOP)/db" )
|
||||
|
||||
cd "${TOP}"
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase "dbd/ISTTOKrpi2.dbd"
|
||||
ISTTOKrpi2_registerRecordDeviceDriver pdbbase
|
||||
|
||||
## Load record instances
|
||||
#dbLoadRecords("db/xxx.db","user=pi")
|
||||
## 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")
|
||||
|
||||
dbLoadRecords("db/ISTTOKpfeiffer.db","P=ISTTOK:,R=vacuum:,bus=RS0")
|
||||
|
||||
cd "${TOP}/iocBoot/${IOC}"
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq sncxxx,"user=pi"
|
||||
Reference in New Issue
Block a user