| 597,7 → 597,6 |
| } |
| meas_data->Fill(); |
| n++; |
| sleep(1); |
| |
| // Start making a scope measurement |
| /* if( (gScopeDaq->scopeUseType == 2) && (sCamaclink->IsDown()) ) |
| 1210,6 → 1209,32 |
| #endif |
| PositionSet(1); |
| } |
| // Abort any motion |
| else if(opt == 4) |
| { |
| sprintf(cmd, "sudo %s/src/MIKRO/mikro_ctrl -n 1 -c ab", rootdir); // X-axis |
| #if WORKSTAT == 'I' |
| printf("Emergency stop of the current movement of all linear tables.\n"); |
| retTemp = system(cmd); |
| #else |
| printf("Cmd: %s\n",cmd); |
| #endif |
| |
| sprintf(cmd, "sudo %s/src/MIKRO/mikro_ctrl -n 2 -c ab", rootdir); // Y-axis |
| #if WORKSTAT == 'I' |
| retTemp = system(cmd); |
| #else |
| printf("Cmd: %s\n",cmd); |
| #endif |
| |
| sprintf(cmd, "sudo %s/src/MIKRO/mikro_ctrl -n 3 -c ab", rootdir); // Z-axis |
| #if WORKSTAT == 'I' |
| retTemp = system(cmd); |
| #else |
| printf("Cmd: %s\n",cmd); |
| #endif |
| PositionSet(1); |
| } |
| } |
| |
| // Set, get, home or reset the rotation platform |
| 1296,23 → 1321,40 |
| #endif |
| RotationSet(1); |
| } |
| // Abort any motion |
| else if(opt == 4) |
| { |
| sprintf(cmd, "sudo %s/src/MIKRO/mikro_ctrl -n 4 -c ab", rootdir); |
| #if WORKSTAT == 'I' |
| printf("Emergency stop of the current movement of the rotation platform.\n"); |
| retTemp = system(cmd); |
| #else |
| printf("Cmd: %s\n",cmd); |
| #endif |
| RotationSet(1); |
| } |
| } |
| |
| // File browser for selecting the save file |
| void TGAppMainFrame::SaveFile() |
| { |
| // char *cTemp; |
| |
| TGFileInfo file_info; |
| const char *filetypes[] = {"Histograms",histextall,0,0}; |
| char *cTemp; |
| file_info.fFileTypes = filetypes; |
| cTemp = new char[1024]; |
| sprintf(cTemp, "%s/results", rootdir); |
| file_info.fIniDir = StrDup(cTemp); |
| // cTemp = new char[1024]; |
| // sprintf(cTemp, "%s/results", rootdir); |
| // file_info.fIniDir = StrDup(cTemp); |
| file_info.fIniDir = StrDup(currentMeasDir); |
| new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDSave, &file_info); |
| delete[] cTemp; |
| // delete[] cTemp; |
| |
| if(file_info.fFilename != NULL) |
| { |
| fileName->widgetTE->SetText(file_info.fFilename); |
| remove_from_last(file_info.fFilename, '/', currentMeasDir); |
| } |
| } |
| |
| // Start the acquisition |
| 1605,6 → 1647,8 |
| measProgress->widgetPB->SetPosition(progVal); |
| gVirtualX->Update(1); |
| |
| int nrAverMeas = -1; |
| |
| clkt0 = clock(); |
| timet0 = time(NULL); |
| |
| 1668,8 → 1712,8 |
| progVal = (float)(100.00/(abs(repetX)*abs(repetY)*abs(repetZ)))*(k*abs(repetX)*abs(repetY) + j*abs(repetX) + i); |
| measProgress->widgetPB->SetPosition(progVal); |
| |
| TimeEstimate(clkt0, timet0, progVal, cmd, doublewait*((abs(repetX)+2)*abs(repetY)+2)*abs(repetZ)); |
| measProgress->widgetTE->SetText(cmd); |
| // TimeEstimate(clkt0, timet0, progVal, cmd, doublewait*((abs(repetX)+2)*abs(repetY)+2)*abs(repetZ)); |
| // measProgress->widgetTE->SetText(cmd); |
| |
| gVirtualX->Update(1); |
| |
| 1687,6 → 1731,9 |
| |
| printf("Next X position...\n"); |
| fflush(stdout); |
| |
| TimeEstimateNew(nrAverMeas, clkt0, timet0, repetX, repetY, repetZ, doublewait, 2*doublewait, 2*doublewait, cmd); |
| measProgress->widgetTE->SetText(cmd); |
| |
| printf("Waiting for position change...\n"); |
| sleep(doublewait); |
| 1694,8 → 1741,9 |
| printf("Continuing...\n"); |
| |
| // Here comes function to start histogramming <<<<<<<<<<<<<<<<<<<<<<<< |
| clkt0 = clock(); |
| RunMeas((void*)0, (j*repetX + i), scanon); |
| |
| nrAverMeas++; |
| fflush(stdout); |
| |
| i++; |
| 1969,7 → 2017,7 |
| // cTemp = new char[1024]; |
| // sprintf(cTemp, "%s/results", rootdir); |
| // file_info.fIniDir = StrDup(cTemp); |
| file_info.fIniDir = StrDup(currentOpenDir); |
| file_info.fIniDir = StrDup(currentAnalDir); |
| file_info.fMultipleSelection = kTRUE; |
| new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDOpen, &file_info); |
| // delete[] cTemp; |
| 1983,7 → 2031,7 |
| while(file=(TSystemFile*)next()) |
| { |
| fname = file->GetName(); |
| remove_from_last((char*)fname.Data(), '/', currentOpenDir); |
| remove_from_last((char*)fname.Data(), '/', currentAnalDir); |
| fileList->AddEntry(fname.Data(), i); |
| i++; |
| } |