New temperature IOC ans systemd start script
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#https://epics-controls.org/resources-and-support/documents/howto-documents/posix-thread-priority/
|
||||
# 1) install procserv and telnet
|
||||
# put this file in
|
||||
# /etc/systemd/system/
|
||||
# 2) and enable service:
|
||||
# sudo systemctl enable isttok-temp-ioc.service
|
||||
[Unit]
|
||||
Description=EPICS Soft IOC ISTTOK
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/home/oper/ISTTOK/epics/iocs/dsPICTemp/iocBoot/iocISTTOK
|
||||
ExecStart=/usr/bin/procServ --foreground --quiet --port=4051 /home/oper/ISTTOK/epics/iocs/dsPICTemp/iocBoot/iocISTTOK/st.cmd
|
||||
Restart=always
|
||||
#User=iocuser
|
||||
User=oper
|
||||
RuntimeDirectory=ISTTOK
|
||||
#CPUAffinity=1-3
|
||||
#LimitMEMLOCK=infinity
|
||||
#LimitRTPRIO=99
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
33
epics/iocs/dsPICTemp/iocBoot/iocISTTOK/st.cmd
Executable file
33
epics/iocs/dsPICTemp/iocBoot/iocISTTOK/st.cmd
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/home/oper/ISTTOK/epics/iocs/dsPICTemp/bin/linux-x86_64/ISTTOK
|
||||
|
||||
#- You may have to change ISTTOK to something else
|
||||
#- everywhere it appears in this file
|
||||
|
||||
< envPaths
|
||||
|
||||
epicsEnvSet( "STREAM_PROTOCOL_PATH", "$(TOP)/db" )
|
||||
|
||||
epicsEnvSet( "EPICS_CA_ADDR_LIST", "localhost 192.168.1.120 192.168.1.110")
|
||||
|
||||
cd "${TOP}"
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase "dbd/ISTTOK.dbd"
|
||||
ISTTOK_registerRecordDeviceDriver pdbbase
|
||||
|
||||
drvAsynSerialPortConfigure("RS232","/dev/ttyUSB0")
|
||||
asynSetOption("RS232", 0, "baud", "115200")
|
||||
asynSetOption("RS232", 0, "bits", "8")
|
||||
asynSetOption("RS232", 0, "parity", "none")
|
||||
asynSetOption("RS232", 0, "stop", "1")
|
||||
#asynSetOption("RS232", 0, "clocal", "N")
|
||||
#asynSetOption("RS232", 0, "crtscts", "Y")
|
||||
|
||||
## Load record instances
|
||||
dbLoadRecords("db/ISTTOKtemperature.db","P=ISTTOK:,R=temperature:,PORT=RS232,A=0")
|
||||
|
||||
cd "${TOP}/iocBoot/${IOC}"
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq sncxxx,"user=oper"
|
||||
Reference in New Issue
Block a user