📄 cml_ampdef.h
字号:
/// The amplifier is software disabled
AMPEVENT_SOFTDISABLE = 0x00010000,
/// A new home position has been captured.
/// Note that this features requires firmware version >= 4.77
AMPEVENT_HOME_CAPTURE = 0x00020000,
/// PVT buffer is empty.
AMPEVENT_PVT_EMPTY = 0x00040000,
/// This amplifier's event mask has not yet been initialized.
/// This event is for internal use only.
AMPEVENT_NOT_INIT = 0x80000000
};
/***************************************************************************/
/**
Latching Amplifier faults conditions. Once a fault is detected in the
amplifier, the amp will be disabled until the fault condition has been
cleared.
Use Amp::GetFaults to get a list of any active fault conditions, and
Amp::ClearFaults to clear one or more faults.
*/
/***************************************************************************/
enum AMP_FAULT
{
FAULT_DATAFLASH = 0x0001, ///< Fatal hardware error: the flash data is corrupt.
FAULT_ADCOFFSET = 0x0002, ///< Fatal hardware error: An A/D offset error has occurred.
FAULT_SHORT_CRCT = 0x0004, ///< The amplifier detected a short circuit condition
FAULT_AMP_TEMP = 0x0008, ///< The amplifier is over temperature
FAULT_MTR_TEMP = 0x0010, ///< A motor temperature error was detected
FAULT_OVER_VOLT = 0x0020, ///< The amplifier bus voltage is over the acceptable limit
FAULT_UNDER_VOLT = 0x0040, ///< The amplifier bus voltage is below the acceptable limit
FAULT_ENCODER_PWR = 0x0080, ///< Over current on the encoder power supply
FAULT_PHASE_ERR = 0x0100, ///< Amplifier phasing error
FAULT_TRK_ERR = 0x0200, ///< Tracking error, the position error is too large.
FAULT_I2T_ERR = 0x0400 ///< Current limited by i^2t algorithm.
};
/***************************************************************************/
/**
The amplifier's halt mode defines it's action when a halt command is issued
(Amp::HaltMove). When the halt command is issued, the move in progress will
be terminated using the method defined in this mode. Unless the HALT_DISABLE
method is selected, the amplifier will remain enabled and holding position
at the end of the halt sequence.
*/
/***************************************************************************/
enum HALT_MODE
{
HALT_DISABLE = 0, ///< Disable the amplifier immediately
HALT_DECEL = 1, ///< Slow down using the profile deceleration
HALT_QUICKSTOP = 2, ///< Slow down using the quick stop deceleration
HALT_ABRUPT = 3 ///< Slow down with unlimited deceleration
};
/***************************************************************************/
/**
The amplifier's quick stop mode defines it's action when a quick stop command
is issued (Amp::QuickStop).
The quick stop command differs from the halt command in that the amplifier
is always disabled at the end of the sequence. For some modes, the amplifier
automatically disables after halting the move. For others, the amplifier
halts the move and holds in the quick stop state. No new moves may be started
until the amplifier has manually been disabled.
*/
/***************************************************************************/
enum QUICK_STOP_MODE
{
QSTOP_DISABLE = 0, ///< Disable the amplifier immediately
QSTOP_DECEL = 1, ///< Slow down using the profile deceleration then disable
QSTOP_QUICKSTOP = 2, ///< Slow down using the quick stop deceleration then disable
QSTOP_ABRUPT = 3, ///< Slow down with unlimited deceleration then disable
QSTOP_DECEL_HOLD = 5, ///< Slow down and hold
QSTOP_QUICKSTOP_HOLD = 6, ///< Quick stop and hold
QSTOP_ABRUPT_HOLD = 7 ///< Abrupt stop and hold
};
/***************************************************************************/
/**
Home methods supported by the Copley amplifier. This enumeration gives
more useful names to the various homing methods currently supported by
the Copley amplifier.
The names of the members of this enumeration define the type of homing
procedure. These names are made up of the following elements:
-# CHM: prefix that identifies the member as a Copley Home Method
-# Sensor: Defines the type of sensor that defines the location of
the home position. It will be one of the following:
- PLIM: A positive limit switch
- NLIM: A negative limit switch
- PHOME: A positive home switch. This is a home switch that goes active
at some point, and remains active for all greater positions.
- NHOME: A negative home switch. This is a home switch that goes active
at some point, and remains active for all lower positions.
- LHOME: The lower side of a momentary home switch. This type of home
switch has an active region and is inactive on either side of that
region. This choice selects the lower edge of that switch.
- UHOME: The upper side of a momentary home switch. This type of home
switch has an active region and is inactive on either side of that
region. This choice selects the upper edge of that switch.
-# Index: This defines whether an encoder index pulse will be used to mark
the exact home location in conjunction with the sensor. If so, it
identifies which index position will be used. It will be one of the
following:
- none: If not specified, then no index is used. The edge of the sensor
will define the home position.
- ONDX: Outter index switch. This is an index on the inactive side of
the sensor
- INDX: Inner index switch. This is the first index on the active side of
the sensor.
-# Initial move direction: For some home methods, this is provided and defines
the initial move direction. The initial move direction is only specified
if it isn't already obvious based on the home type.
- none: The initial move direction is always obvious and does not need to be specified.
- NEG: Move in the negative direction if the home position is not obvious.
If the negative limit switch is encountered before the home region is
found, then the move direction will be reversed.
- POS: Move in the negative direction if the home position is not obvious.
If the positive limit switch is encountered before the home region is
found, then the move direction will be reversed.
*/
/***************************************************************************/
enum COPLEY_HOME_METHOD
{
/// Move into the negative limit switch, then back out to the
/// first encoder index pulse beyond it. The index position
/// is home.
CHM_NLIM_ONDX = 1,
/// Move into the positive limit switch, then back out to the
/// first encoder index pulse beyond it. The index position
/// is home.
CHM_PLIM_ONDX = 2,
/// Move to a positive home switch, then back out of it to the
/// first encoder index outside the home region. The index
/// position is home.
CHM_PHOME_ONDX = 3,
/// Move to a positive home switch, and continue into it to
/// the first encoder index inside the home region. The index
/// position is home.
CHM_PHOME_INDX = 4,
/// Move to a negative home switch, then back out of it to the
/// first encoder index outside the home region. The index
/// position is home.
CHM_NHOME_ONDX = 5,
/// Move to a negative home switch, and continue into it to
/// the first encoder index inside the home region. The index
/// position is home.
CHM_NHOME_INDX = 6,
/// Move to the lower side of a momentary home switch. Then
/// find the first encoder index pulse outside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_LHOME_ONDX_POS = 7,
/// Move to the lower side of a momentary home switch. Then
/// find the first encoder index pulse inside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_LHOME_INDX_POS = 8,
/// Move to the upper side of a momentary home switch. Then
/// find the first encoder index pulse inside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_UHOME_INDX_POS = 9,
/// Move to the upper side of a momentary home switch. Then
/// find the first encoder index pulse outside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_UHOME_ONDX_POS = 10,
/// Move to the upper side of a momentary home switch. Then
/// find the first encoder index pulse outside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_UHOME_ONDX_NEG = 11,
/// Move to the upper side of a momentary home switch. Then
/// find the first encoder index pulse inside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_UHOME_INDX_NEG = 12,
/// Move to the lower side of a momentary home switch. Then
/// find the first encoder index pulse inside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_LHOME_INDX_NEG = 13,
/// Move to the lower side of a momentary home switch. Then
/// find the first encoder index pulse outside the home region.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_LHOME_ONDX_NEG = 14,
/// Move into the negative limit switch. The edge of the
/// limit is home.
CHM_NLIM = 17,
/// Move into the positive limit switch. The edge of the
/// limit is home.
CHM_PLIM = 18,
/// Move to a positive home switch. The edge of the home
/// region is home.
CHM_PHOME = 19,
/// Move to a negative home switch. The edge of the home
/// region is home.
CHM_NHOME = 21,
/// Move to the lower side of a momentary home switch.
/// The edge of the home region is home.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_LHOME_POS = 23,
/// Move to the upper side of a momentary home switch.
/// The edge of the home region is home.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be positive.
CHM_UHOME_POS = 25,
/// Move to the upper side of a momentary home switch.
/// The edge of the home region is home.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_UHOME_NEG = 27,
/// Move to the lower side of a momentary home switch.
/// The edge of the home region is home.
/// If the home switch is not active when the home sequence
/// starts, then the initial move will be negative.
CHM_LHOME_NEG = 29,
/// Move in the negative direction until the first encoder
/// index pulse is found. The index position is home.
CHM_NDX_NEG = 33,
/// Move in the positive direction until the first encoder
/// index pulse is found. The index position is home.
CHM_NDX_POS = 34,
/// Set the current position to home.
CHM_NONE = 35,
/// Home to a hard stop. The motor will start running in the
/// positive direction until the homing current has been reached.
/// It will hold this current until the homing delay has expired.
/// The actual position after that delay is home.
CHM_HARDSTOP_POS = 255,
/// Home to a hard stop. The motor will start running in the
/// negative direction until the homing current has been reached.
/// It will hold this current until the homing delay has expired.
/// The actual position after that delay is home.
CHM_HARDSTOP_NEG = 254,
/// Home to a hard stop. The motor will start running in the
/// positive direction until the homing current has been reached.
/// It will hold this current until the homing delay has expired.
/// It will them move away from the hard stop until an index mark
/// is located. The index position is home.
CHM_HARDSTOP_ONDX_POS = 253,
/// Home to a hard stop. The motor will start running in the
/// negative direction until the homing current has been reached.
/// It will hold this current until the homing delay has expired.
/// It will them move away from the hard stop until an index mark
/// is located. The index position is home.
CHM_HARDSTOP_ONDX_NEG = 252,
/// Home using an extended home method. This is not a real home
/// method, but instead a flag that is used by the Amp::GoHome function
/// to indicate that a non-standard homing method is to be used.
/// When this value is passed it instructs the GoHome function to
/// execute the home sequence through the use of a special low-level
/// homing parameter implemented in the amplifier firmware. This
/// allows a bit more flexibility on the home sequencer.
CHM_EXTENDED = 256
};
/***************************************************************************/
/**
Point to point profile types. This enumeration gives the various profile
types supported by the Copley amplifiers. These profile types are used
when running in profile position mode (point to point moves).
*/
/***************************************************************************/
enum PROFILE_TYPE
{
/// Velocity profile. In this profile mode the velocity, acceleration and deceleration
/// values are used. The position value is also used, but it only defines the direction
/// of motion ( positive is position is >= 0, negative if position is < 0 ).
PROFILE_VEL = -1,
/// Trapezoidal profile. In this profile mode a position, velocity, acceleration
/// and deceleration may be specified.
/// This profile mode allows any of it's parameters (position, vel, accel, decel)
/// to be changed during the course of a move.
PROFILE_TRAP = 0,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -