FEDRA emulsion software from the OPERA Collaboration
AcqAxis Class Reference

#include <AcqStage1.h>

Inheritance diagram for AcqAxis:
Collaboration diagram for AcqAxis:

Public Member Functions

 AcqAxis ()
 
 AcqAxis (int Ax)
 
void ArmBreakpoint (float Pos)
 
void ArmBreakpointSequence ()
 
void DisarmBreakpoint ()
 
void DisarmBreakpointSequence ()
 
void DumpBreakpointSequence ()
 
int FindHome (int Direction)
 
int GetLimiter ()
 
float GetPos ()
 
bool Initialize ()
 
bool IsBreakpointOccured ()
 
int IsBreakpointSequenceArmed ()
 
bool IsMoveComplete ()
 
void LoadBreakpointSequence (float *Pos, int N)
 
void LoadMoveCompleteCriteria (bool MotorOff, bool Stop, bool Delay, bool InPosition, float DeadBand, int sdelay, int minPulse)
 
void Move (float Speed, float Acc)
 
void PosMove (float Pos, float Speed, float Acc)
 
int ReadFollowingError ()
 
void Reset ()
 
void SetFilterFrequency (int Freq)
 
void SetFollowingError (u16 Error)
 
void Stop ()
 
void Test (float *Pos, int N)
 
int WaitForHome (int Timeout)
 
int WaitForMoveComplete (u32 Timeout)
 
virtual ~AcqAxis ()
 

Public Attributes

float Accel
 
int Axis
 
int BoardId
 
int CtlModeIsCWCCW
 
float EncoderToMicrons
 
int HomePol
 
float HomingSpeed
 
int Invert
 
int LimPol
 
int LinesRev
 
float MaxSpeed
 
float MicronsToSteps
 
float NominalReference
 
float Reference
 
int StepsRev
 
int TurnOffLightTime
 

Constructor & Destructor Documentation

◆ AcqAxis() [1/2]

AcqAxis::AcqAxis ( )
439 {
440  BoardId=1;
441  StepsRev=10000;
442  LinesRev=10000;
443  EncoderToMicrons=.05;
445  Accel=100000.000000;
446  MaxSpeed=25000.000000;
447  LimPol=0;
448  HomePol=0;
449  CtlModeIsCWCCW=0;
450  Invert=1;
451  HomingSpeed=10000;
452  Reference=0;
453 
454 }
int CtlModeIsCWCCW
Definition: AcqStage1.h:68
int LinesRev
Definition: AcqStage1.h:62
float MicronsToSteps
Definition: AcqStage1.h:64
int StepsRev
Definition: AcqStage1.h:61
float HomingSpeed
Definition: AcqStage1.h:71
int BoardId
Definition: AcqStage1.h:60
float Accel
Definition: AcqStage1.h:65
int HomePol
Definition: AcqStage1.h:67
float Reference
Definition: AcqStage1.h:72
float EncoderToMicrons
Definition: AcqStage1.h:63
float MaxSpeed
Definition: AcqStage1.h:66
int LimPol
Definition: AcqStage1.h:67
Definition: Dinv.hh:46

◆ AcqAxis() [2/2]

AcqAxis::AcqAxis ( int  Ax)
457 {
458  Axis=Ax;
459 }
int Axis
Definition: AcqStage1.h:59

◆ ~AcqAxis()

virtual AcqAxis::~AcqAxis ( )
inlinevirtual
57 {}

Member Function Documentation

◆ ArmBreakpoint()

void AcqAxis::ArmBreakpoint ( float  Pos)
697  {
698 //Sets breakpoint at position [mic] on an axis
699  long ActPos;
700  ActPos = Pos / EncoderToMicrons ;
701  if (Invert) ActPos = -ActPos;
702  flex_load_pos_bp(BoardId,0x20+Axis,ActPos,0xFF);
704  }
FLEXFUNC flex_load_pos_bp(BOARD, u8 axisOrEncoder, i32 breakpointPosition, u8 inputVector)
FLEXFUNC flex_enable_breakpoint(BOARD, u8 axisOrEncoder, u16 enable)

◆ ArmBreakpointSequence()

void AcqAxis::ArmBreakpointSequence ( )
766  {
767  //refresh index Var78 from Var76, where it's saved
768  // and starts BP grab sequence
769  // Doesn't check if the program is loaded!!!! - TODO
770  flex_xor_vars(BoardId,0x78,0x78,0x78); //set index to 0 to be sure
771 // DumpBreakpointSequence();
772  flex_add_vars(BoardId,0x78,0x76,0x78); //set index to Var76
773 // DumpBreakpointSequence();
775  //gSystem->Sleep(500);
776  }
FLEXFUNC flex_add_vars(BOARD, u8 variable1, u8 variable2, u8 returnVector)
FLEXFUNC flex_xor_vars(BOARD, u8 variable1, u8 variable2, u8 returnVector)
FLEXFUNC flex_run_prog(BOARD, u8 program)

◆ DisarmBreakpoint()

void AcqAxis::DisarmBreakpoint ( )
706  {
708  }

◆ DisarmBreakpointSequence()

void AcqAxis::DisarmBreakpointSequence ( )
761  {
762  //stops BP grab sequence
764  }
FLEXFUNC flex_stop_prog(BOARD, u8 program)

◆ DumpBreakpointSequence()

void AcqAxis::DumpBreakpointSequence ( )
789  {
790  // Debug function
791  i32 var;
792  i32 N78,N77,N76;
793  flex_read_var_rtn(BoardId,0x78,&N78);
794  flex_read_var_rtn(BoardId,0x77,&N77);
795  flex_read_var_rtn(BoardId,0x76,&N76);
796  // flex_flush_rdb(BoardId);
797 
798  printf("0x76:%d 0x77:%d 0x78:%d\n",N76,N77,N78);
799 // flex_read_var_rtn(BoardId,0x78,&N78);
800  }
FLEXFUNC flex_read_var_rtn(BOARD, u8 variable1, i32 FAR *value)
long i32
Definition: MotnCnst.h:35

◆ FindHome()

int AcqAxis::FindHome ( int  Direction)

here the homing sequence itself starts

632 {
633 // Finds home switch using the NI7344 onboard sequence
634 // the initial seacrh is performed with XY(Z)MaxSpeed
635 // in a given Direction (+1 or -1);
636 // the final approach is done with the fixed speed of 1/4 RPS to provide good
637 // accuracy.
638 // returns immidiately 1 if the sequence started, and 0 if parameters are wrong.
639 // To wait for the end use WaitForHome() function
640  int ActSpeed;
641  int ActAccel;
643  ActSpeed = abs(HomingSpeed * MicronsToSteps);
644  ActAccel = abs(Accel * MicronsToSteps);
645  flex_load_velocity(BoardId, Axis, ActSpeed, 0xFF);
649  int DirMap;
650  if(Direction>0) DirMap=0x0004;
651  else DirMap=0x0003;
652  flex_find_home(BoardId, Axis, DirMap);
653 // flex_find_reference(BoardId, Axis, 0, NIMC_FIND_HOME_REFERENCE);//Flex6.1.2
654  printf("Home Finding is started on axis %d..\n",Axis);
655  return 1;
656 }
FLEXFUNC flex_load_velocity(BOARD, u8 axisOrVectorSpace, i32 velocity, u8 inputVector)
FLEXFUNC flex_set_op_mode(BOARD, u8 axisOrVectorSpace, u16 operationMode)
FLEXFUNC flex_find_home(BOARD, u8 axis, u16 directionMap)
FLEXFUNC flex_load_acceleration(BOARD, u8 axisOrVectorSpace, u16 accelerationType, u32 acceleration, u8 inputVector)
#define NIMC_ACCELERATION
Definition: MotnCnst.h:197
#define NIMC_DECELERATION
Definition: MotnCnst.h:199
#define NIMC_ABSOLUTE_POSITION
Definition: MotnCnst.h:262

◆ GetLimiter()

int AcqAxis::GetLimiter ( )
614 {
615 //returns status of limiters on a given axis:
616 // 0 - no limiters reached
617 // 1 - "-" limiter reached
618 // 2- "+" limiter reached
619  unsigned char fwdStatus, revStatus;
620  flex_read_limit_status_rtn(BoardId, NIMC_LIMIT_INPUTS, &fwdStatus, &revStatus);
621  // flex_flush_rdb(BoardId);
622 
623  DWORD a = 0;
624  bool invert = Invert;
625  if (revStatus & (0x02 << (Axis-1))) a |= invert ? 2 : 1;
626  if (fwdStatus & (0x02 << (Axis-1))) a |= invert ? 1 : 2;
627  return a;
628 }
FLEXFUNC flex_read_limit_status_rtn(BOARD, u16 limitType, u8 FAR *forwardLimitStatus, u8 FAR *reverseLimitStatus)
#define NIMC_LIMIT_INPUTS
Definition: MotnCnst.h:211
void a()
Definition: check_aligned.C:59
int Invert
Definition: AcqStage1.h:70

◆ GetPos()

float AcqAxis::GetPos ( )
600 {
601 // returns position in [mic] of a given axis
602  long retval;
603  Double_t fretval;
604  flex_read_pos_rtn(BoardId, Axis, &retval);
605 // flex_flush_rdb(BoardId);
606 
607  if (Invert) retval = -retval;
608  fretval= retval * EncoderToMicrons * LinesRev / StepsRev;
609  return fretval;
610 ;
611 }
FLEXFUNC flex_read_pos_rtn(BOARD, u8 axis, i32 FAR *position)

◆ Initialize()

bool AcqAxis::Initialize ( )
464 {
465 //Initialises the axis
466  try
467  {
468 
469  if (flex_enable_axes( BoardId, 0, 2, 0x00) != NIMC_noError) throw(3);
470  if (flex_config_axis( BoardId, Axis, 0x20+Axis, 0, 0x40+Axis, 0) != NIMC_noError) throw(3);
471  if (flex_set_stepper_loop_mode( BoardId, Axis, 1) != NIMC_noError) throw(3);
472  if (flex_config_step_mode_pol( BoardId, Axis, 0x04 | ((! CtlModeIsCWCCW) ? 1 : 0)) != NIMC_noError) throw(3);
475  if (flex_load_follow_err( BoardId, Axis, 0, 0xFF) != NIMC_noError) throw(3);
476  if (flex_enable_home_inputs( BoardId, 0x0E) != NIMC_noError) throw(3);
477  if (flex_set_home_polarity( BoardId, ( HomePol) ? 0x0E : 0) != NIMC_noError) throw(3);
478  if (flex_set_limit_polarity( BoardId, ( LimPol) ? 0x0E : 0, ( LimPol) ? 0x0E : 0) != NIMC_noError) throw(3);
479  if (flex_enable_limits( BoardId, NIMC_LIMIT_INPUTS, 0x0E, 0x0E) != NIMC_noError) throw(3);
481 
484 // if (flex_configure_breakpoint( BoardId, Axis, NIMC_ABSOLUTE_BREAKPOINT, NIMC_SET_BREAKPOINT,0) != NIMC_noError) throw(3);
486  if (flex_enable_axes( BoardId, 0, 2, 0x0E) != NIMC_noError) throw(3);
487  }
488  catch (...)
489  {
490  return false;
491  };
492  SetFilterFrequency(0); //Must be set to maximum 25.6MHz to avoid missing lines at high speed
493  printf("Axis %d initialized siccessfully with parameters:\n",Axis);
494  Dump();
495  return true;
496 
497 }
FLEXFUNC flex_set_limit_polarity(BOARD, u8 forwardPolarityMap, u8 reversePolarityMap)
FLEXFUNC flex_enable_axes(BOARD, u8 reserved, u8 PIDRate, u8 axisMap)
FLEXFUNC flex_load_counts_steps_rev(BOARD, u8 axisOrEncoder, u16 unitType, u32 countsOrSteps)
FLEXFUNC flex_load_follow_err(BOARD, u8 axis, u16 followingError, u8 inputVector)
FLEXFUNC flex_set_stepper_loop_mode(BOARD, u8 axis, u16 loopMode)
FLEXFUNC flex_config_step_mode_pol(BOARD, u8 axisOrStepperOutput, u16 modeAndPolarityMap)
FLEXFUNC flex_enable_limits(BOARD, u16 limitType, u8 forwardLimitMap, u8 reverseLimitMap)
FLEXFUNC flex_configure_breakpoint(BOARD, u8 axisOrEncoder, u16 enableMode, u16 actionOnBreakpoint, u16 reserved)
FLEXFUNC flex_config_axis(BOARD, u8 axis, u8 primaryFeedback, u8 secondaryFeedback, u8 primaryOutput, u8 secondaryOutput)
FLEXFUNC flex_enable_home_inputs(BOARD, u16 homeMap)
FLEXFUNC flex_set_home_polarity(BOARD, u16 homePolarityMap)
#define NIMC_STEPS
Definition: MotnCnst.h:462
#define NIMC_COUNTS
Definition: MotnCnst.h:461
#define NIMC_ABSOLUTE_BREAKPOINT
Definition: MotnCnst.h:276
#define NIMC_OPERATION_SINGLE
Definition: MotnCnst.h:285
#define NIMC_SET_BREAKPOINT
Definition: MotnCnst.h:282
#define NIMC_noError
Definition: MotnErr.h:21
void SetFilterFrequency(int Freq)
Definition: AcqStage1.cxx:838

◆ IsBreakpointOccured()

bool AcqAxis::IsBreakpointOccured ( )
711  {
712  u16 status;
714  // flex_flush_rdb(BoardId);
715 
716  printf("Breakpoint Status: %d\n",status);
717  if(status & (0x01 << Axis))
718  return true;
719  else return false;
720  }
FLEXFUNC flex_read_breakpoint_status_rtn(BOARD, u8 axisOrEncoder, u16 breakpointType, u16 FAR *breakpointStatus)
unsigned short u16
Definition: MotnCnst.h:23

◆ IsBreakpointSequenceArmed()

int AcqAxis::IsBreakpointSequenceArmed ( )
779  {
780  //Returns number of breakpoints to occur in sequence.
781  // if 0 - sequence is not active or finished
782  i32 N78;
783  flex_read_var_rtn(BoardId,0x78,&N78);
784  // flex_flush_rdb(BoardId);
785 
786  return int(N78);
787  }

◆ IsMoveComplete()

bool AcqAxis::IsMoveComplete ( )
591 {
592 // chacks if Move Complete Flag is set
593  u16 mc;
595  if(mc==1) return true;
596  else return false;
597 }
FLEXFUNC flex_check_move_complete_status(BOARD, u8 axisOrVectorSpace, u16 axisOrVSMap, u16 *moveComplete)

◆ LoadBreakpointSequence()

void AcqAxis::LoadBreakpointSequence ( float *  Pos,
int  N 
)
723  {
724 //Sets breakpoint sequence and store the BP grab program.
725  u16 mask;
726  int label1=1;
727  int label2=2;
728  if(N>100) N=100;
729  if(N<=0) return;
730  i32 ActPos[120];
731  i32 NPos=N;
732  flex_load_var(BoardId,NPos,0x76); //store number of breakpoints in Var76 (save)
733  flex_load_var(BoardId,NPos,0x78); //store number of breakpoints in Var78 (index)
734  flex_load_var(BoardId,1,0x77); //store decrement=1 in Var77
735  for(u8 i=0;i<N;i++)
736  {
737  ActPos[i] = Pos[i] / EncoderToMicrons ;
738  if (Invert) ActPos[i] = -ActPos[i];
739  flex_load_var(BoardId,ActPos[i],i+1); //store breakpoints in Vars from 0x01 up
740  }
741  mask=(0x01 << Axis);
743 // flex_load_program_time_slice(BoardId,1,20,0xFF);
744  // Start the loop, index is in var 0x01 decrementing down to 0
746  flex_load_pos_bp(BoardId,0x20+Axis,0,0xF8); //load indirect from the index Var78
747  flex_enable_breakpoint(BoardId,0x20+Axis,0x01); //arm breakpoint
748  flex_insert_program_label(BoardId,label2); //loop till bp is occured
750  // flex_wait_on_event(BoardId,0,NIMC_WAIT,NIMC_CONDITION_POSITION_BREAKPOINT,(u8)(1<<Axis),0,NIMC_MATCH_ALL,65535,0);//FlexMotion6.1.2
751  //OK, BP is occured, decrementing index Var78 by Var77=1
752  flex_sub_vars(BoardId,0x78,0x77,0x78);
753  //Now if N=0 flag EQUALTO must be set... checking
755  flex_set_breakpoint_momo(BoardId,0x20+Axis,0,mask,0xFF); //reset output
756  // flex_enable_breakpoint(BoardId,0x20+Axis,0x00); //disable breakpoint
758 
759  }
FLEXFUNC flex_load_var(BOARD, i32 value, u8 variable1)
FLEXFUNC flex_sub_vars(BOARD, u8 variable1, u8 variable2, u8 returnVector)
FLEXFUNC flex_insert_program_label(BOARD, u16 labelNumber)
FLEXFUNC flex_end_store(BOARD, u8 program)
FLEXFUNC flex_set_breakpoint_momo(BOARD, u8 axisOrEncoder, u8 mustOn, u8 mustOff, u8 inputVector)
FLEXFUNC flex_begin_store(BOARD, u8 program)
FLEXFUNC flex_jump_label_on_condition(BOARD, u8 resource, u16 condition, u8 mustOn, u8 mustOff, u16 matchType, u16 labelNumber)
#define NIMC_MATCH_ALL
Definition: MotnCnst.h:228
#define NIMC_CONDITION_POSITION_BREAKPOINT
Definition: MotnCnst.h:248
#define NIMC_CONDITION_NOT_EQUAL
Definition: MotnCnst.h:242
unsigned char u8
Definition: MotnCnst.h:22

◆ LoadMoveCompleteCriteria()

void AcqAxis::LoadMoveCompleteCriteria ( bool  MotorOff,
bool  Stop,
bool  Delay,
bool  InPosition,
float  DeadBand,
int  sdelay,
int  minPulse 
)
568 {
569 // Defines conditions under which the Move Complete flag is set:
570 // Motor Off - says for itself
571 // Stop - Run/Stop flag must be Stopped
572 // Delay - MoveComplete flag is set after a given sdelay [ms]
573 // InPosition - when stage is within DeadBand [mic] from the target position.
574 //
575 // sdelay - settling time delay [ms]
576 // minPulse [ms] - minimum time for which MoveComplete status must be true
577 // even if the axis re-started, the flag stays for this time anyway
578  int criteria=1;
579  if(MotorOff) criteria+=2;
580  if(Stop) criteria+=4;
581  if(Delay) criteria+=8;
582  if(InPosition) criteria+=16;
583  int DBand;
584  DBand=DeadBand/EncoderToMicrons;
585 // printf("flex_config_mc_criteria(%d,%d,%d,%d,%d,%d)\n",BoardId, Axis, criteria, DBand, Delay, minPulse);
586  flex_config_mc_criteria(BoardId, Axis, criteria, DBand, sdelay, minPulse);
587 
588 }
FLEXFUNC flex_config_mc_criteria(BOARD, u8 axis, u16 criteria, u16 deadband, u8 delay, u8 minPulse)
void Stop()
Definition: AcqStage1.cxx:502

◆ Move()

void AcqAxis::Move ( float  Speed,
float  Acc 
)
549 {
550 //Moves stage axis infinitely with given speed [mic/s] and acceleration [mic/s2]
551  long retval;
552  int ActSpeed;
553  int ActAccel;
555  if (Speed > MaxSpeed) Speed = MaxSpeed;
556  if (Acc > Accel) Acc = Accel;
557  ActSpeed = Speed * MicronsToSteps;
558  if(Invert) ActSpeed=-ActSpeed;
559  ActAccel = Acc * MicronsToSteps;
560  flex_load_velocity(BoardId, Axis, ActSpeed, 0xFF);
563  flex_start(BoardId, Axis, 0);
564 
565 }
FLEXFUNC flex_start(BOARD, u8 axisOrVectorSpace, u16 axisOrVSMap)
#define NIMC_VELOCITY
Definition: MotnCnst.h:264
float Speed
Definition: hwinit.C:69

◆ PosMove()

void AcqAxis::PosMove ( float  Pos,
float  Speed,
float  Acc 
)
525 {
526 //Moves stage axis to position [mic] with given speed [mic/s] and acceleration [mic/s2]
527  long ActPos;
528  long retval;
529  int ActSpeed;
530  int ActAccel;
532  ActPos = Pos * MicronsToSteps;
533  if (Invert) ActPos = -ActPos;
534  if (Speed > MaxSpeed) Speed = MaxSpeed;
535  if (Acc > Accel) Acc = Accel;
536  ActSpeed = abs(Speed * MicronsToSteps);
537  ActAccel = abs(Acc * MicronsToSteps);
538  flex_read_pos_rtn(BoardId, Axis, &retval);
539 // flex_flush_rdb(BoardId);
540  if(retval==ActPos) return; //Already at position
541  flex_load_target_pos(BoardId, Axis, ActPos, 0xFF);
542  flex_load_velocity(BoardId, Axis, ActSpeed, 0xFF);
545  flex_start(BoardId, Axis, 0);
546 
547 }//_____________________________________________________________________________
FLEXFUNC flex_load_target_pos(BOARD, u8 axis, i32 targetPosition, u8 inputVector)

◆ ReadFollowingError()

int AcqAxis::ReadFollowingError ( )
845 {
846  // returns current position following error
847  // useful for debugging of the stage
848  short retval;
850  // flex_flush_rdb(BoardId);
851 
852  return retval;
853 }
FLEXFUNC flex_read_follow_err_rtn(BOARD, u8 axisOrVectorSpace, i16 FAR *followingError)

◆ Reset()

void AcqAxis::Reset ( )
509 {
510 //Resets a given axis
511  flex_reset_pos(BoardId, Axis, 0, 0, 0xFF);
512 }
FLEXFUNC flex_reset_pos(BOARD, u8 axis, i32 position1, i32 position2, u8 inputVector)

◆ SetFilterFrequency()

void AcqAxis::SetFilterFrequency ( int  Freq)
839 {
840  //sets digital filter cutoff frequency for the encoder
841  // F=25.6 /(2**Freq) MHz
843 }
FLEXFUNC flex_configure_encoder_filter(BOARD, u8 axisOrEncoder, u16 frequency)

◆ SetFollowingError()

void AcqAxis::SetFollowingError ( u16  Error)
855 {
856  flex_load_follow_err(BoardId,Axis,Error,0xFF);
857 }

◆ Stop()

void AcqAxis::Stop ( )
503 {
504 //Stops a given axis
506 }
FLEXFUNC flex_stop_motion(BOARD, u8 axisOrVectorSpace, u16 stopType, u16 axisOrVSMap)
#define NIMC_HALT_STOP
Definition: MotnCnst.h:208

◆ Test()

void AcqAxis::Test ( float *  Pos,
int  N 
)
802  {
803  u16 mask;
804  int label1=1;
805  int label2=2;
806  if(N>100) N=100;
807  if(N<=0) return;
808  i32 ActPos[120];
809  i32 NPos=N;
810  flex_load_var(BoardId,NPos,0x78); //store number of breakpoints in Var78
811  flex_load_var(BoardId,1,0x77); //store decrement=1 in Var77
812  for(u8 i=0;i<N;i++)
813  {
814  ActPos[i] = Pos[i] / EncoderToMicrons ;
815  if (Invert) ActPos[i] = -ActPos[i];
816  flex_load_var(BoardId,ActPos[i],i+1); //store breakpoints in Vars from 0x01 up
817  }
818  mask=(0x01 << Axis);
819 
821  // Start the loop, index is in var 0x01 decrementing down to 0
823  flex_load_pos_bp(BoardId,0x20+Axis,0,0xF8); //load indirect from the index Var78
824  flex_enable_breakpoint(BoardId,0x20+Axis,0x01); //arm breakpoint
825  flex_insert_program_label(BoardId,label2); //loop till bp is occured
827  //OK, BP is occured, decrementing index Var78 by Var77=1
828  flex_sub_vars(BoardId,0x78,0x77,0x78);
829  //Now if N=0 flag EQUALTO must be set... checking
833 
834  }

◆ WaitForHome()

int AcqAxis::WaitForHome ( int  Timeout)
659  {
660  int res;
661  printf("Waiting Home Finding Complete on axis %d..\n",Axis);
662  res=WaitForMoveComplete(Timeout);
663  gSystem->Sleep(100);
664  res=WaitForMoveComplete(Timeout);
665  gSystem->Sleep(100);
666  res=WaitForMoveComplete(Timeout);
667  if(res!=1) return 0;
668  u16 AxisStatus;
669  flex_read_axis_status_rtn(BoardId, Axis, &AxisStatus);
670  // flex_flush_rdb(BoardId);
671 
672  if(AxisStatus & 0x0400) {
673  printf("Home Finding Complete on axis %d..\n",Axis);
674  return 1;
675  }
676  else {
677  printf("*** Home Finding Failed on axis %d..\n",Axis);
678  return 0;
679  }
680  //Flex5.x
681 /* u16 found, finding;
682  flex_check_reference(BoardId, Axis, 0, &found, &finding);
683  while(finding) flex_check_reference(BoardId, Axis, 0, &found, &finding);
684  if(found) {
685  printf("Home Finding Complete on axis %d..\n",Axis);
686  return 1;
687  }
688  else {
689  printf("*** Home Finding Failed on axis %d..\n",Axis);
690  return 0;
691  }
692 */ //Flex6.1.2
693  }
FLEXFUNC flex_read_axis_status_rtn(BOARD, u8 axis, u16 FAR *axisStatus)
int WaitForMoveComplete(u32 Timeout)
Definition: AcqStage1.cxx:514

◆ WaitForMoveComplete()

int AcqAxis::WaitForMoveComplete ( u32  Timeout)
515 {
516 //Waits for a movement complete on a given axis ar timeout [ms],
517 //returns 1 if movement complete, 0 if timeout happened
518  u16 MComplete;
519  flex_wait_for_move_complete(BoardId, Axis,0,Timeout,10, &MComplete);
520 return MComplete;
521 }
FLEXFUNC flex_wait_for_move_complete(BOARD, u8 axisOrVectorSpace, u16 axisOrVSMap, u32 timeout, i32 pollInterval, u16 *moveComplete)

Member Data Documentation

◆ Accel

float AcqAxis::Accel

◆ Axis

int AcqAxis::Axis

◆ BoardId

int AcqAxis::BoardId

◆ CtlModeIsCWCCW

int AcqAxis::CtlModeIsCWCCW

◆ EncoderToMicrons

float AcqAxis::EncoderToMicrons

◆ HomePol

int AcqAxis::HomePol

◆ HomingSpeed

float AcqAxis::HomingSpeed

◆ Invert

int AcqAxis::Invert

◆ LimPol

int AcqAxis::LimPol

◆ LinesRev

int AcqAxis::LinesRev

◆ MaxSpeed

float AcqAxis::MaxSpeed

◆ MicronsToSteps

float AcqAxis::MicronsToSteps

◆ NominalReference

float AcqAxis::NominalReference

◆ Reference

float AcqAxis::Reference

◆ StepsRev

int AcqAxis::StepsRev

◆ TurnOffLightTime

int AcqAxis::TurnOffLightTime

The documentation for this class was generated from the following files: