merge upstream

This commit is contained in:
gasche committed 2026-11-25 15:01:57 +01:00
commit aba7156ec3
1 file changed
+80
@@ -6,3 +6,83 @@ tags:
- SwissFEL
- HIPA
---
## Introduction
Wago systems are PLCs used for slow IO, mostly temperature acquisition. There are instances installed in HIPA and SLS.
The PLC can generate interlocks with a physical line to the interlock system if temperature measurements go outside the tolerance ranges defined. This is however not a safety product, as the company confirmed that they don't have experience in safety and their products have not been validated for that.
NOTE: Due to stability issues found in the installed devices, AEK decided not to install new WAGO systems. A replacement plan is ongoing for HIPA.
## EPICS Integration
There are two ways of interfacing the WAGO devices, both using a soft IOC and a network connection:
### modbus
Example code:
````
# IOC_GIT=https://gitea.psi.ch/epics_iocboot_hipa/ZHIPA_wago
# ========================================================
# Startup script of WAGO I/O system for Temperature Acquisition in Injector in HIPA (Without Interlock)
# ========================================================
##################################################################
#PON = PortName
#HOI = HostInfo
#PRI = priority (0 = epicsThreadPriorityMedium)
#NAK = noAutoConnect (0 = auto connect)
#NPE = noProcessEos (should be set to 1)
#
#LIT = LinkType (0=TCP/IP, 1=RTU, 2=ASCII)
#TOU = TimeOut msec
#WDE = WriteDelay msec
#
#MPN = Modbus PortName
#AIP = Asyn IP name
#SLA = SlaveAddress
#MFC = ModBusFunctionCode
#MSA = ModBusStartAddress
#MLE = ModBusLength
#MDT = ModBusDataType
#PDT = PollingDelayTime
##################################################################
require modbus
#
# PON, HOI, PRI, NAK, NPE
drvAsynIPPortConfigure("DEVICE", "ZCW-CWAG-FW:502", 0, 0, 1)
#
# PON, LIT, TOU, WDE
modbusInterposeConfig("DEVICE", 0, 2000, 0)
#
# MPN, AIP, SLA, MFC, MSA, MLE, MDT, PDT, TYP
drvModbusAsynConfigure("INP_BIT", "DEVICE", 0, 1, 0, 2, 0, 100, "Wago")
drvModbusAsynConfigure("INP_WORD", "DEVICE", 0, 4, 0, 4, 0, 100, "WAGO")
````
### OPC-UA
Example code:
````
# IOC_GIT=https://git.psi.ch/epics_iocboot_hipa/ZHIPA_wago
# =========================================================================== #
# OPC-UA Client
# used together with open62541.org OPC-UA stack
# =========================================================================== #
require calc
require opcua
var opcua_DefaultSamplingInterval 0
runScript $(opcua_DIR)opcua.cmd, "OPC_HOST=ZSINQ-CWAG-KHN.psi.ch, OPC_SESS=OPS1, OPC_SUBS=SUB1"
````
## Installed devices
Link inventory search of all devices: https://inventory.psi.ch/#action=ReportPartType&search=wago
### HIPA
* ZHIPA_wago/ZDOM-CSPCL-01
* ZHIPA_wago/ZIP2-CSPCL-01
* ZHIPA_wago/ZINJ2-CSPCL-WAGRES2
* ZHIPA_wago/ZINJ2-CSPCL-WAGRES4
* ZHIPA_wago/ZWAGO-PC03
* ZHIPA_mbt/ZUCN-CSPCL-MBTWAG
* ZHIPA_rrl/ZRING-CSPCL-RRLWAG
* ZHIPA_mevis/ZMEVIS-CSPCL-SQ
* ZHIPA_mevis/ZMEVIS-CSPCL-UCN
* ZHIPA_mevis/MEVIS-CSPCL-WEHA