Table of Contents |
---|
Description | This is a PythonSoftIOC that can read DCS magnet values allocated in Memcached memory, decode them, and use them as process variables (PVs) for EPICS. | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Then it send commands to the DCS DEVIL process. | |||||||||||||||
Target release | 2.4.1 | ||||||||||||||
Task List |
| ||||||||||||||
Document status |
| ||||||||||||||
Designer | |||||||||||||||
Developers | |||||||||||||||
Project | https://baltig.infn.it/lnf-da-control/softioc-devil-wrapper |
Project schema
Code Block | ||||
---|---|---|---|---|
| ||||
#[...] iocs: - name: "mag-wrapper" asset: "https://confluence.infn.it/display/TESTBEAM/SoftIOC+DEVIL+Wrapper" charturl: 'https://baltig.infn.it/epics-containers/ioc-chart.git' image: baltig.infn.it:4567/epics-containers/epics-py-base iocprefix: "DAFNE" start: "/epics/ioc/config/start.sh" ## if your mynewioc has a start.sh this line must be kept gitinit: true #[...] |
...
Code Block | ||||
---|---|---|---|---|
| ||||
#!/bin/bash
script_dir=$(dirname "$0")
cd $script_dir
echo "Starting Mag-Wrapper : $EPICS_CA_ADDR_LIST"
pip install -r ./scripts/requirements.txt
python ./scripts/main.py -x DAFNE -c btf-config.json
|
OPI Magnets Test on CS-Studio Phoebus
OPI 2.4 - Read only from Memcached
OPI 2.5 - Complete PySoftIOC (2.5.1) for Test on BTF - DEPRECATED
Code Block | ||||
---|---|---|---|---|
| ||||
$ python main.py -x DAFNE -c btf_qua_magnets.json INFO: PVXS QSRV2 is loaded, permitted, and ENABLED. [2024-05-28 10:10:29,741] INFO: Start SoftIOC to DEVIL - Version: 2.5.1 [2024-05-28 10:10:29,742] INFO: Memcached Server: 192.168.198.20 [2024-05-28 10:10:29,742] INFO: Memcached Port: 11211 [2024-05-28 10:10:29,783] INFO: Read configuration file! [2024-05-28 10:10:29,783] INFO: Configuration file : btf_qua_magnets.json [2024-05-28 10:10:29,784] INFO: Build prefix >>>>> DAFNE:BTF:QUATM001:current >>>>> DAFNE:BTF:QUATM001:mode >>>>> DAFNE:BTF:QUATM001:polarity >>>>> DAFNE:BTF:QUATM002:current >>>>> DAFNE:BTF:QUATM002:mode >>>>> DAFNE:BTF:QUATM002:polarity >>>>> DAFNE:BTF:QUATM003:current >>>>> DAFNE:BTF:QUATM003:mode >>>>> DAFNE:BTF:QUATM003:polarity [...] Starting iocInit ############################################################################ ## EPICS 7.0.7.0 ## Rev. 7.0.7.99.0.2 ## Rev. Date 7.0.7.99.0.2 ############################################################################ iocRun: All initialization complete [2024-05-28 10:10:30,314] INFO: Define CONTROL & COMMAND main functions. [2024-05-28 10:10:30,314] INFO: Launch CONTROL & COMMAND threads. ###################################################################### ## Command help : ## softioc.dbl() - Prints the names of PV records in the database! ## softioc.scanpiol() - Prints all records in the I/O event scan lists. ###################################################################### ### softioc.dbl() ### DAFNE:BTF:QUATB001:current_rb DAFNE:BTF:QUATB001:mode_rb DAFNE:BTF:QUATB001:polarity_rb DAFNE:BTF:QUATB002:current_rb DAFNE:BTF:QUATB002:mode_rb DAFNE:BTF:QUATB002:polarity_rb DAFNE:BTF:QUATB003:current_rb DAFNE:BTF:QUATB003:mode_rb DAFNE:BTF:QUATB003:polarity_rb [...] DAFNE:COUNTER # Service PV DAFNE:BTF:QUATB001:current DAFNE:BTF:QUATB002:current DAFNE:BTF:QUATB003:current [...] DAFNE:MC_ERROR # Service PV DAFNE:DEBUG:SERVICE:COMMAND # Service PV DAFNE:INFO_VERSION # Service PV DAFNE:START_TIME # Service PV DAFNE:BTF:QUATB001:mode DAFNE:BTF:QUATB001:polarity DAFNE:BTF:QUATB002:mode DAFNE:BTF:QUATB002:polarity DAFNE:BTF:QUATB003:mode DAFNE:BTF:QUATB003:polarity [...] Python 3.12.1 | packaged by Anaconda, Inc. | (main, Jan 19 2024, 09:52:31) [Clang 14.0.6 ] on darwin Type "help", "copyright", "credits" or "license" for more information. # (InteractiveConsole) for EPICS SoftIOC >>> |
Code Block | ||||
---|---|---|---|---|
| ||||
[...]
>>>
############################################################
# Counter Processed command : [1] [2024-05-21 16:55:12]
# DCS Element : QUATB003
# Parameter : OPER
# DEVIL IP : 192.168.198.122
# Port : 6342
# DCS Command : MODE
############################################################
# String to send Command : MODE QUATB003 OPER
############################################################
#
# >>> Command Exectuted : MODE QUATB003 OPER
#
############################################################
# Response for ECHO :
############################################################
>>>
[...] |
Table alignment of all magnets for the BTF (Class/Protocol/Type) (1)
QUA | DIP | COR | Wrapped | Devil | Virtual (Name) | Virtual (IP) | port (prefs) | Init/control tag | class | Driver/Protocol | Type |
---|---|---|---|---|---|---|---|---|---|---|---|
QUATM001 | x | 647 | vldantedev015 | 192.168.198.115 | 6343 | newOCEM_3.2 | MG1 | E642 | 01010001 | ||
CHHTM001 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTM001 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
QUATM002 | x | 649 | vldantedev022 | 192.168.198.122 | 6346 | MG1 | SYS8X00 | 00010100 | |||
CHHTM002 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTM002 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
QUATM003 | x | 649 | vldantedev022 | 192.168.198.122 | 6349 | MG1 | SYS8X00 | 00010100 | |||
CHHTM003 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTM003 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
QUATM004 | x | 647 | vldantedev015 | 192.168.198.115 | 6343 | newOCEM_3.2 | MG1 | E642 | 01010001 | ||
DHPTB101 | x | 654 | vldantedev034 | 192.168.198.134 | 6343 | MG1 | SYS8X00 | 00010100 | |||
QUATB101 | x | 647 | vldantedev015 | 192.168.198.115 | 6343 | newOCEM_3.2 | MG1 | E642 | 01010001 | ||
QUATB102 | x | 647 | vldantedev015 | 192.168.198.115 | 6343 | newOCEM_3.2 | MG1 | E642 | 01010001 | ||
DHSTB001 | x | 672 | vldantedev035 | 192.168.198.135 | 6346 | newOCEM_3.2 | MG1 | E642 | 00010101 | ||
QUATB001 | x | 650 | vldantedev022 | 192.168.198.122 | 6347 | MG1 | E642 | 01010001 | |||
CHHTB001 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTB001 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
QUATB002 | x | 659 | vldantedev025 | 192.168.198.125 | 6345 | newOCEM_3.2 | MG1 | E642 | 01010001 | ||
CHHTB002 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTB002 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
DHPTB102 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 03000007 | |||
CHHTB101 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
CVVTB101 | x | 639 | vldantedev020 | 192.168.198.120 | 6345 | newOCEM_3.4 | MG1 | CAENels Easy Driver | 00000006 | ||
QUATB003 | x | 628 (2) | vldantedev022 | 192.168.198.122 | 6342 | MG1 | E642 | 01010001 | |||
QUATB004 | x | 628 (2) | vldantedev022 | 192.168.198.122 | 6342 | MG1 | E642 | 01010001 | |||
DHSTB002 | x | 628 (2) | vldantedev022 | 192.168.198.122 | 6342 | MG1 | E642 | 01010001 | |||
DHRTB101 | x | 649 | vldantedev022 | 192.168.198.122 | 6346 | MG1 | SYS8X00 | 00010100 | |||
DHRTB102 | x | 663 (3) | vldantedev033 | 192.168.198.133 | 6345 | MG1 | Modbus | 00020002 | |||
QUATB201 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
QUATB202 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
CHHTB201 | x | 666 | vldantedev023 | 192.168.198.123 | 6345 | MG1 | CAENels Easy Driver | 00000006 | |||
CVVTB201 | x | 666 | vldantedev023 | 192.168.198.123 | 6346 | MG1 | CAENels Easy Driver | 00000006 | |||
DHSTB201 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 02010007 | |||
QUATB203 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
QUATB204 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
DHSTB202 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 02010007 | |||
QUATB205 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
QUATB206 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 01010007 | |||
DHSTB203 | x | 671 | vldantedev024 | 192.168.198.124 | 6345 | MG1 | Modbus TCP EEI | 02010007 |
References
(a) https://confluence.infn.it/spaces/LDCG/pages/44991576/MG1
Note:
(2) DEVIL628 | (3) DEVIL663 |
---|---|
#DHSA*001 (ACC) #QUAA*001 (ACC) #QUAA*002 (ACC) #QUAA*003 (ACC) #SXPA*001 (ACC) #SXPA*002 (ACC) #DHSTB002 (1) #QUATB003 (1) #QUATB004 (1) | #SPLP2001 #SPLP1002 #DHRTB999 #DHRTB997 #SPLE2001 #SPLE1002 #DHRTB998 #DHRTB102 (1)
|