Fixing DAN timing, inverting MHVPS_FLT dig input

This commit is contained in:
ferrog
2026-02-10 14:53:58 +00:00
parent 7a1a8da39c
commit d18c98311a
9 changed files with 426 additions and 42 deletions

View File

@@ -292,12 +292,12 @@ bool JAConditionalSignalUpdateGAM::Execute() {
if (state) { if (state) {
needsReset = true; needsReset = true;
MARTe::uint32 i; MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) { for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].value; *outputSignals[i] = outputs[i].value;
} }
} else { } else {
MARTe::uint32 i; MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) { for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].defaultValue; *outputSignals[i] = outputs[i].defaultValue;
} }
} }

View File

@@ -53,7 +53,7 @@
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
CPUs = @cpus_dan CPUs = @cpus_dan
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
Class = RealTimeThread Class = RealTimeThread
@@ -118,7 +118,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -187,7 +187,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -259,7 +259,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -326,7 +326,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -396,7 +396,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -458,7 +458,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -523,7 +523,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {
@@ -589,7 +589,7 @@
} }
+DANThread = { +DANThread = {
Class = RealTimeThread Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM } Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan CPUs = @cpus_dan
} }
+ReferenceGenerationThread = { +ReferenceGenerationThread = {

View File

@@ -539,6 +539,26 @@
} }
} }
} }
//# PXI NI6528 Digital input datasource
//# TODO: configure it
+NI6528_1_DIO = {
Class = NI6528
DeviceName = "/dev/pxi6528"
BoardId = 0 // TODO: check if not 1
Signals = {
//# P5.6 O.22 PXI_FLT
DO5 = {
Type = uint8
PortId = 5
InversionMask = 0xFF
}
}
}
//# Direct HW accesses. Follwing device/port assignment must be consistent with actual wiring. //# Direct HW accesses. Follwing device/port assignment must be consistent with actual wiring.
//# NI6259.0 //# NI6259.0
//# APS_SWON BoardId=0, PortId=3.0 //# APS_SWON BoardId=0, PortId=3.0

View File

@@ -147,7 +147,7 @@
+Event = { +Event = {
Class = Message Class = Message
Destination = StateMachine Destination = StateMachine
Function = GoError Function = GoWaitStandby
} }
} }
//# Go to wait standby //# Go to wait standby

View File

@@ -6,6 +6,9 @@
Class = RealTimeThreadSynchronisation Class = RealTimeThreadSynchronisation
Timeout = 100 Timeout = 100
Signals = { Signals = {
DiTime = {
Type = uint32
}
PXI6259_Status = { PXI6259_Status = {
Type = uint32 Type = uint32
} }
@@ -146,6 +149,9 @@
+SyncThreadProducerGAM = { +SyncThreadProducerGAM = {
Class = IOGAM Class = IOGAM
InputSignals = { InputSignals = {
Time = {
DataSource = DDB3
}
PXI6259_Status = { PXI6259_Status = {
Alias = Status Alias = Status
DataSource = NI6259_DIO_P0 DataSource = NI6259_DIO_P0
@@ -251,6 +257,9 @@
} }
} }
OutputSignals = { OutputSignals = {
DiTime = {
DataSource = SynchThread
}
PXI6259_Status = { PXI6259_Status = {
DataSource = SynchThread DataSource = SynchThread
} }

View File

@@ -162,11 +162,26 @@
CCPS_IN_OPERATION = { CCPS_IN_OPERATION = {
DataSource = DDB3 DataSource = DDB3
} }
PXI_FLT = {
DataSource = DDB3
}
//! implicit: Placeholder for spare output //! implicit: Placeholder for spare output
NONE_DO23 = { NONE_DO23 = {
DataSource = DDB3
Type = uint8
NumberOfElements = 2
NumberOfDimensions = 1
Default = { 0, 0 }
}
NONE_DO5_1_Before = {
DataSource = DDB3
Type = uint8
NumberOfElements = 6
NumberOfDimensions = 1
Default = { 0, 0, 0, 0, 0, 0 }
}
PXI_FLT = {
DataSource = DDB3
}
//! implicit: Placeholder for spare output
NONE_DO5_1_After = {
DataSource = DDB3 DataSource = DDB3
Type = uint8 Type = uint8
Default = 0 Default = 0
@@ -182,6 +197,11 @@
DO5 = { DO5 = {
DataSource = NI6528_0_DIO DataSource = NI6528_0_DIO
} }
DO5_B1 = {
Alias = DO5
DataSource = NI6528_1_DIO
Trigger = 1
}
} }
} }
// //# INPUTs: StateMahine Value, NI6528P3Value and NI6528P4Value // //# INPUTs: StateMahine Value, NI6528P3Value and NI6528P4Value

View File

@@ -130,7 +130,7 @@
} }
+FastAnalogDAN = { +FastAnalogDAN = {
Class = "DAN::DANSource" Class = "DAN::DANSource"
NumberOfBuffers = 10000 NumberOfBuffers = 100
CPUMask = @cpus_fdan CPUMask = @cpus_fdan
StackSize = 10000000 StackSize = 10000000
DanBufferMultiplier = 10000 //10s at 1kHz loop (1M with 1k samples) DanBufferMultiplier = 10000 //10s at 1kHz loop (1M with 1k samples)

View File

@@ -6,14 +6,161 @@
Class = GAMDataSource Class = GAMDataSource
AllowNoProducers = 1 AllowNoProducers = 1
Signals = { Signals = {
CurrTime = { DiTime = {
Type = uint64 Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PXI6528_Status = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_APS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_APS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_BPS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
GYA_BPS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_OV = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_OC = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_FLT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
MHVPS_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
ECPC_MOD = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
FAST_TRIP = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV1 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV2 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
CRIO_RV3 = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_ITL = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_STANDBY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_READY = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_ON = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_PERMIT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_OP_SELECTED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_CC_OP_SELECTED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
PLC_SYNCMODE = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
TRIGGER = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
BEAM_ON_STAT = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
HVARMED = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
HVINJECTION = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
RFON = {
Type = uint8
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
BEAM_ON_TIME = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
}
RFON_TIME = {
Type = uint32
NumberOfElements = @dan_ratio
NumberOfDimensions = 1
} }
} }
} }
+DANDIODataSource = { +DANDIODataSource = {
Class = "DAN::DANSource" Class = "DAN::DANSource"
NumberOfBuffers = 1000 NumberOfBuffers = 100
CPUMask = @cpus_dio CPUMask = @cpus_dio
StackSize = 10000000 StackSize = 10000000
DanBufferMultiplier = 200 //10s at 20Hz DanBufferMultiplier = 200 //10s at 20Hz
@@ -23,10 +170,9 @@
NumberOfPostTriggers = 0 NumberOfPostTriggers = 0
Signals = { Signals = {
DI_Time = { DI_Time = {
Type = uint64 Type = uint32
TimeSignal = 1 TimeSignal = 1
AbsoluteTime = 1 AbsoluteTime = 0
TimeSignalMultiplier = 1e-9
} }
PXI6528_Status = { PXI6528_Status = {
SamplingFrequency = @fast_clock SamplingFrequency = @fast_clock
@@ -207,26 +353,17 @@
} }
+Functions = { +Functions = {
+CurrentTimeDIO = { +WaitForDioSignals = {
Class = "IOExt::SystemClockGAM"
OutputSignals = {
CurrTime = {
DataSource = DDB5
Type = uint64
}
}
}
+DANDIOPublisherGAM = {
Class = IOGAM Class = IOGAM
InputSignals = { InputSignals = {
Time = { DiTime = {
DataSource = DDB5 DataSource = SynchThread
Alias = CurrTime Samples = @dan_ratio
Frequency = 1
} }
PXI6528_Status = { PXI6528_Status = {
DataSource = SynchThread DataSource = SynchThread
Samples = @dan_ratio Samples = @dan_ratio
Frequency = 1
} }
GYA_APS_READY = { GYA_APS_READY = {
DataSource = SynchThread DataSource = SynchThread
@@ -341,6 +478,195 @@
Samples = @dan_ratio Samples = @dan_ratio
} }
} }
OutputSignals = {
DiTime = {
DataSource = DDB5
}
PXI6528_Status = {
DataSource = DDB5
}
GYA_APS_READY = {
DataSource = DDB5
}
GYA_APS_FLT = {
DataSource = DDB5
}
GYA_BPS_READY = {
DataSource = DDB5
}
GYA_BPS_FLT = {
DataSource = DDB5
}
MHVPS_OV = {
DataSource = DDB5
}
MHVPS_OC = {
DataSource = DDB5
}
MHVPS_FLT = {
DataSource = DDB5
}
MHVPS_READY = {
DataSource = DDB5
}
ECPC_MOD = {
DataSource = DDB5
}
FAST_TRIP = {
DataSource = DDB5
}
CRIO_RV1 = {
DataSource = DDB5
}
CRIO_RV2 = {
DataSource = DDB5
}
CRIO_RV3 = {
DataSource = DDB5
}
PLC_ITL = {
DataSource = DDB5
}
PLC_STANDBY = {
DataSource = DDB5
}
PLC_READY = {
DataSource = DDB5
}
PLC_ON = {
DataSource = DDB5
}
PLC_PERMIT = {
DataSource = DDB5
}
PLC_OP_SELECTED = {
DataSource = DDB5
}
PLC_CC_OP_SELECTED = {
DataSource = DDB5
}
PLC_SYNCMODE = {
DataSource = DDB5
}
TRIGGER = {
DataSource = DDB5
}
BEAM_ON_STAT = {
DataSource = DDB5
}
HVARMED = {
DataSource = DDB5
}
HVINJECTION = {
DataSource = DDB5
}
RFON = {
DataSource = DDB5
}
BEAM_ON_TIME = {
DataSource = DDB5
}
RFON_TIME = {
DataSource = DDB5
}
}
}
+DANDIOPublisherGAM = {
Class = IOGAM
InputSignals = {
DiTime = {
DataSource = DDB5
Ranges = {{0, 0}}
}
PXI6528_Status = {
DataSource = DDB5
}
GYA_APS_READY = {
DataSource = DDB5
}
GYA_APS_FLT = {
DataSource = DDB5
}
GYA_BPS_READY = {
DataSource = DDB5
}
GYA_BPS_FLT = {
DataSource = DDB5
}
MHVPS_OV = {
DataSource = DDB5
}
MHVPS_OC = {
DataSource = DDB5
}
MHVPS_FLT = {
DataSource = DDB5
}
MHVPS_READY = {
DataSource = DDB5
}
ECPC_MOD = {
DataSource = DDB5
}
FAST_TRIP = {
DataSource = DDB5
}
CRIO_RV1 = {
DataSource = DDB5
}
CRIO_RV2 = {
DataSource = DDB5
}
CRIO_RV3 = {
DataSource = DDB5
}
PLC_ITL = {
DataSource = DDB5
}
PLC_STANDBY = {
DataSource = DDB5
}
PLC_READY = {
DataSource = DDB5
}
PLC_ON = {
DataSource = DDB5
}
PLC_PERMIT = {
DataSource = DDB5
}
PLC_OP_SELECTED = {
DataSource = DDB5
}
PLC_CC_OP_SELECTED = {
DataSource = DDB5
}
PLC_SYNCMODE = {
DataSource = DDB5
}
TRIGGER = {
DataSource = DDB5
}
BEAM_ON_STAT = {
DataSource = DDB5
}
HVARMED = {
DataSource = DDB5
}
HVINJECTION = {
DataSource = DDB5
}
RFON = {
DataSource = DDB5
}
BEAM_ON_TIME = {
DataSource = DDB5
}
RFON_TIME = {
DataSource = DDB5
}
}
OutputSignals = { OutputSignals = {
DI_Time = { DI_Time = {
DataSource = DANDIODataSource DataSource = DANDIODataSource

View File

@@ -62,11 +62,14 @@
} }
+DDB3 = { +DDB3 = {
Signals = { Signals = {
Counter = {
Type = uint32
}
Time = { Time = {
Type = uint32 Type = uint32
} }
Counter = { AbsoluteTime = {
Type = uint32 Type = uint64
} }
} }
} }
@@ -107,13 +110,16 @@
+FastTimerGAM = { +FastTimerGAM = {
Class = IOGAM Class = IOGAM
InputSignals = { InputSignals = {
Time = {
DataSource = FastTimer
}
Counter = { Counter = {
DataSource = FastTimer DataSource = FastTimer
Frequency = @fast_clock Frequency = @fast_clock
} }
Time = {
DataSource = FastTimer
}
AbsoluteTime = {
DataSource = FastTimer
}
PCF_FAULT = { PCF_FAULT = {
DataSource = Th1Bridge DataSource = Th1Bridge
} }
@@ -122,10 +128,13 @@
} }
} }
OutputSignals = { OutputSignals = {
Counter = {
DataSource = DDB3
}
Time = { Time = {
DataSource = DDB3 DataSource = DDB3
} }
Counter = { AbsoluteTime = {
DataSource = DDB3 DataSource = DDB3
} }
PCF_FLT = { PCF_FLT = {