TOC
Other pages:
New ISTTOK slow control system
Intro
The new ISTTOK slow control system is designed to replace the former vaccum/power/slow timing system based is the EDWARDS controller.
The new system uses the EPICS framework and the Control System Studio, below there is a detailed description of the used software. In the next figure is depicted the system structure.

At the present all the software are installed in two IOC servers with the exception of the Control System Studio that is also used for the GUI management.
Team and responsabilities
- Horácio Fernandes (ISTTOK Leader)
- Bernardo Carvalho (Project Leader)
- Paulo Duarte (ISTTOK Session Leader, State Machine develpment)
- Tiago Pereira (dsPIC development, RS232 protocol/ Sensor Interface/ Wiring)
- Paulo F. Carvalho ( Epics Applications)
- Bruno Santos (Epics)
- Gonçalo Quintal (Epics, CSS Gui Panels)
System description
Presently there are two instances of EPICS IOC Server implemented. One responsible for the Temperature /Vacuum Node. And a second one, installed in a Raspberry Pi, implemented in the new control unit launched at ISTTOK for the remote control of the vacuum pumps, named Central Node.
Temperature/Vacuum Node: Vacuum System
- Pfeiffer pressure gauges
The dsPic acquires the pressure value from the Pfeiffer gauge, with the Pfeiffer protocol working on RS485, and sends the pressure to a high level PC application.
Process Value in the IOC Server for this system.
PV Name | PV Type | Archive |
ISTTOK:vacuum:Uptime | longin | no |
ISTTOK:vacuum:Diff_Uptime | calc | no |
ISTTOK:vacuum:Last_Uptime | calc | no |
ISTTOK:vacuum:Pressure_Chamber1 | ai | yes |
ISTTOK:vacuum:Pressure_Primary1 | ai | yes |
Temperature/Vacuum Node: Temperature Sensors and ELCO Voltage Measurement Systems
- Thermocouple Sensor
- ELCO voltage measurement
-For communication was used a fiber optic
The dsPic uses the internal ADC to read the voltage signal from the thermocouple.
To measure the ELCO's voltage it was developed two boards one to read the ELCO's voltage and another to connect the fiber optic to dsPIC.
Process Value in the IOC Server for this system.
PV Name | PV Type | Archive |
ISTTOK:temperature:Uptime | longin | no |
ISTTOK:temperature:Diff_Uptime | calc | no |
ISTTOK:temperature:Last_Uptime | calc | no |
ISTTOK:temperature:RawTemperature_0 | ai | yes |
ISTTOK:temperature:Temperature_0 | calc | yes |
ISTTOK:temperature:RawTemperature_1 | ai | no |
ISTTOK:temperature:Temperature_1 | calc | no |
ISTTOK:temperature:RawTemperature_2 | ai | no |
ISTTOK:temperature:Temperature_2 | calc | no |
ISTTOK:temperature:RawTemperature_3 | ai | no |
ISTTOK:temperature:Temperature_3 | calc | no |
ISTTOK:temperature:RawCapbank_Voltage | ai | no |
ISTTOK:temperature:Capbank_Voltage | calc | no |
Central Node
- Pffeifer rotatory vacuum pump
- Edwards electro valve
- Seiko Seiki turbomolecular pump and control unit
There are: one control signal to turn the rotatory pump on and off; one control signal to open and close the Edwards electro valve; and four control signals, as well as four monitoring signals for the Seiko Seiki turbomolecular pump and control unit.
Process Value in the IOC Server for this system.
PV Name | PV Type | Archive |
ISTTOK:central:RotatoryPump | bo | - |
ISTTOK:central:RotatoryValve | bo | - |
ISTTOK:central:TMPControllerOn | bo | - |
ISTTOK:central:TMPControllerOnInv | calcout | - |
ISTTOK:central:TMPControllerOff | bo | - |
ISTTOK:central:TMPControllerOffInv | calcout | - |
ISTTOK:central:TMPMotorOn | bo | - |
ISTTOK:central:TMPMotorOnInv | calcout | - |
ISTTOK:central:TMPMotorOff | bo | - |
ISTTOK:central:TMPMotorOffInv | calcout | - |
ISTTOK:central:Turbo_PW_Ind | bi | - |
ISTTOK:central:Turbo_Emergency | bi | - |
ISTTOK:central:Turbo_Acceleration | bi | - |
ISTTOK:central:Turbo_NormalOperation | bi | - |
ISTTOK:central:TMPManualValve | bo | - |
State machine description
The developed state machine for EPICS uses the State Notation Language and Sequencer module.
This module implements a programming language specifically designed for programming finite state machines in such a way that it is easy for the program to interact with EPICS process variables (PVs), allowing to read and to write them and to react to changes in their value or status.
In the next Figure is depicted the state machine flow,
And the Process Value in the IOC Server for this system,
PV Name | PV Type | Archive |
ISTTOK:central:AUTHORISATION | bo | no |
ISTTOK:central:OPREQ | bo | no |
ISTTOK:central:PROCESS-MODE | bo | no |
ISTTOK:central:PROCESS-REQ | bo | no |
ISTTOK:central:COUNTER | calc | no |
ISTTOK:central:OPCALCSTATE | calc | no |
ISTTOK:central:COUNTDOWN | mbbi | no |
ISTTOK:central:PULSE-NUMBER | longout | no |
ISTTOK:central:OPSTATE | longout | no |
ISTTOK:central:CurrentTime | stringin | no |
ISTTOK:central:TraceMessage | stringout | no |
Hardware Platform
Supervisor/Central Node
One PC Controller
- Intel(R) Atom(TM) CPU 330 @ 1.60GHz, Dual Core, 1 Gbyte RAM, 4 RAM
- 4 Serial Ports
- IP addr:192.168.1.152 ( ISTTOK private network)
- Scientific Linux CERN 6 (SLC6) with MRG Realtime extensions
- Linux kernel 3.2.33-rt50.66.el6rt.x86_64
- NTP time conected to IPFN Gps NTP/PPS server IP:10.136.236.255
Local Control
One or more dsPic board running an embedded firmware
-
Software Platform
All software stored in IPFN SVN server: http://metis.ipfn.ist.utl.pt/svn/cdaq/ISTTOK/
Central Node
EPICS v. 3.14.12.3 including modules:
CS-STUDIO
Apache Tomcat
Installed Scripts
- epicsenv.sh directory: /etc/profile.d/epicsenv.sh
- epicsenv directory: /usr/bin/epicsenv
- epicsEnv directory: /etc/opt/epics/env.d/epicsEnv
- epicsCaRepeater directory: /etc/init.c/epicsCaRepeater
- service-startup directory: /opt/epics/bin/services/service-startup
- epicsIocLogServer directory: /etc/init.c/epicsIocLogServer
- epicsenv directory: /usr/bin/epicsenv
- ioc-isttok directory: /etc/init.d/ioc-isttok
- isttok-archive-engine directory: /etc/init.d/isttok-archive-engine
- isttok-css-alarm-server directory: /etc/init.d/isttok-css-alarm-server
Unpack file inside a folder named epics.
Set environment variables:
Run the perl script EpicsHostArch.pl in the base/startup directory to set EPICS_HOST_ARCH.
Do site-specific build configuratiom, site configuration:
configure/CONFIG_SITE Build choices. Specify target archs.
configure/CONFIG_SITE_ENV Environment variable defaults
configure/RELEASE TORNADO2 full path location
To build EPICS:
gnumake clean uninstall
gnumake
Create a symbolic link for the base folder of EPICS called base/ inside the folder epics.
Create a folder inside the epics folder named modules/.
Download asyn and snl modules and unpack them inside epics/modules/.
Create symbolic links for both unpack folders, asyn for the asyn module and seq for the snl module.
To build asyn:
Edit the config/RELEASE file and set the paths to your installation of EPICS_BASE (use the symbolic link base/).
Then run make on top level directory.
To build SNL:
Edit the configure/RELEASE file and set the paths to your installation of EPICS_BASE (use the symbolic link base/) and perhaps also configure/CONFIG_SITE.
Then run make on top level directory.
Note that make builds first in the configure
directory, then the src
tree, and finally the test
and examples
trees. A failure in the latter two will not impact your ability to write SNL programs.
export EPICS_CA_ADDR_LIST=localhost
echo $EPICS_CA_ADDR_LIST, it should say localhost.
echo $EPICS_CA_SERVER_PORT, it should say 5064.
echo $EPICS_CA_REPEATER_PORT, it should say 5065.
This last values define ports used by EPICS and should be opened in firewall, iptable.
Protocol for communication between dspics and PC in ISTTOK slow control
- all bytes are readable ASCII
- all messages all terminated with two bytes: \r\n (13 10)
- messages have variable length
- framing character for fields inside message is space (32)
- individual fields inside each message have variable length
- the last three characters before the terminator are the ASCII representation of the checksum of all other bytes, excluding the terminator
Examples:
PIC -> PC
VL01_1 VL02_1 VL03_0 TE01_150.9 TE02_80.1 UP_7200 PR01_1.3e-4 CKS\r\n
PC -> PIC
VL01_1 CKS\r\n
Table of words:
VL - Valve
TE - Temperature
UP - Uptime
PRD - Wave Periode
PR - Pressure
Archive System
Main folder: /home/bernardo/css/
References
"EPICS IOC module development and implementation for the ISTTOK machine subsystem operation and control"
Paulo Carvalho, André Duarte, Tiago Pereira, Bernardo Carvalho, Jorge Sousa, Horácio Fernandes, Carlos Correia, Bruno Gonçalves, Carlos Varandas
Fusion Engineering and Design 86 (2011) 1085–1090