312{
314 char hit=' ';
315 float SpeedFactor=100;
316 bool MustStop=false;
317 int XMoving=0;
318 int YMoving=0;
319 int ZMoving=0;
320 printf("Stage Monitor started. for key help press 'h'.\n");
321
322 while(!MustStop){
323
324 while(!kbhit()) {
329 for(int ch=0;ch<80;ch++) printf("\b");
333 printf(
"X:%9.1f ",xyz->
X());
337 printf(
"Y:%9.1f ",xyz->
Y());
340 printf(
"Z:%9.1f Speed: max/%d Light: %d ",
Z->
GetPos(),
int(SpeedFactor),
L->
LightLevel);
342 gSystem->Sleep(20);
343 }
344 hit=getch();
345 if(kbhit())
346 {hit=getch();
347 }
348 switch(hit)
349 {
350 case 'h' :
351 printf("\n\nX-Y movement initiated by arrows\nSPACE to stop all axes\n");
352 printf("+ Speed Up\n- Speed Down\n");
353 printf("1 go to the bottom of emulsion Bottom layer\n");
354 printf("2 go to the top of emulsion Bottom layer\n");
355 printf("3 go to the bottom of emulsion Top layer\n");
356 printf("4 go to the top of emulsion Top layer\n");
357 printf("R go to the reference corner on X,Y\n");
358 printf("x and z to uncrease and decrease light\n");
359 printf("ESC or q to exit monitor\n");
360 printf("Limiter active - 'H' or 'L' displayed at the corresponding axis letter\n\n ");
361 break;
362 case '=': SpeedFactor/=5; if(SpeedFactor<1) SpeedFactor=1;
366
367 break;
368 case '-': SpeedFactor*=5; if(SpeedFactor>10000) SpeedFactor=10000;
369
373 break;
375 XMoving=-1;
376 break;
378 XMoving=1;
379 break;
381 YMoving=1;
382 break;
384 YMoving=-1;
385 break;
387 ZMoving=1;
388 break;
390 ZMoving=-1;
391 break;
394 break;
397 break;
400 break;
403 break;
404 case 'r' :
407 break;
409 break;
411 break;
413 break;
415 break;
416 case 76 :
417 case ' ':
418 case 'q':
420 XMoving=0; YMoving=0;ZMoving=0;
421
422 }
423 if(hit==27 || hit=='q') MustStop=true;
424 }
425 for(int ch=0;ch<40;ch++) printf("\b");
426 printf("\n");
428 delete xyz;
429 printf("Monitor stoped. \n");
430
431
432
433}
void Move(float Speed, float Acc)
Definition: AcqStage1.cxx:548
int GetLimiter()
Definition: AcqStage1.cxx:613
void PosMove(float Pos, float Speed, float Acc)
Definition: AcqStage1.cxx:524
float GetPos()
Definition: AcqStage1.cxx:599
int WaitForMoveComplete(u32 Timeout)
Definition: AcqStage1.cxx:514
void ON()
Definition: AcqStage1.cxx:895
void Stop()
Definition: AcqStage1.cxx:193
Definition: EdbFiducial.h:21
Float_t Y() const
Definition: EdbFiducial.h:43
void SetY(float y)
Definition: EdbFiducial.h:45
void SetX(float x)
Definition: EdbFiducial.h:44
Float_t X() const
Definition: EdbFiducial.h:42
virtual void SetZ(float z)
Definition: EdbVirtual.h:86
virtual void Transform(const EdbAffine2D *a)
Definition: EdbVirtual.cxx:107