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

📄 commands.h

📁 Luminary Micro BLDC motor control software
💻 H
📖 第 1 页 / 共 3 页
字号:
//! Specifies the motor stepping mode.
//
//*****************************************************************************
#define PARAM_STEP_MODE         0x24

//*****************************************************************************
//
//! Specifies the fixed on duration for application of motor winding current.
//
//*****************************************************************************
#define PARAM_FIXED_ON_TIME     0x25

//*****************************************************************************
//
//! Specifies the winding resistance.
//
//*****************************************************************************
#define PARAM_RESISTANCE        0x26

//*****************************************************************************
//
//! Specifies the blanking time after the current is removed.
//
//*****************************************************************************
#define PARAM_BLANK_OFF         0x27

//*****************************************************************************
//
//! Specifies the motor winding holding current.
//
//*****************************************************************************
#define PARAM_HOLDING_CURRENT   0x28

//*****************************************************************************
//
//! Specifies whether dynamic braking should be performed.
//
//*****************************************************************************
#define PARAM_USE_DYNAM_BRAKE   0x29

//*****************************************************************************
//
//! Specifies the maximum time that dynamic braking can be performed (in
//! order to prevent circuit or motor damage).
//
//*****************************************************************************
#define PARAM_MAX_BRAKE_TIME    0x2a

//*****************************************************************************
//
//! Specifies the time at which the dynamic braking leaves cooling mode
//! if entered.
//
//*****************************************************************************
#define PARAM_BRAKE_COOL_TIME   0x2b

//*****************************************************************************
//
//! Provides the fault status of the motor drive.  This value matches the
//! corresponding real-time data item; writing it will clear all latched
//! fault status.
//
//*****************************************************************************
#define PARAM_FAULT_STATUS      0x2c

//*****************************************************************************
//
//! Provides the status of the motor drive, indicating the operating mode
//! of the drive.  This value will be one of #MOTOR_STATUS_STOP,
//! #MOTOR_STATUS_RUN, #MOTOR_STATUS_ACCEL, or #MOTOR_STATUS_DECEL.
//
//*****************************************************************************
#define PARAM_MOTOR_STATUS      0x2d

//*****************************************************************************
//
//! Specifies whether DC injection braking should be performed.
//
//*****************************************************************************
#define PARAM_USE_DC_BRAKE      0x2e

//*****************************************************************************
//
//! Specifies the voltage to be applied during DC injection braking.
//
//*****************************************************************************
#define PARAM_DC_BRAKE_V        0x2f

//*****************************************************************************
//
//! Specifies the amount of time to apply DC injection braking.
//
//*****************************************************************************
#define PARAM_DC_BRAKE_TIME     0x30

//*****************************************************************************
//
//! Specifies the bus voltage at which the deceleration of the motor drive
//! is reduced in order to control increases in the bus voltage.
//
//*****************************************************************************
#define PARAM_DECEL_VOLTAGE     0x31

//*****************************************************************************
//
//! Specifies the target running current of the motor.
//
//*****************************************************************************
#define PARAM_TARGET_CURRENT    0x32

//*****************************************************************************
//
//! Specifies the maximum ambient temperature of the microcontroller.  If
//! the ambient temperature goes above this value, then an overtemperature
//! alarm is asserted.
//
//*****************************************************************************
#define PARAM_MAX_TEMPERATURE   0x33

//*****************************************************************************
//
//! Specifies the motor current at which the acceleration of the motor drive is
//! reduced in order to control increases in the motor current.
//
//*****************************************************************************
#define PARAM_ACCEL_CURRENT     0x34

//*****************************************************************************
//
//! Indicates whether or not Hall Effect sensor feedback is present on the
//! motor.  Things that require the sensor feedback in order to operate
//! (for example, closed-loop speed control) will be automatically disabled
//! when there is no sensor feedback present.
//
//*****************************************************************************
#define PARAM_SENSOR_PRESENT    0x35

//*****************************************************************************
//
//! Indicates the type of Hall Effect sensor feedback that is present on the
//! motor.  The Hall Effect sensor can be the Digital/GPIO type that is 
//! typically used, or can be the Analog/Linear type.
//
//*****************************************************************************
#define PARAM_SENSOR_TYPE       0x36

//*****************************************************************************
//
//! Indicates the value(s) of the various GPIO signals on the motor drive
//! board.
//
//*****************************************************************************
#define PARAM_GPIO_DATA         0x37

//*****************************************************************************
//
//! Indicates the number of CAN messages that have been received on the
//! CAN bus.
//
//*****************************************************************************
#define PARAM_CAN_RX_COUNT      0x38

//*****************************************************************************
//
//! Indicates the number of CAN messages that have been transmitted on the
//! CAN bus.
//
//*****************************************************************************
#define PARAM_CAN_TX_COUNT      0x39

//*****************************************************************************
//
//! Indicates the number of Ethernet messages that have been received on the
//! Ethernet interface.
//
//*****************************************************************************
#define PARAM_ETH_RX_COUNT      0x3a

//*****************************************************************************
//
//! Indicates the number of Ethernet messages that have been transmitted on
//! the Ethernet interface.
//
//*****************************************************************************
#define PARAM_ETH_TX_COUNT      0x3b

//*****************************************************************************
//
//! The timeout for an IDLE TCP connection
//
//*****************************************************************************
#define PARAM_ETH_TCP_TIMEOUT   0x3c

//*****************************************************************************
//
//! Indicates the polarity of the GPIO/Digital Hall Sensor Inputs.
//
//*****************************************************************************
#define PARAM_SENSOR_POLARITY   0x3d

//*****************************************************************************
//
//! Indicates the duty cycle for startup phase.
//
//*****************************************************************************
#define PARAM_STARTUP_DUTY      0x3e

//*****************************************************************************
//
//! Indicates the startup count for sensorless operation.
//
//*****************************************************************************
#define PARAM_STARTUP_COUNT     0x3f

//*****************************************************************************
//
//! This real-time data item provides the current through phase A of the motor.
//
//*****************************************************************************
#define DATA_PHASE_A_CURRENT    0x00

//*****************************************************************************
//
//! This real-time data item provides the current through phase B of the motor.
//
//*****************************************************************************
#define DATA_PHASE_B_CURRENT    0x01

//*****************************************************************************
//
//! This real-time data item provides the current through phase C of the motor.
//
//*****************************************************************************
#define DATA_PHASE_C_CURRENT    0x02

//*****************************************************************************
//
//! This real-time data item provides the current through the motor (that is,
//! the sum of the phases).
//
//*****************************************************************************
#define DATA_MOTOR_CURRENT      0x03

//*****************************************************************************
//
//! This real-time data item provides the bus voltage.
//
//*****************************************************************************
#define DATA_BUS_VOLTAGE        0x04

//*****************************************************************************
//
//! This real-time data item provides the position of the motor.
//
//*****************************************************************************
#define DATA_MOTOR_POSITION     0x05

//*****************************************************************************
//
//! This real-time data item provides the speed of the motor drive.  This will
//! only be available for asynchronous motors, where the rotor speed does not
//! match the stator speed.
//
//*****************************************************************************
#define DATA_STATOR_SPEED       0x06

//*****************************************************************************
//
//! This real-time data item provides the speed of the rotor (in other words,
//! the motor shaft).  For asynchronous motors, this will differ from the
//! stator speed.
//
//*****************************************************************************
#define DATA_ROTOR_SPEED        0x07

//*****************************************************************************
//
//! This real-time data item provides the percentage of the processor that is
//! being utilized.
//
//*****************************************************************************
#define DATA_PROCESSOR_USAGE    0x08

//*****************************************************************************
//
//! This real-time data item provides the current operating mode of the motor
//! drive.  This value will be one of #MOTOR_STATUS_STOP, #MOTOR_STATUS_RUN,
//! #MOTOR_STATUS_ACCEL, or #MOTOR_STATUS_DECEL.
//
//*****************************************************************************
#define DATA_MOTOR_STATUS       0x09

//*****************************************************************************
//
//! This real-time data item provides the direction the motor drive is running.
//
//*****************************************************************************
#define DATA_DIRECTION          0x0a

//*****************************************************************************
//
//! This real-time data item provides the current fault status of the motor
//! drive.
//
//*****************************************************************************
#define DATA_FAULT_STATUS       0x0b

//*****************************************************************************
//
//! This real-time data item provides the ambient temperature of the
//! microcontroller.
//
//*****************************************************************************
#define DATA_TEMPERATURE        0x0c

//*****************************************************************************
//
//! This real-time data item provides the ambient temperature of the
//! microcontroller.
//
//*****************************************************************************
#define DATA_ANALOG_INPUT       0x0d

//*****************************************************************************
//
//! This real-time data item provides application-specific debug information.
//! The format of this data will vary from one application to the next.  It
//! is the responsibility of the user to ensure that the motor drive board and
//! host application are in sync with the data format.
//
//*****************************************************************************
#define DATA_DEBUG_INFO         0x0e

//*****************************************************************************
//
//! The number of real-time data items.
//
//*****************************************************************************
#define DATA_NUM_ITEMS          0x0f

//*****************************************************************************
//
//! This is the motor status when the motor drive is stopped.
//
//*****************************************************************************
#define MOTOR_STATUS_STOP       0x00

//*****************************************************************************
//
//! This is the motor status when the motor drive is running at a fixed speed.
//
//*****************************************************************************
#define MOTOR_STATUS_RUN        0x01

//*****************************************************************************
//
//! This is the motor status when the motor drive is accelerating.
//
//*****************************************************************************
#define MOTOR_STATUS_ACCEL      0x02

//*****************************************************************************
//
//! This is the motor status when the motor drive is decelerating.
//
//*****************************************************************************
#define MOTOR_STATUS_DECEL      0x03

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

⌨️ 快捷键说明

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