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

Compare with Current View Page History

« Previous Version 41 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

DIPCORWrapped

To Wrap

DevilVirtualIPport
 (prefs)
classNote


x




MG1



CHHTM001       x
639vldantedev020192.168.198.120    6345MG1



CVVTM001       x
639vldantedev020

192.168.198.120

    6345MG1


x







CHHTM002       x
 639vldantedev020192.168.198.120    6345MG1



CVVTM002       x
 639vldantedev020192.168.198.120    6345



x







CHHTM003       x
 639vldantedev020192.168.198.120    6345


CVVTM003       x
 639vldantedev020192.168.198.120    6345



x






DHPTB101
       x
654vldantedev034192.168.198.134    6343MG1


x








x






DHSTB001
       x
672vldantedev035192.168.198.135    6346MG1


x







CHHTB001       x
 639vldantedev020192.168.198.120    6345


CVVTB001       x
 639vldantedev020192.168.198.120    6345



x







CHHTB002       x
 639vldantedev020192.168.198.120    6345


CVVTB002       x
 639vldantedev020192.168.198.120    6345

DHPTB102
       x
 671vldantedev024192.168.198.124    6345


CHHTB101       x
 639vldantedev020192.168.198.120    6345


CVVTB101       x
 639vldantedev020192.168.198.120    6345



x
















DHSTB002
       x
 628vldantedev022192.168.198.122    6342

DHRTB101
       x
 649vldantedev022192.168.198.122    6346

DHRTB102
       x
 663vldantedev033192.168.198.133    6345



x








x







CHHTB201       x
 666vldantedev023192.168.198.123    6345


CVVTB201       x
 666vldantedev023192.168.198.123    6346

DHSTB201
       x
 671vldantedev024192.168.198.124    6345



       x
671vldantedev024192.168.198.1246345



       x
671vldantedev024192.168.198.1246345

DHSTB202
       x
 671vldantedev024192.168.198.124    6345



       x








       x






DHSTB203
       x
 671vldantedev024192.168.198.124    6345

  • No labels