Commit 63aedfa3 authored by d22's avatar d22

Modifications done related to HPLC

parent 64292bc8
......@@ -11,16 +11,21 @@
<property role="hplccontroller1" property="number_samples" save_value="true"/>
<dynamic_property role="hplccontroller1" property="sample_names" save_value="true"/>
<dynamic_property role="hplccontroller1" property="sample_positions" save_value="true"/>
<property role="hplccontroller1" property="max_pressure_column_h" save_value="true"/>
<property role="hplccontroller1" property="max_pressure_column_d" save_value="true"/>
<simple_label prefix="hplccontroller.experimentType" hAlignment="center" />
<simple_label prefix="hplccontroller.2ColumnType" font_style="BOLD" hAlignment="center" />
<newLine />
<newLine />
<simple_label prefix="hplccontroller.injectionPhasePrefix" font_style="BOLD" hAlignment="center" />
<newLine />
<text role="hplccontroller1" property="sample_volume" prefix="hplccontroller.sampleVolumePrefix" suffix="hplccontroller.microLiter"/>
<property_combo role="hplccontroller1" property="sample" prefix="hplccontroller.samplePrefix" key="sampleCombo"/>
<combo role="hplccontroller1" property="column_measured" prefix="hplccontroller.columnTypePrefix" valuesAndLabels="hplccontroller.columnH,hplccontroller.columnD" key="columnMeasuredCombo"/>
<newLine />
<newLine />
<simple_label prefix="hplccontroller.elutionPhasePrefix" font_style="BOLD" hAlignment="center" />
<newLine />
<property_combo role="hplccontroller1" property="elution_valve" prefix="hplccontroller.valveElutionPosPrefix" key="elutionValveCombo"/>
......@@ -34,12 +39,14 @@
</switchable_composite>
<text role="hplccontroller1" property="threshold" prefix="hplccontroller.thresholdValuePrefix" />
<newLine />
<newLine />
<simple_label prefix="hplccontroller.equilibrationPhasePrefix" font_style="BOLD" hAlignment="center" />
<newLine />
<check role="hplccontroller1" property="doEquilibration_phase" checkBoxValues="hplccontroller.doEquilibration" />
<property_combo role="hplccontroller1" property="equilibration_valve" prefix="hplccontroller.valveEquilibrationPosPrefix" key="equilibrationValveCombo" />
<text role="hplccontroller1" property="equil_flowRate" prefix="at" suffix="hplccontroller.flowRateUnitSuffix" />
<newLine />
<newLine />
<simple_label prefix="hplccontroller.dataRecordingPhasePrefix" font_style="BOLD" hAlignment="center" />
<newLine />
<text role="hplccontroller1" property="num_exposures" prefix="hplccontroller.numExposuresPrefix" suffix="hplccontroller.numExposuresSuffix"/>
......@@ -50,6 +57,7 @@
<text role="hplccontroller1" property="lambda_3" prefix="hplccontroller.lambda3Prefix" suffix="hplccontroller.nanometerCommaSuffix" />
<text role="hplccontroller1" property="lambda_4" prefix="hplccontroller.lambda4Prefix" suffix="hplccontroller.nanometerSuffix" />
<newLine />
<newLine />
<simple_label prefix="hplccontroller.fractionCollectionPhasePrefix" font_style="BOLD" hAlignment="center" />
<newLine />
<check role="hplccontroller1" property="collect_sample" checkBoxValues="hplccontroller.collectSample" suffix="hplccontroller.doCollectionSuffix"/>
......
......@@ -46,7 +46,7 @@ HplcController::HplcController(const std::string& controllerName) : ExperimentCo
nameColumnD.init(this, NOSAVE, "name_column_d");
volumeColumnH.init(this, NOSAVE, "volume_column_h");
volumeColumnD.init(this, NOSAVE, "volume_column_d");
maxPressureColumnH.init(this, NOSAVE, "max_pressure_column_h");
maxPressureColumnH.init(this, NOSAVE, "max_pressure_column_h"); //max_pressure_column_h
maxPressureColumnD.init(this, NOSAVE, "max_pressure_column_d");
sampleVolume.init(this, SAVE, "sample_volume");
......@@ -93,6 +93,7 @@ HplcController::HplcController(const std::string& controllerName) : ExperimentCo
equilibrationPositionLabel.init(this, NOSAVE | SPY, "equilibration_pos_label", "Equl. Buf");
measureDescriptionFileName.init(this, NOSAVE, "measure_desc_file", "File");
measureDescription.init(this, NOSAVE, "measure_description", "Description");
// Init controller pointers
m_pumpH.init(this, "pumpH");
......@@ -164,6 +165,7 @@ HplcController::HplcController(const HplcController& controller) :
equilibrationPositionLabel.copy(this, controller.equilibrationPositionLabel);
measureDescriptionFileName.copy(this, controller.measureDescriptionFileName);
measureDescription.copy(this, controller.measureDescription);
m_pumpH.copy(controller.m_pumpH);
m_pumpD.copy(controller.m_pumpD);
......@@ -546,6 +548,9 @@ void HplcController::createLogMessage() {
// Send
logStream << endlog;
// Use also the method for property sampleName
measureDescription = nameColumnH() + " " + elutionPositionLabel() + " " + sampleName() + " " +sample();
}
void HplcController::doDataAcquisition() {
......
......@@ -60,7 +60,7 @@ public:
Property<std::string> sample;
DynamicProperty<std::string> sampleNames;
DynamicProperty<std::string> samplePositions;
Property<int32>numberOfSamples;
Property<int32> numberOfSamples;
Property<bool> doEquilibrationPhase;
Property<float64> equilibrationFlowRate;
......@@ -99,6 +99,7 @@ public:
Property<std::string> equilibrationPositionLabel; // For spy and log
Property<std::string> measureDescriptionFileName;
Property<std::string> measureDescription;
ControllerPtr<PumpController> m_pumpH;
ControllerPtr<PumpController> m_pumpD;
......
......@@ -69,6 +69,7 @@ UVUsbDetectorController::UVUsbDetectorController(const std::string& controllerNa
xDataInTime.init(this, NOSAVE, "x_data_save_time");
xDataInMl.init(this, NOSAVE, "x_data_save_ml");
xDataInFractions.init(this, NOSAVE, "x_data_save_fraction");
xDataInFlowRate.init(this, NOSAVE, "x_data_save_flowrate");
lambdaSlope.init(this, NOSAVE, "lambda_slope");
......@@ -98,6 +99,7 @@ UVUsbDetectorController::UVUsbDetectorController(const std::string& controllerNa
xDataToSaveInTime = nullptr;
xDataToSaveInMl = nullptr;
xDataToSaveInFractions = nullptr;
xDataToSaveInFlowRate = nullptr;
absorptionData = nullptr;
xDataPtr = nullptr;
slopeData = nullptr;
......@@ -453,18 +455,26 @@ void UVUsbDetectorController::processData() {
xDataToSaveInFractions = nullptr;
}
if (xDataToSaveInFlowRate) {
delete[] xDataToSaveInFlowRate;
xDataToSaveInFlowRate = nullptr;
}
xDataToSaveInTime = new float64[chromatoSize]{};
xDataToSaveInMl = new float64[chromatoSize]{};
xDataToSaveInFractions = new int32[chromatoSize]();
xDataToSaveInFlowRate = new float64[chromatoSize]();
vectorForXAxisInTimeForDataFile.push_back(m_totalDuration.getSeconds());
vectorForXAxisInMlForDataFile.push_back(actualVolume);
vectorForXAxisInFractionCollectionPosition.push_back(actualTubePosition());
vectorForXAxisInFlowRateForDataFile.push_back(flowRate());
for (int32 i = 0; i < chromatoSize; i++) {
xDataToSaveInTime[i] = vectorForXAxisInTimeForDataFile[i];
xDataToSaveInMl[i] = vectorForXAxisInMlForDataFile[i]; //!!
xDataToSaveInFractions[i] = vectorForXAxisInFractionCollectionPosition[i];
xDataToSaveInFlowRate[i] = vectorForXAxisInFlowRateForDataFile[i];
}
xDataInTime.update(xDataToSaveInTime);
xDataInTime.setSize(chromatoSize);
......@@ -472,6 +482,8 @@ void UVUsbDetectorController::processData() {
xDataInMl.setSize(chromatoSize);
xDataInFractions.update(xDataToSaveInFractions);
xDataInFractions.setSize(chromatoSize);
xDataInFlowRate.update(xDataToSaveInFlowRate);
xDataInFlowRate.setSize(chromatoSize);
// Mutex block
storeDataBlock();
......@@ -509,6 +521,7 @@ void UVUsbDetectorController::resetData() {
vectorForXAxisInTimeForDataFile.clear();
vectorForXAxisInMlForDataFile.clear();
vectorForXAxisInFractionCollectionPosition.clear();
vectorForXAxisInFlowRateForDataFile.clear();
vectorForAbsorbanceSlope.clear();
}
......
......@@ -110,6 +110,7 @@ public:
ArrayProperty<float64> xDataInTime; // For data file
ArrayProperty<float64> xDataInMl; // For data file
ArrayProperty<int32> xDataInFractions; // For data file
ArrayProperty<float64> xDataInFlowRate; // For data file
ArrayProperty<float64> lambdaSlope;
......@@ -134,6 +135,7 @@ private:
float64* xDataToSaveInTime;
float64* xDataToSaveInMl;
int32* xDataToSaveInFractions;
float64* xDataToSaveInFlowRate;
float64* slopeData;
......@@ -148,6 +150,7 @@ private:
std::vector<float64> vectorForXAxisInTimeForDataFile;
std::vector<float64> vectorForXAxisInMlForDataFile;
std::vector<int32> vectorForXAxisInFractionCollectionPosition;
std::vector<int32> vectorForXAxisInFlowRateForDataFile;
std::vector<float64> vectorForAbsorbanceSlope;
void getData();
......
......@@ -369,6 +369,7 @@ void RealAliasDriver::setMode() {
*/
void RealAliasDriver::moveTray() {
// (1) Set program option "move tray"
// code STX | 6 1 | 0 1 | 0 8 3 0 | SP SP SP SP SP X | ETX -> x = 0 home, x = 1 front
string buf;
string ack(1, ACK);
......@@ -378,21 +379,19 @@ void RealAliasDriver::moveTray() {
unsigned char trayMoveMess[SIZE] = { STX, '6', '1', '0', '1', '0', '8', '3', '0', SP, SP, SP, SP, SP, (unsigned char) trayPosition[0], ETX };
owner()->write(trayMoveMess, SIZE);
owner()->read(buf, ack);
printf("alias loading tray position %i\n", owner()->trayPosition());
// Send programmed value
unsigned char sendProgramMess[SIZE] = { STX, '6', '1', '0', '1', '1', '0', '0', '0', SP, SP, '0', '8', '3', '0', ETX };
owner()->write(sendProgramMess, SIZE);
owner()->read(buf, nack);
printf("alias loading tray position program -> COMMAND NOT ACCEPTED");
// Start/stop user program value
unsigned char startProgramMess[SIZE] = { STX, '6', '1', '0', '1', '5', '1', '0', '0', '1', SP, SP, SP, SP, '0', ETX };
owner()->write(startProgramMess, SIZE);
owner()->read(buf, nack);
printf("alias start command programmed -> COMMAND NOT ACCEPTED");
// Ask for current configuration to see if there is a program loaded
// string buf2;
// int size = 16;
// unsigned char message[16] = { STX, '6', '1', '0', '1', '1', '0', '0', '1', SP, SP, '0', '1', '5', '9', ETX };
// owner()->write(message, size);
// owner()->read(buf2, etx);
// (2) Start/stop user program value previously loaded
unsigned char startProgramMess[SIZE] = { STX, '6', '1', '0', '1', '5', '1', '0', '0', '1', '0', '0', '0', '0', '0', ETX };
owner()->write(startProgramMess, SIZE);
owner()->read(buf, ack);
}
......
......@@ -71,8 +71,6 @@ void RealTCPSmartValveDriver::readStatus() {
} else if (buf.find(valve::ValveCommon::INJECT_POS) != std::string::npos) {
channel = 2;
}
cout << "test to validate there are not empty spaces at the end" << buf << "end test" << endl;
} else {
istringstream sbuf(buf);
sbuf >> channel;
......
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