⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cml_ampstruct.h

📁 美国COPLEY驱动器,程序开发工具之一.
💻 H
📖 第 1 页 / 共 3 页
字号:
   uint16 extended;

   /// Velocity to use for fast moves during the home procedure.
   /// This parameter is specified in "user units".  See 
   /// Amp::SetCountsPerUnit for details.
   uunit velFast;

   /// Velocity to use when seeking a sensor edge.
   /// This parameter is specified in "user units".  See 
   /// Amp::SetCountsPerUnit for details.
   uunit velSlow;

   /// Acceleration to use for the home procuedure.
   /// This parameter is specified in "user units".  See 
   /// Amp::SetCountsPerUnit for details.
   uunit accel;

   /// Offset from located home position to zero position.
   /// After the home position is found as defined by the home method,
   /// this offset will be added to it and the resulting position will
   /// be considered the zero position.
   /// This parameter is specified in "user units".  See 
   /// Amp::SetCountsPerUnit for details.
   uunit offset;

   /// Home current limit.  This parameter is only used when running
   /// in one of the 'home to hard stop' homing modes.  In all other
   /// modes this parameter may be left uninitialized.
   /// The current should be specified in units of 0.01 Amps
   /// (i.e. 100 for 1.0 Amp)
   int16 current;

   /// Home delay.  This parameter is only used when running
   /// in one of the 'home to hard stop' homing modes.  In all other
   /// modes this parameter may be left uninitialized.
   /// The delay is specified in units of milliseconds.
   int16 delay;

   /// Default constructor, just set the method to none and the other
   /// parameters to zero.
   HomeConfig( void )
   {
      method = CHM_NONE;
      extended = 0;
      velFast = 0;
      velSlow = 0;
      accel   = 0;
      offset  = 0;
      current = 0;
      delay   = 0;
   }
};

/***************************************************************************/
/**
  Amplifier profile parameters.  This structure holds all the parameters 
  related to point-to-point profile moves.
  */
/***************************************************************************/
struct ProfileConfig
{
   /// Type of profile to be used.
   PROFILE_TYPE type;

   /// For absolute moves this is an absolute position,
   /// for relative moves it's a distance to move.
   uunit pos;

   /// Velocity limit for move.
   uunit vel;

   /// Acceleration limit for move.
   uunit acc;

   /// Deceleration limit for move.
   uunit dec;

   /// Acceleration value to use when aborting a running
   /// trajectory.  This is the same as the 'quick stop'
   /// deceleration.
   uunit abort;

   /// Jerk limit for move.
   uunit jrk;

   /// Default constructor.  Simply set all parameters to zero.
   ProfileConfig( void )
   {
      type = PROFILE_TRAP;
      pos = vel = acc = dec = jrk = abort = 0;
   }
};

/***************************************************************************/
/**
  Position and velocity error windows.
  */
/***************************************************************************/
struct TrackingWindows
{
   /// Tracking error window.  
   /// See Amp::SetPositionErrorWindow for more information
   uunit trackErr;

   /// Position warning window.
   /// See Amp::SetPositionWarnWindow for more information
   uunit trackWarn;

   /// Position tracking & settling window.
   /// See Amp::SetSettlingWindow for more information
   uunit settlingWin;

   /// Position tracking & settling time (ms).
   /// See Amp::SetSettlingTime for more info
   uint16 settlingTime;

   /// Velocity warning window
   /// See Amp::SetVelocityWarnWindow for more information
   uunit velWarnWin;

   /// Velocity warning window time
   /// See Amp::SetVelocityWarnTime for more information
   uint16 velWarnTime;

   TrackingWindows( void );
};

/***************************************************************************/
/**
  Motor information structure.  This structure holds information about the 
  motor connected to the amplifier.

  The amplifier uses the information in this structure when controlling the
  motor.  It is very important that the information provided to the amplifier
  be as accurate as possible for proper motor control.

  Use the methods Amp::GetMtrInfo and Amp::SetMtrInfo to upload / download
  the information contained in this structure.

  Note that unlike many amplifier parameters, motor parameters are always 
  stored in non-volatile flash memory.
  */
/***************************************************************************/
struct MtrInfo
{
   /// Motor type
   uint16 type;

   /// Name of the motor manufacturer
   char mfgName[ COPLEY_MAX_STRING ];

   /// Motor model number
   char model[ COPLEY_MAX_STRING ];

   /// Number of pole pairs (i.e. number of electrical phases) 
   /// per rotation.  Used for rotory motors only.
   int16 poles;

   /// Motor resistance (10 milliohm units)
   uint16 resistance;

   /// Motor inductance (10 microhenry units)
   uint16 inductance;

   /// Peak torque (0.01 Newton millimeters)
   uint32 trqPeak;

   /// Continuous torque (0.01 Newton millimeters)
   uint32 trqCont;

   /// Torque constant (0.01 Newton millimeters / Amp)
   uint32 trqConst;

   /// Max velocity 
   uunit  velMax;

   /// Back EMF constant (10 millivolts / KRPM)
   uint32 backEMF;

   /// Inertia
   uint32 inertia;

   /// Motor has a temperature sensor (true/false)
   bool   tempSensor;

   /// Reverse motor wiring if true
   bool   mtrReverse;

   /// Reverse encoder direction if true
   bool   encReverse;

   /// Type of hall sensors on motor.  See documentation for details
   int16 hallType;

   /// Hall wiring code, see documentation for details
   int16 hallWiring;

   /// Hall offset (degrees)
   int16 hallOffset;

   /// Motor has a brake if true
   bool   hasBrake;

   /// Delay (milliseconds) between disabling amp & applying brake
   /// During this time the amp will attempt to actively stop motor
   int16 stopTime;

   /// Delay (milliseconds) between applying brake & disabling PWM
   int16 brakeDelay;

   /// Velocity below which brake will be applied.
   uunit brakeVel;

   /// Encoder type.  See documentation for details
   int16 encType;

   /// Encoder counts / revolution (rotory motors only)
   int32 ctsPerRev;

   /// Encoder units (linear motor only)
   int16 encUnits;

   /// Encoder resolution (encoder units / count) - linear motors only
   int16 encRes;

   /// Motor electrical distance (encoder units / electrical phase) - linear only
   int32 eleDist;

   /// Motor units (used by CME program)
   int16 mtrUnits;

   /// Microsteps / motor rotation (used for Stepnet amplifiers)
   int32 stepsPerRev;

   /// Analog Encoder shift value (used only with Analog encoders)
   int16 encShift;

   /// Index mark distance (reserved for future use)
   int32 ndxDist;

   /// Load encoder type (0 for none).  See amplifier documentation
   /// for possible values.
   int16 loadEncType;

   /// Load encoder resolution.  This is encoder counts/rev for rotory
   /// encoders, or nanometers/count for linear encoders.
   int32 loadEncRes;

   /// Reverse load encoder if true.
   bool  loadEncReverse;

   /// Load encoder gear ratio.  This parameter is used by the CME software
   /// and gives a ratio of motor encoder counts to load encoder counts.
   int32 gearRatio;

   /// Resolver cycles / rev.  This parameter gives the number of 
   /// resolver cycles / motor rev.  It's only used on systems that
   /// use a resolver for position feedback.  Default is 1 cycle/rev.
   uint16 resolverCycles;

   /// Hall velocity shift value.  This parameter is only used on servo systems where
   /// there is no encoder and digital hall sensors are used for velocity feedback.
   /// In that case, this shift value can be used to scale up the calculated velocity.
   int16 hallVelShift;

   MtrInfo( void );
};

/***************************************************************************/
/**
  Programmable I/O pin configuration
  */
/***************************************************************************/
struct AmpIoCfg
{
   /// Maximum available on any amplifier
#define COPLEY_MAX_INPUTS         12
#define COPLEY_MAX_OUTPUTS        4

   /// Number of programmable inputs available on this amplifier.
   /// This is a read only parameter, writes have no effect.
   uint8 inputCt;

   /// Number of programmable outputs available on this amplifier.
   /// This is a read only parameter, writes have no effect.
   uint8 outputCt;

   /// Input pin pull-up / pull-down resister configuration.
   /// See Amp::SetIoPullup for more information
   uint16 inPullUpCfg;

   /// Input pin configuration for each pin.
   /// See Amp::SetInputConfig for more information.
   INPUT_PIN_CONFIG inCfg[ COPLEY_MAX_INPUTS ];

   /// Input pin debounce time (milliseconds)
   int16 inDebounce[ COPLEY_MAX_INPUTS ];

   /// Output pin configuration for each output pin
   /// See Amp::SetOutputConfig for more information
   OUTPUT_PIN_CONFIG outCfg[ COPLEY_MAX_OUTPUTS ];

   /// Output pin configuration mask for each pin.
   /// See Amp::SetOutputConfig for more information
   uint32 outMask[ COPLEY_MAX_OUTPUTS ];

    /// Output pin configuration mask for each pin.
   /// See Amp::SetOutputConfig for more information
   uint32 outMask1[ COPLEY_MAX_OUTPUTS ];

   AmpIoCfg( void );
};

/***************************************************************************/
/**
  Software limit switch configuration.  This structure may be used to pass
  software limit switch settings to an Amp object using the functions
  Amp::SetSoftLimits and Amp::GetSoftLimits
  */
/***************************************************************************/
struct SoftPosLimit
{
   /// Negative limit position.  Any time the motors actual position is less
   /// then this value, a negative software limit condition will be in effect
   /// on the amplifier.
   uunit neg;

   /// Positive limit position.  Any time the motors actual position is greater
   /// then this value, a positive software limit condition will be in effect
   /// on the amplifier.
   uunit pos;

   /// Software limit acceleration.
   /// 
   /// This parameter defines the acceleration value that will be used to stop the 
   /// motor at the software limit position.  Note that this parameter was added in
   /// amplifier firmware version 4.60.  Before that version the older current based
   /// software limit processing was used.
   ///
   /// If this parameter is set to zero (the default) then the software limits will
   /// act like virtual limit switches.  If the motor position exceeds the limit position
   /// then the amplifier will refuse to output current in the limit direction.
   uunit accel;

   /// Default constructor.  Simply sets both limits to zero.
   SoftPosLimit( void )
   {
      neg = pos = 0;
      accel = 0;
   }
};

/***************************************************************************/
/**
  Configuration structure used to set up the amplifier regeneration resister.
  The regen resister is not available on all amplifier models (currently only
  on the Xenus offline amplifier).

  These settings may be up/download from the amplifier using the functions
  Amp::SetRegenConfig and Amp::GetRegenConfig.
  */
/***************************************************************************/
struct RegenConfig
{
   /// Model number / name string for regen resister connected 
   /// to the amplifier.
   char model[ COPLEY_MAX_STRING ];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -