Added ATCA channels 14/15
Signed-off-by: Bernardo Carvalho <bernardo.carvalho@tecnico.ulisboa.pt>
This commit is contained in:
@@ -7,11 +7,15 @@
|
|||||||
Class = "EPICS::EPICSPV"
|
Class = "EPICS::EPICSPV"
|
||||||
PVName = "ISTTOK:central:MARTe2-Status"
|
PVName = "ISTTOK:central:MARTe2-Status"
|
||||||
PVType = "int32"
|
PVType = "int32"
|
||||||
|
NumberOfElements = "1"
|
||||||
|
Timeout = 2.0
|
||||||
}
|
}
|
||||||
+PV_COMMAND = {
|
+PV_COMMAND = {
|
||||||
Class = "EPICS::EPICSPV"
|
Class = "EPICS::EPICSPV"
|
||||||
PVName = "ISTTOK:central:MARTe2-Command"
|
PVName = "ISTTOK:central:MARTe2-Command"
|
||||||
PVType = "uint32"
|
PVType = "uint32"
|
||||||
|
NumberOfElements = "1"
|
||||||
|
Timeout = 2.0
|
||||||
Event = {
|
Event = {
|
||||||
Destination = "StateMachine"
|
Destination = "StateMachine"
|
||||||
PVValue = "Function"
|
PVValue = "Function"
|
||||||
@@ -22,6 +26,8 @@
|
|||||||
Class = "EPICS::EPICSPV"
|
Class = "EPICS::EPICSPV"
|
||||||
PVName = "ISTTOK:central:MARTe2-Reset"
|
PVName = "ISTTOK:central:MARTe2-Reset"
|
||||||
PVType = "uint32"
|
PVType = "uint32"
|
||||||
|
NumberOfElements = "1"
|
||||||
|
Timeout = 2.0
|
||||||
Event = {
|
Event = {
|
||||||
Destination = "StateMachine"
|
Destination = "StateMachine"
|
||||||
PVValue = "Ignore"
|
PVValue = "Ignore"
|
||||||
@@ -500,6 +506,7 @@ $IsttokApp = {
|
|||||||
DataSource = "DDB1"
|
DataSource = "DDB1"
|
||||||
Type = "float32"
|
Type = "float32"
|
||||||
NumberOfElements = "14"
|
NumberOfElements = "14"
|
||||||
|
NumberOfDimensions = "1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -549,11 +556,13 @@ $IsttokApp = {
|
|||||||
EO = {
|
EO = {
|
||||||
DataSource = AtcaIopConfig_DS
|
DataSource = AtcaIopConfig_DS
|
||||||
Type = int32
|
Type = int32
|
||||||
|
NumberOfDimensions = "1"
|
||||||
NumberOfElements = "16"
|
NumberOfElements = "16"
|
||||||
Trigger = 1
|
Trigger = 1
|
||||||
}
|
}
|
||||||
WO = {
|
WO = {
|
||||||
DataSource = AtcaIopConfig_DS
|
DataSource = AtcaIopConfig_DS
|
||||||
|
NumberOfDimensions = "1"
|
||||||
NumberOfElements = "16"
|
NumberOfElements = "16"
|
||||||
Type = float32
|
Type = float32
|
||||||
}
|
}
|
||||||
@@ -707,10 +716,12 @@ $IsttokApp = {
|
|||||||
CounterLi = {
|
CounterLi = {
|
||||||
DataSource = "EPICSCAOutput"
|
DataSource = "EPICSCAOutput"
|
||||||
Type = "uint32"
|
Type = "uint32"
|
||||||
|
NumberOfElements = "1"
|
||||||
}
|
}
|
||||||
TimeLi = {
|
TimeLi = {
|
||||||
DataSource = "EPICSCAOutput"
|
DataSource = "EPICSCAOutput"
|
||||||
Type = "uint32"
|
Type = "uint32"
|
||||||
|
NumberOfElements = "1"
|
||||||
}
|
}
|
||||||
TimeoutCountLi = {
|
TimeoutCountLi = {
|
||||||
DataSource = "EPICSCAOutput"
|
DataSource = "EPICSCAOutput"
|
||||||
|
|||||||
@@ -712,7 +712,6 @@ ErrorManagement::ErrorType AtcaIopADC::Execute(ExecutionInfo& info) {
|
|||||||
|
|
||||||
float64 t = counterAndTimer[1];
|
float64 t = counterAndTimer[1];
|
||||||
t /= 1e6;
|
t /= 1e6;
|
||||||
// Compute simulated Sinus Signals
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ namespace MARTe {
|
|||||||
DataSourceI(),
|
DataSourceI(),
|
||||||
MessageI() {
|
MessageI() {
|
||||||
devFileDescriptor = -1;
|
devFileDescriptor = -1;
|
||||||
//numberOfDACsEnabled = 0u;
|
|
||||||
//isMaster = 0u;
|
//isMaster = 0u;
|
||||||
deviceName = "";
|
deviceName = "";
|
||||||
boardId = 0u;
|
boardId = 0u;
|
||||||
@@ -62,7 +61,6 @@ namespace MARTe {
|
|||||||
uint32 n;
|
uint32 n;
|
||||||
synchCounter = 0u;
|
synchCounter = 0u;
|
||||||
|
|
||||||
//channelsMemory = NULL_PTR(float32 *);
|
|
||||||
eoValues = NULL_PTR(int32 *);
|
eoValues = NULL_PTR(int32 *);
|
||||||
woValues = NULL_PTR(float32 *);
|
woValues = NULL_PTR(float32 *);
|
||||||
eoWriteFlag = false;
|
eoWriteFlag = false;
|
||||||
@@ -88,9 +86,6 @@ namespace MARTe {
|
|||||||
if (woValues != NULL_PTR(float32 *)) {
|
if (woValues != NULL_PTR(float32 *)) {
|
||||||
delete[] woValues;
|
delete[] woValues;
|
||||||
}
|
}
|
||||||
//if (channelsMemory != NULL_PTR(float32 *)) {
|
|
||||||
//delete[] channelsMemory;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AtcaIopConfig::AllocateMemory() {
|
bool AtcaIopConfig::AllocateMemory() {
|
||||||
@@ -114,14 +109,6 @@ namespace MARTe {
|
|||||||
else {
|
else {
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
bool ok = (signalIdx < (ATCA_IOP_MAX_DAC_CHANNELS));
|
|
||||||
if (ok) {
|
|
||||||
if (channelsMemory != NULL_PTR(float32 *)) {
|
|
||||||
signalAddress = &(channelsMemory[signalIdx]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,7 +300,6 @@ namespace MARTe {
|
|||||||
ErrorManagement::ErrorType err;
|
ErrorManagement::ErrorType err;
|
||||||
REPORT_ERROR(ErrorManagement::Information, "AtcaIopConfig::WriteEoWo. Got Message!");
|
REPORT_ERROR(ErrorManagement::Information, "AtcaIopConfig::WriteEoWo. Got Message!");
|
||||||
|
|
||||||
//ret = err.ErrorsCleared();
|
|
||||||
eoWriteFlag = true;
|
eoWriteFlag = true;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -339,13 +325,12 @@ namespace MARTe {
|
|||||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail Write wo0:%6.3f", woValues[0]);
|
REPORT_ERROR(ErrorManagement::ParametersError, "Fail Write wo0:%6.3f", woValues[0]);
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
/* Reset is done by fiber
|
/* Reset may be done by fiber... */
|
||||||
rv = ioctl(devFileDescriptor, ATCA_PCIE_IOPT_RST_INTEG);
|
rv = ioctl(devFileDescriptor, ATCA_PCIE_IOPT_RST_INTEG);
|
||||||
if (rv ) {
|
if (rv ) {
|
||||||
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrators");
|
REPORT_ERROR(ErrorManagement::ParametersError, "Fail reset Integrator regs");
|
||||||
ok = false;
|
ok = false;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -353,4 +338,4 @@ namespace MARTe {
|
|||||||
CLASS_METHOD_REGISTER(AtcaIopConfig, WriteEoWo)
|
CLASS_METHOD_REGISTER(AtcaIopConfig, WriteEoWo)
|
||||||
|
|
||||||
}
|
}
|
||||||
// vim: syntax=cpp ts=4 sw=4 sts=4 sr et
|
// vim: syntax=cpp ts=2 sw=2 sts=2 sr et
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ namespace MARTe {
|
|||||||
const uint32 ATCA_IOP_MAX_ADC_CHANNELS = 16u;
|
const uint32 ATCA_IOP_MAX_ADC_CHANNELS = 16u;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A DataSource which provides an analogue output interface to the ATCA IOP boards.
|
* @brief A DataSource which provides an interface to config EO, WO parameters on
|
||||||
|
* the ATCA IOP board.
|
||||||
* @details The configuration syntax is (names are only given as an example):
|
* @details The configuration syntax is (names are only given as an example):
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
@@ -158,7 +159,6 @@ namespace MARTe {
|
|||||||
* @return true if all the mandatory parameters are correctly specified and if the specified optional parameters have valid values.
|
* @return true if all the mandatory parameters are correctly specified and if the specified optional parameters have valid values.
|
||||||
uint32 synchCounter;
|
uint32 synchCounter;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual bool Initialise(StructuredDataI & data);
|
virtual bool Initialise(StructuredDataI & data);
|
||||||
|
|
||||||
|
|
||||||
@@ -168,9 +168,6 @@ namespace MARTe {
|
|||||||
* are valid and consistent with the board parameters set during the initialisation phase.
|
* are valid and consistent with the board parameters set during the initialisation phase.
|
||||||
* In particular the following conditions shall be met:
|
* In particular the following conditions shall be met:
|
||||||
* - At least one triggering signal was requested by a GAM (with the property Trigger = 1)
|
* - At least one triggering signal was requested by a GAM (with the property Trigger = 1)
|
||||||
* - All the DAC channels have type float32.
|
|
||||||
uint32 synchCounter;
|
|
||||||
* - The number of samples of all the DAC channels is exactly one.
|
|
||||||
* @return true if all the parameters are valid and consistent with the board parameters and if the board can be successfully configured with
|
* @return true if all the parameters are valid and consistent with the board parameters and if the board can be successfully configured with
|
||||||
* these parameters.
|
* these parameters.
|
||||||
*/
|
*/
|
||||||
@@ -184,12 +181,11 @@ namespace MARTe {
|
|||||||
virtual bool Synchronise();
|
virtual bool Synchronise();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set flag to write Eo, Wo Synchronisly
|
* @brief Set flag to write synchronously Eo, Wo parameters
|
||||||
* @details This method
|
* @details This method
|
||||||
* It can be called within a
|
* It can be called within a
|
||||||
* MARTe message.
|
* MARTe message.
|
||||||
*/
|
*/
|
||||||
//ErrorManagement::ErrorType Reset();
|
|
||||||
ErrorManagement::ErrorType WriteEoWo();
|
ErrorManagement::ErrorType WriteEoWo();
|
||||||
|
|
||||||
|
|
||||||
@@ -209,10 +205,6 @@ namespace MARTe {
|
|||||||
int32 devFileDescriptor;
|
int32 devFileDescriptor;
|
||||||
|
|
||||||
uint32 synchCounter;
|
uint32 synchCounter;
|
||||||
/**
|
|
||||||
* DAC values
|
|
||||||
*/
|
|
||||||
// int32 dacValues[ATCA_IOP_N_DACs];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EO values Signal
|
* EO values Signal
|
||||||
@@ -226,11 +218,6 @@ namespace MARTe {
|
|||||||
|
|
||||||
bool eoWriteFlag;
|
bool eoWriteFlag;
|
||||||
|
|
||||||
/**
|
|
||||||
* The signal memory
|
|
||||||
*/
|
|
||||||
// float32 *channelsMemory;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter to receive the RPC which allows to change the...
|
* Filter to receive the RPC which allows to change the...
|
||||||
@@ -242,8 +229,10 @@ namespace MARTe {
|
|||||||
*/
|
*/
|
||||||
bool triggerSet;
|
bool triggerSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform ioctl functions
|
||||||
|
*/
|
||||||
bool IoWriteEoWo();
|
bool IoWriteEoWo();
|
||||||
//int32 SetDacReg(uint32 channel, float32 val) const;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,3 +63,11 @@ caput -a ISTTOK:central:ATCAIOP1-EO 14 -393 -28 134 -45 -211 7 -157 -248 -469 -3
|
|||||||
New : ISTTOK:central:ATCAIOP1-WO 16 -0.051 -0.036 -0.289 -0.049 0.024 -0.209 -0.114 -0.09 -0.221 -0.006 -0.167 -0.157 0 0 0 0
|
New : ISTTOK:central:ATCAIOP1-WO 16 -0.051 -0.036 -0.289 -0.049 0.024 -0.209 -0.114 -0.09 -0.221 -0.006 -0.167 -0.157 0 0 0 0
|
||||||
Pulse = 52706 : 4kA 4 semi cycles
|
Pulse = 52706 : 4kA 4 semi cycles
|
||||||
|
|
||||||
|
5 June 2025
|
||||||
|
Pulse => 52960
|
||||||
|
Connected IPLB probe to channel 13
|
||||||
|
|
||||||
|
Pulse => 162
|
||||||
|
➜ ~ caput -a ISTTOK:central:ATCAIOP1-EO 14 -395 -32 140 -5 -206 2 -157 -251 -467 -326 -113 -179 -272 -291
|
||||||
|
➜ ~ caput -a ISTTOK:central:ATCAIOP1-WO 14 -0.001 0.022 0.131 0.017 0.092 -0.096 0.034 -0.090 -0.175 -0.006 -0.118 -0.029 0.077 69.493
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user