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) {
needsReset = true;
MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) {
for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].value;
}
} else {
MARTe::uint32 i;
for (i = 0u; i < numberOfOutputSignals; ++i) {
for (i = 0u; i < numberOfOutputSignals; i++) {
*outputSignals[i] = outputs[i].defaultValue;
}
}

View File

@@ -53,7 +53,7 @@
+DANThread = {
Class = RealTimeThread
CPUs = @cpus_dan
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
}
+ReferenceGenerationThread = {
Class = RealTimeThread
@@ -118,7 +118,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -187,7 +187,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -259,7 +259,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -326,7 +326,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -396,7 +396,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -458,7 +458,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -523,7 +523,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+ReferenceGenerationThread = {
@@ -589,7 +589,7 @@
}
+DANThread = {
Class = RealTimeThread
Functions = { CurrentTimeDIO, DANDIOPublisherGAM }
Functions = { WaitForDioSignals, DANDIOPublisherGAM }
CPUs = @cpus_dan
}
+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.
//# NI6259.0
//# APS_SWON BoardId=0, PortId=3.0

View File

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

View File

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

View File

@@ -162,11 +162,26 @@
CCPS_IN_OPERATION = {
DataSource = DDB3
}
//! implicit: Placeholder for spare output
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_DO23 = {
NONE_DO5_1_After = {
DataSource = DDB3
Type = uint8
Default = 0
@@ -182,6 +197,11 @@
DO5 = {
DataSource = NI6528_0_DIO
}
DO5_B1 = {
Alias = DO5
DataSource = NI6528_1_DIO
Trigger = 1
}
}
}
// //# INPUTs: StateMahine Value, NI6528P3Value and NI6528P4Value

View File

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

View File

@@ -6,14 +6,161 @@
Class = GAMDataSource
AllowNoProducers = 1
Signals = {
CurrTime = {
Type = uint64
DiTime = {
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 = {
Class = "DAN::DANSource"
NumberOfBuffers = 1000
NumberOfBuffers = 100
CPUMask = @cpus_dio
StackSize = 10000000
DanBufferMultiplier = 200 //10s at 20Hz
@@ -23,10 +170,9 @@
NumberOfPostTriggers = 0
Signals = {
DI_Time = {
Type = uint64
Type = uint32
TimeSignal = 1
AbsoluteTime = 1
TimeSignalMultiplier = 1e-9
AbsoluteTime = 0
}
PXI6528_Status = {
SamplingFrequency = @fast_clock
@@ -207,26 +353,17 @@
}
+Functions = {
+CurrentTimeDIO = {
Class = "IOExt::SystemClockGAM"
OutputSignals = {
CurrTime = {
DataSource = DDB5
Type = uint64
}
}
}
+DANDIOPublisherGAM = {
+WaitForDioSignals = {
Class = IOGAM
InputSignals = {
Time = {
DataSource = DDB5
Alias = CurrTime
DiTime = {
DataSource = SynchThread
Samples = @dan_ratio
Frequency = 1
}
PXI6528_Status = {
DataSource = SynchThread
Samples = @dan_ratio
Frequency = 1
}
GYA_APS_READY = {
DataSource = SynchThread
@@ -341,6 +478,195 @@
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 = {
DI_Time = {
DataSource = DANDIODataSource

View File

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