This commit is contained in:
Bernardo Carvalho
2019-12-19 17:31:47 +00:00
8 changed files with 1326 additions and 778 deletions

View File

@@ -55,6 +55,23 @@
<autoscale>false</autoscale> <autoscale>false</autoscale>
<log_scale>true</log_scale> <log_scale>true</log_scale>
</axis> </axis>
<axis>
<visible>true</visible>
<name>Value 3</name>
<use_axis_name>false</use_axis_name>
<use_trace_names>true</use_trace_names>
<right>false</right>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
<min>0.0</min>
<max>10.0</max>
<grid>false</grid>
<autoscale>false</autoscale>
<log_scale>false</log_scale>
</axis>
</axes> </axes>
<annotations> <annotations>
</annotations> </annotations>
@@ -84,14 +101,14 @@
</archive> </archive>
</pv> </pv>
<pv> <pv>
<display_name>ISTTOK:vacuum:Pressure_Primary1</display_name> <display_name>ISTTOK:central:RPump1-Pressure</display_name>
<visible>true</visible> <visible>true</visible>
<name>ISTTOK:vacuum:Pressure_Primary1</name> <name>ISTTOK:central:RPump1-Pressure</name>
<axis>1</axis> <axis>2</axis>
<color> <color>
<red>242</red> <red>255</red>
<green>26</green> <green>0</green>
<blue>26</blue> <blue>0</blue>
</color> </color>
<trace_type>AREA</trace_type> <trace_type>AREA</trace_type>
<linewidth>2</linewidth> <linewidth>2</linewidth>
@@ -102,7 +119,7 @@
<ring_size>5000</ring_size> <ring_size>5000</ring_size>
<request>OPTIMIZED</request> <request>OPTIMIZED</request>
<archive> <archive>
<name>rdb</name> <name>RDB</name>
<url>jdbc:mysql://192.168.1.152/archive</url> <url>jdbc:mysql://192.168.1.152/archive</url>
<key>1</key> <key>1</key>
</archive> </archive>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,139 @@
###################################################################
# 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)Temperature_0")
{
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")
field(EGUL, "-1.02376")
field(HIHI,"90.0")
field(HIGH,"80.0")
field(LOW, "20.0")
field(LOLO,"0.0")
field(HHSV,"MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV,"MAJOR")
}
# 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(ADEL, "10000.0") # Archive Deadband
# 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")
}

View File

@@ -0,0 +1,23 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#----------------------------------------------------
# Optimization of db files using dbst (DEFAULT: NO)
#DB_OPT = YES
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
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

View File

@@ -0,0 +1,37 @@
# https://epics.anl.gov/tech-talk/2013/msg02051.php
Terminator = CR LF;
MaxInput = 125;
ReadTimeout = 500;
#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";
}

View File

@@ -0,0 +1,43 @@
# CONFIG_SITE
# Make any application-specific changes to the EPICS build
# configuration variables in this file.
#
# Host/target specific settings can be specified in files named
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
# CONFIG_SITE.Common.$(T_A)
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# CHECK_RELEASE controls the consistency checking of the support
# applications pointed to by the RELEASE* files.
# Normally CHECK_RELEASE should be set to YES.
# Set CHECK_RELEASE to NO to disable checking completely.
# Set CHECK_RELEASE to WARN to perform consistency checking but
# continue building even if conflicts are found.
CHECK_RELEASE = YES
# Set this when you only want to compile this application
# for a subset of the cross-compiled target architectures
# that Base is built for.
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc32
# To install files into a location other than $(TOP) define
# INSTALL_LOCATION here.
INSTALL_LOCATION=/opt/epics/apps/ISTTOK
# Set this when the IOC and build host use different paths
# to the install location. This may be needed to boot from
# a Microsoft FTP server say, or on some NFS configurations.
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>
# For application debugging purposes, override the HOST_OPT and/
# or CROSS_OPT settings from base/configure/CONFIG_SITE
#HOST_OPT = NO
#CROSS_OPT = NO
# These allow developers to override the CONFIG_SITE variable
# settings without having to modify the configure/CONFIG_SITE
# file itself.
-include $(TOP)/../CONFIG_SITE.local
-include $(TOP)/configure/CONFIG_SITE.local

View File

@@ -0,0 +1,45 @@
# RELEASE - Location of external support modules
#
# IF YOU MAKE ANY CHANGES to this file you must subsequently
# do a "gnumake rebuild" in this application's top level
# directory.
#
# The build process does not check dependencies against files
# that are outside this application, thus you should do a
# "gnumake rebuild" in the top level directory after EPICS_BASE
# or any other external module pointed to below is rebuilt.
#
# Host- or target-specific settings can be given in files named
# RELEASE.$(EPICS_HOST_ARCH).Common
# RELEASE.Common.$(T_A)
# RELEASE.$(EPICS_HOST_ARCH).$(T_A)
#
# This file is parsed by both GNUmake and an EPICS Perl script,
# so it can ONLY contain definititions of paths to other support
# modules, variable definitions that are used in module paths,
# and include statements that pull in other RELEASE files.
# Variables may be used before their values have been set.
# Build variables that are NOT used in paths should be set in
# the CONFIG_SITE file.
# Variables and paths to dependent modules:
MODULES = /opt/epics/modules
#MYMODULE = $(MODULES)/my-module
ASYN=$(MODULES)/asyn
STREAM=$(MODULES)/stream
# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver
# EPICS_BASE should appear last so earlier modules can override stuff:
EPICS_BASE = /opt/epics/base-3.15.7
# Set RULES here if you want to use build rules from somewhere
# other than EPICS_BASE:
#RULES = $(MODULES)/build-rules
# These allow developers to override the RELEASE variable settings
# without having to modify the configure/RELEASE file itself.
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local

View File

@@ -0,0 +1,37 @@
#!../../bin/linux-x86_64/ISTTOKdsPIC
## You may have to change ISTTOKdsPIC to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet ("STREAM_PROTOCOL_PATH","$(TOP)/db")
cd "${TOP}"
## Register all support components
dbLoadDatabase "dbd/ISTTOKdsPIC.dbd"
ISTTOKdsPIC_registerRecordDeviceDriver pdbbase
## Load record instances
#dbLoadRecords("db/xxx.db","user=codac-dev")
# Setup serial port 2
drvAsynSerialPortConfigure("COM2","/dev/ttyS2",0,0,0)
asynSetOption("COM2", -1, "baud", "115200")
asynSetOption("COM2", -1, "bits", "8")
asynSetOption("COM2", -1, "parity", "none")
asynSetOption("COM2", -1, "stop", "1")
asynSetOption("COM2", -1, "clocal", "Y")
asynSetOption("COM2", -1, "crtscts", "N")
#### Uncomment for ASYNS debuging ####
#asynSetTraceMask("COM2", 0, 9)
#asynSetTraceIOMask("COM2",0, 0x2)
## Setup support for dsPIC interface 2
dbLoadRecords("db/ISTTOKtemperature.db","P=ISTTOK:,R=temperature:,PORT=COM2,A=0")
cd "${TOP}/iocBoot/${IOC}"
iocInit
## Start any sequence programs
#seq sncxxx,"user=codac-dev"