Commit 0250d473 authored by ics's avatar ics
Browse files

bugs

parent 1855ed2e
......@@ -52,13 +52,13 @@ const int32 AutoSamplerController::MAX_SAMPLES = 96;
const int32 AutoSamplerController::SAMPLE_OFFSET = 9;
const int32 AutoSamplerController::SAMPLE_IN = 23.5;
const int32 AutoSamplerController::SAMPLE_OUT = 0;
const int32 AutoSamplerController::HOME = -1;
const int32 AutoSamplerController::HOME = 0;
const int32 AutoSamplerController::MAX_Y = 8;
const int32 AutoSamplerController::MAX_X = 12;
AutoSamplerController::AutoSamplerController(const std::string& controllerName) :
ExperimentController(controllerName),controller::Read(this),controller::WriteParameters(this),controller::Stoppable(this) {
ExperimentController(controllerName),controller::Read(this),controller::WriteParameters(this),controller::Stoppable(this) {
m_isStopped=true;
sampleVolume.init(this, SAVE, "sample_volume");
sampleRackName.init(this, SAVE, "sample_rack_name");
......@@ -184,41 +184,41 @@ void AutoSamplerController::postConfiguration() {
valvePositions.resize(numberValves());
//for (int i = 0; i < numberOfSamples(); i++) {
//fill new properties with default values
//int32 index = i + 1;
//fill new properties with default values
//int32 index = i + 1;
// ostringstream title;
int i = 0;
int i = 0;
// title << "Sample " << index;
for (int x=0; x<MAX_X;x++){
for (int y=0; y<MAX_Y;y++){
int32 index = i + 1;
ostringstream title;
title << "Sample " << index;
for (int x=0; x<MAX_X;x++){
for (int y=0; y<MAX_Y;y++){
int32 index = i + 1;
ostringstream title;
title << "Sample " << index;
posX.set(i, x);; //!
posY.set(i, y);; //!
cout<<title.str()<<endl;
sampleNames.set(i, title.str());
cout<<sampleNames(i)<<endl;
samplePositions.update(i, index);
cout<<"samplepos == "<<samplePositions(i)<<endl;
i++;
if(i >= numberOfSamples())
break;
posX.set(i, x);; //!
posY.set(i, y);; //!
cout<<title.str()<<endl;
sampleNames.set(i, title.str());
cout<<sampleNames(i)<<endl;
}
samplePositions.update(i, index);
cout<<"samplepos == "<<samplePositions(i)<<endl;
i++;
if(i >= numberOfSamples())
break;
break;
}
if(i >= numberOfSamples())
break;
}
//}
......@@ -392,9 +392,9 @@ void AutoSamplerController::start() {
//cout << "m_Valve->valveValue.setpoint=NUMBER_VALVE_POSITIONS" << endl;
m_Valve->valveValue.setpoint=NUMBER_VALVE_POSITIONS;
m_Valve->startCommand();
for(int32 indx = 0; indx < MAX_X; ++indx) {
for(int32 indy = 0; indy < MAX_Y; ++indy) {
sample= actualsample;
for(int32 indy = 0; indy < MAX_Y; ++indy) {
for(int32 indx = 0; indx < MAX_X; ++indx) {
//sample.setpoint= actualsample;
Parallel::begin();
......@@ -420,6 +420,8 @@ void AutoSamplerController::start() {
m_Psd4->startCommand();
sample= actualsample;
//sleep(5);
......@@ -428,7 +430,7 @@ void AutoSamplerController::start() {
//m_Count->totalReps = numExposures();
// m_Count->timeType = "s";
// m_Count->saveData = saveCountData();
m_Count->subtitle = sampleNames(actualsample);
m_Count->subtitle = sampleNames(actualsample);
//cout << " m_Count->startCommand();;" << endl;
......@@ -540,19 +542,19 @@ void AutoSamplerController::clean() {
Parallel::begin();
//cout << "clean m_AxisX->position.setpoint=SAMPLE_OFFSET*MAX_X;" << endl;
m_AxisX->position.setpoint=84;
m_AxisX->startParallel();
m_AxisY->position.setpoint=84;
m_AxisY->startParallel();
//cout << "clean m_AxisY->position.setpoint=SAMPLE_OFFSET*(MAX_Y-1);" << endl;
m_AxisY->position.setpoint=9;
m_AxisY->startParallel();
m_AxisX->position.setpoint=9;
m_AxisX->startParallel();
Parallel::end();
//cout << "clean m_AxisZ->position.setpoint=SAMPLE_IN;" << endl;
m_AxisZ->position.setpoint=43;
m_AxisZ->startCommand();
for(int32 indx = 0; indx <9 ; ++indx) {
for(int32 indx = 0; indx <1 ; ++indx) {
//cout << "clean m_Valve->valveValue.setpoint=cleaning_positions[indx]" << endl;
m_Valve->valveValue.setpoint=cleaning_positions[indx];
m_Valve->startCommand();
......@@ -588,7 +590,7 @@ void AutoSamplerController::read() {
typedef tokenizer<char_separator<char> > tokenizer;
char_separator<char> sep(";");
string mystring=m_UfrReader->userdata();
string mystring=m_UfrReader->userdata();
tokenizer tok1(mystring, sep);
tokenizer::iterator iter = tok1.begin();
......@@ -605,7 +607,7 @@ void AutoSamplerController::read() {
iter++;
cout <<"iter id :====" <<(*iter)<<endl;
s1=(*iter);
s1=(*iter);
boost::trim_left(s1);
......@@ -615,6 +617,7 @@ void AutoSamplerController::read() {
cout <<"numberOfSamples()=" <<numberOfSamples()<<endl;
while ((iter != tok1.end()) && (i<numberOfSamples())) {
......
Supports Markdown
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