You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 43 Next »



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 release2.4.1
Task List

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

Document status

DRAFT

Designer
Developers
Projecthttps://baltig.infn.it/lnf-da-control/softioc-devil-wrapper


Project schema



EPIK8S-BTF/deploy/values.yaml
#[...]
  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

#[...]


EPIK8S-BTF/config/iocs/mag-wrapper/start.sh
#!/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 (not send commands to DEVIL)


OPI 2.5 - Complete PySoftIOC (2.5.1) for Test on BTF



Run Python SoftIOC
$ 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
>>> 

Send Command - Shell Output
[...]
>>>
############################################################
# 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 :  
############################################################
>>>
[...]



Alignment of all magnets for the BTF

QUADIPCORWrapped

To Wrap

DevilVirtualIPport
 (prefs)
classDriverProtocolNote
QUATM001

x
647vldantedev015192.168.198.1156343MG1






CHHTM001x
639vldantedev020192.168.198.1206345MG1






CVVTM001x
639vldantedev020

192.168.198.120

6345MG1


QUATM002

x
649vldantedev022192.168.198.1226346MG1






CHHTM002x
639vldantedev020192.168.198.1206345MG1






CVVTM002x
639vldantedev020192.168.198.1206345MG1


QUATM003

x
649vldantedev022192.168.198.1226349MG1




CHHTM003x
639vldantedev020192.168.198.1206345MG1




CVVTM003x
639vldantedev020192.168.198.1206345MG1


QUATM004

x
647vldantedev015192.168.198.1156343MG1



DHPTB101
x
654vldantedev034192.168.198.1346343MG1


QUATB101

x
647vldantedev015192.168.198.1156343MG1


QUATB102

x
647vldantedev015192.168.198.1156343MG1



DHSTB001
x
672vldantedev035192.168.198.1356346MG1


QUATB001

x
650vldantedev022192.168.198.1226347MG1




CHHTB001x
639vldantedev020192.168.198.1206345MG1




CVVTB001x
639vldantedev020192.168.198.1206345MG1


QUATB002

x
659vldantedev025192.168.198.1256345MG1




CHHTB002x
639vldantedev020192.168.198.1206345MG1




CVVTB002x
639vldantedev020192.168.198.1206345MG1



DHPTB102
x
671vldantedev024192.168.198.1246345MG1




CHHTB101x
639vldantedev020192.168.198.1206345MG1




CVVTB101x
639vldantedev020192.168.198.1206345MG1


QUATB003

x
628vldantedev022192.168.198.1226342MG1


QUATB004

x
628vldantedev022192.168.198.1226342MG1



DHSTB002
x
628vldantedev022192.168.198.1226342MG1



DHRTB101
x
649vldantedev022192.168.198.1226346MG1



DHRTB102
x
663vldantedev033192.168.198.1336345MG1


QUATB201

x
671vldantedev024192.168.198.1246345MG1


QUATB202

x
671vldantedev024192.168.198.1246345MG1




CHHTB201x
666vldantedev023192.168.198.1236345MG1




CVVTB201x
666vldantedev023192.168.198.1236346MG1



DHSTB201
x
671vldantedev024192.168.198.1246345MG1


QUATB203

x
671vldantedev024192.168.198.1246345MG1


QUATB204

x
671vldantedev024192.168.198.1246345MG1



DHSTB202
x
671vldantedev024192.168.198.1246345MG1


QUATB205

x
671vldantedev024192.168.198.1246345MG1


QUATB206

x
671vldantedev024192.168.198.1246345MG1



DHSTB203
x
671vldantedev024192.168.198.1246345MG1



  • No labels