Implementing cleaner configuration

This commit is contained in:
Martino Ferrari
2026-01-23 18:00:15 +01:00
parent f19df69de7
commit ba5ae74c22
7 changed files with 590 additions and 47 deletions

View File

@@ -1,46 +0,0 @@
#package jada_gyro.JAGyroApp.Data
+EPICSCAInput = {
Class = EPICSCAInput
Signals = {
MIS_ITL = {
Type = uint32
PVName = "EC-GN-P01-GAFP:FMC4310-YTRP"
}
RESET_FLT = {
PVName = "EC-GN-P01-GPF:STAT-RST-FLT"
Type = uint32
}
}
}
//# PXI NI6528 Digital input datasource
//# TODO: configure it
+NI6528_DI = {
Class = GAMDataSource // TODO Change
Signals = {
GYA_APS_FLT = {
// DI.1
Type = uint32
}
GYA_BPS_FLT = {
Type = uint32
// DI.3
}
MHVPS_OV = {
Type = uint32
// DI.4
}
MHVPS_OC = {
Type = uint32
// DI.5
}
MHVPS_FLT = {
Type = uint32
// DI.6
}
PLC_ITL = {
Type = uint32
// DI.9
}
}
}

View File

@@ -0,0 +1,31 @@
#package jada_gyro.JAGyroApp.Data
+EPICSCAInput = {
Class = EPICSCAInput
Signals = {
MIS_ITL = {
Type = uint32
PVName = "EC-GN-P01-GAFP:FMC4310-YTRP"
}
RESET_FLT = {
PVName = "EC-GN-P01-GPF:STAT-RST-FLT"
Type = uint32
}
PLC_SELECT = {
PVName = "EC-GN-P01-GPS:PLC4110-CON-OPGY1"
Type = uint32
}
CCPS_OUTPUT_FREQ = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-FREQ"
Type = float32
}
CCPS_OUTPUT_AMP = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-AMP"
Type = float32
}
CCPS_OUTPUT_OFFS = {
PVName = "EC-GN-P01-GAF-CCPS:STAT-OFFS"
Type = float32
}
}
}

View File

@@ -0,0 +1,145 @@
#package jada_gyro.JAGyroApp.Data
+DDB1 = {
Signals = {
//# PXI Status
PXI_FAULT = {
Type = uint32
}
PCF_FLT_6259 = {
Type = uint32
}
PCF_FLT_6368_ERRNO_04 = {
Type = uint32
}
PCF_FLT_6368_ERRNO_03 = {
Type = uint32
}
}
}
//# PXI NI6528 Digital input datasource
//# TODO: configure it
+NI6528_DI = {
Class = GAMDataSource // TODO Change
Signals = {
PXI6528_Status = {
Type = uint32
}
GYA_APS_FLT = {
// DI.1
Type = uint32
}
GYA_BPS_FLT = {
Type = uint32
// DI.3
}
MHVPS_OV = {
Type = uint32
// DI.4
}
MHVPS_OC = {
Type = uint32
// DI.5
}
MHVPS_FLT = {
Type = uint32
// DI.6
}
PLC_ITL = {
Type = uint32
// DI.9 or DI.14
}
PLC_STANDBY = {
Type = uint32
// DI.15
}
}
}
+NI6259_AO = {
Class = GAMDataSource
Signals = {
CCPS_REF = {
Type = float32
}
}
}
//# Analog slow monitor PXI NI6259
//# TODO implement
+NI6259_AI = {
Class = GAMDataSource
Signals = {
PXI6259_Status = {
Type = uint32
}
GYA_BPS_MESVOLT = {
// AI: 0
Type = float32
}
GYA_BPS_MESCURR = {
// AI: 1
Type = float32
}
GYA_APS_MESVOLT = {
// AI: 2
Type = float32
}
GYA_APS_MESCURR = {
// AI: 3
Type = float32
}
GYA_ARC1_MESVOLT = {
// AI:4
Type = float32
}
GYA_ARC2_MESVOLT = {
// AI:5
Type = float32
}
GYA_ARC3_MESVOLT = {
// AI:6
Type = float32
}
GYA_MHVPS_MESVOLT = {
Type = float32
// AI:8
}
GYA_MHVPS_MESCURR = {
Type = float32
// AI:9
}
GYA_MCPS_CURR_MON = {
Type = float32
}
GYA_GCPS_CURR_MON = {
Type = float32
}
GYA_FHPS_MEAS_ACI = {
Type = float32
}
GYA_CCPS_MEAS_DCI = {
Type = float32
}
}
}
+PXI6368_3_DataSource = {
Class = GAMDataSource
Signals = {
PXI6368_0 = {
Type = uint32
}
PXI6368_1 = {
Type = uint32
}
}
}
+PXI6368_4_DataSource = {
Class = GAMDataSource
Signals = {
PXI6368_0 = {
Type = uint32
}
PXI6368_1 = {
Type = uint32
}
}
}

View File

@@ -0,0 +1,99 @@
#package jada_gyro.JAGyroApp.Functions
//# Check PXI board status.
+PXI6259ErrorGAM = {
Class = JAConditionalSignalUpdateGAM
Operation = OR
ExpectedValues = { 0 0 0 0 }
Comparators = { GREATER GREATER GREATER GREATER }
Values = { 1 }
InputSignals = {
// Conditional signals
PXI6259_Status = {
DataSource = NI6259_AI
}
PXI6528_Status = {
DataSource = NI6528_DI
}
}
OutputSignals = {
PCF_FLT_6259 = {
DataSource = DDB1
}
}
}
+PXI6368Error03GAM = { // detect Hardware error (status number 3) for PXI6368 boards.
Class = JAConditionalSignalUpdateGAM
Operation = OR
InputSignals = {
PXI6368_0 = {
DataSource = PXI6368_3_DataSource
Comparator = "EQUALS"
Value = 3
}
PXI6368_1 = {
DataSource = PXI6368_3_DataSource
Comparator = "EQUALS"
Value = 3
}
}
OutputSignals = {
PCF_FLT_6368_ERRNO_03 = {
DataSource = DDB1
Default = 0
Value = 1
}
}
}
+PXI6368Error04GAM = { // detect No board error (status number 4) for PXI6368 boards.
Class = JAConditionalSignalUpdateGAM
Operation = OR
InputSignals = {
PXI6368_0 = {
DataSource = PXI6368_4_DataSource
Comparator = "EQUALS"
Value = 4
}
PXI6368_1 = {
DataSource = PXI6368_4_DataSource
Comparator = "EQUALS"
Value = 4
}
}
OutputSignals = {
PCF_FLT_6368_ERRNO_04 = {
DataSource = DDB1
Default = 0
Value = 1
}
}
}
+PXIErrorGAM = {
Class = JAConditionalSignalUpdateGAM
Operation = OR
Values = { 1 }
InputSignals = {
PCF_FLT_6368_ERRNO_03 = {
DataSource = DDB1
Comparator = "GREATER"
Value = 0
}
PCF_FLT_6368_ERRNO_04 = {
DataSource = DDB1
Comparator = "GREATER"
Value = 0
}
PCF_FLT_6259 = {
DataSource = DDB1
Comparator = "GREATER"
Value = 0
}
}
OutputSignals = {
PXI_FAULT = {
DataSource = DDB1
Default = 0
Value = 1
}
}
}

View File

@@ -0,0 +1,60 @@
#package jada_gyro.JAGyroApp.Functions
// GAM for trianguler waveform generation.
+CCPSWaveformGAM = {
Class = JATriangleWaveGAM
InputSignals = {
Frequency = {
Alias = CCPS_OUTPUT_FREQ
DataSource = EPICSCAInput
}
Amplitude = {
Alias = CCPS_OUTPUT_AMP
DataSource = EPICSCAInput
}
Offset = {
Alias = CCPS_OUTPUT_OFFS
DataSource = EPICSCAInput
}
PLCSTANDBY = {
Alias = PLC_STANDBY
DataSource = NI6528_DI
}
}
OutputSignals = {
CCPS_REF = {
DataSource = NI6259_AO
}
}
}
// MCPS, GCPS PV to DDB1
+GCPSGAM = {
Class = IOGAM
InputSignals = {
GCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
}
OutputSignals = {
GCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
}
}
+MCPSGAM = {
Class = IOGAM
InputSignals = {
MCPS_TRG_CURR_MANUAL = {
DataSource = EPICSCAInput
Type = float32
}
}
OutputSignals = {
MCPS_TRG_CURR_SET = {
DataSource = DDB1
Type = float32
}
}
}

View File

@@ -72,7 +72,7 @@
//# Reset Error GAM //# Reset Error GAM
+ResetErrorGAM = { +ResetErrorGAM = {
Class = JAMessageGAM Class = JAMessageGAM
Operation = AND Operation = "AND"
InputSignals = { InputSignals = {
RESET_FLT = { RESET_FLT = {
DataSource = EPICSCAInput DataSource = EPICSCAInput
@@ -113,4 +113,20 @@
Function = GoError Function = GoError
} }
} }
//# Go to wait standby
+GoWaitStandbyGAM = {
Class = JAMessageGAM
Operation = "AND"
InputSignals = {
PLC_SELECT = {
DataSource = EPICSCAInput
ExpectedValue = 1
}
}
+Event = {
Class = Message
Destination = StateMachine
Function = GoWaitStandby
}
}
} }

View File

@@ -0,0 +1,238 @@
#package jada_gyro.JAGyroApp
+Data = {
//# SDN subscriber
+SDNCommands = {
Class = SDN::SDNSubscriber
Topic = "ECPC2SCUJA"
Interface = "enp35s0f1"
CPUs = 0x200
Locked = 1
Timeout = 2
Signals = {
//! unused: SDN header has no use in this appliation
Header = {
Type = uint8
NumberOfDimensions = 1
NumberOfElements = 52
}
ESDNTime = {
Type = uint32
NumberOfDimensions = 1
NumberOfElements = 1
}
Command = {
Type = uint16
NumberOfDimensions = 1
NumberOfElements = 64
}
}
}
+RealTimeThreadAsyncBridge = {
Class = RealTimeThreadAsyncBridge
NumberOfBuffers = 20
Signals = {
Command = {
Type = uint16
}
}
}
+DDB2 = {
Signals = {
WaveformPacketID = {
Type = uint16
}
ESDNTime = {
Type = uint32
}
}
}
+SDNReply = {
Class = SDN::SDNPublisher
Topic = "SCUJA2ECPC"
Interface = "enp35s0f1"
CPUs = 0x200 // changed from 0x100
Locked = 1
Signals = {
//! unused: SDN header not used
Header = {
Type = uint8
NumberOfElements = 52
}
ESDNTime = {
Type = uint32
}
ReplyStatus = {
Type = uint16
}
ReplyWaveformAck = {
Type = uint16
}
// Status (26Bytes?) is not assigned
// GyrotronA measurements
// 56Bytes are used as Gyrotron1 Measurements (verified on 2020/10/22)
GYA_MHVPS_MESVOLT = {
Type = float32
}
GYA_MHVPS_MESCURR = {
Type = float32
}
GYA_BPS_MESVOLT = {
Type = float32
}
GYA_BPS_MESCURR = {
Type = float32
}
GYA_APS_MESVOLT = {
Type = float32
}
GYA_APS_MESCURR = {
Type = float32
}
GYA_ARC1_MESVOLT = {
Type = float32
}
GYA_ARC2_MESVOLT = {
Type = float32
}
GYA_ARC3_MESVOLT = {
Type = float32
}
GYA_MCPS_CURR_MON = {
Type = float32
}
GYA_GCPS_CURR_MON = {
Type = float32
}
GYA_FHPS_MEAS_ACI = {
Type = float32
}
GYA_CCPS_MEAS_DCI = {
Type = float32
}
}
}
}
+Functions = {
+SDNCommandGAM = {
Class = IOGAM
InputSignals = {
Command = {
DataSource = SDNCommands
NumberOfDimensions = 1
NumberOfElements = 64
Ranges = { { 0 0 } }
}
ESDNTime = {
DataSource = SDNCommands
NumberOfDimensions = 1
NumberOfElements = 1
}
}
OutputSignals = {
Command = {
DataSource = RealTimeThreadAsyncBridge
}
ESDNTime = {
DataSource = DDB2
}
}
}
+SDNReplyGAM = {
Class = IOGAM
InputSignals = {
ESDNTime = {
DataSource = DDB2
}
WaveformPacketID = {
DataSource = DDB2
}
GYA_BPS_MESVOLT = {
DataSource = NI6259_AI
}
GYA_BPS_MESCURR = {
DataSource = NI6259_AI
}
GYA_APS_MESVOLT = {
DataSource = NI6259_AI
}
GYA_APS_MESCURR = {
DataSource = NI6259_AI
}
GYA_ARC1_MESVOLT = {
DataSource = NI6259_AI
}
GYA_ARC2_MESVOLT = {
DataSource = NI6259_AI
}
GYA_ARC3_MESVOLT = {
DataSource = NI6259_AI
}
GYA_MHVPS_MESVOLT = {
DataSource = NI6259_AI
}
GYA_MHVPS_MESCURR = {
DataSource = NI6259_AI
}
GYA_MCPS_CURR_MON = {
DataSource = NI6259_AI
}
GYA_GCPS_CURR_MON = {
DataSource = NI6259_AI
}
GYA_FHPS_MEAS_ACI = {
DataSource = NI6259_AI
}
GYA_CCPS_MEAS_DCI = {
DataSource = NI6259_AI
}
}
OutputSignals = {
ESDNTime = {
DataSource = SDNReply
}
ReplyWaveformAck = {
DataSource = SDNReply
}
GYA_BPS_MESVOLT = {
DataSource = SDNReply
}
GYA_BPS_MESCURR = {
DataSource = SDNReply
}
GYA_APS_MESVOLT = {
DataSource = SDNReply
}
GYA_APS_MESCURR = {
DataSource = SDNReply
}
GYA_ARC1_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC2_MESVOLT = {
DataSource = SDNReply
}
GYA_ARC3_MESVOLT = {
DataSource = SDNReply
}
GYA_MHVPS_MESVOLT = {
DataSource = SDNReply
}
GYA_MHVPS_MESCURR = {
DataSource = SDNReply
}
GYA_MCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_GCPS_CURR_MON = {
DataSource = SDNReply
}
GYA_FHPS_MEAS_ACI = {
DataSource = SDNReply
}
GYA_CCPS_MEAS_DCI = {
DataSource = SDNReply
}
}
}
}