Commit 78cd9b15 authored by pf1b's avatar pf1b

Merge branch 'V3.2_191' of https://code.ill.fr/instrument-control/nomad-modules.git into V3.2_191

parents 8fe628b1 895a9dff
......@@ -1253,7 +1253,7 @@ void ExperimentData::sendMailAlarm(const string& mailText) {
// test environment variable
string notificationsString = ServerProperties::getInstance()->getNomadNotifications();
if (notificationsString == "0") {
if ((notificationsString == "0") || (notificationsString == "-1")) {
return;
}
......
......@@ -17,7 +17,6 @@
*/
#include "BaseLogProperties.h"
#include "controllers/common/sample_environment/environment/SampleEnvironmentSelector.h"
#include <InstrumentManager/InstrumentManager.h>
using namespace std;
......@@ -31,6 +30,7 @@ const string BaseLogProperties::ACQTYPE = "log_acqtype";
BaseLogProperties::BaseLogProperties() {
m_TypeOfMeasure = nullptr;
m_EnvironmentSelector = nullptr;
m_SampleSettings = nullptr;
m_MainTcontroller = nullptr;
m_SecTcontroller = nullptr;
......@@ -56,11 +56,11 @@ void BaseLogProperties::configureptr() {
acquisition::TypeOfMeasure::TYPE));
// Check if there an environment selector
sample_environment::EnvironmentSelector* envsel =
m_EnvironmentSelector =
dynamic_cast<sample_environment::EnvironmentSelector*>(InstrumentManager::getInstance()->getFirstExperimentControllerByType(
sample_environment::EnvironmentSelector::TYPE));
if (envsel != nullptr) {
m_SampleSettings = envsel->getActualSampleEnvironment();
if (m_EnvironmentSelector != nullptr) {
m_SampleSettings = m_EnvironmentSelector->getActualSampleEnvironment();
} else {
m_SampleSettings =
dynamic_cast<sample_environment::SampleSettings*>(InstrumentManager::getInstance()->getFirstExperimentControllerByType(
......@@ -84,6 +84,11 @@ void BaseLogProperties::checklog(LogStream& logStream) {
}
logStream.property(logMeasureType);
// Refresh sample settings if necessary.
if (m_EnvironmentSelector != nullptr) {
m_SampleSettings = m_EnvironmentSelector->getActualSampleEnvironment();
}
// Sample environement stuff....
if (m_SampleSettings != nullptr) {
m_MainTcontroller = m_SampleSettings->getMainSampleTempController();
......
......@@ -21,6 +21,7 @@
#include <Controller.h>
#include "controllers/common/acquisition/TypeOfMeasure.h"
#include "controllers/common/sample_environment/environment/SampleEnvironmentSelector.h"
#include "controllers/common/sample_environment/environment/SampleSettings.h"
extern const std::string COUNT_ACQTYPE;
......@@ -62,6 +63,7 @@ public:
private:
acquisition::TypeOfMeasure* m_TypeOfMeasure;
sample_environment::EnvironmentSelector* m_EnvironmentSelector;
sample_environment::SampleSettings* m_SampleSettings;
sampletemperature::SampleTemperatureController* m_MainTcontroller;
sampletemperature::SampleTemperatureController* m_SecTcontroller;
......
......@@ -131,21 +131,18 @@
<simple_label prefix="lss_sample_settings.main_typePrefix"/>
<switchable_composite switcher_key="use_tempSwitcher" switch_values="false">
<property_combo role="lss_sample_settings" property="main_type"/>
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefregirator,DilutionRefregirator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefrigerator,DilutionRefrigerator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<simple_label prefix="lss_sample_settings.main_idPrefix"/>
<property_combo role="lss_sample_settings" property="main_id"/>
</switchable_composite>
<switchable_composite switcher_key="main_idSwitcher" switch_values="V1,V2,V3">
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="true">
<simple_label prefix="lss_sample_settings.first_bath_typePrefix"/>
<property_combo role="lss_sample_settings" property="first_bath_type"/>
<simple_label prefix="lss_sample_settings.first_bath_namePrefix"/>
<property_combo role="lss_sample_settings" property="first_bath_name"/>
<switchable_composite switcher_key="enable_first_external_tempSwitcher" switch_values="true">
<check role="lss_sample_settings" property="use_first_external_temp" prefix="lss_sample_settings.use_first_external_tempPrefix" checkBoxValues="lss_sample_settings.use_first_external_temp"/>
<switchable_composite switcher_key="use_first_external_tempSwitcher" switch_values="true">
<property_combo role="lss_sample_settings" property="first_external_temp"/>
</switchable_composite>
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="true">
<newLine/>
<simple_label prefix="lss_sample_settings.first_bath_namePrefix"/>
<property_combo role="lss_sample_settings" property="first_bath_name"/>
<switchable_composite switcher_key="enable_first_external_tempSwitcher" switch_values="true">
<check role="lss_sample_settings" property="use_first_external_temp" prefix="lss_sample_settings.use_first_external_tempPrefix" checkBoxValues="lss_sample_settings.use_first_external_temp"/>
<switchable_composite switcher_key="use_first_external_tempSwitcher" switch_values="true">
<property_combo role="lss_sample_settings" property="first_external_temp"/>
</switchable_composite>
</switchable_composite>
</switchable_composite>
......@@ -153,29 +150,26 @@
<switchable_composite switcher_key="use_tempSwitcher" switch_values="true">
<label role="lss_sample_settings" property="main_type" font_style="BOLD"/>
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefregirator,DilutionRefregirator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<simple_label prefix="lss_sample_settings.main_idPrefix"/>
<label role="lss_sample_settings" property="main_id" font_style="BOLD"/>
</switchable_composite>
<switchable_composite switcher_key="main_idSwitcher" switch_values="V1,V2,V3">
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="true">
<simple_label prefix="lss_sample_settings.first_bath_typePrefix"/>
<label role="lss_sample_settings" property="first_bath_type"/>
<simple_label prefix="lss_sample_settings.first_bath_namePrefix"/>
<label role="lss_sample_settings" property="first_bath_name"/>
<switchable_composite switcher_key="enable_first_external_tempSwitcher" switch_values="true">
<switchable_composite switcher_key="use_first_external_tempSwitcher" switch_values="true">
<simple_label prefix="lss_sample_settings.use_first_external_tempPrefix"/>
<label role="lss_sample_settings" property="first_external_temp"/>
</switchable_composite>
<simple_label prefix="lss_sample_settings.main_idPrefix"/>
<label role="lss_sample_settings" property="main_id" font_style="BOLD"/>
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="true">
<newLine/>
<simple_label prefix="lss_sample_settings.first_bath_namePrefix"/>
<label role="lss_sample_settings" property="first_bath_name"/>
<switchable_composite switcher_key="enable_first_external_tempSwitcher" switch_values="true">
<switchable_composite switcher_key="use_first_external_tempSwitcher" switch_values="true">
<simple_label prefix="lss_sample_settings.use_first_external_tempPrefix"/>
<label role="lss_sample_settings" property="first_external_temp" font_style="BOLD"/>
</switchable_composite>
</switchable_composite>
</switchable_composite>
</switchable_composite>
<simple_label prefix="lss_sample_settings.parameter_idPrefix"/>
<property_combo role="lss_sample_settings" property="parameter_id"/>
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefrigerator,DilutionRefrigerator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<simple_label prefix="lss_sample_settings.parameter_idPrefix"/>
<property_combo role="lss_sample_settings" property="parameter_id"/>
</switchable_composite>
<newLine/>
......@@ -214,8 +208,6 @@
<switchable_composite switcher_key="use_tempSwitcher" switch_values="false">
<check role="lss_sample_settings" property="use_second_bath" prefix="lss_sample_settings.use_second_bathPrefix" checkBoxValues="lss_sample_settings.use_second_bath"/>
<switchable_composite switcher_key="use_second_bathSwitcher" switch_values="true">
<!-- <simple_label prefix="lss_sample_settings.insert_idPrefix"/> -->
<!-- <property_combo role="lss_sample_settings" property="insert_id"/> -->
<simple_label prefix="lss_sample_settings.second_bath_typePrefix"/>
<property_combo role="lss_sample_settings" property="second_bath_type"/>
<simple_label prefix="lss_sample_settings.second_bath_namePrefix"/>
......@@ -230,8 +222,6 @@
</switchable_composite>
<switchable_composite switcher_key="use_tempSwitcher" switch_values="true">
<switchable_composite switcher_key="use_second_bathSwitcher" switch_values="true">
<!-- <simple_label prefix="lss_sample_settings.insert_idPrefix"/> -->
<!-- <label role="lss_sample_settings" property="insert_id"/> -->
<simple_label prefix="lss_sample_settings.second_bath_typePrefix"/>
<label role="lss_sample_settings" property="second_bath_type"/>
<simple_label prefix="lss_sample_settings.second_bath_namePrefix"/>
......@@ -277,6 +267,10 @@
<check role="lss_sample_settings" property="use_high_voltage" prefix="lss_sample_settings.use_high_voltagePrefix" checkBoxValues="lss_sample_settings.use_high_voltage" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="enable_gonio_stickSwitcher" switch_values="true">
<check role="lss_sample_settings" property="use_gonio_stick" prefix="lss_sample_settings.use_gonio_stickPrefix" checkBoxValues="lss_sample_settings.use_gonio_stick" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="enable_density_cellsSwitcher" switch_values="true">
<check role="lss_sample_settings" property="use_density_cells" prefix="lss_sample_settings.use_density_cellsPrefix" checkBoxValues="lss_sample_settings.use_density_cells" spaceBefore="false"/>
</switchable_composite>
......
......@@ -35,7 +35,7 @@ ReadTemperatureController::ReadTemperatureController (const string& name) :
setFamily(family::SAMPLE_ENVIRONMENT, family::TEMPERATURE);
unit.init(this, SAVE, "unit");
actualTemperature.init(this, SPY, "actual_temperature");
actualTemperature.init(this, SPY, "actual_temperature", "Temperature");
actualTemperature.setUnit(unit);
offsetTemperature.init(this, SAVE, "offset_temperature");
......
......@@ -444,7 +444,7 @@ void SingleCrystalSettings::refreshModeProperty(int32 value) throw (CannotSetVal
updateWantedPsi();
registerRefresher(doOmegaTweek, &SingleCrystalSettings::refreshProperty<bool>, this, m_HKL->doOmegaTweek);
registerUpdater(m_HKL->doOmegaTweek, &SingleCrystalSettings::updateProperty<bool>, this, doOmegaTweek, m_HKL->doOmegaTweek);
m_HKL->doOmegaTweek.update(doOmegaTweek());
doOmegaTweek.update(m_HKL->doOmegaTweek());
}
if (m_Rafin.isAssigned() == true) {
......
......@@ -273,6 +273,12 @@ void LSSSampleSettings::refreshMainControllerTypeProperty(const std::string& val
enableBathSelector = true;
}
}
if (value == BATH_TYPE) {
setFirstExternalTemp();
setFirstBathName();
setSecondExternalTemp();
setSecondBathName();
}
}
else {
enableFirstBath = false;
......
<plugin>
<controller type="lss_sample_settings" role="lss_sample_settings1"/>
<property_switcher role="lss_sample_settings1" property="main_type" switcher_key="main_typeSwitcher"/>
<property_switcher role="lss_sample_settings1" property="enable_first_bath" switcher_key="enable_first_bathSwitcher"/>
<property_switcher role="lss_sample_settings1" property="enable_second_bath" switcher_key="enable_second_bathSwitcher"/>
<property_switcher role="lss_sample_settings1" property="use_second_bath" switcher_key="use_second_bathSwitcher"/>
......@@ -20,6 +21,7 @@
<property_switcher role="lss_sample_settings1" property="enable_pump" switcher_key="enable_pumpSwitcher"/>
<property_switcher role="lss_sample_settings1" property="enable_density_cells" switcher_key="enable_density_cellsSwitcher"/>
<property_switcher role="lss_sample_settings1" property="enable_temp_cells" switcher_key="enable_temp_cellsSwitcher"/>
<property_switcher role="lss_sample_settings1" property="main_id" switcher_key="main_idSwitcher"/>
<group title="lss_sample_settings.temperatureTitle">
<check role="lss_sample_settings1" property="use_temp" prefix="lss_sample_settings.use_tempPrefix" checkBoxValues="lss_sample_settings.use_temp"/>
......@@ -28,8 +30,10 @@
<simple_label prefix="lss_sample_settings.main_typePrefix"/>
<switchable_composite switcher_key="use_tempSwitcher" switch_values="false">
<property_combo role="lss_sample_settings1" property="main_type"/>
<simple_label prefix="lss_sample_settings.main_idPrefix"/>
<property_combo role="lss_sample_settings1" property="main_id"/>
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefrigerator,DilutionRefrigerator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<simple_label prefix="lss_sample_settings.main_idPrefix"/>
<property_combo role="lss_sample_settings1" property="main_id"/>
</switchable_composite>
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="true">
<simple_label prefix="lss_sample_settings.first_bath_namePrefix"/>
<property_combo role="lss_sample_settings1" property="first_bath_name"/>
......@@ -58,6 +62,11 @@
</switchable_composite>
</switchable_composite>
<switchable_composite switcher_key="main_typeSwitcher" switch_values="Cryostat,Cryofurnace,Displex,Furnace,3HeRefrigerator,DilutionRefrigerator,HighMagneticField,EasyMag,Cryostream,HumidityChamber">
<simple_label prefix="lss_sample_settings.parameter_idPrefix"/>
<property_combo role="lss_sample_settings1" property="parameter_id"/>
</switchable_composite>
<newLine/>
<switchable_composite switcher_key="enable_first_bathSwitcher" switch_values="false">
......
......@@ -4,5 +4,7 @@
<plugin class="HplcControllerSetupPlugin" />
<swt_plugin_peer class="SWTHplcControllerSetupPluginPeer" />
</settings>
<command view="hplccontrollerCommandView.xml" />
<command view="hplccontrollerCommandView.xml" >
<plugin class="HplcControllerCommandPlugin" />
</command>
</controller_plugin_config>
\ No newline at end of file
......@@ -73,6 +73,7 @@ HplcController::HplcController(const std::string& controllerName) : ExperimentCo
thresholdLambda.init(this, SAVE, "threshold_lambda");
thresholdCondition.init(this, SAVE, "threshold_condition");
useThreshold.init(this, SAVE|SPY, "use_threshold", "Use Thres.");
timeOutForThreshold.init(this, SAVE, "timeout_threshold");
numExposures.init(this, SAVE, "num_exposures");
exposureTime.init(this, SAVE, "exposure_time");
......@@ -145,6 +146,7 @@ HplcController::HplcController(const HplcController& controller) :
thresholdLambda.copy(this, controller.thresholdLambda);
thresholdCondition.copy(this, controller.thresholdCondition);
useThreshold.copy(this, controller.useThreshold);
timeOutForThreshold.copy(this, controller.timeOutForThreshold);
numExposures.copy(this, controller.numExposures);
exposureTime.copy(this, controller.exposureTime);
......@@ -300,6 +302,7 @@ void HplcController::updateConditionIsReached() {
*/
if (useThreshold()) {
float64 flowRate;
if (m_detector->conditionIsReached()) {
// Change to DataCollect FlowRate
flowRate = dataCollectFlowRate();
......
......@@ -79,6 +79,7 @@ public:
Property<int32> thresholdLambda;
Property<int32> thresholdCondition;
Property<bool> useThreshold;
Property<float64> timeOutForThreshold;
Property<int32> numExposures; // For count management
Property<int32> exposureTime; // For count management
......@@ -149,6 +150,7 @@ private:
static const char DATACOLLECTION_PHASE[];
static const char FINISH_PHASE[];
};
}
......
......@@ -52,6 +52,8 @@ UVUsbDetectorController::UVUsbDetectorController(const std::string& controllerNa
useThreshold.init(this, SAVE, "use_threshold");
threshold.init(this, SAVE, "threshold");
slowDownPumps.init(this, SAVE, "slowdown_pumps");
actualTubePosition.init(this, NOSAVE, "actual_tube_pos", "TubePos");
lambda1.init(this, SAVE | SPY, "lambda1", "Lambda1");
......@@ -124,6 +126,8 @@ UVUsbDetectorController::UVUsbDetectorController(const std::string& controllerNa
actualVolume = 0;
previousVolume = 0;
timeOutValueForThreshold = 0;
// temp property
numor.init(this, NOSAVE, "numor");
......@@ -327,8 +331,6 @@ void UVUsbDetectorController::getData() {
measuredYData = nullptr;
}
float64* tempYData;
tempYData = new float64[size()] {};
measuredYData = new float64[size()]{};
for (int32 i = 0; i < scansToAverage(); i++) {
......@@ -336,7 +338,7 @@ void UVUsbDetectorController::getData() {
m_detectorDriver.execute("start", false);
//y data
tempYData = m_detectorDriver->yData();
float64* tempYData = m_detectorDriver->yData();
for (int32 j = 0; j < size(); j++) {
measuredYData[j] = measuredYData[j] + tempYData[j];
if (i == scansToAverage() - 1) {
......@@ -345,9 +347,6 @@ void UVUsbDetectorController::getData() {
}
}
}
delete[] tempYData;
tempYData = nullptr;
}
void UVUsbDetectorController::cleanBlockData() {
......@@ -598,6 +597,7 @@ void UVUsbDetectorController::checkCondition() {
//The condition can vary: it can be a time, a threshold (in absorbance) or a slope. If no condition just wait until stop or time out value.
if (useThreshold()) {
if ((m_totalDuration.getSeconds() > 8) && ((m_totalDuration.getSeconds()) < timeOutValue())) {
// Threshold is given in absorption units -> Criteria CANNOT be used if we are measuring in intensity
if (thresholdCondition() == ABSORBANCE_THRESHOLD_MODE) {
......@@ -611,6 +611,13 @@ void UVUsbDetectorController::checkCondition() {
} else if (thresholdLambda() == 4) {
lambdaAbsorption = lambda4Value();
}
// Before rewriting local value of m_conditionReached check if it is the first time we have a true value in order to store the time when that happens
if (m_conditionReached == false && (lambdaAbsorption > threshold() == true)) {
// Get time when change happens
timeWhenConditionForThresholdIsReached = common::Date();
}
m_conditionReached = (lambdaAbsorption > threshold());
} else if (thresholdCondition() == SLOPE_THRESHOLD_MODE) {
......@@ -643,6 +650,12 @@ void UVUsbDetectorController::checkCondition() {
// Update property
conditionIsReached.update(m_conditionReached);
// Check time on condition reached
common::Date m_actualTime = common::Date();
common::Duration m_conditionReachedDuration = m_actualTime - timeWhenConditionForThresholdIsReached;
if ((m_conditionReached) && (m_conditionReachedDuration.getSeconds() > timeOutValueForThreshold)) {
}
}
void UVUsbDetectorController::getActualLambdaValueForSlope() {
......@@ -678,6 +691,7 @@ void UVUsbDetectorController::saveSpectraInCountNexusFile() {
memset(tempYBlockData, 0, vectorSize * sizeof(float64));
std::copy(vectorForYData.begin(), vectorForYData.end(), tempYBlockData);
delete [] yDataBlock();
yDataBlock.update(tempYBlockData);
yDataBlock.setSize(vectorSize);
......
......@@ -137,6 +137,12 @@ public:
static const int32 TEMP_NX_FILE;
static const int32 REAL_NX_FILE;
// For threshold timeout management
common::Date timeWhenConditionForThresholdIsReached;
float64 timeOutValueForThreshold;
Property<bool> slowDownPumps;
private:
bool m_hasBeenStopped;
bool m_conditionReached;
......
......@@ -127,6 +127,16 @@ void IN22Settings::refreshUseZetaProperty(bool value) throw (CannotSetValue) {
m_GBF12.init(this, "gbf12");
m_GBF21.init(this, "gbf21");
m_GBF22.init(this, "gbf22");
m_Z11.init(this, "z11");
m_Z12.init(this, "z12");
m_Z21.init(this, "z21");
m_Z22.init(this, "z22");
m_L1.init(this, "l1");
m_L2.init(this, "l2");
m_MC11.init(this, "mc11");
m_MC12.init(this, "mc12");
m_MC21.init(this, "mc21");
m_MC22.init(this, "mc22");
m_ZetaRegistered = true;
}
}
......@@ -204,6 +214,36 @@ void IN22Settings::refreshModeProperty(const std::string& value) throw (CannotSe
if (m_GBF22.isAssigned()) {
m_GBF22->setDisabled(true);
}
if (m_Z11.isAssigned()) {
m_Z11->setDisabled(true);
}
if (m_Z12.isAssigned()) {
m_Z12->setDisabled(true);
}
if (m_Z21.isAssigned()) {
m_Z21->setDisabled(true);
}
if (m_Z22.isAssigned()) {
m_Z22->setDisabled(true);
}
if (m_L1.isAssigned()) {
m_L1->setDisabled(true);
}
if (m_L2.isAssigned()) {
m_L2->setDisabled(true);
}
if (m_MC11.isAssigned()) {
m_MC11->setDisabled(true);
}
if (m_MC12.isAssigned()) {
m_MC12->setDisabled(true);
}
if (m_MC21.isAssigned()) {
m_MC21->setDisabled(true);
}
if (m_MC22.isAssigned()) {
m_MC22->setDisabled(true);
}
}
TasSettings::refreshModeProperty(value);
......@@ -271,6 +311,36 @@ void IN22Settings::refreshModeProperty(const std::string& value) throw (CannotSe
if (m_GBF22.isAssigned()) {
m_GBF22->setEnabled(true);
}
if (m_Z11.isAssigned()) {
m_Z11->setEnabled(true);
}
if (m_Z12.isAssigned()) {
m_Z12->setEnabled(true);
}
if (m_Z21.isAssigned()) {
m_Z21->setEnabled(true);
}
if (m_Z22.isAssigned()) {
m_Z22->setEnabled(true);
}
if (m_L1.isAssigned()) {
m_L1->setEnabled(true);
}
if (m_L2.isAssigned()) {
m_L2->setEnabled(true);
}
if (m_MC11.isAssigned()) {
m_MC11->setEnabled(true);
}
if (m_MC12.isAssigned()) {
m_MC12->setEnabled(true);
}
if (m_MC21.isAssigned()) {
m_MC21->setEnabled(true);
}
if (m_MC22.isAssigned()) {
m_MC22->setEnabled(true);
}
// Enabling configuration changed and notifying a configuration changed
getServantManager()->enableConfigurationChanged();
......@@ -339,6 +409,16 @@ void IN22Settings::test() {
m_GBF12->test();
m_GBF21->test();
m_GBF22->test();
m_Z11->test();
m_Z12->test();
m_Z21->test();
m_Z22->test();
m_L1->test();
m_L2->test();
m_MC11->test();
m_MC12->test();
m_MC21->test();
m_MC22->test();
// mode = UFO_MODE;
// m_SampleOrienter->test();
......
......@@ -27,6 +27,7 @@
#include "../common/TasSettings.h"
#include "../common/SimpleMonoCurves.h"
#include "controllers/common/axis/AxisController.h"
#include "controllers/common/frequency/RFController.h"
#include "controllers/common/current/CurrentController.h"
#include "controllers/common/voltage/ReadVoltageController.h"
......@@ -121,6 +122,19 @@ private:
ControllerPtr<frequency::FrequencyController> m_GBF21;
ControllerPtr<frequency::FrequencyController> m_GBF22;
ControllerPtr<axis::AxisController> m_Z11;
ControllerPtr<axis::AxisController> m_Z12;
ControllerPtr<axis::AxisController> m_Z21;
ControllerPtr<axis::AxisController> m_Z22;
ControllerPtr<axis::AxisController> m_L1;
ControllerPtr<axis::AxisController> m_L2;
ControllerPtr<axis::AxisController> m_MC11;
ControllerPtr<axis::AxisController> m_MC12;
ControllerPtr<axis::AxisController> m_MC21;
ControllerPtr<axis::AxisController> m_MC22;
virtual void test();
//! Refreshers
......
......@@ -554,6 +554,25 @@ void RealMpdaDPPDriver::readCurves(int32 localStatus) {
buf4[i * 2] = ((buf[i] >> 14) & 0X1) * 1000;
buf4[i * 2 + 1] = ((buf[i] >> 30) & 0X1) * 1000;
}
// HACK PATRICK V1725 TIMIG FILTER 01/08/2019
/* for (int i = 0; i < size / 2; ++i) {
buf1[i * 2] = 2*((buf[i] & 0x3FFF)<0x2000 ? buf[i] & 0x1FFF : - (0x2000 - (buf[i] & 0x1FFF)));
buf1[i * 2 + 1] = 2*(((buf[i]>>16) & 0x3FFF)<0x2000 ? (buf[i]>>16) & 0x1FFF : - (0x2000 - ((buf[i]>>16) & 0x1FFF)));
buf2[i * 2] = 0;
buf2[i * 2 + 1] = 0;
buf3[i * 2] = ((buf[i] >> 14) & 0X1) * 1000;
buf3[i * 2 + 1] = ((buf[i] >> 14) & 0X1) * 1000;
buf4[i * 2] = ((buf[i] >>30) & 0X1) * 1000;
buf4[i * 2 + 1] = ((buf[i] >> 30) & 0X1) * 1000;
}
*/
}
int32 value = 0;
owner()->write(SCOPE_READ_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
......
......@@ -88,6 +88,7 @@ void RealXN06Driver::read() {
// Read time register
int32 detector = m_buffer[1] & DETECTOR_NB_MASK;
m_owner->updateValue(DETECTOR_PROPERTY, detector+1);
// std::cout << "detector = " << detector << std::endl;
int32 hourTime = (m_buffer[1] & TIME_HOUR_MASK) >> 4;
m_owner->updateValue(HOUR_TIMER_PROPERTY, hourTime);
int32 minuteTime = (m_buffer[1] & TIME_MINUTE_MASK) >> 9;
......
......@@ -48,7 +48,6 @@ void RealRedPitayaDriver::init() {
* read
*/
void RealRedPitayaDriver::read() {
owner()->voltage.update((float64) owner()->readHoldingRegister(VOLTAGE_REGISTER));
owner()->actualFrequency.update((float64) owner()->readHoldingRegister(FREQUENCY_REGISTER));
}
......
......@@ -25,7 +25,7 @@ static const int32 ADDRESS = 1;
//! Registers addresses
static const int32 VOLTAGE_REGISTER = 0;
static const int32 FREQUENCY_REGISTER = 2;
static const int32 FREQUENCY_REGISTER = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment