From 798b052e1a7cf89a15780a3868a3acc9612c2bff Mon Sep 17 00:00:00 2001 From: Martino Ferrari Date: Fri, 6 Feb 2026 14:59:35 +0100 Subject: [PATCH] Updated with fixes on GAMs and PXI timing changes --- .../Configurations/src/thread1/data.marte | 12 ----- .../Configurations/src/thread1/epics.marte | 10 ++-- .../src/thread1/pxi_error_management.marte | 2 +- .../src/thread1/references_generator.marte | 2 +- .../src/thread1/state_management.marte | 45 +++++++++++++++++ .../src/thread1/thread_data_broker.marte | 49 +++++++++++++++++++ .../Configurations/src/thread2/sdn.marte | 1 + .../Configurations/src/thread3/datasync.marte | 29 +++++++++++ .../src/thread3/hvon_functions.marte | 9 +++- .../Configurations/src/timers.marte | 3 ++ 10 files changed, 141 insertions(+), 21 deletions(-) diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/data.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/data.marte index 8fa7185..9bd655c 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/data.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/data.marte @@ -118,15 +118,3 @@ } } } -+NI_6683H = { - Class = NI6683H - BoardId = 0 - Signals = { - Status = { - Type = uint8 - } - PtpdStatus = { - Type = uint8 - } - } -} diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/epics.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/epics.marte index cbab6d6..b93374d 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/epics.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/epics.marte @@ -211,13 +211,11 @@ PXI6259_Status = { DataSource = DDB1 } - PXI_6683_STATE = { - DataSource = NI_6683H - Alias = Status + PXI6683_Status = { + DataSource = DDB1 } - PXI_6683_SYNC = { - DataSource = NI_6683H - Alias = PtpdStatus + PXI6683_PtpdStatus = { + DataSource = DDB1 } // PXI_6683_SYNCLOST = { // DataSource = DDB1 diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/pxi_error_management.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/pxi_error_management.marte index da523c1..c8f176e 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/pxi_error_management.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/pxi_error_management.marte @@ -36,7 +36,7 @@ PXI_FAULT = { DataSource = DDB1 Type = uint32 - Default = 0 + DefaultValue = 0 Value = 1 } } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/references_generator.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/references_generator.marte index d8840d6..68582b9 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/references_generator.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/references_generator.marte @@ -27,7 +27,7 @@ //# Switching AO port source between internal variable and EPICS PV. +ChoiceGAM = { Class = JASourceChoiceGAM - // numberOfPVs = 5 + numberOfPVs = 5 InputSignals = { BPS_REF = { DataSource = DDB1 diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte index 7468fd9..ad6d0fa 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte @@ -47,36 +47,43 @@ InputSignals = { GYA_APS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } GYA_BPS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_OV = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_OC = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } MIS_ITL = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 1 } PLC_ITL = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -94,41 +101,49 @@ InputSignals = { RESET_FLT = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 1 } GYA_APS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } GYA_BPS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } MHVPS_OV = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } MHVPS_OC = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } MHVPS_FLT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } MIS_ITL = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 0 } PLC_ITL = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } @@ -147,6 +162,7 @@ PLC_SELECT = { DataSource = EPICSCAInput Comparator = "EQUALS" + Type = uint32 Value = 1 } } @@ -180,16 +196,19 @@ InputSignals = { MCPS_ACT_RB = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 3 } MCPS_CURR_MON = { DataSource = EPICSCAInput + Type = float32 Comparator = "GREATER" Value = 0.0 } GCPS_ACT_RB = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 3 } @@ -201,11 +220,13 @@ } FHPS_RU = { DataSource = DDB1 + Type = float32 Comparator = "EQUALS" Value = 1 } GY_FHPS_MEAS_ACV = { DataSource = EPICSCAInput + Type = float32 Comparator = "GREATER" Value = 0.0 } @@ -223,11 +244,13 @@ InputSignals = { CCPS_IN_OPERATION = { DataSource = DDB1 + Type = uint32 Comparator = "EQUALS" Value = 1 } PLC_READY = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -244,6 +267,7 @@ InputSignals = { PLC_STANDBY = { DataSource = DDB1 + Type = uint8 Value = 0 Comparator = "EQUALS" } @@ -261,11 +285,13 @@ InputSignals = { PLC_STANDBY = { DataSource = DDB1 + Type = uint8 Value = 0 Comparator = "EQUALS" } PLC_READY = { DataSource = DDB1 + Type = uint8 Value = 0 Comparator = "EQUALS" } @@ -282,16 +308,19 @@ InputSignals = { PLC_SYNCMODE = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } PREP_MODE = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 0 } PLC_PERMIT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -308,16 +337,19 @@ InputSignals = { PLC_SYNCMODE = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } PREP_MODE = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 1 } PLC_PERMIT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -334,16 +366,19 @@ InputSignals = { PLC_SYNCMODE = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } PREP_MODE = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 0 } PLC_PERMIT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -360,16 +395,19 @@ InputSignals = { PLC_SYNCMODE = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } PREP_MODE = { DataSource = EPICSCAInput + Type = uint32 Comparator = "EQUALS" Value = 1 } PLC_PERMIT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -387,6 +425,7 @@ InputSignals = { PLC_READY = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } @@ -404,31 +443,37 @@ InputSignals = { PLC_PERMIT = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } APS_HVON = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } BPS_HVON = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } MHVPS_HVON = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } BPS_SWON = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } APS_SWON = { DataSource = DDB1 + Type = uint8 Comparator = "EQUALS" Value = 0 } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/thread_data_broker.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/thread_data_broker.marte index 209ea34..3aefaee 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/thread_data_broker.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/thread_data_broker.marte @@ -14,6 +14,14 @@ DataSource = SynchThread Samples = @fast_slow_ratio } + PXI6683_Status = { + DataSource = SynchThread + Samples = @fast_slow_ratio + } + PXI6683_PtpdStatus = { + DataSource = SynchThread + Samples = @fast_slow_ratio + } GYA_APS_READY = { DataSource = SynchThread Samples = @fast_slow_ratio @@ -134,126 +142,167 @@ OutputSignals = { PXI6259_Status = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PXI6528_Status = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio + Ranges = { { @dec_index, @dec_index } } + } + PXI6683_Status = { + DataSource = DDB1 + NumberOfElements = @fast_slow_ratio + Ranges = { { @dec_index, @dec_index } } + } + PXI6683_PtpdStatus = { + DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } GYA_APS_READY = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } GYA_APS_FLT = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } GYA_BPS_READY = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } GYA_BPS_FLT = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } MHVPS_OV = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } MHVPS_OC = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } MHVPS_FLT = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } MHVPS_READY = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } ECPC_MOD = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } FAST_TRIP = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_ITL = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_STANDBY = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_READY = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_ON = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_PERMIT = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_OP_SELECTED = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_CC_OP_SELECTED = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } PLC_SYNCMODE = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } TRIGGER = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } BEAM_ON_STAT = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } HVARMED = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } HVINJECTION = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } RFON = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } ELAPSED_TIME = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } BEAM_ON_TIME = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } SHOT_ID = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } CRIO_RV1 = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } CRIO_RV2 = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } CRIO_RV3 = { DataSource = DDB1 + NumberOfElements = @fast_slow_ratio Ranges = { { @dec_index, @dec_index } } } } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread2/sdn.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread2/sdn.marte index e4fc45e..a5511fd 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread2/sdn.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread2/sdn.marte @@ -245,6 +245,7 @@ } GYA_CCPS_MEAS_DCI = { DataSource = SDNReply + Trigger = 1 } } } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/datasync.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/datasync.marte index f979cd8..7a82421 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/datasync.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/datasync.marte @@ -6,12 +6,21 @@ Class = RealTimeThreadSynchronisation Timeout = 0xFFFFFFFF Signals = { + Time = { + Type = uint64 + } PXI6259_Status = { Type = uint32 } PXI6528_Status = { Type = uint32 } + PXI6683_Status = { + Type = uint8 + } + PXI6683_PtpdStatus = { + Type = uint8 + } GYA_APS_READY = { Type = uint8 } @@ -140,6 +149,9 @@ +SyncThreadProducerGAM = { Class = IOGAM InputSignals = { + AbsoluteTime = { + DataSource = FastTimer + } PXI6259_Status = { Alias = Status DataSource = NI6259_DIO_P0 @@ -148,6 +160,14 @@ DataSource = DDB3 Value = 0 } + PXI6683_Status = { + DataSource = TimingBoard + Alias = Status + } + PXI6683_PtpdStatus = { + DataSource = TimingBoard + Alias = PtpdStatus + } GYA_APS_READY = { DataSource = DDB3 } @@ -237,12 +257,21 @@ } } OutputSignals = { + Time = { + DataSource = SynchThread + } PXI6259_Status = { DataSource = SynchThread } PXI6528_Status = { DataSource = SynchThread } + PXI6683_Status = { + DataSource = SynchThread + } + PXI6683_PtpdStatus = { + DataSource = SynchThread + } GYA_APS_READY = { DataSource = SynchThread } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/hvon_functions.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/hvon_functions.marte index c9467b2..84b1616 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/hvon_functions.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread3/hvon_functions.marte @@ -6,26 +6,31 @@ InputSignals = { GYA_APS_FLT = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } GYA_BPS_FLT = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_OV = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_OC = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } MHVPS_FLT = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -37,6 +42,7 @@ } PLC_ITL = { DataSource = DDB3 + Type = uint8 Comparator = "EQUALS" Value = 1 } @@ -44,7 +50,8 @@ OutputSignals = { FAST_STOP = { DataSource = DDB3 - Default = 0 + Type = uint8 + DefaultValue = 0 Value = 1 } } diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/timers.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/timers.marte index 4720892..7f55cd9 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/timers.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/timers.marte @@ -31,6 +31,9 @@ Time = { Type = uint32 } + AbsoluteTime = { + Type = uint64 + } } } //# Fast Timer for thread 3 (RTStateMachineGAM execution cycle.)