#include <AcqSerialPlateChanger.h>
|
| | AcqSerialPlateChanger () |
| |
| void | AddToBank (int bnk, TPlateS *plate) |
| |
| int | ArmVacuumControl (bool VacOn, int timeout) |
| |
| int | FindEmulsion (IdentifierS id, int Bank) |
| |
| int | GetLoadedId (int *id0=NULL, int *id1=NULL, int *id2=NULL, int *id3=NULL) |
| |
| int | GoOnHAxis (int position, int timeout) |
| |
| int | GoOnVAxis (int position, int timeout) |
| |
| int | Initialize (AcqStage1 *Stage=NULL) |
| |
| void | LoadBrick (int Brick, int Nemulsions=57, int SrcBank=1, int DestBank=2, bool Separators=true, bool FirstIsSeparator=true) |
| |
| int | LoadPlate (IdentifierS id) |
| |
| int | LoadPlate (int id0, int id1, int id2=0, int id3=0) |
| |
| int | MoveEmulsion (int isrc, int idst) |
| |
| void | OnReset () |
| |
| int | Park (int idst) |
| |
| int | PowerOFF (int timeout=100) |
| |
| int | PowerON (int timeout=100) |
| |
| virtual void | Print () |
| |
| int | ReadStatusFile () |
| |
| void | ResetBanks () |
| |
| int | TableVacuumControl (bool VacOn, int timeout, bool BlowOn=false) |
| |
| TPlateS * | TakeFromBank (int bnk) |
| |
| void | UnloadBrick () |
| |
| int | UnloadPlate (bool TurnPowerOff=true) |
| |
| void | UpdateStatusFile () |
| |
| virtual | ~AcqSerialPlateChanger () |
| |
◆ AcqSerialPlateChanger()
| AcqSerialPlateChanger::AcqSerialPlateChanger |
( |
| ) |
|
bool StageError
Definition: AcqSerialPlateChanger.h:105
bool Ready
Definition: AcqSerialPlateChanger.h:104
int PositionTimeout
Definition: AcqSerialPlateChanger.h:110
int SourceBank
Definition: AcqSerialPlateChanger.h:108
float XLoadPosition
Definition: AcqSerialPlateChanger.h:119
bool LiftCorners
Definition: AcqSerialPlateChanger.h:113
float YLoadPosition
Definition: AcqSerialPlateChanger.h:120
int ComPort
Definition: AcqSerialPlateChanger.h:92
float ZLoadPosition
Definition: AcqSerialPlateChanger.h:121
int ComBaud
Definition: AcqSerialPlateChanger.h:93
int SeparationAttempts
Definition: AcqSerialPlateChanger.h:116
int NumberOfAttempt
Definition: AcqSerialPlateChanger.h:115
int DestinationBank
Definition: AcqSerialPlateChanger.h:109
bool Debug
Definition: AcqSerialPlateChanger.h:126
int VacuumTimeout
Definition: AcqSerialPlateChanger.h:111
int NumberOfBanks
Definition: AcqSerialPlateChanger.h:112
char VacRegister
Definition: AcqSerialPlateChanger.h:64
AcqStage1 * ST
Definition: AcqSerialPlateChanger.h:123
bool InitDone
Definition: AcqSerialPlateChanger.h:103
#define NULL
Definition: nidaqmx.h:84
◆ ~AcqSerialPlateChanger()
| AcqSerialPlateChanger::~AcqSerialPlateChanger |
( |
| ) |
|
|
virtual |
void OnReset()
Definition: AcqSerialPlateChanger.cxx:85
◆ AddToBank()
| void AcqSerialPlateChanger::AddToBank |
( |
int |
bnk, |
|
|
TPlateS * |
plate |
|
) |
| |
737 for(
int i=
BankS[bnk].NEmulsions+
BankS[bnk].NSeparators;i>0;i--) {
TBankS BankS[5]
Definition: AcqSerialPlateChanger.cxx:25
void UpdateStatusFile()
Definition: AcqSerialPlateChanger.cxx:346
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1
int NEmulsions
Definition: AcqSerialPlateChanger.h:51
TPlateS * Plates[MAX_NUMBER_OF_PLATES *2]
Definition: AcqSerialPlateChanger.h:53
int NSeparators
Definition: AcqSerialPlateChanger.h:52
◆ ArmVacuumControl()
| int AcqSerialPlateChanger::ArmVacuumControl |
( |
bool |
VacOn, |
|
|
int |
timeout |
|
) |
| |
213 if(
Debug) printf(
"ArmVacuumControl(%d,%d) called.\n",VacOn,timeout);
223 while( !Reached && tme<timeout)
228 gSystem->Sleep(50);tme++;
231 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[4]=0x%x \n",res,rep[0],((
unsigned)(rep[4])));
235 if(rep[0]==
'D' && (rep[4] & 0x01)) Reached=
true;
237 if(
Debug) printf(
"ArmVacuumControl reached %d, timeout is %d. Done.\n",tme,timeout);
238 if(tme>=timeout)
return -tme;
int RecvString(char *string, int N)
Definition: AcqCOM.cxx:126
void Flush()
Definition: AcqCOM.cxx:101
int SendString(char *string, int N)
Definition: AcqCOM.cxx:119
AcqCOM * port
Definition: AcqSerialPlateChanger.h:63
◆ FindEmulsion()
| int AcqSerialPlateChanger::FindEmulsion |
( |
IdentifierS |
id, |
|
|
int |
Bank |
|
) |
| |
901 if(
BankS[bnk].Plates[i]->IsSeparator==
false)
902 if(
BankS[bnk].Plates[i]->
id.Part[0]==
id.Part[0])
903 if(
BankS[bnk].Plates[i]->
id.Part[1]==
id.Part[1])
904 if(
BankS[bnk].Plates[i]->
id.Part[2]==
id.Part[2])
905 if(
BankS[bnk].Plates[i]->
id.Part[3]==
id.Part[3])
◆ GetLoadedId()
| int AcqSerialPlateChanger::GetLoadedId |
( |
int * |
id0 = NULL, |
|
|
int * |
id1 = NULL, |
|
|
int * |
id2 = NULL, |
|
|
int * |
id3 = NULL |
|
) |
| |
TPlateS * EmulsionOnTableS
Definition: AcqSerialPlateChanger.cxx:24
int Part[4]
Definition: AcqSerialPlateChanger.h:34
IdentifierS id
Definition: AcqSerialPlateChanger.h:41
◆ GoOnHAxis()
| int AcqSerialPlateChanger::GoOnHAxis |
( |
int |
position, |
|
|
int |
timeout |
|
) |
| |
290 if(
Debug) printf(
"GoOnHAxis(%d, %d) called.\n",
position,timeout);
295 while( !Reached && tme<timeout)
300 gSystem->Sleep(50);tme++;
303 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[1]=0x%x rep[4]=0x%x \n",res,rep[0],rep[1],((
unsigned)(rep[4])));
305 if(rep[0]==
'D' && (rep[1] & 0x40) && (rep[1] & 0x10) && !(rep[1] & 0x80) && !(rep[1] & 0x20)) Reached=
true;
307 if(
Debug) printf(
"GoOnHAxis reached %d, timeout is %d. Done.\n",tme,timeout);
308 if(tme>=timeout)
return -tme;
MFTYPE32 long position
Definition: Milproto.h:644
◆ GoOnVAxis()
| int AcqSerialPlateChanger::GoOnVAxis |
( |
int |
position, |
|
|
int |
timeout |
|
) |
| |
321 if(
Debug) printf(
"GoOnVAxis(%d, %d) called.\n",
position,timeout);
326 while( !Reached && tme<timeout)
331 gSystem->Sleep(50);tme++;
335 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[2]=0x%x rep[4]=0x%x \n",res,rep[0],rep[2],((
unsigned)(rep[4])));
336 if(rep[0]==
'D' && (rep[2] & 0x40) && (rep[2] & 0x10) && !(rep[2] & 0x80) && !(rep[2] & 0x20)) Reached=
true;
338 if(
Debug) printf(
"GoOnVAxis reached %d, timeout is %d. Done.\n",tme,timeout);
339 if(tme>=timeout)
return -tme;
◆ Initialize()
| int AcqSerialPlateChanger::Initialize |
( |
AcqStage1 * |
Stage = NULL | ) |
|
117 printf(
"Initializing Plate changer..\n");
123 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
127 printf(
"Reading status file.."); fflush(
stdout);
132 printf(
"Done!"); fflush(
stdout);
#define VPOS_UP
Definition: AcqPlateChanger.h:25
int Open(int port, int baud)
Definition: AcqCOM.cxx:28
void Close()
Definition: AcqCOM.cxx:91
int PowerOFF(int timeout=100)
Definition: AcqSerialPlateChanger.cxx:173
int Park(int idst)
Definition: AcqSerialPlateChanger.cxx:911
int ReadStatusFile()
Definition: AcqSerialPlateChanger.cxx:382
int PowerON(int timeout=100)
Definition: AcqSerialPlateChanger.cxx:138
int TableVacuumControl(bool VacOn, int timeout, bool BlowOn=false)
Definition: AcqSerialPlateChanger.cxx:243
int GoOnVAxis(int position, int timeout)
Definition: AcqSerialPlateChanger.cxx:313
◆ LoadBrick()
| void AcqSerialPlateChanger::LoadBrick |
( |
int |
Brick, |
|
|
int |
Nemulsions = 57, |
|
|
int |
SrcBank = 1, |
|
|
int |
DestBank = 2, |
|
|
bool |
Separators = true, |
|
|
bool |
FirstIsSeparator = true |
|
) |
| |
466 if(
Debug) printf(
" LoadBrick(%d,%d,%d,%d,%d,%d) called.\n",Brick,Nemulsions, isrc,idest,Separators,FirstIsSeparator);
467 int res,inumem,ibrick;
470 if(isrc<1 || isrc>3 || idest<1 || idest>3 || isrc==idest || inumem<=0) {
471 printf(
"Wrong bank assignements!\n");
477 printf(
"Load source bank, top sheet must be ");
478 if( FirstIsSeparator) printf(
"the separator sheet ");
479 else printf(
"the first emulsion ");
480 printf(
", then press any key :"); fflush(
stdout);
486 printf(
"Please remove emulsion from the stage, then press any key :");
501 if( FirstIsSeparator ) {
514 Fsep=FirstIsSeparator?1:0;
515 if( Separators )
for(
int i=0;i<inumem;i++) {
535 else for(
int i=0;i<inumem;i++) {
552 if(
Debug) printf(
" LoadBrick() done.\n");
int Initialize(AcqStage1 *Stage=NULL)
Definition: AcqSerialPlateChanger.cxx:105
void ResetBanks()
Definition: AcqSerialPlateChanger.cxx:557
Definition: AcqSerialPlateChanger.h:40
bool IsSeparator
Definition: AcqSerialPlateChanger.h:44
int InBank
Definition: AcqSerialPlateChanger.h:43
int SeqNumber
Definition: AcqSerialPlateChanger.h:42
◆ LoadPlate() [1/2]
789 printf(
"LoadPlate is in progress...\n"); fflush(
stdout);
790 int SeqN=-1,sn,BankN;
793 if(
FindEmulsion(
id,0)>=0) {printf(
"Load Plate is complete (plate was already on the stage).\n");
return 2; }
796 if(sn>=0){ SeqN=sn; BankN=bnk;
break;}
798 if(SeqN<0) {printf(
"Load Plate is failed. Emulsion is not found in banks!\n");
return 0; }
799 printf(
"Required emulsion is found in bank #%d at position %d\n",BankN,SeqN+1);
807 printf(
"Waiting for stage to reach exchange position..\n"); fflush(
stdout);
811 if(res==0) {printf(
"Stage didn't reach exchange position! Unload Plate is failed. \n");
return 0; }
813 else { printf(
"No connection with the stage (stage pointer is not set)!!! Unload Plate is failed. \n");
return 0; }
820 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
821 printf(
"OK..\nMoving emulsion from the stage..\n"); fflush(
stdout);
825 printf(
"Done.\n"); fflush(
stdout);
826 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
829 if(SeqN>0) printf(
"Moving emulsions from bank #%d to #%d\n", Mfrom,Mto); fflush(
stdout);
830 for(
int num=0;num<SeqN;num++){
831 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
835 printf(
"Done.\n"); fflush(
stdout);
836 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
840 printf(
"Brick structure incosistent!!! Reload the brick!\n");
843 printf(
"OK..moving emulsion to the stage.."); fflush(
stdout);
847 printf(
"Done.\n"); fflush(
stdout);
850 printf(
"Load Plate is complete.\n");
void PosMove(float Pos, float Speed, float Acc)
Definition: AcqStage1.cxx:524
int WaitForMoveComplete(u32 Timeout)
Definition: AcqStage1.cxx:514
void AddToBank(int bnk, TPlateS *plate)
Definition: AcqSerialPlateChanger.cxx:733
int MoveEmulsion(int isrc, int idst)
Definition: AcqSerialPlateChanger.cxx:591
int FindEmulsion(IdentifierS id, int Bank)
Definition: AcqSerialPlateChanger.cxx:896
TPlateS * TakeFromBank(int bnk)
Definition: AcqSerialPlateChanger.cxx:750
AcqAxis * Y
Definition: AcqStage1.h:146
AcqAxis * Z
Definition: AcqStage1.h:147
AcqAxis * X
Definition: AcqStage1.h:145
◆ LoadPlate() [2/2]
| int AcqSerialPlateChanger::LoadPlate |
( |
int |
id0, |
|
|
int |
id1, |
|
|
int |
id2 = 0, |
|
|
int |
id3 = 0 |
|
) |
| |
int LoadPlate(IdentifierS id)
Definition: AcqSerialPlateChanger.cxx:783
UInt_t id
Definition: tlg2pattern.C:118
Definition: AcqSerialPlateChanger.h:33
◆ MoveEmulsion()
| int AcqSerialPlateChanger::MoveEmulsion |
( |
int |
isrc, |
|
|
int |
idst |
|
) |
| |
594 if(
Debug) printf(
" --- MoveEmulsion(%d,%d)\n",isrc,idest);
597 if((isrc<0) || (isrc>3)) {printf(
"Wring Source Position assignement!\n");
return 0;}
598 if((idest<0) || (idest>3)) {printf(
"Wring Scanned Position assignement!\n");
return 0;}
599 if(isrc==idest) {printf(
"Same Source and Scanned Position assignement!\n");
return 0;}
601 printf(
"\n%d > %d",isrc,idest); fflush(
stdout);
605 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
607 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
610 if(res<0) {printf(
"ArmVacuum is not reached in 2 seconds!\n");}
621 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
632 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
634 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
637 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
640 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
643 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
644 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
648 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
650 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
653 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
656 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
659 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
660 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return 0;
else printf(
" Continue.\n");}
665 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
668 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
676 printf(
"Robot can't take plate from the stage!\n");
681 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
683 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
686 if(res<0 && isrc==0) {printf(
"ArmVacuum is not reached in 2 seconds!\n");}
688 if(
Debug) printf(
"Arm vac seems ok... trying to separate emulsions..\n");
690 if(
Debug) printf(
"Attempt %d..going up..\n",att+1);
692 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
693 if(
Debug) printf(
"..going down..\n",att+1);
695 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
697 if(
Debug) printf(
"Separation loop is complete..\n");
700 printf(
"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%d > %d",isrc,idest); fflush(
stdout);
703 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
704 if(
Debug) printf(
"Ready to go to bank idest=%d\n",idest);
706 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
708 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
709 printf(
"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b%d > %d",isrc,idest); fflush(
stdout);
715 printf(
"TableVacuum is not reached in 5 seconds!\n");
717 if(res<0) printf(
"Vpos is not reached in 5 seconds!\n");
724 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
725 printf(
"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); fflush(
stdout);
726 if(
Debug) printf(
" --- MoveEmulsion is done, returns 1.\n");
#define VPOS_ABOVE_STAGE
Definition: AcqPlateChanger.h:28
#define VPOS_DOWN_TO_STAGE
Definition: AcqPlateChanger.h:27
#define VPOS_DOWN
Definition: AcqPlateChanger.h:26
int ArmVacuumControl(bool VacOn, int timeout)
Definition: AcqSerialPlateChanger.cxx:209
int GoOnHAxis(int position, int timeout)
Definition: AcqSerialPlateChanger.cxx:278
◆ OnReset()
| void AcqSerialPlateChanger::OnReset |
( |
| ) |
|
98 if(
Debug) printf(
"OnReset called\n");
102 if(
Debug) printf(
"OnReset done.\n");
◆ Park()
| int AcqSerialPlateChanger::Park |
( |
int |
idst | ) |
|
916 if((idest<0) || (idest>3)) {printf(
"Wrong Scanned Position assignement!\n");
return 0;}
918 if(res<0) {printf(
"Vpos is not reached in 5 seconds!\n");
return 0;}
920 if(res<0) {printf(
"Hpos is not reached in 5 seconds!\n");
return 0;}
◆ PowerOFF()
| int AcqSerialPlateChanger::PowerOFF |
( |
int |
timeout = 100 | ) |
|
176 if(
Debug) printf(
"PowerOFF called.\n");
187 while( !Reached && tme<timeout)
192 gSystem->Sleep(50);tme++;
195 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[1]=0x%x \n",res,rep[0],rep[1]);
197 if(rep[0]==
'D' && !(rep[1] & 0x08)) Reached=
true;
199 if(
Debug) printf(
"PowerOFF reached %d, timeout is %d. Done.\n",tme,timeout);
201 if(tme>=timeout)
return -tme;
◆ PowerON()
| int AcqSerialPlateChanger::PowerON |
( |
int |
timeout = 100 | ) |
|
144 if(
Debug) printf(
"PowerON called\n");
155 while( !Reached && tme<timeout)
160 gSystem->Sleep(50);tme++;
163 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[1]=0x%x \n",res,rep[0],rep[1]);
165 if( rep[0]==
'D' && (rep[1] & 0x08)) Reached=
true;
167 if(
Debug) printf(
"PowerON reached %d, timeout is %d. Done.\n",tme,timeout);
168 if(tme>=timeout)
return -tme;
◆ Print()
| void AcqSerialPlateChanger::Print |
( |
| ) |
|
|
virtual |
60 if(bnk==0) printf(
"\nTable:",
BankS[bnk].Number);
61 else printf(
"\nBank #%d content:",
BankS[bnk].Number);
62 if(
BankS[bnk].NEmulsions==0 &&
BankS[bnk].NSeparators==0) printf(
" Empty.\n\n");
67 if(
BankS[bnk].Plates[i]->IsSeparator) printf(
"---Separator---\n");
68 else printf(
"Emulsion %d %d %d %d\n",
BankS[bnk].Plates[i]->
id.Part[0],
69 BankS[bnk].Plates[i]->
id.Part[1],
70 BankS[bnk].Plates[i]->
id.Part[2],
71 BankS[bnk].Plates[i]->
id.Part[3]);
◆ ReadStatusFile()
| int AcqSerialPlateChanger::ReadStatusFile |
( |
| ) |
|
UpdateBanksView();
385 if(
Debug) printf(
" ReadStatusFile() called.\n");
388 int I,bnk,seps,plts,
a,b,c,
d,ip;
389 FILE *fp=fopen(
"c:\\ChangerStatus.txt",
"r");
390 if(fp==
NULL)
return 0;
391 if(fgets(line,128,fp)==
NULL)
return 0;
394 while(fgets(line,128,fp)!=
NULL){
395 sscanf(line,
"%s %d",key,&I);
396 if(strcmp(key,
"Bank")==0) bnk=I;
397 if(strcmp(key,
"SEPARATORS")==0) seps=I;
398 if(strcmp(key,
"PLATES")==0) plts=I;
399 if(strcmp(key,
"PLATE")==0){
400 sscanf(line,
"%s %d %d %d %d",key,&
a,&b,&c,&
d);
412 if(strcmp(key,
"SEPARATOR")==0){
424 if(strcmp(key,
"EndBank")==0){
425 if((bnk!=I) || (
BankS[bnk].NSeparators!=seps) || (
BankS[bnk].NEmulsions!=plts))
427 printf(
"Plate Changer Error: ChangerStatus.txt file is corrupted!!! Resetting banks.\n");
429 if(
Debug) printf(
" ReadStatusFile() done. returns 0.\n");
441 if(
Debug) printf(
" ReadStatusFile() done. returns 1.\n");
void d()
Definition: RecDispEX.C:381
void a()
Definition: check_aligned.C:59
◆ ResetBanks()
| void AcqSerialPlateChanger::ResetBanks |
( |
| ) |
|
560 if(
Debug) printf(
" ResetBanks() called.\n");
571 if(
Debug) printf(
" ResetBanks() done.\n");
#define MAX_NUMBER_OF_PLATES
Definition: AcqPlateChanger.h:24
int Number
Definition: AcqSerialPlateChanger.h:50
◆ TableVacuumControl()
| int AcqSerialPlateChanger::TableVacuumControl |
( |
bool |
VacOn, |
|
|
int |
timeout, |
|
|
bool |
BlowOn = false |
|
) |
| |
247 if(
Debug) printf(
"TableVacuumControl(%d,%d,%d) called.\n",VacOn,timeout,BlowOn);
248 if(VacOn) BlowOn=
false;
259 while( !Reached && tme<timeout)
264 gSystem->Sleep(50);tme++;
267 if(
Debug) printf(
"res=0x%x rep[0]=0x%x rep[4]=0x%x \n",res,rep[0],((
unsigned)(rep[4])));
269 if(rep[0]==
'D' && (rep[4] & 0x02)) Reached=
true;
271 if(
Debug) printf(
"TableVacuumControl reached %d, timeout is %d. Done.\n",tme,timeout);
272 if(tme>=timeout)
return -tme;
◆ TakeFromBank()
| TPlateS * AcqSerialPlateChanger::TakeFromBank |
( |
int |
bnk | ) |
|
◆ UnloadBrick()
| void AcqSerialPlateChanger::UnloadBrick |
( |
| ) |
|
450 if(
Debug) printf(
" UnloadBrick() called.\n");
455 if(kbhit()){getch();printf(
"Paused. Continue? (y/n)");
if(getchar()==
'n')
return;
else printf(
" Continue.\n");}
460 printf(
"Done. \nPlease take the brick from the bank %d\n",
SourceBank);
int UnloadPlate(bool TurnPowerOff=true)
Definition: AcqSerialPlateChanger.cxx:856
◆ UnloadPlate()
| int AcqSerialPlateChanger::UnloadPlate |
( |
bool |
TurnPowerOff = true | ) |
|
862 printf(
"Unload plate is in progress...\n");
868 if(isrc<1 || isrc>3 || idest<1 || idest>3 || isrc==idest) {
869 printf(
"Wrong bank assignements!\n");
870 printf(
"Unload Plate is failed.\n");
882 if(res==0) {printf(
"Stage didn't reach exchange position! Unload Plate is failed. \n");
return 0; }
887 if(
MoveEmulsion(0,isrc)!=1) { printf(
"Unload Plate is failed. ");
Park(idest);
return 0;};
889 printf(
"Unload Plate is complete.\n");
◆ UpdateStatusFile()
| void AcqSerialPlateChanger::UpdateStatusFile |
( |
| ) |
|
349 if(
Debug) printf(
" UpdateStatusFile() called.\n");
354 FILE *fp=fopen(
"c:\\ChangerStatus.txt",
"w");
355 FILE *fpl=fopen(
"c:\\ChangerLog.txt",
"a");
356 fprintf(fp,
"Plate Changer Status on %s at %s.\n",dateStr,timeStr);
357 fprintf(fpl,
"Plate Changer Status on %s at %s.\n",dateStr,timeStr);
359 fprintf(fp,
"Bank %d\n",bnk);
360 fprintf(fpl,
"Bank %d\n",bnk);
361 fprintf(fp,
"SEPARATORS %d\n",
BankS[bnk].NSeparators);
362 fprintf(fpl,
"SEPARATORS %d\n",
BankS[bnk].NSeparators);
363 fprintf(fp,
"PLATES %d\n",
BankS[bnk].NEmulsions);
364 fprintf(fpl,
"PLATES %d\n",
BankS[bnk].NEmulsions);
366 if(
BankS[bnk].Plates[i]->IsSeparator){ fprintf(fp,
"SEPARATOR\n");fprintf(fpl,
"SEPARATOR\n");}
368 fprintf(fp,
"PLATE %d %d %d %d\n",
BankS[bnk].Plates[i]->
id.Part[0],
BankS[bnk].Plates[i]->
id.Part[1],
BankS[bnk].Plates[i]->
id.Part[2],
BankS[bnk].Plates[i]->
id.Part[3]);
369 fprintf(fpl,
"PLATE %d %d %d %d\n",
BankS[bnk].Plates[i]->
id.Part[0],
BankS[bnk].Plates[i]->
id.Part[1],
BankS[bnk].Plates[i]->
id.Part[2],
BankS[bnk].Plates[i]->
id.Part[3]);
371 fprintf(fp,
"EndBank %d\n",bnk);
372 fprintf(fpl,
"EndBank %d\n",bnk);
378 if(
Debug) printf(
" UpdateStatusFile() done.\n");
◆ ComBaud
| int AcqSerialPlateChanger::ComBaud |
◆ ComPort
| int AcqSerialPlateChanger::ComPort |
◆ Debug
| bool AcqSerialPlateChanger::Debug |
◆ DestinationBank
| int AcqSerialPlateChanger::DestinationBank |
◆ InitDone
| bool AcqSerialPlateChanger::InitDone |
◆ LiftCorners
| bool AcqSerialPlateChanger::LiftCorners |
◆ NumberOfAttempt
| int AcqSerialPlateChanger::NumberOfAttempt |
◆ NumberOfBanks
| int AcqSerialPlateChanger::NumberOfBanks |
◆ port
| AcqCOM* AcqSerialPlateChanger::port |
|
private |
◆ PositionTimeout
| int AcqSerialPlateChanger::PositionTimeout |
◆ Ready
| bool AcqSerialPlateChanger::Ready |
◆ SeparationAttempts
| int AcqSerialPlateChanger::SeparationAttempts |
◆ SourceBank
| int AcqSerialPlateChanger::SourceBank |
◆ ST
◆ StageError
| bool AcqSerialPlateChanger::StageError |
◆ StX
| float AcqSerialPlateChanger::StX |
|
private |
◆ StY
| float AcqSerialPlateChanger::StY |
|
private |
◆ StZ
| float AcqSerialPlateChanger::StZ |
|
private |
◆ VacRegister
| char AcqSerialPlateChanger::VacRegister |
|
private |
◆ VacuumTimeout
| int AcqSerialPlateChanger::VacuumTimeout |
◆ XLoadPosition
| float AcqSerialPlateChanger::XLoadPosition |
◆ YLoadPosition
| float AcqSerialPlateChanger::YLoadPosition |
◆ ZLoadPosition
| float AcqSerialPlateChanger::ZLoadPosition |
The documentation for this class was generated from the following files: