Commit dc140e64 authored by Cristina Cocho's avatar Cristina Cocho

Local modifications on D22 instrument

parent b9cf8eae
......@@ -59,6 +59,7 @@ void SpeedCommon::constructor() {
wantedSpeed.init(this, SAVE, "wanted_speed");
actualSpeed.init(this, NOSAVE, "actual_speed");
useHisto.init(this, SAVE, "use_histo");
initCommand(SPEED_MOVE_COMMAND);
......
......@@ -63,6 +63,7 @@ public:
*/
Property<float64> wantedSpeed;
Property<float64> actualSpeed;
Property<bool> useHisto;
};
......
......@@ -436,7 +436,7 @@ void DetectorElement::setData() {
}
}
for (uint32 i = 0; i < globalsize; ++i) {
m_LinearData[i] = round(new_data[i]);
m_LinearData[i] = (int32 ) Calculations::round(new_data[i]);
}
delete[] new_data;
......
......@@ -152,19 +152,19 @@ void DualPump::refreshUnitA(const std::string& volumeUnit) throw (CannotSetValue
}
void DualPump::refreshRateA(float64 rate) throw (CannotSetValue) {
m_syringe->rateA.setpoint = rate;
//m_syringe->rateA.setpoint = rate;
}
void DualPump::refreshForceA(int32 force) throw (CannotSetValue) {
m_syringe->forceA.setpoint = force;
//m_syringe->forceA.setpoint = force;
}
void DualPump::refreshRateAUnit(const std::string& rateUnit) throw (CannotSetValue) {
m_syringe->rate_unitA.setpoint = rateUnit;
//m_syringe->rate_unitA.setpoint = rateUnit;
}
void DualPump::refreshDiameterA(float64 diameter) throw (CannotSetValue) {
m_syringe->diameterA.setpoint = diameter;
//m_syringe->diameterA.setpoint = diameter;
}
//void DualPump::updateWantedVolumeA() {
......@@ -190,19 +190,19 @@ void DualPump::refreshUnitB(const std::string& volumeUnit) throw (CannotSetValue
}
void DualPump::refreshRateB(float64 rate) throw (CannotSetValue) {
m_syringe->rateB.setpoint = rate;
//m_syringe->rateB.setpoint = rate;
}
void DualPump::refreshForceB(int32 force) throw (CannotSetValue) {
m_syringe->forceB.setpoint = force;
//m_syringe->forceB.setpoint = force;
}
void DualPump::refreshRateBUnit(const std::string& rateUnit) throw (CannotSetValue) {
m_syringe->rate_unitB.setpoint = rateUnit;
// m_syringe->rate_unitB.setpoint = rateUnit;
}
void DualPump::refreshDiameterB(float64 diameter) throw (CannotSetValue) {
m_syringe->diameterB.setpoint = diameter;
//m_syringe->diameterB.setpoint = diameter;
}
//
//void DualPump::updateWantedVolumeB() {
......@@ -237,17 +237,30 @@ void DualPump::start() {
commandProgression = 0;
//writeParameters();
m_syringe->syringeId=line();
m_syringe->mode.setpoint=mode();
m_syringe->rate_unitA.setpoint = rateAUnit();
m_syringe->rate_unitB.setpoint = rateBUnit();
m_syringe->diameterA.setpoint=diameterA();
m_syringe->diameterB.setpoint=diameterB();
m_syringe->tvolumeA.setpoint=volumeA.setpoint();
m_syringe->tvolume_unitA.setpoint= unitA();
m_syringe->tvolumeB.setpoint=volumeB.setpoint();
m_syringe->tvolume_unitB.setpoint = unitB();
m_syringe->rateB.setpoint=rateB();
m_syringe->rateA.setpoint=rateA();
m_syringe->direction.setpoint=direction();
// sleep(4);
commandStatus.setRunning();
resetVolume() ;
sleep(2);
writeParameters();
sleep(2);
m_syringe.execute(COMMAND_MOVE_DEVICE_CONTAINER, true);
cout << "start 2" << endl;
commandStatus.setIdle();
// m_syringe.execute(COMMAND_READ_DEVICE_CONTAINER, true);
}
......
......@@ -126,6 +126,7 @@ void LSSWavelength::postConfiguration() {
registerRefresher(offset, &LSSWavelength::refresOffset, this);
registerUpdater(m_Selector->speed, &LSSWavelength::updateActualSpeed, this);
registerUpdater(m_SelRot->position, &LSSWavelength::updateSelAngle, this);
updateActualSpeed();
updateSelAngle();
......
......@@ -298,8 +298,8 @@ void SampleSequencer::start() {
slot.update(i);
try {
if (apply_acquisitionTime[i] != 0.0) {
sampleChanger->slot.setpoint = apply_samplePosition[i];
sampleChanger->changer = changer();
sampleChanger->slot.setpoint = apply_samplePosition[i];
try {
count->time.setpoint = apply_acquisitionTime[i];
......
......@@ -3,6 +3,6 @@
<image key="PUMP"/>
<settings view="dualpumpView.xml"/>
<command view="dualpumpCommandView.xml"/>
<command view="dualpumpCommandView.xml" backgroundable="true"/>
</controller_plugin_config>
<plugin>
<controller type="dualpump" role="dualpump1"/>
<title>
<graphical_switcher switcher_key="simpleAdvancedModeSwitcher" switcher_type="button"/>
</title>
<property_switcher role="dualpump1" property="mode" switcher_key="modeSwitcher" />
<property_switcher role="dualpump1" property="line" switcher_key="lineSwitcher" />
<group prefix="dualpump.experimentParameters">
<property_switcher role="dualpump1" property="mode" switcher_key="modeSwitcher" />
<combo role="dualpump1" property="mode" valuesAndLabels="p33dds.indep,p33dds.reciproque,p33dds.twin" prefix="p33dds.modePrefix"/>
<combo role="dualpump1" property="direction" valuesAndLabels="p33dds.infuse,p33dds.withdraw" prefix="p33dds.directionPrefix"/>
<combo role="dualpump1" property="mode" valuesAndLabels="p33dds.indep,p33dds.reciproque,p33dds.twin" prefix="p33dds.modePrefix"/>
<combo role="dualpump1" property="direction" valuesAndLabels="p33dds.infuse,p33dds.withdraw" prefix="p33dds.directionPrefix"/>
</group>
<newLine/>
<switchable_composite switcher_key="simpleAdvancedModeSwitcher" switch_values="MORE_OPTIONS_BUTTON"/>
<switchable_composite switcher_key="simpleAdvancedModeSwitcher" switch_values="LESS_OPTIONS_BUTTON">
<newLine/>
<group title="dualpump.syringeParameters">
<newLine/>
<switchable_composite switcher_key="modeSwitcher" switch_values="Independent">
<newLine/>
<switchable_composite switcher_key="modeSwitcher" switch_values="Independent">
<newLine/>
<property_switcher role="dualpump1" property="line" switcher_key="lineSwitcher" />
<combo role="dualpump1" property="line" prefix="p33dds.syringeIdPrefix" valuesAndLabels="p33dds.syringeA,p33dds.syringeB,p33dds.syringeAB" font_style="BOLD"/>
<newLine/>
<newLine/>
......@@ -165,18 +141,11 @@
</group>
</switchable_composite>
</group>
<newLine/>
</group>
<newLine/>
<button role="dualpump1" command="raz" prefix="p33dds.resetVolume"/>
<button role="dualpump1" command="writeparams" prefix="p33dds.writeParam"/>
<button role="dualpump1" command="raz" prefix="p33dds.resetVolume"/>
<button role="dualpump1" command="writeparams" prefix="p33dds.writeParam"/>
</switchable_composite>
</plugin>
......@@ -256,7 +256,7 @@ void D22Settings::start() {
//12/12/16: Execute movement in two block due to problems with card
m_colSetup->startWithoutShutterCommand(); //do not move the shutter in colSetup controller!!
if (m_det->position.setpoint()<3){
if (m_det->position.setpoint()<3){
if (abs(m_det->position.setpoint() - m_det->position())>m_det->axisDriver->tolerance()){
m_dtr->position.setpoint =0;
m_dtr->startCommand();
}
......@@ -308,6 +308,8 @@ void D22Settings::start() {
log(Level::s_Info) << "Wavelength " << m_wavelength->wavelength << " Detector " << m_det->position << " DTR " << m_dtr->position << " Collimator " << m_colSetup->selectedColSetup << " " << DIAMODE[diaphragmMode()] << " Bx " << m_bx->position << " By " << m_by->position << " Attenuator " << m_att->state << endlog;
commandProgression = 100;
} catch (CannotSetValue& error) {
......
......@@ -23,7 +23,7 @@ namespace d22 {
const std::string AkdController::TYPE = "akd_controller";
AkdController::AkdController(const std::string & contName) :
ExperimentController(contName), controller::Stoppable(this) {
ExperimentController(contName), controller::Stoppable(this) {
frequency.init(this, SAVE, "actual_frequency", "wanted_frequency", "frequency");
amplitude.init(this, SAVE, "actual_amplitude", "wanted_amplitude", "amplitude");
......@@ -32,11 +32,13 @@ AkdController::AkdController(const std::string & contName) :
pulseOne.init(this, SAVE, "pulse_one", "pulse1");
pulseTwo.init(this, SAVE, "pulse_two", "pulse2");
setPosition.init(this, SAVE, "set_position", "set pos");
useHisto.init(this, SAVE, "use_histo");
execMode.init(this, SAVE, "exec_mode");
status.init(this, SAVE, "status", "Status");
statusFunction.init(this, NOSAVE, "status_function");
ratio.init(this, SAVE, "ratio");
duration.init(this, SAVE, "duration");
m_Driver.init(this, "driver");
......@@ -73,6 +75,8 @@ void AkdController::postConfiguration() {
void AkdController::start() {
//Avoid not having the property execMode correctly updated
m_Driver->execMode = execMode();
m_Driver->useHisto =useHisto();
m_Driver->duration =duration();
commandProgression = 10;
commandStatus.setRunning();
......@@ -85,6 +89,7 @@ void AkdController::start() {
}
void AkdController::stop() {
m_Driver->useHisto =useHisto();
m_Driver.execute(STOP_COMMAND, false);
commandProgression = 100;
commandStatus.setIdle();
......
......@@ -40,6 +40,8 @@ public:
Property<int32> status;
Property<int32> statusFunction;
Property<int32> ratio;
Property<int32> duration;
Property<bool> useHisto;
static const std::string TYPE;
......
......@@ -38,7 +38,7 @@ D22Collimation::D22Collimation(const std::string & contName) :
selectedColAxis.init(this, SAVE|SPY, "selected_colAxis", "Selected");
directionColAxis.init(this, SAVE, "direction_colAxis");
directionColAxisLabel.init(this, SAVE|SPY, "direction_colAxisLabel", "Type");
position.init(this, SAVE, "actual_position", "wanted_position", "Position");
position.init(this, SAVE|SPY, "actual_position", "wanted_position", "Position");
positionIn.init(this, SAVE, "in_colPosition");
positionOut.init(this, SAVE, "out_colPosition");
minPosition.init(this, SAVE, "min_colPosition");
......@@ -311,6 +311,8 @@ void D22Collimation::start() {
//Move only the axis selected
try {
commandStatus.setRunning();
if (selectedColAxis() == "Col1") {
if (directionColAxis() == "In") {
//IN
......@@ -484,8 +486,10 @@ void D22Collimation::start() {
} */
}
} catch (CannotSetValue &) {
commandStatus.setIdle();
}
commandStatus.setIdle();
commandProgression = 100;
}
......
......@@ -192,6 +192,7 @@ void D22CollimationSetup::updateDirectionColInfo() {
void D22CollimationSetup::start() {
m_stopActivated = false;
commandStatus.setRunning();
log(Level::s_Info) << name << cursor << selectedColSetup() << endlog;
......@@ -253,7 +254,8 @@ void D22CollimationSetup::start() {
m_fastShutter->setOpen();
m_fastShutter->startCommand();
} catch (CannotSetValue&) {
}
commandStatus.setIdle();
}
}
//Just at the end...set up value of "selected_ApertInfo"
......@@ -263,11 +265,13 @@ void D22CollimationSetup::start() {
log(Level::s_Info) << name << " " << selectedColSetup() << " reached" << endlog;
commandProgression = 100;
commandStatus.setIdle();
}
void D22CollimationSetup::startWithoutShutter() {
m_stopActivated = false;
commandStatus.setRunning();
//In this method we assume there is a higher controller that moves the shutter.
//Only verify it is closed.
......@@ -316,6 +320,7 @@ void D22CollimationSetup::startWithoutShutter() {
//Just at the end...set up value of "selected_ApertInfo"
decodeAperture(selectedColSetup());
}
commandStatus.setIdle();
commandProgression = 100;
......
......@@ -19,6 +19,10 @@ akd_controller.ratioPrefix=Ratio: 1 /
akd_controller.statusFunctionPrefix=Status Function:
akd_controller.sinusConditionInfo=Be careful, remember that: (Amplitude * ratio) * Frequence < 2740
akd_controller.sinusConditionInfoShort= ( < 2740)
akd_controller.useHistoUncheckedValue=false
akd_controller.useHistoCheckedValue=true
akd_controller.useHistoPrefix=Use Histo
akd_controller.durationPrefix=Duration
#Groups
akd_controller.speedGroup=Speed
......@@ -30,14 +34,14 @@ akd_controller.frequencyGroup=Frequency
akd_controller.frequencyUnit=Hz
akd_controller.speedUnit=rpm
akd_controller.degreeUnit=~degree
akd_controller.msUnit=ms
#Values & Labels of Mode Combo
akd_controller.modeStopValue=0
akd_controller.modeStopLabel=Stop
akd_controller.modeSpeedValue=1
akd_controller.modeSpeedLabel=Speed mode
akd_controller.modeSinuValue=2
akd_controller.modeSinuLabel=Sinu mode
akd_controller.modeSinuLabel=Sinus mode
akd_controller.modePositionValue=3
akd_controller.modePositionLabel=Position mode
akd_controller.modeSetPositionValue=4
......@@ -46,6 +50,8 @@ akd_controller.modeSetPositionLabel=Set Feedback
#Values & Labels of Ratio
akd_controller.ratio1Value=1
akd_controller.ratio1Label=Ratio: 1 / 1
akd_controller.ratio3Value=3
akd_controller.ratio3Label=Ratio: 1 / 3
akd_controller.ratio10Value=10
akd_controller.ratio10Label=Ratio: 1 / 10
akd_controller.ratio100Value=100
......
<plugin>
<controller type="akd_controller" role="akd_controller1"/>
<number_of_lines nb_lines="2"/>
<number_of_lines nb_lines="3"/>
<property_switcher role="akd_controller1" property="exec_mode" switcher_key="modeSwitcher" />
<check role="akd_controller1" property="use_histo" prefix="akd_controller.useHistoPrefix" checkBoxValues="akd_controller.useHisto"/>
<combo role="akd_controller1" property="exec_mode" valuesAndLabels="akd_controller.modeSpeed,akd_controller.modeSinu,akd_controller.modePosition,akd_controller.modeStop,akd_controller.modeSetPosition" />
<switchable_composite switcher_key="modeSwitcher" switch_values="1">
<text role="akd_controller1" property="wanted_speed" prefix="akd_controller.wanted_speedPrefix" suffix="akd_controller.speedUnit" />
<label role="akd_controller1" property="actual_speed" prefix="akd_controller.actual_speedPrefix" spaceBefore="false"/>
<newLine />
<text role="akd_controller1" property="duration" prefix="akd_controller.durationPrefix" suffix="akd_controller.msUnit" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="2">
<text role="akd_controller1" property="wanted_frequency" prefix="akd_controller.wanted_frequencyCommandPrefix" suffix="akd_controller.frequencyUnit"/>
......@@ -14,6 +17,8 @@
<newLine />
<text role="akd_controller1" property="pulse_one" prefix="akd_controller.pulse_onePrefix" suffix="akd_controller.degreeUnit"/>
<text role="akd_controller1" property="pulse_two" prefix="akd_controller.pulse_twoPrefix" suffix="akd_controller.degreeUnit"/>
<newLine />
<text role="akd_controller1" property="duration" prefix="akd_controller.durationPrefix" suffix="akd_controller.msUnit" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="3">
<text role="akd_controller1" property="wanted_position" prefix="akd_controller.wanted_positionPrefix"/>
......
......@@ -2,6 +2,9 @@
<property name="ratio" type="int32" max_length="3">
<strictly_positive/>
</property>
<property name="duration" type="int32" max_length="10">
<positive/>
</property>
<property name="actual_position" type="float64" max_length="12">
<decimal_format nb_decimal_places="3"/>
</property>
......@@ -35,5 +38,7 @@
<property name="wanted_speed" type="float64" max_length="12">
<decimal_format nb_decimal_places="3"/>
</property>
<property name="use_histo" type="Boolean" >
</property>
</controller>
\ No newline at end of file
<plugin>
<controller type="akd_controller" role="akd_controller1" />
<property_switcher role="akd_controller1" property="exec_mode" switcher_key="modeSwitcher" />
<check role="akd_controller1" property="use_histo" prefix="akd_controller.useHistoPrefix" checkBoxValues="akd_controller.useHisto"/>
<combo role="akd_controller1" property="exec_mode" valuesAndLabels="akd_controller.modeSpeed,akd_controller.modeSinu,akd_controller.modePosition,akd_controller.modeSetPosition" />
<newLine />
<switchable_composite switcher_key="modeSwitcher" switch_values="1">
<label role="akd_controller1" property="actual_speed" prefix="akd_controller.actual_speedPrefix" suffix="akd_controller.speedUnit" />
<label role="akd_controller1" property="actual_speed" prefix="akd_controller.actual_speedPrefix" suffix="akd_controller.speedUnit" />
<newLine />
<text role="akd_controller1" property="wanted_speed" prefix="akd_controller.wanted_speedPrefix" suffix="akd_controller.speedUnit" />
<newLine />
<text role="akd_controller1" property="duration" prefix="akd_controller.durationPrefix" suffix="akd_controller.msUnit" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="2">
<table_composite nbColumns="2" border="false">
......@@ -18,6 +21,8 @@
<text role="akd_controller1" property="wanted_amplitude" prefix="akd_controller.wanted_amplitudePrefix" suffix="akd_controller.degreeUnit"/>
<text role="akd_controller1" property="pulse_two" prefix="akd_controller.pulse_twoPrefix" suffix="akd_controller.degreeUnit"/>
</table_composite>
<newLine />
<text role="akd_controller1" property="duration" prefix="akd_controller.durationPrefix" suffix="akd_controller.msUnit" spaceBefore="false"/>
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="3">
<label role="akd_controller1" property="actual_position" prefix="akd_controller.actual_positionPrefix" suffix="akd_controller.degreeUnit" spaceBefore="false"/>
......@@ -33,7 +38,7 @@
<newLine />
<button role="akd_controller1" command="stop" prefix="akd_controller.stopCommand" />
<newLine/>
<combo role="akd_controller1" property="ratio" valuesAndLabels="akd_controller.ratio1,akd_controller.ratio10,akd_controller.ratio100" />
<combo role="akd_controller1" property="ratio" valuesAndLabels="akd_controller.ratio1,akd_controller.ratio3,akd_controller.ratio10,akd_controller.ratio100" />
<!-- <text role="akd_controller1" property="ratio" prefix="akd_controller.ratioPrefix"/> -->
<summary>
<summary_content>
......
......@@ -47,3 +47,6 @@ collectorcontroller.fractionVolumePrefix=Fraction Volume
collectorcontroller.flowDelayPrefix=Flow Delay
collectorcontroller.actualTubePrefix=Actual Tube
collectorcontroller.secondsTube=Sec/Tube
collectorcontroller.seconds=Sec.
......@@ -7,7 +7,15 @@
-->
<group title="collectorcontroller.methodSelectionGroup">
<combo role="collectorcontroller1" property="collection_mode" valuesAndLabels="collectorcontroller.mode1,collectorcontroller.mode2,collectorcontroller.mode3,collectorcontroller.mode10,collectorcontroller.mode11" />
<switchable_composite switcher_key="modeSwitcher" switch_values="1,2,3">
<switchable_composite switcher_key="modeSwitcher" switch_values="1">
<text role="collectorcontroller1" property="fraction_volume" prefix="collectorcontroller.fractionVolumePrefix" suffix="collectorcontroller.secondsTube" spaceBefore="false" />
<text role="collectorcontroller1" property="flow_delay" prefix="collectorcontroller.flowDelayPrefix" suffix="collectorcontroller.seconds" spaceBefore="false" />
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="2">
<text role="collectorcontroller1" property="fraction_volume" prefix="collectorcontroller.fractionVolumePrefix" spaceBefore="false" />
<text role="collectorcontroller1" property="flow_delay" prefix="collectorcontroller.flowDelayPrefix" spaceBefore="false" />
</switchable_composite>
<switchable_composite switcher_key="modeSwitcher" switch_values="3">
<text role="collectorcontroller1" property="fraction_volume" prefix="collectorcontroller.fractionVolumePrefix" spaceBefore="false" />
<text role="collectorcontroller1" property="flow_delay" prefix="collectorcontroller.flowDelayPrefix" spaceBefore="false" />
</switchable_composite>
......
hplc_valve.valveAntePos1Message=Sample injection on column H; column D elution
hplc_valve.valveAntePos2Message=Sample injection on column D; column H elution
hplc_valve.valvePostPos1Message=Column H to waste; column D to SANS and foxy
hplc_valve.valvePostPos2Message=Column D to waste; column H to SANS and foxy
hplc_valve.valveAntePos1Message=Sample injection on column D; column H elution
hplc_valve.valveAntePos2Message=Sample injection on column H; column D elution
hplc_valve.valvePostPos1Message=Column D to waste; column H to SANS and foxy
hplc_valve.valvePostPos2Message=Column H to waste; column D to SANS and foxy
#Group Testing
hplc_valve.wantedValvePrefix=Valve position
......
......@@ -66,8 +66,10 @@ hplccontroller_twocolumns.pos6Label=6
# Threshold Mode combo
hplccontroller_twocolumns.absorbanceModeValue=0
hplccontroller_twocolumns.slopeModeValue=1
hplccontroller_twocolumns.timeModeValue=2
hplccontroller_twocolumns.absorbanceModeLabel=Absorbance (a.u.)
hplccontroller_twocolumns.slopeModeLabel=Slope (a.u./mL)
hplccontroller_twocolumns.timeModeLabel=Time (sec.)
# Threshold lambda combo
hplccontroller_twocolumns.lambda1Value=1
......
<plugin>
<controller type="hplccontroller_twocolumns" role="hplccontroller_twocolumns1" />
<property_switcher role="hplccontroller_twocolumns1" property="threshold_condition" switcher_key="thresholdConditionSwitcher" />
<simple_label prefix="hplccontroller_twocolumns.experimentType" hAlignment="center" />
<simple_label prefix="hplccontroller_twocolumns.2ColumnType" font_style="BOLD" hAlignment="center" />
......@@ -23,8 +24,10 @@
<newLine />
<check role="hplccontroller_twocolumns1" property="use_threshold" checkBoxValues="hplccontroller_twocolumns.useThreshold" />
<text role="hplccontroller_twocolumns1" property="dataCol_FlowRate" prefix="hplccontroller_twocolumns.collectionFlowRatePrefix" suffix="hplccontroller_twocolumns.flowRateUnitSuffix"/>
<combo role="hplccontroller_twocolumns1" property="threshold_condition" prefix="hplccontroller_twocolumns.thresholdConditionPrefix" valuesAndLabels="hplccontroller_twocolumns.absorbanceMode,hplccontroller_twocolumns.slopeMode" />
<combo role="hplccontroller_twocolumns1" property="threshold_lambda" prefix="hplccontroller_twocolumns.thresholdLambdaPrefix" valuesAndLabels="hplccontroller_twocolumns.lambda1,hplccontroller_twocolumns.lambda2,hplccontroller_twocolumns.lambda3,hplccontroller_twocolumns.lambda4" />
<combo role="hplccontroller_twocolumns1" property="threshold_condition" prefix="hplccontroller_twocolumns.thresholdConditionPrefix" valuesAndLabels="hplccontroller_twocolumns.absorbanceMode,hplccontroller_twocolumns.slopeMode,hplccontroller_twocolumns.timeMode" />
<switchable_composite switcher_key="thresholdConditionSwitcher" switch_values="0,1">
<combo role="hplccontroller_twocolumns1" property="threshold_lambda" prefix="hplccontroller_twocolumns.thresholdLambdaPrefix" valuesAndLabels="hplccontroller_twocolumns.lambda1,hplccontroller_twocolumns.lambda2,hplccontroller_twocolumns.lambda3,hplccontroller_twocolumns.lambda4" />
</switchable_composite>
<text role="hplccontroller_twocolumns1" property="threshold" prefix="hplccontroller_twocolumns.thresholdValuePrefix" />
<newLine />
......
......@@ -11,7 +11,7 @@
<property name="channel_d" type="int32" max_length="3">
<range min_included="0" max_included="100"/>
</property>
<property name="flow_rate" type="float64" max_length="6">
<property name="wanted_flow_rate" type="float64" max_length="6">
<decimal_format nb_decimal_places="3"/>
</property>
</controller>
\ No newline at end of file
......@@ -27,6 +27,7 @@ const std::string ASCIIUVDetectorController::TYPE = "asciiuvdetectorcontroller";
const int32 ASCIIUVDetectorController::ABSORBANCE_THRESHOLD_MODE = 0;
const int32 ASCIIUVDetectorController::SLOPE_THRESHOLD_MODE = 1;
const int32 ASCIIUVDetectorController::TIME_THRESHOLD_MODE = 2;
ASCIIUVDetectorController::ASCIIUVDetectorController(const std::string& controllerName) :
UVDetectorController(controllerName), MakeAutozero(this) {
......@@ -288,6 +289,9 @@ bool ASCIIUVDetectorController::conditionReached() {
// Once used, reset values
previousVolume = actualVolume;
previousLambdaValue = actualLambdaValue;
} else if (thresholdCondition() == TIME_THRESHOLD_MODE) {
m_conditionReached = (m_durationNoCollection.getSeconds() > threshold());
}
}
......
......@@ -114,6 +114,7 @@ private:
static const int32 ABSORBANCE_THRESHOLD_MODE;
static const int32 SLOPE_THRESHOLD_MODE;
static const int32 TIME_THRESHOLD_MODE;
};
......
......@@ -154,6 +154,8 @@ void HplcControllerTwoColumnMode::postConfiguration() {
columnVolumeD = 1; // ml
columnMeasured = COLUMN_H;
saveCountData = true;
registerRefresher(samplePosition, &HplcControllerTwoColumnMode::refreshSamplePosition, this);
registerRefresher(columnVolumeH, &HplcControllerTwoColumnMode::refreshColumnVolumeH, this);
registerRefresher(columnVolumeD, &HplcControllerTwoColumnMode::refreshColumnVolumeH, this);
......@@ -363,12 +365,12 @@ void HplcControllerTwoColumnMode::configureControllers() {
m_collector->collectionMode = foxy_r1::TIME_MODE; // Default set up
m_collector->fractionVolume = fractionVolume() * 60; // In seconds
if (useThreshold()) {
m_collector->flowDelay = (63.7 / (dataCollectFlowRate() * 1000)) * 60; // 63,7 microLiters. IN SECONDS
} else {
m_collector->flowDelay = (63.7 / (elutionFlowRate() * 1000)) * 60; // 63,7 microLiters. IN SECONDS
}
m_collector->flowDelay = 0;
// if (useThreshold()) {
// m_collector->flowDelay = (63.7 / (dataCollectFlowRate() * 1000)) * 60; // 63,7 microLiters. IN SECONDS
// } else {
// m_collector->flowDelay = (63.7 / (elutionFlowRate() * 1000)) * 60; // 63,7 microLiters. IN SECONDS
// }
if (collectInInitialPos()) {
m_collector->resetPosition();
}
......@@ -393,12 +395,12 @@ void HplcControllerTwoColumnMode::configureControllers() {
m_detector->init(); // do init here because it involves dummy reads that take time
// Set up Count
m_count->time.setpoint = exposureTime();
m_count->timeType = "s";
m_count->totalReps = numExposures();
m_count->saveData = saveCountData();
m_count->subtitle = sampleName();
}
void HplcControllerTwoColumnMode::doDataAcquisition() {
......
......@@ -85,7 +85,7 @@ void TCPBlueShadowPump40PDriver::execute(const std::string& command) {
} else if (command == COMMAND_START_DEVICE_CONTAINER) {
startActivated = true;
currentState->start();
commandProgression = 10;
commandProgression = PROGRESSION_END_DEVICE_CONTAINER;
} else if (command == COMMAND_STOP_DEVICE_CONTAINER) {
startActivated = false;
......
......@@ -37,6 +37,8 @@ void TCPRealBlueShadowPump40PDriver::init() {
// Connect the computer.
owner()->connect();
usleep(100000);
setRemote();
}
......
......@@ -93,7 +93,7 @@ void RealFoxyR1Driver::start() {
cout << " Volume request: " << volumeRequest.str() << endl;
usleep(100000);
// Print reply of FTYPE
// Print reply of FSIZE
ostringstream actualvolumeRequest;
actualvolumeRequest << FSIZE << RETURN;
owner()->write(actualvolumeRequest.str());
......@@ -160,6 +160,7 @@ void RealFoxyR1Driver::stop() {
usleep(100000);
stopRequest << STOP << RETURN;
owner()->write(stopRequest.str());
cout << "----------------> writing stop request: " << stopRequest.str() << endl ;
}
void RealFoxyR1Driver::pause() {
......
......@@ -54,7 +54,11 @@ AkdDriver::AkdDriver(const string& name) :
pulseOne.init(this, SAVE, "pulse_one", "pulse1");
pulseTwo.init(this, SAVE, "pulse_two", "pulse2");
setPosition.init(this, SAVE, "set_position", "set pos");
duration.init(this, SAVE, "duration", "duration");
histoPosition.init(this, SAVE, "histo_pos");
histoSpeed.init(this, SAVE, "histo_speed");
getHisto.init(this, NOSAVE, "get_histo");
execMode.init(this, SAVE, "exec_mode");
ratio.init(this, SAVE, "ratio");
statusFunction.init(this, NOSAVE, "status_function");
......@@ -68,6 +72,19 @@ AkdDriver::AkdDriver(const string& name) :
updateValue(DEVICE_TYPE_DEVICE_CONTAINER, string(LEAF_DEVICE_TYPE_DEVICE_CONTAINER));
// Create array for histo
m_HistoPosition = new float64[1000];
memset(m_HistoPosition, 0, 1000 * sizeof(float64));
histoPosition.update(m_HistoPosition);
histoPosition.setSize(1000);
m_HistoSpeed = new float64[1000];
memset(m_HistoSpeed, 0, 1000 * sizeof(float64));
histoSpeed.update(m_HistoSpeed);
histoSpeed.setSize(1000);
useHisto=true;
registerSpyCommand(COMMAND_READ_DEVICE_CONTAINER, 2);
registerSpyCommand(COMMAND_STATUS_DEVICE_CONTAINER, 2);
registerObserverCommand(COMMAND_READ_DEVICE_CONTAINER, 1);
......@@ -75,6 +92,7 @@ AkdDriver::AkdDriver(const string& name) :
}
AkdDriver::~AkdDriver() {
delete[] m_HistoPosition;
}
......
......@@ -69,11 +69,15 @@ public:
Property<float64> pulseOne;
Property<float64> pulseTwo;
Property<float64> setPosition;
Property<int32> duration;
ArrayProperty<float64> histoPosition;