FEDRA emulsion software from the OPERA Collaboration
AcqSerialPlateChanger Class Reference

#include <AcqSerialPlateChanger.h>

Inheritance diagram for AcqSerialPlateChanger:
Collaboration diagram for AcqSerialPlateChanger:

Public Member Functions

 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)
 
TPlateSTakeFromBank (int bnk)
 
void UnloadBrick ()
 
int UnloadPlate (bool TurnPowerOff=true)
 
void UpdateStatusFile ()
 
virtual ~AcqSerialPlateChanger ()
 

Public Attributes

int ComBaud
 
int ComPort
 
bool Debug
 
int DestinationBank
 
bool InitDone
 
bool LiftCorners
 
int NumberOfAttempt
 
int NumberOfBanks
 
int PositionTimeout
 
bool Ready
 
int SeparationAttempts
 
int SourceBank
 
AcqStage1ST
 
bool StageError
 
int VacuumTimeout
 
float XLoadPosition
 
float YLoadPosition
 
float ZLoadPosition
 

Private Attributes

AcqCOMport
 
float StX
 
float StY
 
float StZ
 
char VacRegister
 

Constructor & Destructor Documentation

◆ AcqSerialPlateChanger()

AcqSerialPlateChanger::AcqSerialPlateChanger ( )
31{
32 InitDone=false;
33 Ready=false;
37 LiftCorners=false;
40 ST=NULL;
41 XLoadPosition=-63082;
42 YLoadPosition=12485;
43 ZLoadPosition=5000;
44 SourceBank=1;
46 StageError=false;
47 ComPort=1; //default COM1
48 ComBaud=19200;
50 Debug=0; // default - no debug messages produced
51
52
53}
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
80{
81 OnReset();
82}
void OnReset()
Definition: AcqSerialPlateChanger.cxx:85

Member Function Documentation

◆ AddToBank()

void AcqSerialPlateChanger::AddToBank ( int  bnk,
TPlateS plate 
)
734{
735 // puts the info on plate to the container (nothing is done physically)
736 // to keep track of real world situation
737 for(int i=BankS[bnk].NEmulsions+BankS[bnk].NSeparators;i>0;i--) {
738 BankS[bnk].Plates[i]=BankS[bnk].Plates[i-1];
739 }
740 plate->InBank=bnk;
741 plate->SeqNumber=0;
742 BankS[bnk].Plates[0]=plate;
743 if(plate->IsSeparator) BankS[bnk].NSeparators++;
744 else BankS[bnk].NEmulsions++;
746
747}
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 
)
210{
211 // Switches the vacuum on/off at arm holder, if vacuum is not reached within given timeout returns -timeout,
212 // otherwise returns actual time spent to reach vacuum
213 if(Debug) printf("ArmVacuumControl(%d,%d) called.\n",VacOn,timeout);
214 int tme=0;
215 int res;
216 char str[8];
217 char rep[128];
218 str[0]='V';
219 if(VacOn) VacRegister= VacRegister | 0x01; else VacRegister = VacRegister & 0xFE;
220 str[1]=VacRegister;
221 bool Reached=false;
222 if(port->SendString(str,2)!=2) return -tme;
223 while( !Reached && tme<timeout)
224 {
225 str[0]='Q';
226 if(port->SendString(str,1)!=1) return -tme;
227 port->Flush();
228 gSystem->Sleep(50);tme++;
229 port->Flush();
230 res=port->RecvString(rep,5);
231if(Debug) printf("res=0x%x rep[0]=0x%x rep[4]=0x%x \n",res,rep[0],((unsigned)(rep[4])));
232// port->CleanAll();
233 if(res==0) continue;
234 // if(res==5 && rep[0]=='D' && (rep[4] & 0x01)) Reached=true;
235 if(rep[0]=='D' && (rep[4] & 0x01)) Reached=true;
236 }
237 if(Debug) printf("ArmVacuumControl reached %d, timeout is %d. Done.\n",tme,timeout);
238 if(tme>=timeout) return -tme;
239 else return tme;
240
241}
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 
)
897{
898 // returns the sequence number of the given emulsion in the bank
899 // if not found, returns -1
900 for(int i=0;i<BankS[bnk].NEmulsions+BankS[bnk].NSeparators;i++) {
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])
906 return i;
907 }
908
909 return -1;
910}

◆ GetLoadedId()

int AcqSerialPlateChanger::GetLoadedId ( int *  id0 = NULL,
int *  id1 = NULL,
int *  id2 = NULL,
int *  id3 = NULL 
)
577{
578 //returns 0 if no emulsion on the stage
579 if(!EmulsionOnTableS) return 0;
580 if(id0) (*id0)=EmulsionOnTableS->id.Part[0];
581 if(id1) (*id1)=EmulsionOnTableS->id.Part[1];
582 if(id2) (*id2)=EmulsionOnTableS->id.Part[2];
583 if(id3) (*id3)=EmulsionOnTableS->id.Part[3];
584 return 1;
585}
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 
)
279{
280 // Moves arm horisontally to position <position>, if not reached within given timeout returns -timeout,
281 // otherwise returns actual time spent to reach position
282 // ************ WARNING!!!!!!! This low level function is not mechanically safe!!
283 // ************ It may damage the plate changer
284 // ************ if used without caution to set the arm into UPMOST POSITION!
285
286 int tme=0;
287 int res;
288 char str[8];
289 char rep[128];
290if(Debug) printf("GoOnHAxis(%d, %d) called.\n",position,timeout);
291 str[0]='X';
292 str[1]=position & 0x07;
293 bool Reached=false;
294 if(port->SendString(str,2)!=2) return -tme;
295 while( !Reached && tme<timeout)
296 {
297 str[0]='Q';
298 if(port->SendString(str,1)!=1) return -tme;
299 port->Flush();
300 gSystem->Sleep(50);tme++;
301 port->Flush();
302 res=port->RecvString(rep,5);
303if(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])));
304 if(res==0) continue;
305 if(rep[0]=='D' && (rep[1] & 0x40) && (rep[1] & 0x10) && !(rep[1] & 0x80) && !(rep[1] & 0x20)) Reached=true;
306 }
307 if(Debug) printf("GoOnHAxis reached %d, timeout is %d. Done.\n",tme,timeout);
308 if(tme>=timeout) return -tme;
309 else return tme;
310
311
312}
MFTYPE32 long position
Definition: Milproto.h:644

◆ GoOnVAxis()

int AcqSerialPlateChanger::GoOnVAxis ( int  position,
int  timeout 
)
314{
315 // Moves arm vertically to position <position>, if not reached within given timeout returns -timeout,
316 // otherwise returns actual time spent to reach position
317 int tme=0;
318 int res;
319 char str[8];
320 char rep[128];
321if(Debug) printf("GoOnVAxis(%d, %d) called.\n",position,timeout);
322 str[0]='Y';
323 str[1]=position & 0x07;
324 bool Reached=false;
325 if(port->SendString(str,2)!=2) return -tme;
326 while( !Reached && tme<timeout)
327 {
328 str[0]='Q';
329 if(port->SendString(str,1)!=1) return -tme;
330 port->Flush();
331 gSystem->Sleep(50);tme++;
332 port->Flush();
333 res=port->RecvString(rep,5);
334 if(res==0) continue;
335if(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;
337 }
338 if(Debug) printf("GoOnVAxis reached %d, timeout is %d. Done.\n",tme,timeout);
339 if(tme>=timeout) return -tme;
340 else return tme;
341
342
343}

◆ Initialize()

int AcqSerialPlateChanger::Initialize ( AcqStage1 Stage = NULL)
106{
107 // initializes the arm drives, vacuum generators,
108 // moves the arm to position 1 up,
109 // reads the status file and sets flags InitDone, Ready
110 ST=Stage;
111 int tme=0;
112 int res;
113// int32 read;
114// int32 bytesPerSamp;
115// uInt8 datain[8];
116// uInt8 dataout[8] = {0,0,0,0,0,0,0,0};
117 printf("Initializing Plate changer..\n");
118 port=new AcqCOM();
119 port->Close();
120 if(!port->Open(ComPort,ComBaud)) {printf("Can't open COM port! PlateChanger Init failed.\n"); return 0;}
121 PowerON();
123 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
124 Park(1);
125 InitDone=true;
126 Ready=false;
127 printf("Reading status file.."); fflush(stdout);
128
130
132 printf("Done!"); fflush(stdout);
133 Dump();
134 PowerOFF();
135 return 1;
136}
#define VPOS_UP
Definition: AcqPlateChanger.h:25
FILE * stdout
Definition: AcqCOM.h:14
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 
)
464{
465 // Lets user load the emulsion pile into <isrc> bank, updates StatusFile.
466if(Debug) printf(" LoadBrick(%d,%d,%d,%d,%d,%d) called.\n",Brick,Nemulsions, isrc,idest,Separators,FirstIsSeparator);
467 int res,inumem,ibrick;
468 ibrick=Brick;
469 inumem=Nemulsions;
470 if(isrc<1 || isrc>3 || idest<1 || idest>3 || isrc==idest || inumem<=0) {
471 printf("Wrong bank assignements!\n");
472 return;
473 }
474if(!InitDone) Initialize();
475 PowerON();
476Park(idest);
477printf("Load source bank, top sheet must be ");
478if( FirstIsSeparator) printf("the separator sheet ");
479else printf("the first emulsion ");
480printf(", then press any key :"); fflush(stdout);
481getchar();
482printf("\n");
483
485while(res>=0){
486 printf("Please remove emulsion from the stage, then press any key :");
487 getchar();
488 printf("\n");
490}
491//for(int bnk=0; bnk<NumberOfBanks+1;bnk++){
492// BankS[bnk].NEmulsions=0;
493// BankS[bnk].NSeparators=0;
494// }
495ResetBanks();
496SourceBank=isrc;
497DestinationBank=idest;
498
499BankS[isrc].NEmulsions=inumem;
500if( Separators ) BankS[isrc].NSeparators=inumem;
501if( FirstIsSeparator ) {
502 (BankS[isrc].NSeparators)++;
503 BankS[isrc].Plates[0]=new TPlateS; //add sep
504 BankS[isrc].Plates[0]->SeqNumber=0;
505 BankS[isrc].Plates[0]->InBank=isrc;
506 BankS[isrc].Plates[0]->IsSeparator=true;
507 BankS[isrc].Plates[0]->id.Part[0]=ibrick;
508 BankS[isrc].Plates[0]->id.Part[1]=0;
509 BankS[isrc].Plates[0]->id.Part[2]=0;
510 BankS[isrc].Plates[0]->id.Part[3]=0;
511
512}
513int Fsep;
514Fsep=FirstIsSeparator?1:0;
515if( Separators ) for(int i=0;i<inumem;i++) {
516 BankS[isrc].Plates[i*2+Fsep]=new TPlateS; //add plate
517 BankS[isrc].Plates[i*2+Fsep]->SeqNumber=i*2+Fsep;
518 BankS[isrc].Plates[i*2+Fsep]->InBank=isrc;
519 BankS[isrc].Plates[i*2+Fsep]->IsSeparator=false;
520 BankS[isrc].Plates[i*2+Fsep]->id.Part[0]=ibrick;
521 BankS[isrc].Plates[i*2+Fsep]->id.Part[1]=i+1;
522 BankS[isrc].Plates[i*2+Fsep]->id.Part[2]=0;
523 BankS[isrc].Plates[i*2+Fsep]->id.Part[3]=0;
524
525 BankS[isrc].Plates[i*2+1+Fsep]=new TPlateS; //add sep
526 BankS[isrc].Plates[i*2+1+Fsep]->SeqNumber=i*2+1+Fsep;
527 BankS[isrc].Plates[i*2+1+Fsep]->InBank=isrc;
528 BankS[isrc].Plates[i*2+1+Fsep]->IsSeparator=true;
529 BankS[isrc].Plates[i*2+1+Fsep]->id.Part[0]=ibrick;
530 BankS[isrc].Plates[i*2+1+Fsep]->id.Part[1]=i+1;
531 BankS[isrc].Plates[i*2+1+Fsep]->id.Part[2]=0;
532 BankS[isrc].Plates[i*2+1+Fsep]->id.Part[3]=0;
533
534}
535else for(int i=0;i<inumem;i++) {
536 BankS[isrc].Plates[i]=new TPlateS; //add emulsion
537 BankS[isrc].Plates[i]->SeqNumber=i;
538 BankS[isrc].Plates[i]->InBank=isrc;
539 BankS[isrc].Plates[i]->IsSeparator=false;
540 BankS[isrc].Plates[i]->id.Part[0]=ibrick;
541 BankS[isrc].Plates[i]->id.Part[1]=i+1;
542 BankS[isrc].Plates[i]->id.Part[2]=0;
543 BankS[isrc].Plates[i]->id.Part[3]=0;
544
545}
546
547
548Ready=true;
549
551PowerOFF();
552 if(Debug) printf(" LoadBrick() done.\n");
553
554}
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]

int AcqSerialPlateChanger::LoadPlate ( IdentifierS  id)
784{
785 // Loads the plate with given Id
786 // returns 0 if failed,
787 // 1 if succeeded,
788 // 2 if plate is already on the table
789 printf("LoadPlate is in progress...\n"); fflush(stdout);
790 int SeqN=-1,sn,BankN;
791 int Mfrom, Mto;
792 int res;
793 if(FindEmulsion(id,0)>=0) {printf("Load Plate is complete (plate was already on the stage).\n"); return 2; }//Already loaded
794 for(int bnk=1; bnk<NumberOfBanks+1;bnk++) {
795 sn=FindEmulsion(id,bnk);
796 if(sn>=0){ SeqN=sn; BankN=bnk; break;}
797 }
798 if(SeqN<0) {printf("Load Plate is failed. Emulsion is not found in banks!\n"); return 0; }//Emulsion is not found anywhere
799 printf("Required emulsion is found in bank #%d at position %d\n",BankN,SeqN+1);
800 // Emulsion is in bank BankN at the position SeqN, SeqN=0 means at the top
801 //Now put it onto the table
802 if(ST)
803 { //Move stage to exchange position
804 ST->Z->PosMove(ZLoadPosition,1e9,1e9);
805 ST->X->PosMove(XLoadPosition,1e9,1e9);
806 ST->Y->PosMove(YLoadPosition,1e9,1e9);
807 printf("Waiting for stage to reach exchange position..\n"); fflush(stdout);
808 res=ST->X->WaitForMoveComplete(5e3);
809 res*=ST->Y->WaitForMoveComplete(5e3);
810 res*=ST->Z->WaitForMoveComplete(3e3);
811 if(res==0) {printf("Stage didn't reach exchange position! Unload Plate is failed. \n"); return 0; }
812 }
813 else { printf("No connection with the stage (stage pointer is not set)!!! Unload Plate is failed. \n"); return 0; }
814 printf("OK.\n"); //reached position;
815
816 if(BankN==SourceBank) { Mfrom=BankN; Mto=DestinationBank;}
817 else { Mto=SourceBank; Mfrom=BankN;}
818 PowerON();
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);
822 if(MoveEmulsion(0,Mto)!=1) { Park(Mto); return 0;};
825 printf("Done.\n"); fflush(stdout);
826 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') return 0; else printf(" Continue.\n");}
827
828 }
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++){ //move from one bank to another all unnecessary plates
831 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') return 0; else printf(" Continue.\n");}
832 AddToBank(Mto,TakeFromBank(Mfrom));
833 if(MoveEmulsion(Mfrom,Mto)!=1) { Park(Mto); return 0;};
834 }
835 printf("Done.\n"); fflush(stdout);
836 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') return 0; else printf(" Continue.\n");}
837
838 //Now top in Mfrom bank must be emulsion that we search for
839 if(FindEmulsion(id,Mfrom)!=0) {
840 printf("Brick structure incosistent!!! Reload the brick!\n");
841 return 0; //Inconsistency!!!!!
842 }
843 printf("OK..moving emulsion to the stage.."); fflush(stdout);
844 EmulsionOnTableS=TakeFromBank(Mfrom); //if movement is OK update database
846 if(MoveEmulsion(Mfrom,0)!=1) { Park(Mto); return 0;};
847 printf("Done.\n"); fflush(stdout);
848 Park(Mfrom);
849
850 printf("Load Plate is complete.\n");
852 PowerOFF();
853 return 1;
854}
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 
)
770{
771 // Loads the plate with given indices (id0 is brick number, id1 is plate number)
772 // returns 0 if failed,
773 // 1 if succeeded,
774 // 2 if plate is already on the table
776id.Part[0]=id0;
777id.Part[1]=id1;
778id.Part[2]=id2;
779id.Part[3]=id3;
780return LoadPlate(id);
781}
int LoadPlate(IdentifierS id)
Definition: AcqSerialPlateChanger.cxx:783
UInt_t id
Definition: tlg2couples.C:117
Definition: AcqSerialPlateChanger.h:33

◆ MoveEmulsion()

int AcqSerialPlateChanger::MoveEmulsion ( int  isrc,
int  idst 
)
592{
593 // Moves one sheet from bank to bank, whatever it is : emulsion or separator
594 if(Debug) printf(" --- MoveEmulsion(%d,%d)\n",isrc,idest);
595 int res,attempt=0;
596 int cornpos;
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;}
600// if(!PowerON()) return -1;
601 printf("\n%d > %d",isrc,idest); fflush(stdout);
602 if(isrc==0) {
603 if(!LiftCorners) {
604 res=GoOnHAxis(isrc,PositionTimeout);
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;}
609 TableVacuumControl(false,1,true);
610 if(res<0) {printf("ArmVacuum is not reached in 2 seconds!\n");}
611 if(res<0) { GoOnVAxis(VPOS_UP,PositionTimeout); return 0;} //error
612 }
613 TableVacuumControl(false,1,true);
614 attempt=0;
615 while(attempt<NumberOfAttempt){
616 attempt++;
617 if((!LiftCorners) || (attempt>1)) {
618 TableVacuumControl(false,1,true);
619 gSystem->Sleep(100);
621 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
622// res=GoOnVAxis(VPOS_UP,PositionTimeout);
624 if(res>=0) break; //The emulsion is taken succesfully
625 }
626//if not: try to lift up corners
627 res=ArmVacuumControl(false,1); // leave emulsion
628 TableVacuumControl(false,1);
629// if((attempt/2.)==int(attempt/2.)) cornpos=4; else cornpos=5; //try to lift the corner = pos #4 or #5
630 cornpos=4; //try to lift the corner = pos #4 or #5
631 res=GoOnHAxis(cornpos,PositionTimeout); //try to lift the corner = pos #4 or #5
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;}
635 res=ArmVacuumControl(true,VacuumTimeout); //vacuum ON
636 res=GoOnVAxis(VPOS_ABOVE_STAGE,2*PositionTimeout); //lift the corner
637 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
638
640 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
641 res=ArmVacuumControl(false,1); //Vacuum OFF
642 res=GoOnVAxis(VPOS_UP,PositionTimeout); // Go UP
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");}
645
646 cornpos=5; //try to lift the corner = pos #4 or #5
647 res=GoOnHAxis(cornpos,PositionTimeout); //try to lift the corner = pos #4 or #5
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;}
651 res=ArmVacuumControl(true,VacuumTimeout); //vacuum ON
652 res=GoOnVAxis(VPOS_ABOVE_STAGE,2*PositionTimeout); //lift the corner
653 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
654
656 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
657 res=ArmVacuumControl(false,1); //Vacuum OFF
658 res=GoOnVAxis(VPOS_UP,PositionTimeout); // Go UP
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");}
661 // res=ArmVacuumControl(true,VacuumTimeout); //Vacuum ON
662
663
664 res=GoOnHAxis(isrc,PositionTimeout); //go back to 0 position
665 if(res<0) {printf("Hpos is not reached in 5 seconds!\n");return 0;}
666// res=ArmVacuumControl(true,VacuumTimeout); //Vacuum ON
667 res=GoOnVAxis(VPOS_DOWN_TO_STAGE,PositionTimeout); //and DOWN again, ready for the next attempt
668 if(res<0) {printf("Vpos is not reached in 5 seconds!\n");return 0;}
669 res=ArmVacuumControl(true,VacuumTimeout); //Vacuum ON
670 }
671 TableVacuumControl(false,1);
672
673 if(attempt==NumberOfAttempt) {
674 ArmVacuumControl(false,1);
676 printf("Robot can't take plate from the stage!\n");
677 return 0;}
678 }
679 else { //taking from the bank - perform attempts to separate top emulsion from the rest
680 res=GoOnHAxis(isrc,PositionTimeout);
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;}
684 if(isrc==0) TableVacuumControl(false,1);
686 if(res<0 && isrc==0) {printf("ArmVacuum is not reached in 2 seconds!\n");}
687 if(res<0) { GoOnVAxis(VPOS_UP,PositionTimeout); return 0;} //no more emulsion in the bank
688 if(Debug) printf("Arm vac seems ok... trying to separate emulsions..\n");
689 for(int att=0;att<SeparationAttempts;att++){
690 if(Debug) printf("Attempt %d..going up..\n",att+1);
691 res=GoOnVAxis(VPOS_UP,PositionTimeout); // Go UP
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;}
696 }
697 if(Debug) printf("Separation loop is complete..\n");
698
699 }
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);
701
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);
705 res=GoOnHAxis(idest,PositionTimeout);
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);
710 res=ArmVacuumControl(false,1);
711 if(idest==0) {
713 if(res<0)
714 {
715 printf("TableVacuum is not reached in 5 seconds!\n");
717 if(res<0) printf("Vpos is not reached in 5 seconds!\n");
718 return 0;
719
720 }
721
722 }
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");
727
728 return 1;
729
730}
#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 ( )
86{
87 // resets the power on platechanger arm, turns off the vacuums
88/* uInt8 dataout[8] = {0,0,0,0,0,0,0,0};
89 int32 read;
90 //Writing to P5
91 DAQmxWriteDigitalLines (writehandle, 1, 1, 10.0, DAQmx_Val_GroupByChannel , dataout, &read, NULL);
92 DAQmxWaitUntilTaskDone (writehandle, 10.0);
93 DAQmxStopTask (writehandle);
94 //Writing to P4
95 DAQmxWriteDigitalLines (writehandlez, 1, 1, 10.0, DAQmx_Val_GroupByChannel , dataout, &read, NULL);
96 DAQmxWaitUntilTaskDone (writehandlez, 10.0);
97 DAQmxStopTask (writehandlez);
98*/ if(Debug) printf("OnReset called\n");
99 InitDone=false;
100 Ready=false;
101 PowerOFF(100);
102 if(Debug) printf("OnReset done.\n");
103}

◆ Park()

int AcqSerialPlateChanger::Park ( int  idst)
912{
913 // Moves the arm up and to the idest position
914 PowerON();
915 int res;
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;}
919 res=GoOnHAxis(idest,PositionTimeout);
920 if(res<0) {printf("Hpos is not reached in 5 seconds!\n");return 0;}
921 PowerOFF();
922 return 1;
923}

◆ PowerOFF()

int AcqSerialPlateChanger::PowerOFF ( int  timeout = 100)
174{
175 // Turns arm drives power OFF.
176 if(Debug) printf("PowerOFF called.\n");
177
178 int tme=0;
179 int res;
180 char str[8];
181 char rep[128];
182 str[0]='V';
183 VacRegister = VacRegister & 0xEF;
184 str[1]=VacRegister;
185 bool Reached=false;
186 if(port->SendString(str,2)!=2) return -tme;
187 while( !Reached && tme<timeout)
188 {
189 str[0]='Q';
190 if(port->SendString(str,1)!=1) return -tme;
191 port->Flush();
192 gSystem->Sleep(50);tme++;
193 port->Flush();
194 res=port->RecvString(rep,5);
195if(Debug) printf("res=0x%x rep[0]=0x%x rep[1]=0x%x \n",res,rep[0],rep[1]);
196 if(res==0) continue;
197 if(rep[0]=='D' && !(rep[1] & 0x08)) Reached=true;
198 }
199 if(Debug) printf("PowerOFF reached %d, timeout is %d. Done.\n",tme,timeout);
200
201 if(tme>=timeout) return -tme;
202 else return tme;
203 // check if stage coordinate changed during arm movements and rise StageError
204// if(fabs(StX - ST->X->GetPos()) >10.) StageError=true;
205// if(fabs(StY - ST->Y->GetPos()) >10.) StageError=true;
206// if(fabs(StZ - ST->Z->GetPos()) >5.) StageError=true;
207
208}

◆ PowerON()

int AcqSerialPlateChanger::PowerON ( int  timeout = 100)
139{
140 // Turns arm drives power ON.
141// StX=ST->X->GetPos();
142// StY=ST->Y->GetPos();
143// StZ=ST->Z->GetPos(); //save current stage positions
144 if(Debug) printf("PowerON called\n");
145 StageError=false;
146 int tme=0;
147 int res;
148 char str[8];
149 char rep[128];
150 str[0]='V';
151 VacRegister= VacRegister | 0x10;
152 str[1]=VacRegister;
153 bool Reached=false;
154 if(port->SendString(str,2)!=2) return -tme;
155 while( !Reached && tme<timeout)
156 {
157 str[0]='Q';
158 if(port->SendString(str,1)!=1) return -tme;
159 port->Flush();
160 gSystem->Sleep(50);tme++;
161 port->Flush();
162 res=port->RecvString(rep,5);
163if(Debug) printf("res=0x%x rep[0]=0x%x rep[1]=0x%x \n",res,rep[0],rep[1]);
164 if(res==0) continue;
165 if( rep[0]=='D' && (rep[1] & 0x08)) Reached=true;
166 }
167 if(Debug) printf("PowerON reached %d, timeout is %d. Done.\n",tme,timeout);
168 if(tme>=timeout) return -tme;
169 else return tme;
170
171}

◆ Print()

void AcqSerialPlateChanger::Print ( )
virtual
56{
57 // prints the content of emulsion banks
58 for(int bnk=0;bnk<NumberOfBanks+1;bnk++)
59 {
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");
63 else printf("\n\n");
64
65 for(int i=0;i<BankS[bnk].NEmulsions+BankS[bnk].NSeparators;i++)
66 {
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]);
72 }
73 }
74
75
76}

◆ ReadStatusFile()

int AcqSerialPlateChanger::ReadStatusFile ( )

UpdateBanksView();

383{
384 //restores the banks content from the status file
385if(Debug) printf(" ReadStatusFile() called.\n");
386 char line[128];
387 char key[32];
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; //date/time line is gisregarded
392 ResetBanks();
393
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);
401 ip=BankS[bnk].NEmulsions+BankS[bnk].NSeparators;
402 BankS[bnk].Plates[ip]=new TPlateS; //add plate
403 BankS[bnk].Plates[ip]->SeqNumber=ip;
404 BankS[bnk].Plates[ip]->InBank=bnk;
405 BankS[bnk].Plates[ip]->IsSeparator=false;
406 BankS[bnk].Plates[ip]->id.Part[0]=a;
407 BankS[bnk].Plates[ip]->id.Part[1]=b;
408 BankS[bnk].Plates[ip]->id.Part[2]=c;
409 BankS[bnk].Plates[ip]->id.Part[3]=d;
410 BankS[bnk].NEmulsions++;
411 }
412 if(strcmp(key,"SEPARATOR")==0){
413 ip=BankS[bnk].NEmulsions+BankS[bnk].NSeparators;
414 BankS[bnk].Plates[ip]=new TPlateS; //add separator
415 BankS[bnk].Plates[ip]->SeqNumber=ip;
416 BankS[bnk].Plates[ip]->InBank=bnk;
417 BankS[bnk].Plates[ip]->IsSeparator=true;
418 BankS[bnk].Plates[ip]->id.Part[0]=0;
419 BankS[bnk].Plates[ip]->id.Part[1]=0;
420 BankS[bnk].Plates[ip]->id.Part[2]=0;
421 BankS[bnk].Plates[ip]->id.Part[3]=0;
422 BankS[bnk].NSeparators++;
423 }
424 if(strcmp(key,"EndBank")==0){
425 if((bnk!=I) || (BankS[bnk].NSeparators!=seps) || (BankS[bnk].NEmulsions!=plts))
426 {
427 printf("Plate Changer Error: ChangerStatus.txt file is corrupted!!! Resetting banks.\n");
428 ResetBanks();
429 if(Debug) printf(" ReadStatusFile() done. returns 0.\n");
430
432 return 0;
433 }
434 }
435
436 }
437 fclose(fp);
439 Ready=true;
441 if(Debug) printf(" ReadStatusFile() done. returns 1.\n");
442 return 1;
443}
void d()
Definition: RecDispEX.C:381
void a()
Definition: check_aligned.C:59
fclose(pFile)

◆ ResetBanks()

void AcqSerialPlateChanger::ResetBanks ( )
558{
559 //resets the banks content
560 if(Debug) printf(" ResetBanks() called.\n");
563 for(int i=0;i<NumberOfBanks+1;i++) {
564 BankS[i].Number=i; //0- microscope, 1-3 banks
565 BankS[i].NEmulsions=0; //not known how many plates it contains
566 BankS[i].NSeparators=0;
567 for(int j=0;j<MAX_NUMBER_OF_PLATES*2;j++) {if(BankS[i].Plates[j]) delete BankS[i].Plates[j]; BankS[i].Plates[j]=NULL; }
568 }
569 Ready=false;
570//UpdateStatusFile();
571 if(Debug) printf(" ResetBanks() done.\n");
572
573}
#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 
)
244{
245 // Switches the vacuum on/off at the table, if vacuum is not reached within given timeout returns -timeout,
246 // otherwise returns actual time spent to reach vacuum
247 if(Debug) printf("TableVacuumControl(%d,%d,%d) called.\n",VacOn,timeout,BlowOn);
248 if(VacOn) BlowOn=false;
249 int tme=0;
250 int res;
251 char str[8];
252 char rep[128];
253 str[0]='V';
254 if(VacOn) VacRegister= VacRegister | 0x02; else VacRegister = VacRegister & 0xFD;
255 if(BlowOn) VacRegister= VacRegister | 0x04; else VacRegister = VacRegister & 0xFB;
256 str[1]=VacRegister;
257 bool Reached=false;
258 if(port->SendString(str,2)!=2) return -tme;
259 while( !Reached && tme<timeout)
260 {
261 str[0]='Q';
262 if(port->SendString(str,1)!=1) return -tme;
263 port->Flush();
264 gSystem->Sleep(50);tme++;
265 port->Flush();
266 res=port->RecvString(rep,5);
267if(Debug) printf("res=0x%x rep[0]=0x%x rep[4]=0x%x \n",res,rep[0],((unsigned)(rep[4])));
268 if(res==0) continue;
269 if(rep[0]=='D' && (rep[4] & 0x02)) Reached=true;
270 }
271 if(Debug) printf("TableVacuumControl reached %d, timeout is %d. Done.\n",tme,timeout);
272 if(tme>=timeout) return -tme;
273 else return tme;
274
275
276}

◆ TakeFromBank()

TPlateS * AcqSerialPlateChanger::TakeFromBank ( int  bnk)
751{
752 // takes info on plate from the container (nothing is done physically)
753 // to keep track of real world situation
754 TPlateS* retvalue;
755 if(BankS[bnk].NEmulsions+BankS[bnk].NSeparators<=0) return NULL;
756 retvalue=BankS[bnk].Plates[0];
757 for(int i=0;i<BankS[bnk].NEmulsions+BankS[bnk].NSeparators-1;i++) {
758 BankS[bnk].Plates[i]=BankS[bnk].Plates[i+1];
759
760 }
761 if(retvalue->IsSeparator) BankS[bnk].NSeparators--;
762 else BankS[bnk].NEmulsions--;
763 //if(bnk==0) EmulsionOnTableS=NULL;
765 retvalue->InBank=-1; //unknown
766 return retvalue;
767}

◆ UnloadBrick()

void AcqSerialPlateChanger::UnloadBrick ( )
446{
447 // Moves all emulsions and separators back to
448 // the source bank to allow user to withdraw the brick.
449 // Doesnt' reset banks!!!! Make sure to execute LoadBrick if you change the brick!
450if(Debug) printf(" UnloadBrick() called.\n");
451UnloadPlate(false);
452 printf("Moving emulsions from bank %d back to %d..",DestinationBank,SourceBank); fflush(stdout);
453 while( (BankS[DestinationBank].NEmulsions + BankS[DestinationBank].NSeparators) > 0 )
454 {
455 if(kbhit()){getch();printf("Paused. Continue? (y/n)"); if(getchar()=='n') return; else printf(" Continue.\n");}
456 if(MoveEmulsion(DestinationBank,SourceBank)!=1) { printf("MoveEmulsion returned FAILED!\n"); Park(DestinationBank); return;};
458 }
460 printf("Done. \nPlease take the brick from the bank %d\n", SourceBank);
461}
int UnloadPlate(bool TurnPowerOff=true)
Definition: AcqSerialPlateChanger.cxx:856

◆ UnloadPlate()

int AcqSerialPlateChanger::UnloadPlate ( bool  TurnPowerOff = true)
857{
858 // Unloads the plate from the stage to the source bank
859 // returns 1 if OK,
860 // 0 in case of error.
861 PowerON();
862printf("Unload plate is in progress...\n");
863 int isrc,idest;
865 if(!EmulsionOnTableS) return 1;
866 isrc=SourceBank;
867 idest=DestinationBank;
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");
871 return 0;
872 }
873//All is ok, now move plate to src bank
874 int res;
875 if(ST){ //Move stage to exchange position
876 ST->Z->PosMove(ZLoadPosition,1e9,1e9);
877 ST->X->PosMove(XLoadPosition,1e9,1e9);
878 ST->Y->PosMove(YLoadPosition,1e9,1e9);
879 res=ST->X->WaitForMoveComplete(5e3);
880 res*=ST->Y->WaitForMoveComplete(5e3);
881 res*=ST->Z->WaitForMoveComplete(3e3);
882 if(res==0) {printf("Stage didn't reach exchange position! Unload Plate is failed. \n"); return 0; }
883 }
886
887 if(MoveEmulsion(0,isrc)!=1) { printf("Unload Plate is failed. "); Park(idest); return 0;};
888
889printf("Unload Plate is complete.\n");
891if(TurnPowerOff)PowerOFF();
892return 1;
893
894}

◆ UpdateStatusFile()

void AcqSerialPlateChanger::UpdateStatusFile ( )
347{
348 // Syncronizes the status file with the current banks content
349if(Debug) printf(" UpdateStatusFile() called.\n");
350 char dateStr [9];
351 char timeStr [9];
352 _strdate( dateStr);
353 _strtime( timeStr );
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);
358 for(int bnk=0;bnk<NumberOfBanks+1;bnk++){
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);
365 for(int i=0;i<BankS[bnk].NEmulsions+BankS[bnk].NSeparators;i++)
366 if(BankS[bnk].Plates[i]->IsSeparator){ fprintf(fp,"SEPARATOR\n");fprintf(fpl,"SEPARATOR\n");}
367 else {
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]);
370 }
371 fprintf(fp,"EndBank %d\n",bnk);
372 fprintf(fpl,"EndBank %d\n",bnk);
373
374 }
375
376 fclose(fp);
377 fclose(fpl);
378 if(Debug) printf(" UpdateStatusFile() done.\n");
379
380}

Member Data Documentation

◆ 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

AcqStage1* AcqSerialPlateChanger::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: