Advanced Brushed and Brushless Digital Motor Controllers User Manual V2.0, July 8, 2019 visit www.roboteq.
Brushless Motor Connections and Operation Revision History Date Version Changes July 8, 2019 2.0 Separated CAN functionality (“CAN Networking Manual”) Separated Microbasic (“Microbasic Scripting Manual”) Separated Roborun+ Utility (“Roborun+ Utility User Manual”) Miscellaneous updates in order to conform to firmware v2.0 August 28, 2017 1.8 Added AC Induction Sections Extended command set October 15, 2016 1.
Revision History.......................................................................................... 2 INTRODUCTION............................................................................ 17 Refer to the Datasheet for Hardware-Specific Issues............................... 17 User Manual Structure and Use................................................................ 17 SECTION 1 Connecting Power and Motors to the Controller................... 17 SECTION 2 Safety Recommendations.................
Remote Emergency Power Disconnect.................................................... 37 Protection using Supervisory Microcomputer.......................................... 37 Self Protection against Power Stage Failure............................................. 38 Safe Torque-Off (STO)................................................................................ 39 Safe Torque Off (STO) on Roboteq Controllers.......................................... 40 Activating STO..................................
Analog Min/Max Detection........................................................................ 64 Min, Max and Center adjustment.............................................................. 64 Deadband Selection.................................................................................. 65 Command Correction................................................................................ 66 Use of Analog Input...................................................................................
Protecting against Loss of Command Device........................................... 83 Safety Switches........................................................................................ 84 Monitoring and Telemetry in RC or Analog Modes................................... 84 Using the Controller with a Spektrum Satellite Receiver.......................... 84 Using the Controller in Serial (USB/RS232/RS485/TCP) Mode................. 84 6 SECTION 7 Motor Operating Features and Options..................
Theory of Operation................................................................................ 121 Sensorless Parameters........................................................................... 123 Sensorless PWM Frequency.................................................................. 124 Sensorless Auto-tuning........................................................................... 124 Closed Loop Modes in Sensorless.........................................................
Sensor Mounting.................................................................................... 146 Feedback Sensor Range Setting............................................................. 147 Adding Safety Limit Switches................................................................. 148 Using Current Trigger as Protection........................................................ 149 Operating in Closed Loop Relative Position Mode..................................
CAN Commands..................................................................................... 171 Script-generated Commands.................................................................. 171 Communication Protocol Description..................................................... 171 Character Echo........................................................................................ 172 Command Acknowledgment.................................................................. 172 Command Error.........
S - Set Motor Speed............................................................................... 191 STT - STO Self-Test ................................................................................ 191 SX - Next Velocity.................................................................................... 192 VAR - Set User Variable........................................................................... 192 DS402 Runtime Commands...................................................................
CSR - Read Relative SSI Sensor Counter................................................ 217 CSS - Read Absolute SSI Sensor Counter.............................................. 217 D - Read Digital Inputs............................................................................ 218 DI - Read Individual Digital Inputs........................................................... 218 DO - Read Digital Output Status............................................................. 219 DPA - Read DC/Peak Amps ........
UID - Read MCU Id................................................................................. 241 V - Read Volts.......................................................................................... 242 VAR - Read User Integer Variable............................................................ 242 SL - Read Slip Frequency........................................................................ 243 DS402 Runtime Queries.........................................................................
SLD - Script Load.................................................................................... 262 STIME - Set Time.................................................................................... 262 UK - Unlock Configuration Access.......................................................... 262 Set/Read Configuration Commands ....................................................... 263 Setting Configurations............................................................................
DINA - Digital Input Action...................................................................... 288 DINL - Digital Input Active Level............................................................. 288 DOA - Digital Output Action.................................................................... 289 DOL - Digital Outputs Active Level......................................................... 290 PCTR - Pulse Center Range....................................................................
MXPR - Motor Max Power Reverse........................................................ 316 MXRPM - Max RPM Value...................................................................... 317 MXTRN - Number of turns between limits............................................. 317 OVH - Overvoltage hysteresis................................................................. 318 OVL - Overvoltage Cutoff Limit............................................................... 319 OTL - Over Temperature Cutoff Limit .....
ILM - Mutual Inductance......................................................................... 345 ILLR - Rotor Leakage Inductance............................................................ 345 IRR - Rotor Resistance............................................................................ 346 MPW - Minimum Power......................................................................... 347 MXS - Optimal Slip Frequency................................................................
Refer to the Datasheet for Hardware-Specific Issues Introduction Refer to the Datasheet for Hardware-Specific Issues This manual is the companion to your controller’s datasheet. All information that is specific to a particular controller model is found in the datasheet.
Introduction SECTION 3 Connecting Sensors and Actuators to Input/Outputs This section describes all the types of inputs that are available on all controller models and describes how to attach sensors and actuators to them. This section also describes the connection and operation of optical encoders. SECTION 4 I/O Configuration and Operation This section details the possible use of each type of Digital, Analog, Pulse or Encoder inputs, and the Digital Outputs available on the controller.
User Manual Structure and Use SECTION 12 Closed Loop Count Position Mode This section describes how to configure and operate the controller in Closed Loop Count Position mode. Position command chaining is provided to ensure seamless motor motion. SECTION 13 Closed Loop Torque Mode This section describes how to select, configure and operate the controller in Closed Loop Torque mode.
Introduction 20 Advanced Digital Motor Controller User Manual V2.
Power Connections SECTION 1 Connecting Power and Motors to the Controller This section describes the controller’s connections to power sources and motors. This section does not show connector pin-outs or wiring diagram. Refer to the datasheet for these. Important Warning The controller is a high power electronics device. Serious damage, including fire, may occur to the unit, motor, wiring, and batteries as a result of its misuse. Please follow the instructions in this section very carefully.
Connecting Power and Motors to the Controller Controller Power The controller uses a flexible power supply scheme that is best described in Figure 1-1. In this diagram, it can be seen that the power for the Controller’s internal microcomputer is separate from this of the motor drivers. The microcomputer circuit is connected to a DC/DC converter which takes power from either the Power Control input or the VMot input.
Controller Powering Schemes increases by around 20V the low voltage threshold at which the controller will start operating when powered from VMot alone. The table below shows the state of the controller depending on the voltage applied to Power Control and VMot. TABLE 1-1. Controller Status depending on Power Control and VMot Power Control input is connected to And Main Battery Voltage is Ground Any Voltage Controller is Off. Required Off Configuration. Floating 0V Controller is Off.
Connecting Power and Motors to the Controller F2 1A SW1 Main On/Off Switch 1A PwrCtrl/Yellow Note 1 U White/U Ground/Black Motor Backup Battery Green/V Diode >20A Resistor 1K, 0.5W Note 3 V W Blue/W Note 2 F1 Note 4 + HA/HB/HC GND/+5V SW2 Emergency Contactor or Cut-off Switch Ground/Black - Hall Sensors Hall sensor Connector VMot/Red Earth Tab Note 5 I/O Connector Main Battery Note 6 Do not Connect! FIGURE 1-2.
Controller Powering Schemes Connection for Safe Operation with Discharged Batteries (note 1) The controller will stop functioning when the main battery voltage drops below 7V. To ensure motor operation with weak or discharged batteries, connect a second battery to the Power Control wire/terminal via the SW1 switch. This battery will only power the controller’s internal logic.
Connecting Power and Motors to the Controller • • • Do not connect a wire between the I/O connector ground pins and the battery minus terminal. Look for hidden connection and eliminate them. Have a very firm and secure connection of the controller ground wire and the battery minus terminal. Do not use connectors or switches on the power ground cables. Important Warning Do not rely on cutting power to the controller for it to turn Off if the Power Control is left floating.
Single Channel Operation Single Channel Operation Dual channel Brushed DC controllers may be ordered with the -S (Single Channel) suffix. The two channel outputs must be paralleled as shown in the datasheet so that they can drive a single load with twice the power. To perform in this manner, the controller’s Power Transistors that are switching in each channel must be perfectly synchronized.
Connecting Power and Motors to the Controller Important Warning Avoid long connection between the controller and power source, as the added inductance may cause damage to the controller when operating at high currents. Try extending the motor wires instead since the added inductance is not harmful on this side of the controller.
Motor On Measured and Calculated Currents Vbat Vbat Off On Motor Motor On Off FIGURE 1-3. Current flow during operation Vbat On Off I mot Avg On Motor I bat Avg Off FIGURE 1-4. Instant and average current waveforms The relation between Battery Current and Motor current is given in the formula below: On Off Motor Current = Battery Current / PWM RatioI mot Avg Example: If the controller reports 10A of battery current while at 10% PWM, the current in the motor is 10 / 0.1 = 100A.
Connecting Power and Motors to the Controller Controllers with sensors on the motor terminals provide accurate motor current sensing in all conditions, and provide a good estimate battery current value. Some controller models have sensors on the motor and on the battery terminals, and provide the most accurate current sensing as all are actually measured values.
Using the Controller with a Power Supply Using the Controller with a Power Supply Using a transformer or a switching power supply is possible but requires special care, as the current will want to flow back from the motors to the power supply during regeneration. As discussed in “Power Regeneration Considerations” above, if the supply is not able to absorb and dissipate regenerated current, the voltage will increase until the over-voltage protection circuit cuts off the motors.
Connecting Power and Motors to the Controller 32 Advanced Digital Motor Controller User Manual V2.
Possible Failure Causes SECTION 2 Safety Recommendations In many applications, Roboteq controllers drive high power motors that move parts and equipment at high speed and/or with very high force. In case of malfunction, potentially enormous forces can be applied at the wrong time and/or wrong place causing serious damage to property and/or harm to a person. While Roboteq controllers operate very reliably, and failures are rare, a failure is possible as with any other electronic equipment.
Safety Recommendations • • Errors or oversights in user MicroBasic scripts Controller hardware failure Motor Deactivation in Normal Operation In normal operation, the controller is always able to turn off the motor if it detects faults or if instructed to do so from an external command. In case of wiring problem, sensor malfunction, firmware failure or error in user Microbasic scripts, the controller may be in a situation where the motors are turned on and kept on as long as the controller is powered.
Motor Deactivation in Case of Output Stage Hardware Failure + + The figures below show all the possible combinations of shorted MOSFETs switches in a brushed DC motor controller. + + + + 2 + - + 2 1 3 7 - 6 - 6 2 FIGURE 2-1.
Safety Recommendations Manual Emergency Power Disconnect In systems where the operator is within physical reach of the controller, the simplest safety device is the emergency disconnect switch that is shown in the wiring diagram inside all controller datasheets, and in the example diagram below.
Remote Emergency Power Disconnect Remote Emergency Power Disconnect In remote controlled systems, the emergency switch must be replaced by a high power contactor relay as shown in Figure 2-6. The relay must be normally open and be activated using an RC switch on a separate radio channel. The receiver should preferably be powered directly from the system’s battery.
Safety Recommendations Controller On/Off Switch PwrCtrl Ground PC, PLC or Microcomputer VMot Digital Output I/O Connector RS232 + Ground Main Battery FIGURE 2-7. Example of safety disconnect via supervisory system Self Protection against Power Stage Failure If the controller processor is still operational, it can self detect several, although not all, situations where a motor is running while the power stage is off. The figure below shows a protection circuit using an external contactor relay.
Safe Torque-Off (STO) The controller must have the Power Control input wired to the battery so that it can operate and communicate independently of the power stage. The controller’s processor will then activate the contactor coil through a digital output configured to turn on when the “No MOSFET Failure” condition is true. The controller will automatically deactivate the coil if the output is expected to be off and the battery current is above 500mA to 2.
Safety Recommendations Safe Torque Off (STO) on Roboteq Controllers Two digital inputs on the user IO connector can be used to put the controller in a state where the motor is deprived of energy. The two inputs, labeled STO1 and STO2 must both be brought and maintained at a logic level 1 for the controller to be active. If any one or both of these lines are at 0, the output is de-energized. The STO circuit operates independently of the MCU.
Safe Torque-Off (STO) 2. STO Fault LED at Roborun+ utility in failure This failure can have several internal and external reasons. If the failure is shown please check the cabling and the signals to STO 1 and STO 2. Both signals much have at all times the same level. • • • Check that the STO jumper is set correctly and STO is configured correctly Check wiring Check cabling for short circuits or open circuits If the failure persists, contact Roboteq support.
Safety Recommendations 3. Check that there is no STO fault present (through Roborun+ Utility/Serial) 4. Deactivate STO 1 and STO 2 (both logic level 1) 5. Check that STO is not active and that there is no STO fault present (through Roborun+ Utility/Serial). SAFETY INSTALLATION It is required that the controller has to be placed in an enclosure that can provide IP54 protection. SAFETY REGISTRATION It is required that STO end user should follow up www.roboteq.
Safe Torque-Off (STO) Technical Data Specification Value STO Input High Level 6V to 30V STO Input Low Level 0V to 1V STO Response Time < 5msec Operating Temperature -20°C to 55°C Storage Temperature -20°C to 70°C IP degree IP40 Humidity 5% to 95% non-condensing Maximum altitude 2000m STO cable length ≤ 3m (1) EMC immunity According to IEC 61800-3:2017 and IEC 61800-5-2:2007 Annex E CE Declaration of conformity Available at www.roboteq.
Safety Recommendations 44 Advanced Digital Motor Controller User Manual V2.
Controller Connections SECTION 3 Connecting Sensors and Actuators to Input/Outputs This section describes the various inputs and outputs and provides guidance on how to connect sensors, actuators or other accessories to them. Controller Connections The controller uses a set of power connections DSub and plastic connectors for all necessary connections. The power connections are used for connecting to the batteries and motor, and will typically carry large current loads.
Connecting Sensors and Actuators to Input/Outputs Controller’s Inputs and Outputs The controller includes several inputs and outputs for various sensors and actuators. Depending on the selected operating mode, some of these I/Os provide command, feedback and/or safety information to the controller. When the controller operates in modes that do not use these I/Os, these signals are ignored or can become available via the RS232/RS485/TCP/USB port for user application.
Connecting devices to Digital Outputs Connecting devices to Digital Outputs Depending on the controller model, 2 to 8 Digital Outputs are available for multiple purposes. The Outputs are Open Drain MOSFET outputs capable of driving over 1A at up to 24V. See datasheet for detailed specifications. Since the outputs are Open Drain, the output will be pulled to ground when activated. The load must therefore be connected to the output at one end and to a positive voltage source (e.g.
Connecting Sensors and Actuators to Input/Outputs Important Warning Overvoltage spikes induced by switching inductive loads, such as solenoids or relays, will destroy the transistor unless a protection diode is used. Connecting Switches or Devices to Inputs shared with Outputs On HDCxxxx and HBLxxxx controllers, Digital inputs DIN12 to DIN19 share the connector pins with digital outputs DOUT1 to DOUT8.
Connecting a Voltage Source to Analog Inputs A pull up resistor must be installed when using a pull down switch. 5V Out 1K to 10K Ohm 20kOhm 33kOhm DIN Ground FIGURE 3-5. Pull down (Active Low) switch wirings to DIN pins Connecting a Voltage Source to Analog Inputs Connecting sensors with variable voltage output to the controller is simply done by making a direct connection to the controller’s analog inputs. When measuring absolute voltages, configure the input in “Absolute Mode” using the PC Utility.
Connecting Sensors and Actuators to Input/Outputs +5V +/-10V 10kOhm 5kOhm Internal Resistors and Converter 20kOhm A/D 10kOhm 33kOhm Ground FIGURE 3-8. External resistors circuit for -10V to 10V capture range Important Notice On newer motor controllers models, activating the pulse mode on input will also enable a pull up resistor on that input. If the input is also used for analog capture, the analog reading will be wrong. Make sure the pulse mode is disabled on that input.
Connecting a Voltage Source to Analog Inputs +5V Internal Resistors and Converter 20kOhm A/D 1K to 10K Ohm Pot 33kOhm Ground FIGURE 3-9. Potentiometer wiring Because the voltage at the potentiometer output is related to the actual voltage at the controller’s 5V output, configure the analog input in “Relative Mode”. This mode measures the actual voltage at the 5V output in order to eliminate any imprecision due to source voltage variations. Configure using the PC Utility.
Connecting Sensors and Actuators to Input/Outputs The controller’s analog channels are configured by default so that the min and max command range is from 0.25V to 4.75V. These values can be changed using the PC configuration utility. This ensures that the full travel of the pot is used to generate a command that spans from full min to full max. If the Min/Max safety is enabled for the selected analog input, the command will be considered invalid if the voltage is lower than 0.1V or higher than 4.9.
Connecting External Thermistor to Analog Inputs Important Warning The tachometer’s polarity must be such that a positive voltage is generated to the controller’s input when the motor is rotating in the forward direction. If the polarity is inverted, this will cause the motor to run away to the maximum speed as soon as the controller is powered and eventually trigger the closed loop error and stop.
Connecting Sensors and Actuators to Input/Outputs Volts 4.5 4 3.5 3 2.5 2 1.5 1 0.5 90 10 0 11 0 12 0 13 0 14 0 15 0 80 70 60 50 40 30 20 10 0 0 0 0 -1 -2 -3 -4 0 0 oC FIGURE 3-13. Voltage reading by Controller vs NTC temperature Note: The voltage values in this chart are provided for reference only and may vary based on the Thermistor model/brand and the resistor precision. It is recommended that you verify and calibrate your circuit if it is to be used for safety protection.
Connecting SSI Sensors Connecting Sensors to Pulse Inputs The controller has several pulse inputs capable of capturing Pulse Length, Duty Cycle or Frequency with excellent precision. Being a digital signal, pulses are also immune to noise compared to analog inputs. Important Notice On newer motor controllers models, activating the pulse mode on input will also enable a pull up resistor on that input. If the input is also used for analog capture, the analog reading will be wrong.
Connecting Sensors and Actuators to Input/Outputs Connecting the SSI Sensor SSI Sensors connect directly to pins present on the controller’s connector. The connector provides 5V power to the sensors and has inputs for the two data and the two clock signals for each sensor. The figure below shows the connection to the SSI Sensor. FIGURE 3-16.
Connecting Optical Encoders The figure below shows the typical construction of a quadrature encoder. As the disk rotates in front of the stationary mask, it shutters light from the LED. The light that passes through the mask is received by the photo detectors. Two photo detectors are placed side by side at so that the light making it through the mask hits one detector after the other to o produces the 90 phased pulses. LED light source Rotating encoder disk Stationary mask Photodetector FIGURE 3-18.
Connecting Sensors and Actuators to Input/Outputs Example: a motor spinning at 10,000 RPM max, with an encoder with 200 Pulses per Revolution would generate: 10,000 / 60 * 200 * 4 = 133.3 kHz which is well within the 1MHz maximum supported by the encoder input. An encoder with 200 Pulses per Revolutions is a good choice for most applications. A higher resolution will cause the counter to count faster than necessary and possibly reach the controller’s maximum frequency limit.
Connecting the Encoder Ferrite Core Encoder Controller FIGURE 3-20. Use ferrite core on cable length beyond 2’ or 60cm Important Warning Excessive cable length will cause electrical noise to be captured by the controller and cause erratic functioning that may lead to failure. In such a situation, stop operation immediately.
Connecting Sensors and Actuators to Input/Outputs 60 Advanced Digital Motor Controller User Manual V2.
Basic Operation I/O Configuration and Operation SECTION 4 This section discusses the controller’s digital and analog inputs and output and how they can be used.
Safety Recommendations Practically all operating configurations and parameters can be changed by the user to meet any specific requirement. This unique architecture leads to a very high number of possibilities. This section of the manual describes all the possible operating options. Input Selection As seen earlier in the controller’s simplified internal operating diagram on Figure 4-1, any input can be used for practically any purpose.
Analog Inputs Configurations and Use Configuring the Digital Inputs and the Action to use can be done very simply using the PC Utility. Wiring instructions for the Digital Inputs can be found in “Connecting Switches or Devices to Inputs shared with Outputs” onpage 44 Analog Inputs Configurations and Use The controller can do extensive conditioning on the analog inputs and assign them to a different use. Each input can be disabled or enabled.
Safety Recommendations Analog Min/Max Detection An analog input can be configured so that an action is triggered if the captured value is above a user-defined Maximum value and/or under a user-defined Minimum value. The actions that can be selected are the same as these that can be triggered by the Digital Input. See the list and description in Table 4.1, “Digital Input Action List” on page 58.
Analog Inputs Configurations and Use Setting the center value to be the same as the min value makes the input capture only commands in a positive direction. For example if Min = Center = 200 and Max = 4500, the input will convert into 0 when 200 and below, and 1000 above 4500. The Min, Max, and Center values are defined individually for each input. They can be easily entered manually using the Roborun PC Utility.
Safety Recommendations Command Correction An optional exponential or a logarithmic adjustment can then be applied to the signal. The exponential correction will make the commands change less at the beginning and become stronger at the end of the joystick movement. The logarithmic correction will have a stronger effect near the start and lesser effect near the end. The linear selection causes no change to the input. There are 3 exponential and 3 logarithmic choices: weak, medium and strong.
Pulse Inputs Configurations and Uses TABLE 4-3.
Safety Recommendations Digital Outputs Configurations and Triggers The controller’s digital outputs can individually be mapped to turn On or Off based on the status of user-selectable internal status or events. The table below lists the possible assignment for each available Digital Output. Action Output activation Typical Use No action Not changed by any internal controller events.
SSI Configuration and Use The count information is also used to measure rotation speed. Using the Encoder Pulse Per Rotation (PPR) configuration parameter, the output is a speed measurement in actual RPM that is useful in closed loop speed modes where the desired speed is set as a numerical value, in RPM, using a serial command. Configuring the encoder parameters is done easily using the PC Configuration Utility.
Safety Recommendations Hall and other Rotor Sensor Inputs On brushless motor controllers, the Hall or other Rotor position sensor that is used to switch power around the motor windings, are also used to measure speed and distance traveled. Speed is evaluated by measuring the time between transition of the Hall Sensors. A 32 bit up/down counter is also updated at each Hall Sensor transition.
Introduction to MGS1600 Magnetic Guide Sensor Roboteq Products Connection and Operation SECTION 5 This section discusses how to interface one or more Roboteq’s products to the motor controller. For the moment the supported products are: • • • Magnetic or Optical Sensor (MGS(W)1600, MSW3200, MGSW4800, OTS1600), FlowSensor (FLW100), Battery Management System (BMS10X0). Details of each of the above products’ operation can be found in the products’ datasheets.
Magnetic Guide Sensor Connection and Operation Introduction to FLW100 Flowsensor Roboteq’s FLW100 is a high-resolution sensor especially designed for accurate contactless X-Y motion sensing over a surface. The FLW100 is intended as a navigation sensor for a wheeled mobile robot. The sensor works similarly to an optical mouse, but with higher resolution, accuracy and at a greater distance from the reference surface.
Enabling MultiPWM Communication Any of the controller’s pulse input can be configured as a MultiPWM input. The diagram below shows how simple this one-wire interfacing is. Motor Controller Pulse Input GND 5V Out or 7-30V Supply MultiPWM Sensor FIGURE 5-1: One-wire interfacing using MultiPWM Enabling MultiPWM Communication Magnetic Sensor and Flow Sensor are set to MultiPWM mode in its factory default configuration, while the Battery Management System needs to be explicitly configured.
Magnetic Guide Sensor Connection and Operation Accessing Sensor Information Once enabled, the pulses are sent continuously by the sensor 100 times per second. The pulses are captured and parsed by the motor controller as they arrive. A real time mirror image of sensor data is then present inside the controller. From there the sensor information can be read using serial, USB, CAN or MicroBasic scripts like any other of the controller’s operational parameters.
Connecting Multiple Similar Sensors Accessing Multiple Sensor Information Sequentially Two methods are available for accessing each sensor’s data when multiple sensors are connected. The first method is to only have one sensor enabled at any one time. This is done by enabling and disabling pulse inputs via serial commands or MicroBasic scripting.
Magnetic Guide Sensor Connection and Operation ?MGM 3 : Returns the Left Marker Detect state of Sensor at input 2 ?MGM 4 : Returns the Right Marker Detect state of Sensor at input 2 Reading Track Positions ?MGT 3*(x-1)+1 or GetValue(_MGT, 3*(x-1)+1) Returns the Left Track Position of Sensor at input x ?MGT 3*(x-1)+2 or GetValue(_MGT, 3*(x-1)+2) Returns the Right Track Position of Sensor at input x ?MGT 3*(x-1)+3 or GetValue(_MGT, 3*(x-1)+3) Returns the Active (Left or Right) Track Position of Sensor at in
Input Command Modes and Priorities Command Modes SECTION 6 This section discusses the controller’s normal operation in all its supported operating modes. Input Command Modes and Priorities The controller will accept commands from one of the following sources • • • • • • Serial data (RS232, RS485, TCP, USB) Pulse (R/C radio, PWM, Frequency) Analog signal (0 to 5V) Spektrum Radio (on selected models) CAN Interface Microbasic Script One, many or all command modes can be enabled at the same time.
Brushless Motor Connections and Operation Pulse tes eR t eS Serial/USB Analog FIGURE 6-1. Controller’s possible command modes In the Serial mode, the mode is considered as active if commands • • • • • • !G - Go to Speed or to Relative Position !MS - Stop in all modes !S - Set Motor Speed !TC - Target Torque !GIQ - Set Torque Amps !GID - Set Flux Amps arrive within the watchdog timeout period via the RS232, RS485, TCP or USB ports.
Input Command Modes and Priorities TABLE 6-1. Priority resolution example Microcomputer Sending commands Valid Pulses Received Analog joystick within safe Min/Max Command mode selected Yes Don’t care Don’t care Serial No Yes Don’t care RC mode No No Yes Analog mode No No No User selectable default value Note that it is possible to set a priority level to “None”. For example, the priority table 1 - Serial 2 - RC Pulse 3 - None will only arbitrate and use Serial or RC Pulse commands.
Brushless Motor Connections and Operation Operating the Controller in RC mode The controller can be directly connected to an R/C receiver. In this mode, the speed or position information is contained in pulses whose width varies proportionally with the joysticks’ positions. The controller mode is compatible with all popular brands of RC transmitters.
Operating the Controller in RC mode control available from a higher quality RC radio, although it will work fine with lesser expensive radios as well. Input RC Channel Selection The controllers feature several inputs that can be used for pulse capture. See product datasheet for an actual number of pulse input. Any RC input can be used as a command for any motor channels. The controller’s factory default defines two channels for RC capture (one input on single channel products).
Brushless Motor Connections and Operation If no valid RC pulses reach the controller for more than 500ms, the controller no longer considers it is in the RC mode and a lower priority command type will be accepted if present. Important Warning Some receivers include their own supervision of the radio signals and will move their servo outputs to a safe position in case of signal loss. Using these types of receiver, the controller will always be receiving pulses even with the transmitter off.
Operating the Controller In Analog Mode Input Analog Channel Selection The controller features 4 to 11 inputs, depending on the model type, that can be used for analog capture. Using different configuration parameters, any Analog input can be used as command for any motor channel. The controller’s factory default defines two channels as Analog command inputs. Which channel and which pin on the input connector depends on the controller model and can be found in the controller’s datasheet.
Brushless Motor Connections and Operation Safety Switches Any Digital input can be used to add switch-activated protection features. For example, the motor(s) can be made to activate only if a key switch is turned On, and a passenger is present on the driver’s seat. This is done using by configuring the controller’s Digital inputs. See “Digital Inputs Configurations and Uses” page 58.
Power Output Circuit Operation Motor Operating Features and Options SECTION 7 This section discusses the controller’s operating features and options relating to its motor outputs. Power Output Circuit Operation The controller’s power stage is composed of high-current MOSFET transistors that are rapidly pulsed on and off using Pulse Width Modulation (PWM) technique in order to deliver more or less power to the motors.
Motor Operating Features and Options Global Power Configuration Parameters PWM Frequency The power MOSFETs are switched at 16kHz by default. This frequency can set to another value ranging from 10 kHz to 30 kHz. Increasing the frequency reduces efficiency due to switching losses. Lowering the frequency eventually creates audible noise and can be inefficient on low inductance motors. Changing the PWM frequency typically results in no visible change in the motor operation and should be left untouched.
Global Power Configuration Parameters The time it takes for the heat sink’s temperature to rise depends on the current output, ambient temperature, and available air flow (natural or forced). Short Circuit Protection The controller includes a circuit that will detect very high current surges that are consistent with short circuits conditions. When such a condition occurs, the power transistor for the related motor channel is cut off within a few microseconds. Conduction is restored at 1ms intervals.
Motor Operating Features and Options The controller supports 3 mixing algorithms with different driving characteristics. The table below shows how each motor output responds to the two commands in each of these modes. TABLE 7-1.
Motor Channel Parameters The limitation is performed on the Motor current and not on the Battery current. See “Battery Current vs. Motor Current” on page 28 for a discussion of the differences. Selectable Amps Threshold Triggering The controller can be configured to detect when the Amp on a motor channel exceeds a user-defined threshold value and trigger an action if this condition persists for more than a preset amount of time. The list of actions that may be triggered is shown in the table below.
Motor Operating Features and Options Forward and Reverse Power Adjustment Gain This parameter lets you select the scaling factor for the power output as a percentage value. This feature is used to connect motors with a voltage rating that is less than the battery voltage. For example, using a factor of 50% it is possible to connect a 12V motor onto a 24V system, in which case the motor will never see more than 12V at its input even when the maximum power is applied.
Selecting the Motor Control Modes Closed Loop Speed Position Control In this mode, the controller computes the position at which the motor must be at every 1ms. Then a position loop compares that expected position with the current position and applies the necessary power level in order for the motor to reach that position. This mode is especially effective for accurate control at very slow speeds. Details on this mode can be found in Closed Loop Speed and Speed-Position Modes on page 133.
Motor Operating Features and Options Closed Loop Count Position In this mode, an encoder is attached to the motor as for the Speed Mode of Figure 7-8. Then, the controller can be instructed to move the motor to a specific number of counts, using a user-defined acceleration, velocity, and deceleration profile. Details on how to configure and use this mode can be found in “Closed Loop Count Position Mode” on page 151. On brushless motors, the hall sensors can be also be used for position measurement.
Torque Mode Torque Command - PWM PID A Motor Current Sensor Current Feedback FIGURE 7-10: Closed Loop Torque mode Advanced Digital Motor Controller User Manual 93
Motor Operating Features and Options 94 Advanced Digital Motor Controller User Manual V2.
Introduction to Brushless Motors SECTION 8 Brushless Motor Connections and Operation This section addresses installation and operating issues specific to brushless motors. It is applicable only to brushless motor controller models. Important Warning This Manual refers to Firmware 2.x of Roboteq Motor Controllers. Many of the described features are either not available or do not work the same way (PID gains in particular) than in Firmware 1.x or prior. Refer to Manual v1.8 for earlier Firmware.
Brushless Motor Connections and Operation U N W S V FIGURE 8-1. Permanent Magnet Synchronous Motor construction As the name implies, Brushless motors differ from traditional DC motors in that they do not use brushes for commutating the electromagnets. Instead, it is up to the motor controller to apply, in sequence, current to each of the 3 motor windings in order to cause the rotor to spin.
Trapezoidal Switching The number must be entered using the Number of Pole Pairs menus in the in the Roborun PC utility.. Or by sending the configuration command: ^BPOL channel nn See “BPOL” in the command reference section for details. This parameter is not needed for basic trapezoidal motor operation with Hall Sensor feedback and can be left at its default value. It is needed if accurate speed reporting is required or to operate in Closed Loop Speed or Position modes .
Brushless Motor Connections and Operation Hall Sensor Wiring Hall sensors connection requires 5 wires on the motor: • Ground • Sensor A Output • Sensor B Output • Sensor C Output • +5V power supply Sensor outputs are generally Open Collector, meaning that they require a pull up resistor in order to create the logic level 1. Pull up resistor of 4.7K ohm to +5V are incorporated inside all controllers.
Trapezoidal Switching erence section). Note that in the case where digital inputs are configured as Hall inputs, pull-up resistor from the input pin to the +5V must be added externally. Use 4.7K resistors wired as shown in Figure 8.3. Important Warning Keep the Hall sensor wires away from the motor wires. High power PWM switching on the motor leads will induce spikes on the Hall sensor wires if located too close.
Brushless Motor Connections and Operation V. See figure 8-4. The sine wave voltage will be inverted when turning the motor in the opposite direction. Va Vb Vc Vu-w Vv-u Vw-v FIGURE 8-4. Relation between hall sensor and U V W windings Determining the Wiring Order Empirically While probing with an oscilloscope gives the definite order, a simpler and quicker way is to find the correct combination by trial and error.
Trapezoidal Switching Important Notice It is not possible to change the motor direction by changing the Hall/Phase order. If the motor is not turning in the desired direction, chose “Inverted” in the “Motor Direction” configuration menu in the PC Utility. Hall Sensor Alignment It is very important that the hall sensors be precisely aligned vs the electromagnets inside the motor so that commutation be done exactly at the right time. Bad alignment will cause the motor to run inefficiently.
Brushless Motor Connections and Operation Rotate shaft clockwise Motor W V U Probe Vw-u GND Clip +5V HA HB HC Probe Va GND 2-10k 2-10k 5V GND Clip 2-10k Hall Sensor Power and Pull-ups FIGURE 8-6. Use an oscilloscope and the circuit in figure to place the probes and generate these signals Important Warning Hall Sensor misalignment cannot be corrected by the controller. Contact the motor manufacturer for remedy.
Sinusoidal Commutation Amplitude U V W +/-90o Direction 3-Phases PWM Generator Rotor Angle Sensor FIGURE 8-8. Simplified 3-phase sinusoidal model As the motor turns, the phase on each wire is changed in order for the magnetic field to always be perpendicular, and therefore create the maximum radial force to the rotor. 90 o 90 o FIGURE 8-8.
Brushless Motor Connections and Operation Configuring the Controller for Sinusoidal Commutation Sinusoidal mode is selected via the Switching Mode configuration menu in the Roborun PC utility.. Or by sending the configuration command: ^BMOD channel 1 Configuring the Number of Motor Pole Pairs The number of Motor Pole Pairs is a critical parameter for sinusoidal combination. A full 3-phase cycling of motor’s electromagnets will cause the rotor to move to the next permanent magnet pole.
Sinusoidal Commutation Or by sending the configuration command: ^BPOL channel nn Entering a negative number of pole pairs will reverse the measured speed and the count direction. It is useful when operating the motor in closed loop speed mode and if otherwise a negative speed is measured when the motor is moved in the positive direction.
Brushless Motor Connections and Operation 4 Check how many times the Angle range (0-511) rolls over. This gives the number of sensor poles. 5 Restore the correct values of motor and sensor poles 6 Launch the Calibration/Setup again Important Notice The number of motor poles and sensor poles are very important configuration parameters in sinusoidal mode. Using the wrong values will produce erratic behavior and possibly damage.
Sinusoidal Commutation Incremental Encoder-Only A quadrature encoder can be used to determine the rotor position. Enter the Encoder PPR using the PC Utility. Or by sending the configuration command: ^EPPR channel nn Optimally, the encoder should have a PPR that is at least 128 x the number of pole pairs. For example a motor with 4 pole pairs should have a 128 x 4 = 512 Pulse per revolution.
Brushless Motor Connections and Operation relatively slow. It also requires that the magnets and sensors are positioned with precision inside the motor, which is not always the case in low cost motors. Compared to Trapezoidal mode, this mode will result is quieter motor operation because of the sinusoidal commutation.
Sinusoidal Commutation The proper operation of the Sin/Cos sensor can be verified by plotting in real time the voltages of the sin and cos signals inside the Diagnostic tab of the PC utility FIGURE 8-10. Diagnostic Tab with Auto Setup Or using the following queries. ?ASI [channel] Sin/cos sensors require a one-time setup and calibration. See “Automatic Sensor Setup” on page 107.
Brushless Motor Connections and Operation Rotating Secondary 1 Primary Rotatiion Fixed Primary Rotating Secondary 2 Sec 1 Sec 2 FIGURE 8-11. Resolver equivalent diagram and signals Controllers models supporting resolvers use one output to generate the excitation. The secondaries are then fed to two analog inputs. Exact wiring depends on the controller model. Please consult the controller data sheet for pinout location.
Sinusoidal Commutation output from the sensor and captured by the controller. Rotate the motor by hand to verify that the counter changes. The 12 to 15 bit raw value of the SSI sensor can be read using the query: ?CSS [channel] The continuous 32-bit counter and speed that is driven by the SSI sensor can be read using the following queries respectively: ?CSS [channel] ?SS [channel] Typically, SPI encoders are single pole sensors, meaning that they output 0 to their maximum value over a full mechanical turn.
Brushless Motor Connections and Operation Reference Search Power During the automatic sensor setup phase, the controller will drive the motor coils with a slow-changing three phase current, creating a rotating magnetic field inside the motor. The rotor’s magnets are attracted to the field, causing the rotor to follow turn. For best accuracy the rotor is driven for a full turn in the forward direction, and another full turn in the reverse direction.
Sinusoidal Commutation Important Notice All angles values entered or displayed by the controller are in 0-511 value where 0 = 0 degrees or radians, and 511 is 360o or 2r radians. Zero Reference Search for Incremental Encoders Incremental Encoders do not output an absolute position value. The Zero Reference search is therefore performed every time the controller is powered on.
Brushless Motor Connections and Operation Running the Automatic Sensor Setup The V2.x firmware has a new feature for Automatic Setup and Calibration of all the supported rotor sensor types. With a simple click, it performs the following: a. Find the sensor polarity with respect to stator winding connection and set the SWD Swap Windings configuration parameter. b. Find angle offset from the stator zero degrees reference axis and store the value in the “BADJ” Angle Zero Adjust configuration register. c.
Sinusoidal Commutation Select which motor channel to setup. Then click on the Motor/Sensor Setup button to launch the Automatic process. The process can also be initiated using the serial commands %CLMOD 2 for Channel 1 and %CLMOD 3 for Channel 2. The motor will rotate at a RPM speed of 60/Number of Pole pairs. It will perform a full turn in each direction and then stop. If the motor doesn’t turn, or turns with hesitations, Click on the Cancel button (or send %CLMOD 0).
Brushless Motor Connections and Operation Parameter Description Sin Voltage at Sin input of Sin/Cos or resolver Cos Voltage at Sin input of Sin/Cos or resolver Electrical Angle Electrical Angle Calibration Angle Angle of the forced field applied during auto-setup Sensor Angle Angle measured by the sensor Motor Power PWM Level applied to the motor Motor Amps Motor Amps FOC Flux Amps Flux Amp, Direct Current, Id (cause no torque) FOC Torque Amps Torque Amps, Quadrature Current, Iq (cause t
Sinusoidal Commutation FIGURE 8-14. Sensor Linearity Capture and Correction The linearity of the sensor will be displayed on the screen. If the graph is flat at around zero value, the sensor is linear and no correction is needed. If the shape is not a flat line and is clean (i.e. without random noise and glitches), press “Apply Correction” button. It can be beneficial to capture the linearity curve a few times and verify that it is consistent, before applying it.
Brushless Motor Connections and Operation Field Oriented Control (FOC) In sinusoidal modes, using the rotor angle to determine the voltage to apply to each of the 3 motor phase works well at low frequencies, and therefore at low rotation speed. At higher speed, the effect of the winding inductance, back EMF and other effect from the motor rotation, create a shifting current. The resulting magnetic field is then no longer optimally perpendicular to the rotor’s permanent magnets.
Sinusoidal Commutation Field Oriented Control is available on most models of Roboteq motor controllers. It uses a classical implementation as described in the figure 8-11. The current in the motor phase is captured, along with the rotor’s angle. From this are computed the useful Iq and wasteful Id. Two Proportional-Integral (PI) regulators then work to control the power output so that the desired Torque (Iq) and Flux (Id) currents are met.
Brushless Motor Connections and Operation Bandwidth is in rad/sec and according to Nyquist criteria the current loop bandwidth cannot be more than the half of the current loop sampling time. Most commonly the current loop bandwidth is set to the 1/10-1/20 of the current loop sampling time. The current loop sampling time is at 1kHz. So if we choose as current loop bandwidth the 50Hz then: 1Hz = 2π rad/sec So for 50Hz Bandwidth = 50*2π rad/sec = 314.
Sensorless Trapezoidal Commutation Field Weakening Field weakening is a technique that is used to achieve faster motor rotation speed. This is done by having some Flux (Id) current, even though this also introduces some waste. Field Weakening is therefore possible on Roboteq controller by loading a non-zero set point for the Flux current.
Brushless Motor Connections and Operation V+ Ut Vt U Wt V Ub Vb Wb W GND FIGURE 8-17. Active and floating phases The figure above shows the state of the transistor switches during one of the six commutations phases. The current flows from the battery through the U winding, then through the V winding to ground. The W winding is floating.
Sensorless Trapezoidal Commutation V+ ZC Commutation Phase Voltage 0V BEMF Integrator Limit Back EMF Integrator Integration Start FIGURE 8-19. Commutation based on Back EMF Integration Detection of rotor position using the BEMF at zero and very low speeds is not possible. At startup, the motor is therefore operated by applying a fixed commutation sequence and runs as a stepper motor until sufficient speed is gathered to detect Back EMF and Zero Crossings.
Brushless Motor Connections and Operation In the sensorless mode the motor will spin regardless of the phase wiring order. If the motor spin in the opposite direction than the one desired, swap any two of the three motor wires, or change the motor direction to Inverted in the motor configuration.. The number of poles setting is not necessary in order for the motor to run. The number of poles is only used to measure the motor’s rotation speed.
Operating Brushless Motors Closed Loop Modes in Sensorless Closed loop speed mode can be used with sensorless motors. The speed is determined by measuring the time between commutations. Sensorless motors will work the same as sensored motors and require similar PID tuning. The only limitation is at very slow speed where the motor cannot be made to go slower than the RPM resulting from the Startup Frequency parameter.
Brushless Motor Connections and Operation Speed Measurement using the angle feedback Sensors Information from Hall, SPI/SSI, sin/cos sensors, (and even Sensorless) is used by the controller to compute the motor’s rotation speed. When Hall sensors are used, speed is determined by measuring the time between Hall sensor transitions. This measurement method is very accurate, but requires that the motor be well constructed and that the placement between sensors be accurate.
Introduction to AC Induction Motors SECTION 9 AC Induction MotorOperation This section discusses the controller’s operating features and options when using three phase AC Induction motors. Introduction to AC Induction Motors Three phase induction motors are the most common types of electrical motors. They have a very simple construction composed of a stator covered with electromagnets, and a rotor composed of conductors shorted at each end, arranged as a “squirrel cage”.
AC-induction-Motor-Operation •• They are maintenance free motors unlike dc motors due to the absence of brushes, commutators and slip rings. •• Induction motors can be operated in polluted and explosive environments as they do not have brushes which can cause sparks Asynchronous Rotation and Slip AC Induction motors are Asynchronous Machines meaning that the rotor does not turn at the exact same speed as the stator’s rotating magnetic field.
Selecting and Connecting the Encoder Connecting the Motor An AC Induction motors have just 3 power wires which must be connected to the controller’s U V and W terminals. The connection order is not important. However, swapping any two motor connections will make the motor turn in the opposite direction. Selecting and Connecting the Encoder A speed sensor must be used to measure and control the motor’s slip when running in Constant Slip mode and Torque/Speed FOC mode.
AC-induction-Motor-Operation Apply a positive motor command. Verify that the motor shaft is moving in the desired direction. If the motor moves in the opposite direction, swap any two of the three motor cables, or change the motor direction to Inverted in the motor configuration. If the motor moved in the desired direction, then verify that the encoder counter increments when a positive motor command is applied.
Closed Loop Speed Mode with Constant Slip Control Watt V Amps RPM Nm 3500 48Bat 100 1450 23 50Hz V fase 3 x 27 Encoder 64 Pulses For this motor, the VPH can be determined by dividing the 27 Volts per phase by the 50Hz frequency. In this case 0.54 Volts per Hertz. Note that this value is for the optimal torque as rated on the label. If the load is a lot lighter, the VpH will be too high and result in excessive current consumption.
AC-induction-Motor-Operation •• Select Close Loop Constant Slip Mode •• Set the PID gains found in the Motor Output, Closed Loop Speed Parameters menus (do not use the FOC PID gains). Try first with gains of P=4, I=0.5, D=0. These values will produce adequate results in most cases. Additional turning may be needed. •• Set the Max RPM configuration to the speed that must be reached at full throttle (ie when command = 1000).
Field Oriented Control (FOC) mode Operation Rs Stator Resistance Lls Stator Leakage Inductance Rr Rotor Resistance Llr Rotor Leakage Inductance Lm Mutual Inductance These parameters include per phase rotor resistance ‘Rr’, rotor leakage inductance ‘Llr’, mutual inductance ‘Lm’ and rotor leakage inductance ‘Llr’.
AC-induction-Motor-Operation •• Monitor and Record the Flux Amps and Torque Amps for the desired motor channel when tuning the FOC PID. •• Put some high load on the rotor and command a step Torque Amps from the slider bar (say 10A). Record the “FOC Torque Amps” reading on the chart. If the step response reaches the desired (10A) steady state fast enough then the PID is can be considered tuned. If it is slow then increase integral gain.
Field Oriented Control (FOC) mode Operation Speed Limiting in FOC Torque Mode AC Induction Controllers provide a way of smoothly limiting the speed in FOC torque mode to prevent motor runaways. The method for limiting the speed is based on PID speed over-ride control which provides very smooth motor output but requires PID tuning. The speed loop PID tuning can either be done in “FOC torque mode” at the speed limit or in “FOC Speed Mode” by looking at the response time.
AC-induction-Motor-Operation 136 Advanced Digital Motor Controller User Manual V2.
Modes Description Closed Loop Speed and Speed-Position Modes SECTION 10 This section discusses the controller’s Closed Loop Speed modes. Modes Description Close loop speed modes ensure that the motor(s) will run at a precisely desired speed. If the speed changes because of changes in load, the controller automatically compensates the power output so that the motor maintains a constant speed.
Closed Loop Speed Mode Speed Command Trajectory Expected Position - PWM PID Motor Position Feedback Position Counter The controller incorporates a full-featured Proportional, Integral, Differential (PID) control algorithm for quick and stable speed control. The closed loop speed mode and all its tuning parameters may be selected individually for each motor channel. Motor Sensors The controller can use a variety of sensors for measuring speed.
Brushless Hall Sensors as Speed Sensors Connecting the tachometer to the controller is as simple as shown in the diagram below. 5V Out 1kOhm Zero Adjust 100 Ohm pot Internal Resistors and Converter Max Speed Adjust 10kOhm pot Tach Ana In A/D 20kOhm 33kOhm 1kOhm Ground FIGURE 10-2.
Closed Loop Speed Mode Determining the right polarity is best done experimentally using the Roborun utility (see “Roborun+ Utility User Manual”) and following these steps: 1. Configure the controller in Open Loop Mode using the PC utility. This will cause the motor to run in Open Loop for now. 2. Configure the sensor you plan to use as speed feedback. If an analog tachometer is used, map the analog channel on which it is connected as “Feedback” for the selected motor channel.
PID Description sired actual max RPM, an additional parameter must be entered in the encoder or brushless configuration. The Max RPM parameter is the speed that will be reported as 1000 when reading the speed in relative mode. Max RPM is also the speed the controller will attempt to reach when a max command of 1000 is applied. When sending a speed command via serial, CANbus, scripting or USB, the command may be sent as a relative speed (0 to +/-1000) or actual RPM value.
Closed Loop Speed Mode Propor tional Gain x Desired Speed or Position Sensor Integrator Limit - E= Error Measured Speed or Position dE dt Σ x Output Integral Gain dE dt x Differential Gain FIGURE 10-3. PID algorithm used in speed modes PID tuning in Closed Loop Speed Mode As discussed above, three parameters - Proportional Gain, Integral Gain, and Differential Gain - can be adjusted to tune the Closed Loop Speed control algorithm.
PID Tuning in Speed Position Mode In the case where the load moved by the motor is not fixed, tune the PID with the minimum expected load and tune it again with the maximum expected load. Then try to find values that will work in both conditions. If the disparity between minimal and maximal possible loads is large, it may not be possible to find satisfactory tuning values.
Closed Loop Speed Mode Error Detection and Protection The controller will detect large tracking errors due to mechanical or sensor failures, and shut down the motor in case of problem in closed loop speed or position system. The detection mechanism looks for the size of the tracking error (desired position vs. actual position) and the duration the error is present.
Modes Description SECTION 11 Closed Loop Relative and Tracking Position Modes This section describes the controller’s Position Relative and Position Tracking modes, how to wire the motor and position sensor assembly and how to tune and operate the controller in these modes. Modes Description In these two position modes, the axle of a geared-down motor is coupled to a position sensor that is used to compare the angular position of the axle versus a desired position.
Closed Loop Relative and Tracking Position Modes Selecting the Position Modes The two position modes are selected by changing the Motor Control parameter to Closed Loop Position. This can be done using the corresponding menu in the Power Output tree in the Roborun utility. It can also be done using the associated serial (RS232/RS485/TCP/ USB) command. See “MMOD” on page 310. The position mode can be set independently for each channel.
Feedback Sensor Range Setting A gear box is necessary to greatly increase the torque of the assembly. It is also necessary to slow down the motion so that the controller has the time to perform the position control algorithm. If the gearing ratio is too high, however, the positioning mode will be very sluggish. A good ratio should be such that the output shaft rotates at 1 to 10 rotations per second (60 to 600 RPM) when the motor is at full speed.
Closed Loop Relative and Tracking Position Modes Determining the right polarity is best done experimentally using the Roborun utility (see “Roborun+ Utility User Manual”) and following these steps: 1. 2. 3. 4. 5. 6. 7. 8. Configure the controller in Open Loop Speed mode. Configure the position sensor input channel as position feedback for the desired motor channel. Click on the Run tab. Enable the Feedback channel in the chart recorder.
Using Current Trigger as Protection The diodes may be eliminated, but then it will not be possible for the controller to move the motor once either of the limit switches has been triggered. The main benefit of this technique is its total independence on the controller’s electronics and its ability to work in practically all circumstances. Its main limitation is that the switch and diode must be capable of handling the current that flows through the motor.
Closed Loop Relative and Tracking Position Modes Position End Position Start Position Time Speed Position Mode Velocity Acceleration Deceleration Time FIGURE 11-3. When turning the controller on, the default acceleration, deceleration and velocity are parameters retrieved from the configuration EEPROM. In most applications, these parameters can be left unchanged and only change in commands used to control the change from one position to the other.
Operating in Closed Loop Tracking Mode Operating in Closed Loop Tracking Mode In this mode, the controller makes no effort to compute a smooth, millisecond by millisecond position trajectory. Instead, the current feedback position is periodically compared with the requested destination and power is applied to the motor using these two values in a PID control loop. This mode will work best if changes in the commands are smooth and not much faster than what the motor can physically follow.
Closed Loop Relative and Tracking Position Modes The Differential component of the algorithm computes the changes to the error from one ms time period to the next. This change will be a relatively large number every time an abrupt change occurs on the desired position value or the measured position value. The value of that change is then multiplied by a user-selectable Differential Gain and added to the output.
PID Tuning Differences between Position Relative and Position Tracking Experiment first with the motor electrically or mechanically disconnected and verify that the controller is measuring the correct position and is applying the expected amount of power to the motor depending on the command given. Verify that when the Command Value equals the Actual Position, the Applied Power equals to zero. Note that the Applied Power value is shown without the sign in the PC utility.
Closed Loop Relative and Tracking Position Modes 154 Advanced Digital Motor Controller User Manual V2.
Mode description Closed Loop Count Position Mode SECTION 12 In the Closed Loop Position mode, the controller can move a motor a precise number of encoder counts, using a predefined acceleration, constant velocity, and deceleration. This mode requires that an encoder be mounted on the motor. Mode description The desired position is given in the number of counts.
Closed Loop Count Position Mode Sensor Types and Mounting In position mode, best results are achieved with encoders directly mounted on the motor shaft. Encoders can be: • Quadrature encoders • Hall Sensors built-in brushless motors • Other rotor sensors built-in brushless motors It is not advised to mount encoders at the output of a geared motor as the gear box often introduces backlash.
Count Position Commands If a negative speed is reported, swap the two encoder wires to change the measured polarity, or swap the motor leads to make the motor spin in the opposite direction. Then use the PC Utility to select the Closed Loop Position Mode. After saving to the controller, the motor will operate in Closed Loop and will attempt to go to the 0 counter position. Beware therefore that the motor has not already turned before switching to Closed Loop.
Closed Loop Count Position Mode Beware that the next commands must be entered while the motor is moving, since the next commands will only be taken into account at the end of the current motion. To chain more than two commands, use a MicroBasic script or an external program to load new “next” command when the previous “next” commands become active. The ?DR query can be used to detect that this transition has occurred and that a new next command can be sent to the controller.
PID Tunings PID Tunings As long as the motor assembly can physically reach the acceleration and velocity, smooth motion will result in relatively little need for tuning. As for any position control loop, the dominant PID parameter is the Proportional gain with only little Integral gain and smaller or no Derivative gain. See “PID tuning in Position Mode”on page 148.
Closed Loop Count Position Mode 160 Advanced Digital Motor Controller User Manual V2.
Torque Mode Description SECTION 13 Closed Loop Torque Mode This section describes the controller’s operation in Torque Mode. Torque Mode Description The torque mode is a special case of closed loop operation where the motor command controls the current that flows through the motor regardless of the motor’s actual speed. In an electric motor, the torque is directly related to the current. Therefore, controlling the current controls the torque. Command PID Output Driver Motor Motor Amps FIGURE 13-1.
Closed Loop Torque Mode Torque Mode Selection, Configuration and Operation Use the PC utility and the menu “Operating Mode” to select Torque Mode. The controller will now use user commands from RS232, RS485, TCP, USB, Analog or Pulse to command the motor current. Torque commands can be given: • • • • G command, with range -1000 to +1000. The command for brushed controllers is then scaled using the amps limit configuration value.
Torque Mode Limitations Speed Limiting in Brushless controllers Brushless Controllers provide a way of smoothly limiting the speed in torque mode to prevent motor runaways. The method for limiting the speed is based on PID speed over-ride control which provides very smooth motor output but requires PID tuning.
Closed Loop Torque Mode Controller Motor Allegro ACS756 Current Sensor +5V GND Ana FIGURE 13-2. Torque external sensor To operate in torque mode, simply configure the selected analog input range to this of the sensor’s output at the min and max current that will correspond to the -1000 to +1000 command range. Configure the analog input as feedback for the selected motor channel. Then operate the controller in Position Tracking Mode (See “Position Tracking Mode” on page 141).
Use and benefits of Serial Communication Serial (RS232/ RS485/USB/TCP) Operation SECTION 14 This section describes how to communicate to the controller via the RS232, RS485, USB or TCP Interface. This information is useful if you plan to write your own controlling software on a PC or microcomputer. The full set of commands accepted by the controller is provided in “Commands Reference” on page 169.
Serial (RS232/USB) Operation Serial Port Configuration The controller’s default serial communication port is set as follows: • 115200 bits/s • 8-bit data • 1 Start bit • 1 Stop bit 14 25 • No Parity Communication is done without flow control, meaning that the controller is always ready to receive data and can send data at any time. 1 13 Connector RS232 Pin Assignment 14 25 1 8 15 13 1 9 FIGURE 14-1.
Setting Different Bit Rates 0: 115200 1: 57600 2: 38400 3: 19200 4: 9600 Make sure that the controller respond to this command with a +. Check that the value has been accepted by sending ~RSBR. Send %EESAV from the console to store the new configuration to flash. Cable configuration The RS232 connection requires the special cabling as described in Figure 14-2. The 9-pin female connector plugs into the PC (or other microcontroller). The 15-pin or 25-pin male connector plugs into the controller.
Serial (RS232/USB) Operation DB9 Female DB9 Male 1 1 RX Data TX Data 6 6 7 7 2 3 8 8 9 9 Data Out 3 Data In 4 4 GND 2 5 5 GND FIGURE 14-3. RS232 extension cable/connector wiring diagram Connecting to Arduino and other TTL Serial Microcomputers Arduino and similar microcomputers have a TTL serial port. There are Roboteq controllers supporting RS485, so the connection can be done directly. However, for the rest of the controllers there is a full RS232 serial interface.
RS485 Configuration The data sent from the TTL serial port are 0-3V and can be directly connected to the controller’s RS232 input where it will be captured as valid 0-1 levels. The data at the output of the controller is +/-10V. At the other end of the resistor, the voltage is clamped to around 0-3.3V by the protection diodes that are included in the Arduino MCU. However, to avoid any stress it is highly recommended to insert the 2 diodes shown on the diagram.
Serial (RS232/USB) Operation USB Configuration USB is available on all Roboteq controller models and provides a fast and reliable communication method between the controller and the PC. After plugging the USB cable to the controller and the PC, the PC will detect the new hardware, and install the driver. Upon successful installation, the controller will be ready to use. The controller will appear like another Serial device to the PC.
Command Priorities All TCP/IP configuration changes will be applied within one second after activation and communication via TCP, Modbus TCP or Modbus TCP over RTU will be available as long as the TCP mode is enabled.
Serial (RS232/USB) Operation The underscore ‘_’ character is interpreted by the controller as a carriage return. This alternate character is provided so that multiple commands can be easily concatenated inside a single string. All other characters lower than 0x20 (space) have no effect. Character Echo The controller will echo back to the PC or Microcontroller every valid character it has received.
Commands Types Commands Reference SECTION 15 This section lists all the commands accepted by the controller. Commands are typically sent via the serial (RS232, RS485, TCP or USB) ports (See “Serial (RS232/RS485/TCP/ USB) Operation” on page 161) Except for a few maintenance commands, they can also be issued from within a user script written using the MicroBasic language (See “MicroBasic Scripting Manual”).
Commands Reference Configuration commands These start with “~” for read and “^” for write when called via the serial communication (RS232, RS485, TCP or USB), or using the getconfig() and setconfig() MicroBasic functions. They are used to read or configure all the operating parameters of the controller (e.g. set or read amps limit). See “Set/Read Configuration Commands” on page 259 for the full list and description of these commands.
Runtime Commands Command Arguments Description RC Channel Value Set Pulse Out S Channel Value Set Motor Speed STT None STO Self-Test SX Channel Value Next Velocity VAR VarNbr Value Set User Variable AC - Set Acceleration Alias: ACCEL HexCode: 07 CANOpen id: 0x2006 Description: Set the rate of speed change during acceleration for a motor channel. This command is identical to the MACC configuration command but is provided so that it can be changed rapidly during motor operation.
Commands Reference AX - Next Acceleration Alias: NXTACC HexCode: 14 CANOpen id: 0x2012 Description: This command is used for chaining commands in Position Count mode. It is similar to AC except that it stores an acceleration value in a buffer. This value will become the next acceleration the controller will use and becomes active upon reaching a previous desired position. If omitted, the command will be chained using the last used acceleration value.
Runtime Commands Where: nn = Variable number mm = 0 or 1 Note: The total number of user variables depends on the controller model and can be found in the product datasheet. BND - Spectrum Bind Alias: BIND HexCode: 1C CANOpen id: Description: When used on controllers with Spektrum RC radio interface the BND command is used to pair the receiver with its transmitter.
Commands Reference Argument 2: Value Type: Signed 32-bit Min: -2147M Max: +2147M Where: cc = Motor channel nn = Counter value Example: !C 2 -1000 : Loads -1000 in encoder counter 2 !C 1 0 : Clears encoder counter 1 CB - Set Brushless Counter Alias: SBLCNTR HexCode: 05 CANOpen id: 0x2004 Description: This command loads the brushless counter with the value contained in the command argument. Beware that changing the controller value while operating in closed-loop mode can have adverse effects.
Runtime Commands Syntax Scripting: setcommand(_CG, cc, nn) setcommand(_CANGO, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Value Type: Signed 32-bit Min: -1000 Max: +1000 Where: cc = Motor channel nn = Command value CS - CAN Send Alias: CANSEND HexCode: 18 CANOpen id: Description: This command is used in CAN-enabled controllers to build and send CAN frames in the RawCAN mode (See RawCAN section in manual).
Commands Reference CSS - Set SSI Sensor Counter Alias: - HexCode: 6C CANOpen id: 0x201F Description: This command loads the SSI Sensor counter with the value contained in the command argument. Beware that changing the controller value while operating in closed-loop mode can have adverse effects. This command is not applicable if the respective sensor’s use has been set as absolute feedback.
Runtime Commands Example: !D0 2 : will deactivate output 2 Note: Digital Outputs are Open Collector. Activating an outputs will force it to ground. Deactivating an output will cause it to float. D1 - Set Individual Digital Out bits Alias: DSET HexCode: 0A CANOpen id: 0x2009 Description: The D1 command will activate the single digital output that is selected by the parameter that follows.
Commands Reference Syntax Serial: !DC cc nn Syntax Scripting: setcommand(_DC, cc, nn) setcommand(_DECEL, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Deceleration Type: Signed 32-bit Min: 0 Max: 500000 Where: cc = Motor channel nn = Deceleration value in 0.1 * RPM/s Example: !DC 1 2000 : Reduce Motor 1 speed by 200 RPM every second if speed is measured by encoder !DC 2 20000 : Time from full power to stop is 0.
Runtime Commands DX - Next Deceleration Alias: NXTDEC HexCode: 15 CANOpen id: 0x2013 Description: This command is used for chaining commands in Position Count mode. It is similar to DC except that it stores a decceleration value in a buffer. This value will become the next decceleration the controller will use and becomes active upon reaching a previous desired position. If omitted, the command will be chained using the last used decceleration value.
Commands Reference EX - Emergency Stop Alias: ESTOP HexCode: 0E CANOpen id: 0x200C Description: The EX command will cause the controller to enter an emergency stop in the same way as if hardware emergency stop was detected on an input pin. The emergency stop condition will remain until controller is reset or until the MG release command is received.
Runtime Commands Where: cc = Motor channel nn = Command value Example: !G 1 500 : In Open Loop Speed mode, applies 50% power to motor channel 1 !G 1 500 : In Closed Loop Speed mode, assuming that 3000 is contained in Max RPM parameter (MXRPM), motor will go to 1500 RPM !G 1 500 : In Closed Loop Relative or Closed Loop Tracking modes, the motor will move to 75% position of the total -1000 to +1000 motion range !G 1 500 : In Torque mode, assuming that Amps Limit is 60A, motor power will rise until 30A are me
Commands Reference Syntax Serial: !GID [nn] mm Syntax Scripting: setcommand(_GID, nn, mm) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Amps Type: Signed 32 Min: 0 Max: Max Amps in datasheet Where: cc = Motor channel nn = Amps*10 Example: !GID 1 -200: In Closed Loop Torque mode, applies -20,0A flux amps command (field weakening).
Runtime Commands Example: !H 1: Loads encoder counter 1, SSI sensor counter 1 and brushless counter 1 with their preset home values. MG - Emergency Stop Release Alias: MGO HexCode: 0F CANOpen id: 0x200D Description: The MG command will release the emergency stop condition and allow the controller to return to normal operation.
Commands Reference Syntax Scripting: setcommand(_P, cc, nn) setcommand(_MOTPOS, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Destination Type: Signed 32-bit Min: -2147M Max: +2147M Where: cc = Motor channel nn = Absolute count destination Example: !P 1 10000 : make motor go to absolute count value 10000.
Runtime Commands PRX - Next Go to Relative Desired Position Alias: NXTPOSR HexCode: 13 CANOpen id: 0x2011 Description: This command is similar to PR except that it stores a relative count value in a buffer. This value becomes active upon reaching a previous desired position and will become the next destination the controller will go to. See Position Command Chaining in manual.
Commands Reference Where: cc = Motor channel nn = Absolute count position Example: !P 1 5000 followed by !PX 1 -10000 : will cause motor to go to count position 5000 and upon reaching the destination move to position -10000. R - MicroBasic Run Alias: BRUN HexCode: 0C CANOpen id: 0x2018 Description: This command is used to start, stop and restart a MicroBasic script if one is loaded in the controller.
Runtime Commands Where: cc = Channel number nn = Value S - Set Motor Speed Alias: MOTVEL HexCode: 03 CANOpen id: 0x2002 Description: In the Closed-Loop Speed mode, this command will cause the motor to spin at the desired RPM speed. In Closed-Loop Position modes, this commands determines the speed at which the motor will move from one position to the next. It will not actually start the motion.
Commands Reference SX - Next Velocity Alias: NXTVEL HexCode: 17 CANOpen id: 0x2014 Description: This command is used in Position Count mode. It is similar to S except that it stores a velocity value in a buffer. This value will become the next velocity the controller will use and becomes active upon reaching a previous desired position. If omitted, the command will be chained using the last used velocity value. See Position Command Chaining in manual.
Runtime Commands DS402 Runtime Commands Runtime commands created to support DS402 specification are described below: TABLE 15-2.
Commands Reference Bits of the Control Word Command Transition Bit 7 Bit 3 Bit 2 Bit 1 Bit 0 Quick Stop 0 X 0 1 X 7,10,11 Disable Operation 0 0 1 1 1 5 Enable Operation 0 1 1 1 1 4,16 Fault Reset 0->1 X X X X 15 TABLE 15-5. Halt Bit (Bit 8) Bit 8 Value Definition 0 Positioning shall be executed or continued 1 Axis shall be stopped. Slow down on quick stop ramp (EDEC) and stay in operation enabled Profile Position Mode TABLE 15-6.
Runtime Commands In Velocity Mode the operation specific bits are mapped on Table 6. With bits 4, 5 and 6, user can configure the available ramp related options as shown in Table 7. TABLE 15-9 Definition of Bits 4, 5, and 6 in Velocity Mode Bit 4 5 6 Value Definition 0 Motor shall be halted.
Commands Reference Where: cc = Motor channel nn = Profile acceleration in 10×RPM/second PDC – Profile Deceleration (DS402) Alias: PDC HexCode: 5F CANOpen id: 0x6084 Description: This command is used to set the configured deceleration in 10×RPM/second.
Runtime Commands PSP – Profile Velocity (DS402) Alias: PSP HexCode: 5D CANOpen id: 0x6081 Description: This command is used to set the velocity in RPM, normally attained at the end of the acceleration ramp during a profiled motion and is valid for both directions of motion.
Commands Reference Syntax Serial: !S cc nn Syntax Scripting: SetCommand(_S, cc, nn) SetCommand(_MOTVEL, cc, nn) Arguments: 2 Argument 1: Channel Min: 1 Max: Total number of motors Argument 2: Value Min: -500000 Type: Unsigned 8-bit Type: Signed 16-bit Max: 500000 Where: cc = Motor channel nn = Target velocity in RPM SAC – Velocity Acceleration (DS402) Alias: SAC HexCode: 58 CANOpen id: 0x6048 Description: This command configures the velocity acceleration.
Runtime Commands SDC – Velocity Deceleration (DS402) Alias: SDC HexCode: 59 CANOpen id: 0x6049 Description: This command configures the velocity deceleration.
Commands Reference Syntax Serial: !SPL ee nn Syntax Scripting: SetCommand(_SPL, ee, nn) Arguments: 2 Argument 1: Eelment Min: 1 Type: Unsigned 8-bit Max: 2 × Total number of motors Argument 2: Value Type: Unsigned 32-bit Where: ee = 1: Min amount for channel 1 2: Max amount for channel 1 3: Min amount for channel 2 4: Max amount for channel 2 … 2 × (m - 1) + 1: Min amount for channel m. 2 × (m - 1) + 1: Max amount for channel m.
Runtime Queries TSL – Torque Slope (DS402) Alias: TSL HexCode: 60 CANOpen id: 0x6087 Description: This command is used to set the rate of change of torque, in 10×miliNm/second as long as the Torque Constant (TNM) is 1000 miliNm/A.
Commands Reference TABLE 15-10.
Runtime Queries TABLE 15-10.
Commands Reference Syntax Scripting: result = getvalue(_A, cc) result = getvalue(_MOTAMPS, cc) Reply: A = aa Type: Signed 16-bit Min: 0 Where: cc = Motor channel aa = Amps *10 for each channel Example: Q: ?A R: A=100:200 Q: ?A 2 R: A=200 Note: Single channel controllers will report a single value. Some power board units measure the Motor Amps and calculate the Battery Amps, while other models measure the Battery Amps and calculate the Motor Amps.
Runtime Queries the query returns 0. The total number of Analog input channels varies from one controller model to another and can be found in the product datasheet.
Commands Reference Argument: Channel Min: 1 Max: 2 * Number of Motors Syntax Scripting: result = getvalue(_ASI, cc) Reply: ASI=nn Type: Unsigned 16-bit Min: 0 Max: 65535 Where: cc = 1 : Sin input 1/SSI input 1 2 : Cos input 1 3 : Sin input 2/SSI input 2 4 : Cos input 2 nn = ADC value B - Read User Boolean Variable Alias: BOOL HexCode: 16 CANOpen id: 0x2115 Description: Read the value of boolean internal variables that can be read and written to/from within a user MicroBasic script.
Runtime Queries Syntax Scripting: result = getvalue(_BA, cc) result = getvalue(_BATAMPS, cc) Reply: BA=aa Type: Signed 16-bit Min: 0 Where: cc = Motor channel aa = Amps *10 for each channel Example: Q: ?BA R: BA=100:200 Note: Some controller models measure the Motor Amps and Calculate the Battery Amps, while other models measure the Battery Amps and calculate the Motor Amps. The measured Amps is always more precise than the calculated Amps.
Commands Reference only one BMS10X0 is connected to any pulse input this query will report the data of that device, regardless which pulse input it is connected to. If more than one BMS10X0 is connected to pulse inputs and these inputs are enabled and configured in BMS MultiPWM mode, then the argument following the query is used to select the sensor.
Runtime Queries Where: cc = (When only one sensor enabled) None or 1 : Current BMS10X0 cc = (When several sensors enabled) 1 : BMS10X0 at pulse input 1 2 : BMS10X0 at pulse input 2 ...
Commands Reference None or 1 : Current BMS10X0 cc = (When several sensors enabled) 1 : BMS10X0 at pulse input 1 2 : BMS10X0 at pulse input 2 ...
Runtime Queries only one BMS10X0 is connected to any pulse input this query will report the data of that device, regardless which pulse input it is connected to. If more than one BMS10X0 is connected to pulse inputs and these inputs are enabled and configured in BMS MultiPWM mode, then the argument following the query is used to select the sensor.
Commands Reference Reply: BSR=nn Type: Signed 16-bit Min: -1000 Max: 1000 Where: nn = Speed relative to max Example: Q: ?BSR R: BSR=500: speed is 50%of the RPM value stored in the Max RPM configuration C - Read Encoder Counter Absolute Alias: ABCNTR HexCode: 04 CANOpen id: 0x2104 Description: Returns the encoder value as an absolute number. The counter is 32-bit with a range of +/- 2147483648 counts.
Runtime Queries Reply: CAN = dd1:dd2:dd3: ... :dd10 Type: Unsigned 16-bit Min: 0 Max: 255 Where: ee = Byte in frame dd1 = Header dd2= Bytecount dd3 to dd10 = Data0 to data7 Example: Q: ?CAN R: CAN=5:4:11:12:13:14:0:0:0:0 Q: ?CAN 3 R: CAN=11 CB - Read Absolute Brushless Counter Alias: BLCNTR HexCode: 05 CANOpen id: 0x2105 Description: On brushless motor controllers, returns the running total of Internal sensor (Hall, SinCos, Resolver) transition value as an absolute number.
Commands Reference Syntax Serial: ?CF Argument: None Syntax Scripting: result = getvalue(_CF, 1) Reply: CF=nn Type: Unsigned 8-bit Min: 0 Max: 16 Where: nn = Number of frames in receive queue CIA - Read Converted Analog Command Alias: CMDANA HexCode: 1A CANOpen id: 0x2117 Description: Returns the motor command value that is computed from the Analog inputs whether or not the command is actually applied to the motor. The Analog inputs must be configured as Motor Command.
Runtime Queries Syntax Serial: ?CIP [cc] Argument: Channel Min: 1 Max: Total Number of Motors Syntax Scripting: result = getvalue(_CIP, cc) result = getvalue(_CMDPLS, cc) Reply: CIP=nn Type: Signed 32-bit Min: -1000 Max: 1000 Where: cc = Motor channel nn = Command value in +/-1000 range CIS - Read Internal Serial Command Alias: CMDSER HexCode: 19 CANOpen id: 0x2116 Description: Returns the motor command value that is issued from the serial input or from a MicroBasic script whether or not t
Commands Reference Syntax Serial: ?CL nn Argument: Group Min: 1 Max: 16 Syntax Scripting: result = getvalue(_CL, nn) result = getvalue(_CALIVE, nn) Reply: CL=mm Type: Unsigned 32-bit Min: 0 Max: 4194M Where: nn = 1 : nodes 0-3 2 : nodes 4-7 ... ... 15 : nodes 120-123 16 : nodes 124-127 mm = 4 words of 4 bits.
Runtime Queries CSR - Read Relative SSI Sensor Counter Alias: - HexCode: 6D CANOpen id: 0x213F Description: Returns the amount of counts that have been measured from the last time this query was made. Relative counter read is sometimes easier to work with, compared to full counter reading, as smaller numbers are usually returned.
Commands Reference D - Read Digital Inputs Alias: DIGIN HexCode: 0E CANOpen id: 0x210E Description: Reports the status of each of the available digital inputs. The query response is a single digital number which must be converted to binary and gives the status of each of the inputs. The total number of Digital input channels varies from one controller model to another and can be found in the product datasheet.
Runtime Queries Example: Q: ?DI R: DI=1:0:1:0:1:0 Q: ?DI 1 R: DI=0 DO - Read Digital Output Status Alias: DIGOUT HexCode: 17 CANOpen id: 0x2113 Description: Reads the actual state of all digital outputs. The response to that query is a single number which must be converted into binary in order to read the status of the individual output bits. When querying an individual output, the reply is 0 or 1 depending on its status.
Commands Reference Reply: DPA = aa Type: Signed 16-bit Min: 0 Where: cc = Motor channel aa = Amps *10 for each channel Example: Q: ?DPA R: DPA=100:200 Q: ?DPA 2 R: DPA=200 DR - Read Destination Reached Alias: DREACHED HexCode: 22 CANOpen id: 0x211B Description: This query is used when chaining commands in Position Count mode, to detect that a destination has been reached and that the next destination values that were loaded in the buffer have become active.
Runtime Queries Syntax Serial: ?E [cc] Argument: Channel Min: 1 Max: Total Number of Motors Syntax Scripting: result = getvalue(_E, cc) result = getvalue(_LPERR, cc) Reply: E=nn Type: Signed 32-bit Min: -2147M Max: 2147M Where: cc = Motor channel nn = Error value F - Read Feedback Alias: FEEDBK HexCode: 13 CANOpen id: 0x2110 Description: Reports the value of the feedback sensors that are associated to each of the channels in closed-loop modes.
Commands Reference Syntax Scripting: result = getvalue(_FC, cc) Reply: FC = nn Type: Signed 16-bit Min: -512 Max: 512 Where: cc = Motor channel nn = Angle correction FLW - Read Flow Sensor Counter Alias: - HexCode: 7B CANOpen id: 0x214A Description: When one or more FLW100 are connected to the controller, this query reports the count measurements of X and Y axis in mm*10 of the respective FLW100.
Runtime Queries FF - Read Fault Flags Alias: FLTFLAG HexCode: 15 CANOpen id: 0x2112 Description: Reports the status of the controller fault conditions that can occur during operation. The response to that query is a single number which must be converted into binary in order to evaluate each of the individual status bits that compose it. Syntax Serial: ?FF Argument: None Syntax Scripting: result = getvalue(_FF, 1) result = getvalue(_FLTFLAG, 1) Reply: FS = f1 + f2*2 + f3*4 + ...
Commands Reference Reply: FID=ss Type: String Where: ss = Firmware ID string Example: Q: ?FID R: FID=Roboteq v1.6 RCB500 05/01/2016 FIN - Read Firmware ID (numerical) Alias: - HexCode: 3F CANOpen id: 0x2137 Description: This query will report the version and the date of the firmware revision of the controller.
Runtime Queries Syntax Scripting: result = getvalue(_FM, cc) result = getvalue(_MOTFLAG, cc) Reply: FM = f1 + f2*2 + f3*4 + ...
Commands Reference f2 = Pulse mode f3 = Analog mode f4 = Power stage off f5 = Stall detected f6 = At limit f7 = Unused f8 = MicroBasic script running f9 = Motor/Sensor Tuning mode Note: On controller models supporting Spektrum radio mode f4 is used to indicate Spektrum. f4 to f6 are shifted to f5 to f7 HS - Read Hall Sensor States Alias: HSENSE HexCode: 31 CANOpen id: 0x2123 Description: Reports that status of the hall sensor inputs. This function is mostly useful for troubleshooting.
Runtime Queries ICL - Is RoboCAN Node Alive Alias: ICL HexCode: 46 CANOpen id: Description: This query is used to determine if specific RoboCAN node is alive on CAN bus.
Commands Reference LK - Read Lock status Alias: LOCKED HexCode: 1D CANOpen id: Description: Returns the status of the lock flag. If the configuration is locked, then it will not be possible to read any configuration parameters until the lock is removed or until the parameters are reset to factory default. This feature is useful to protect the controller configuration from being copied by unauthorized people.
Runtime Queries Example: Q: ?M R: M=800:-1000 Q: ?M 1 R: M=800 MA - Read Field Oriented Control Motor Amps Alias: MEMS HexCode: 25 CANOpen id: 0x211C Description: On brushless motor controllers operating in sinusoidal mode, this query returns the Torque (also known as Quadrature or Iq) current, and the Flux (also known as Direct, or Id) current. Current is reported in Amps x 10.
Commands Reference Reply: MGD=nn Type: Unsigned 8-bit Min: 0 Max: 1 Where: cc = (When only one sensor enabled) None or 1 : Current sensor cc = (When several sensors enabled) 1 : Sensor at pulse input 1 2 : Sensor at pulse input 2 ...
Runtime Queries MGS - Read Magsensor Status Alias: MGSTATUS HexCode: 2C CANOpen id: 0x2120 Description: When one or more MGS1600 Magnetic Guide Sensors are connected to the controller, this query reports the state of the sensor. If only one sensor is connected to any pulse input, no argument is needed for this query.
Commands Reference Syntax Scripting: result = getvalue(_MGT, cc) result = getvalue(_MGTRACK, cc) Reply: MGM = nn Type: Signed 16-bit Where: cc = (When only one sensor enabled) 1 : Left Track 2 : Right Track 3 : Active Track cc = (When several sensors enabled) 1 : Left Track of sensor at pulse input 1 2 : Right Track of sensor at pulse input 1 3 : Active Track of sensor at pulse input 1 4 : Left Track of sensor at pulse input 2 5 : Right Track of sensor at pulse input 2 6 : Active Track of sensor at pu
Runtime Queries 1 : sensor at pulse input 1 2 : sensor at pulse input 2 ... p : sensor at pulse input p nn = Gyroscope value MGX - Read MagSensor Tape Cross Detection Alias: - HexCode: 52 CANOpen id: 0x2138 Description: When one or more MGS1600 Magnetic Guide Sensors are connected to the controller, this query reports the flag of the Tape Cross Detection of the sensor. If only one sensor is connected to any pulse input, no argument is needed for this query.
Commands Reference Syntax Serial: ?P [cc] Argument: Channel Min: 1 Max: Total Number of Motors Syntax Scripting: result = getvalue(_P, cc) result = getvalue(_MOTPWR, cc) Reply: P=nn Type: Signed 16-bit Min: -1000 Max: 1000 Where: cc = Motor channel nn = 0 to +/-1000 power level Example: Q: ?P 1 R: P=800 PHA - Read Phase Amps Alias: - HexCode: 49 CANOpen id: - Description: Measures and reports instant motor phase Amps, in Amps*10, for all current sensors located in the motor phases.
Runtime Queries reported value in the number of pulses as detected. This counter only increments. In order to reset that counter the pulse capture mode needs to be set back to disabled and then again to Pulse Count.
Commands Reference S - Read Encoder Motor Speed in RPM Alias: ABSPEED HexCode: 03 CANOpen id: 0x2103 Description: Reports the actual speed measured by the encoders as the actual RPM value.
Runtime Queries Syntax Serial: ?SNA [cc] Argument: Channel Min: 1 Max: Total Number Of Motors Syntax Scripting: result = getvalue(_SNA, cc) Reply: SNA = aa Type: Unsigned 16-bit Min: 0 Max: 511 Where: cc = Motor Channel aa = Sensor Angle SR - Read Encoder Speed Relative Alias: RELSPEED HexCode: 07 CANOpen id: 0x2107 Description: Returns the measured motor speed as a ratio of the Max RPM (MXRPM) configuration parameter. The result is a value of between 0 and +/1000.
Commands Reference Syntax Serial: ?SS [cc] Argument: Channel Min: 1 Max: Total Number of SSI sensors Syntax Scripting: result = getvalue(_SS, cc) Reply: SS = aa Type: Signed 32-bit Min: -65535 Max: 65535 Where: cc = Motor channel aa = Speed in RPM. SSR - Read SSI Sensor Speed Relative Alias: - HexCode: 6B CANOpen id: 0x213D Description: Returns the measured motor speed as a ratio of the Max RPM (MXRPM) configuration parameter. The result is a value of between 0 and +/1000.
Runtime Queries Any of the transistors or other component of the STO circuit is damaged. The respective jumper is placed on the board. Syntax Serial: ?STT Argument: None Syntax Scripting: result = getvalue(_STT. 1) Reply: STT=ff Type Singned 8-bit Min:-1 Max: 4 Where ff= -1: The test is in process 0: Test successfull 1: STO1 failed the test 2: STO2 failed the test 3: Test failed using input values 4: Test passed using input values, but cannot continue test since STO is triggerred.
Commands Reference Note: On some controller models, additional temperature values may reported. These are measured at different points and not documented. You may safely ignore this extra data. Other controller models only have one heatsink temperature sensor and therefore only report one value in addition to the Internal IC temperature.
Runtime Queries Reply: TR=nn Type: Signed 32-bit Min: -2147M Max: 2147M Where: cc = Motor channel nn = Position TRN - Read Control Unit type and Controller Model Alias: TRN HexCode: 1F CANOpen id: Description: Reports two strings identifying the Control Unit type and the Controller Model type. This query is useful for adapting the user software application to the controller model that is attached to the computer.
Commands Reference Where: ee = Data element 1 : MCU type 2 : MCU Device Id 3-5 : MCU Unique ID nn = value V - Read Volts Alias: VOLTS HexCode: 0D CANOpen id: 0x210D Description: Reports the voltages measured inside the controller at three locations: the main battery voltage, the internal voltage at the motor driver stage, and the voltage that is available on the 5V output on the DSUB 15 or 25 front connector. For safe operation, the driver stage voltage must be above 12V.
DS402 Runtime Queries Syntax Serial: ?VAR [ee] Argument: VarNumber Min: 1 Max: Total Number of User Variables Syntax Scripting: result = getvalue(_VAR, ee) Reply: VAR=nn Type: Signed 32-bit Min: -2147M Max: 2147M Where: ee = Variable number nn = Value SL - Read Slip Frequency Alias: SL HexCode: 48 CANOpen id: 0x2136 Description: This query is only used in AC Induction boards. Read the value of the Slip Frequency between the rotor and the stator of an AC Induction motor.
Commands Reference Command Arguments Description PAC Channel Profile Acceleration (DS402) PDC Channel Profile Deceleration (DS402) POS Channel Target Position (DS402) PSP Channel Profile Velocity (DS402) RMP Channel Velocity Demand (DS402) ROM Channel Modes of Operation (DS402) S Channel Target Velocity (DS402) SAC Element Velocity Acceleration (DS402) SDC Element Velocity Deceleration (DS402) SDM None Supported Drive Modes (DS402) SPL Element Velocity Min/Max Amount (DS4
DS402 Runtime Queries Syntax Serial: ?CW [cc] Reply: CW=nn Syntax Scripting: nn = GetValue(_CW, cc) Argument: Channel Min: 1 Type: Unsigned 8-bit Max: Total number of motors Result: Value Type: Unsigned 16-bit Where: cc = Motor channel nn = Control word value F – Velocity/Position Actual Value (DS402) Alias: F HexCode: 13 CANOpen id: 0x6044, 0x6064, and 0x606C Description: Reads the velocity actual value in RPM if it isn’t in Position mode.
Commands Reference Syntax Scripting: nn = SetCommand(_PAC, cc) Argument: Channel Min: 1 Type: Unsigned 8-bit Max: Total number of motors Result: Value Type: Unsigned 32-bit Where: cc = Motor channel nn = Profile acceleration in 10×RPM/second PDC – Profile Deceleration (DS402) Alias: PDC HexCode: 5F CANOpen id: 0x6084 Description: Read the configured deceleration in 10×RPM/second.
DS402 Runtime Queries Result: Value Type: Signed 32-bit Where: cc = Motor channel nn = Target position PSP – Profile Velocity (DS402) Alias: PSP HexCode: 5D CANOpen id: 0x6081 Description: Read the configured velocity in RPM.
Commands Reference ROM – Modes of Operation (DS402) Alias: ROM HexCode: 5A CANOpen id: 0x6060 Description: Read the configured modes of operation.
DS402 Runtime Queries SAC – Velocity Acceleration (DS402) Alias: SAC HexCode: 58 CANOpen id: 0x6048 Description: Read the configured velocity acceleration.
Commands Reference 1: Delta speed in 10×RPM for channel 1 2: Delta time in seconds for channel 1 3: Delta speed in 10×RPM for channel 2 4: Delta time in seconds for channel 2 … 2 × (m - 1) + 1: Delta speed in 10×RPM for channel m. 2 × (m - 1) + 1: Delta time in seconds for channel m. nn = Delta speed/time SDM – Supported Drive Modes (DS402) Alias: SDM HexCode: 64 CANOpen id: 0x6502 Description: Read the supported drive modes.
DS402 Runtime Queries Where: ee = 1: Min amount for channel 1 2: Max amount for channel 1 3: Min amount for channel 2 4: Max amount for channel 2 … 2 × (m - 1) + 1: Min amount for channel m. 2 × (m - 1) + 1: Max amount for channel m. nn = Velocity max/min amount SW – Status Word (DS402) Alias: SW HexCode: 61 CANOpen id: 0x6041 Description: Read the status of the PDS FSA. TABLE 15-12.
Commands Reference TABLE 15-10. Definition of Bit 10 Bit Value Definition 0 Halt (bit 8 in control word) = 0: Speed or Position Target not reached Halt (bit 8 in control word) = 1: Axis decelerates 1 Halt (bit 8 in control word) = 0: Speed or Position Target reached Halt (bit 8 in control word) = 1: Velocity of axis is 0 10 Profile Position Mode TABLE 15-14.
DS402 Runtime Queries Reply: SW=nn Syntax Scripting: nn = GetValue(_SW, cc) Argument: Channel Min: 1 Type: Unsigned 8-bit Max: Total number of motors Result: Value Type: Unsigned 16-bit Where: cc = Motor channel nn = Status word value TC – Target Torque (DS402) Alias: TC HexCode: 5B CANOpen id: 0x6071 Description: Read the configured target torque in 100×Nm when the controller in torque mode.
Commands Reference Reply: TRQ=nn Syntax Scripting: nn = GetValue(_TRQ, cc) Argument: Channel Min: 1 Type: Unsigned 8-bit Max: Total number of motors Result: Value Type: Signed 16-bit Where: cc = Motor channel nn = Actual torque 100×Nm TSL – Profile Acceleration (DS402) Alias: TSL HexCode: 60 CANOpen id: 0x6087 Description: Read the configured rate of change of torque, in 10×miliNm/second as long as the Torque Constant (TNM) is 1000 miliNm/A.
Query History Commands Reply: VNM=nn Syntax Scripting: nn = GetValue(_TSL) Result: Value Type: Unsigned 32-bit Where: nn = Version number Query History Commands Every time a Real Time Query is received and executed, it is stored in a history buffer from which it can be recalled. The buffer will store up to 16 queries. If more than 16 queries are received, the new one will be added to the history buffer while the firsts are removed in order to fit the 16 query buffer.
Commands Reference Syntax: # Reply: QQ Where: QQ = is reply to query in the buffer. # C - Clear Buffer History This command will clear the history buffer of all queries that may be stored in it. If the controller was in the process of automatically sending queries from the buffer, then receiving this command will also cause the sending to stop Syntax: #C Reply: None # nn - Start Automatic Sending This command will initiate the automatic retrieving and execution of queries from the history buffer.
Query History Commands /?Q cc - Create data streams Using this syntax the next queries that are going to be sent will be printed after a prefix and separated by a delimiter. The default prefix is none and the default delimiter is tab. There can be created up to 3 streams and can have different refresh rates. Syntax: /””,””?Q cc Reply: The regular reply of the query ?Q cc. Where: Q = is reply the query symbol.
Commands Reference In order to clear the streams # c can be sent and then, the legacy history method can be used. In order to stop the streams but not delete them send #. then using command # xx nn one can restart the streams with nn refresh rate. //? - Dump the streams’ prefixes and delimiters Using this syntax one can see in each of the 3 streams which prefix and delimiter is set. In that case one can know which stream respects to each stream number.
Maintenance Commands CLMOD – Motor/Sensor Setup Argument: None Description: This command is used in order to perform motor and/or sensor setup, in cases of DC brushless motor controllers, when working in Sinusoidal mode or in Sensorless mode. This command will make the motor spin either slowly (sinusoidal) or even fast (sensorless) and will configure accordingly the respective fields in order to have a smooth motor spin and alignment between the motor and the sensor directions.
Commands Reference DFU - Update Firmware via USB Argument: Key Description: Firmware update can be performed via the RS232 port or via USB. When done via USB, the DFU command is used to cause the controller to enter in the firmware upgrade mode. This command must be used with care and must be followed by a 9-digit safety key to prevent accidental use. Once the controller has received the DFU command, it will no longer respond to the PC utility and no longer be visible on the PC.
Maintenance Commands EERST - Reset Factory Defaults Argument: Key Description: The EERST command will reload the controller’s RAM and EEPROM with the factory default configuration. Beware that this command may cause the controller to no longer work in your application since all your configurations will be erased back to factory defaults. This command must be used with care and must be followed by a 9-digit safety key to prevent accidental use.
Commands Reference RESET - Reset Controller Argument: Key Description: This command will cause the controller to reset similarly as if it was powered OFF and ON. This command must be used with care and must be followed by a 9-digit safety key to prevent accidental reset. Syntax: %RESET safetykey Where: safetykey = 321654987 SLD - Script Load Argument: Key Description: After receiving this command, the controller will enter the script loading mode.
Set/Read Configuration Commands Syntax: %UK secretkey Where: secretkey = 32-bit number (1 to 4294967296) Set/Read Configuration Commands These commands are used to set or read all the operating parameters needed by the controller for its operation. Parameters are loaded from EEPROM into RAM, from where they are and then used every time the controller is powered up or restarted. Important Notices The total number of configuration parameters is very large.
Commands Reference Reading Configurations Configuration parameters are read by issuing the “~” character followed by the command name and with an optional channel number parameter. If no parameter is sent, the controller will give the value of all channels. If a channel number is sent, the controller will give the value of the selected channel. The reply to parameter read command is the command name followed by “=” followed by the parameter value.
General Configuration and Safety Command Arguments Description ECHOF OffOn Enable/Disable Serial Echo EE Address Data Store User Data in Flash MDAL Option Modbus Data Alignment MNOD ID Modbus Node ID RS485 Enable Enable RS485 RSBR BitRate Set RS232 bit rate RWD Timeout Serial Data Watchdog SCRO Port Select Print output port for scripting SKCTR Channel Center Spektrum Center SKDB Channel Deadband Spektrum Deadband SKLIN Channel Linearity Spektrum Linearity SKMAX Channel
Commands Reference AMS - Analog within Min & Max Safety HexCode: 0C Description: This configuration is used to make sure that the analog input command is always within a user preset minimum and maximum safe value. It is useful to detect, for example, that the wire connection to a command potentiometer is broken. If the safety is enabled and the input is outside the safe range, the Analog input command will be considered invalid. The controller will then apply a motor command based on the priority logic..
General Configuration and Safety Where: aa = Address dd = Data Example: ^BEE 1 555 : Store value 555 in Battery Backed RAM location 1 ~BEE 1: Read data from RAM location 1 BRUN - MicroBasic Auto Start HexCode: 48 Description: This parameter is used to enable or disable the automatic MicroBasic script execution when the controller powers up. When enabled, the controller checks that a valid script is present in Flash and will start its execution 2 seconds after the controller has become active.
Commands Reference Syntax Serial: ^CLIN cc nn ~CLIN [cc] Syntax Scripting: setconfig(_CLIN, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Unsigned 8-bit Min: 0 Default: 0 = Linear Max: 7 Argument 2: Linearity Where: cc = Motor channel nn = 0: Linear (no change) 1: Exp weak 2: Exp medium 3: Exp strong 4: Log weak 5: Log medium 6: Log strong Example: ^CLIN 1 1 : Sets linearity for channel 1 to exponential weak CPRI - Command Priorities HexCode: 07 Descrip
General Configuration and Safety Argument 2: Command Type: Unsigned 8-bit Min: 0 Default: See description Max: 2 or 3 Where: pp = Priority rank nn = 0: Serial 1: RC 2: Analog (or Spektrum) 3: None (or Alalog) 4: None Example: ^CPRI 1 2 : Set Analog as first priority ~CPRI 2 : Read what command mode is second priority Note: USB, RS232, RS485 and TCP commands share the “Serial” type. When serial commands come from different Serial source, they are executed in the order received.
Commands Reference Example: ^DFC 1 500 : Sets motor command to 500 when no command source are detected ^DFC 2 1001 : Motor takes present position as destination after power up. Motor doesn’t move. DMOD – Modbus Mode HexCode: A1 Description: Configure this parameter in order to enable Modbus and the desired mode.
General Configuration and Safety Argument 1: OffOn Type: Unsigned 8-bit Min: 0 Default: 0 = Echo on Max: 1 Where: nn = 0: Echo is enabled 1: Echo is disabled Example: ^ECHOF 1 : Disable echo EE - Store User Data in Flash HexCode: 00 Description: Read and write user-defined values that can be permanently stored in Flash. Storage area size is typically 32 x 16-bit words but can vary from one product to the other. The command alters data contained in a RAM area.
Commands Reference MDAL – Modbus Data Alignment HexCode: CA Description: Configure this parameter in order to set the alignment of the Modbus byte frame. This option depends on what the Modbus master supports.
General Configuration and Safety Where: nn = Node ID Example: ^MNOD 3: Configure Modbus Node ID to 3. RSBR - Set RS232 bit rate HexCode: 0A Description: Sets the serial communication bit rate of the RS232 and RS485 ports. Choices are one of five most common bit rates. On selected products, the port output can be inverted to allow a simplified connection to devices that have TTL serial ports instead of full RS232 (not applicable for RS485 port).
Commands Reference RS485 - Enable RS485 HexCode: D0 Description: Configure this parameter in order to enable the RS485 communication. This feature is applicable only on motor controllers, where RS485 pins are shared with other features. In these controllers the default value is Disabled. In any other controller that support RS485 with dedicated pins the default value is Enabled.
General Configuration and Safety Where: nn = Timeout value in ms Example: ^RWD 2000 : Set watchdog to 2s ^RWD 0 : Disable watchdog SCRO - Select Print output port for scripting HexCode: 5E Description: Selects which port the print statement sends data to. When 0, the last port which received a valid character will be the one the script outputs to.
Commands Reference Argument 2: Center Type: Unsigned 16-bit Min: 0 Default: 0 Max: 1024 Where: cc = Channel nn = Center value SKDB - Spektrum Deadband HexCode: 54 Description: Sets the deadband value for the Spektrum channel. It is defined as the percent number from 0 to 50% and defines the amount of movement from joystick or sensor around the center position before its converted value begins to change.
General Configuration and Safety Syntax Scripting: setconfig(_SKLIN, cc) Number of Arguments: Argument 1: Channel Min: 1 Max: 2 Type: Unsigned 8-bit Min: 0 Default: 0 = Linear Max: 6 Argument 2: Linearity Where: cc = Input channel number nn = 0 : linear (no change) 1: exp weak 2: exp medium 3: exp strong 4: log weak 5: log medium 6: log strong SKMAX - Spektrum Max HexCode: 52 Description: Value captured from Spektrum radio that will be considered as +1000 command Syntax Serial: ^SKMAX cc nn ~SKMAX
Commands Reference SKMIN - Spektrum Min HexCode: 51 Description: Value captured from Spektrum radio that will be considered as -1000 command Syntax Serial: ^SKMIN cc nn ~SKMIN [cc] Syntax Scripting: setconfig(_SKMIN, cc) Number of Arguments: Argument 1: Channel Min: 1 Max: 2 Type: Unsigned 16-bit Min: 0 Default: 0 Max: 1024 Argument 2: Min Where: cc = Channel nn: Min value SKUSE - Assign Spektrum port to motor command HexCode: 50 Description: Chose which of the 6 joysticks from the Spektrum RC rece
General Configuration and Safety STO – STO Enable HexCode: CF Description: Configure this parameter in order to enable the STO functionality. For boards which have the respective circuit the respective jumper needs to be removed (see Chapter Safe Torque-Off (STO), in Section2). Syntax Serial: ^STO nn ~STO Syntax Scripting: setconfig(_STO, nn) Number of Arguments: 1 Argument 1: STO Status Type: Unsigned 8-bit Min: 0 Max: 1 Default: 0 Where: nn = STO status 0: Disabled. 1: Enabled.
Commands Reference Type: String Min: “” Max: 48 characters string Default: “” = Empty string Where: string = string of ASCII characters between quotes Example: ^TELS “?A:?V:?T:# 200” = Controller will issue Amps, Volts and temperature information automatically upon power up at 200ms intervals. Analog, Digital, Pulse IO Configurations These parameters configure the operating mode and how the inputs and outputs work. TABLE 15-21.
Analog, Digital, Pulse IO Configurations ACTR - Set Analog Input Center (0) Level HexCode: 16 Description: This parameter is the measured voltage on input that will be considered as the center or the 0 value. The min, max and center are useful to set the range of a joystick or of a feedback sensor. Internally to the controller, commands and feedback values are converted to 1000, 0, +1000.
Commands Reference Argument 1: InputNbr Min: 1 Max: Total Number of Analog Inputs Argument 2: Deadband Type: Unsigned 8-bit Min: 0 Default: 5 = 5% Max: 50 Where: cc = Analog input channel nn = Deadband in % Example: ^ADB 6 10 : Sets Deadband for channel 6 at 10% Note: Deadband is not used when input is used as feedback AINA - Analog Input Use HexCode: 19 Description: This parameter selects whether an input should be used as a command feedback or left unused.
Analog, Digital, Pulse IO Configurations Example: ^AINA 1 17: Sets Analog channel 1 as command for motor 1. I.e. 17 = 1 (command) +16 (motor 1) ALIN - Analog Linearity HexCode: 18 Description: This parameter is used for applying an exponential or a logarithmic transformation on an analog input. There are 3 exponential and 3 logarithmic choices. Exponential correction will make the commands change less at the beginning and become stronger at the end of the joystick movement.
Commands Reference Syntax Serial: ^AMAX cc nn ~AMAX [cc] Syntax Scripting: setconfig(_AMAX, cc, nn) Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Analog Inputs Type: Unsigned 16-bit Min: 0 Default: 4900 mV Max: 10000 Argument 2: Max Where: cc = Analog input channel nn = 0 to 10000mV Example: ^AMAX 4 4500 : Set Analog Input 4 Max range to 4500mV Note: Analog input can capture voltage up to around 5.2V.
Analog, Digital, Pulse IO Configurations 2: Emergency stop 3: Motor stop 4: Forward limit switch 5: Reverse limit switch 6: Invert direction 7: Run MicroBasic script 8: Load counter with home value mm = mot1*16 + mot2*32 + mot3*48 Example: ^AMAXA 3 33 : Stops motor 2. I.e. 33 = 1 (safety stop) + 32 (motor2) AMIN - Set Analog Input Min Range HexCode: 14 Description: This parameter sets the raw value on the input that will be considered as the minimum command value.
Commands Reference mand. For example, this feature can be used to create soft limit switches, in which case the motor can be made to stop if the feedback sensor in a position mode has reached a minimum value.
Analog, Digital, Pulse IO Configurations Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Analog Inputs Argument 2: Mode Type: Unsigned 8-bit Min: 0 Default: 0 = Disabled Max: 2 Where: cc = Analog input channel nn = 0: Disabled 1: Absolute 2: Relative Example: ^AMOD 1 1 : Analog input 1 enabled in absolute mode APOL - Analog Input Polarity HexCode: 1C Description: Inverts the analog capture polarity value after conversion.
Commands Reference DINA - Digital Input Action HexCode: 0F Description: This parameter sets the action that is triggered when a given input pin is activated. The action list includes: limit switch for a selectable motor and direction, use as a deadman switch, emergency stop, safety stop or invert direction. Embedded in the parameter is the motor channel(s) to which the action should apply.
Analog, Digital, Pulse IO Configurations Syntax Serial: ^DINL cc aa ~DINL [cc] Syntax Scripting: setconfig(_DINL, cc, aa) Number of Arguments: 1 Argument 1: ActiveLevels Type: Unsigned 32-bit Min: 0 Max: 2 ^ Total Number of Digital Inputs Default: 0 = All Active high Where: cc = Digital input number aa= 0: Active High 1: Active Low Example: ^DINL 2 1 : Sets digital input 2 to active low DOA - Digital Output Action HexCode: 11 Description: This configuration parameter will set what will trigger a given o
Commands Reference 2: Motor reversed 3: Overvoltage 4: Overtemperature 5: Mirror status LED 6: No MOSFET failure Example: ^DOA 1 3 : Output 1 is active when Overvoltage is observed Note: Typical default configuration is Digital outputs 1 (2) are active when motor is on. Digital output 2 (3) when no MOSFET failure is detected.
Analog, Digital, Pulse IO Configurations Syntax Scripting: setconfig(_PCTR, cc, nn) Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Pulse Inputs Argument 2: Center Type: Unsigned 16-bit Min: 0 Default: 1500us Max: 65536 Where: cc = Pulse input number nn = 0 to 65536us PDB - Pulse Input Deadband HexCode: 21 Description: This sets the deadband value for the pulse capture.
Commands Reference Syntax Serial: ^PINA cc (nn + mm) ~PINA [cc] Syntax Scripting: setconfig(_PINA, cc, nn) Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Pulse Inputs Argument 2: Use Type: Unsigned 8-bit Min: 0 Default: See note Max: 255 Where: cc = Pulse input number nn = 0: No action 1: Command 2: Feedback mm = mot1*16 + mot2*32 + mot3*48 Example: ^AINA 1 17: Sets Pulse input 1 as command for motor 1. I.e.
Analog, Digital, Pulse IO Configurations Where: cc = Pulse input number nn = 0: Linear (no change) 1: Exp weak 2: Exp medium 3: Exp strong 4: Log weak 5: Log medium 6: Log strong PMAX - Pulse Max Range HexCode: 1F Description: This parameter defines the raw pulse measurement number that would be considered as the +1000 internal value to the controller. By default, it is set to 2000 which is the max pulse width of an RC radio pulse.
Commands Reference Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Pulse Inputs Argument 2: Action Type: Unsigned 8-bit Min: 0 Default: 0 = No action Max: 255 Where: cc = Pulse input number aa = 0: No action 1: Safety stop 2: Emergency stop 3: Motor stop 4: Forward limit switch 5: Reverse limit switch 6: Invert direction 7: Run MicroBasic script 8: Load counter with home value mm = mot1*16 + mot2*32 + mot3*48 PMIN - Pulse Min Range HexCode: 1E Description: This sets the raw value
Analog, Digital, Pulse IO Configurations PMINA - Action on Pulse Min HexCode: 24 Description: This parameter selects what action should be taken if the minimum value that is defined in PMIN is reached. The list of action is the same as these of the DINA digital input actions. Embedded in the parameter is the motor channel(s) to which the action should apply.
Commands Reference Syntax Scripting: setconfig(_PMOD, cc, nn) Number of Arguments: 2 Argument 1: InputNbr Min: 1 Max: Total Number of Pulse Inputs Argument 2: Mode Type: Unsigned 8-bit Min: 0 Default: See note Max: 4 Where: cc = Pulse input number nn = 0: Disabled 1: Pulse width 2: Frequency 3: Duty cycle 4: Magsensor 5: BMS 6: Pulse Count 7: Flow Sensor Example: ^PMOD 4 4 : Sets Pulse input 4 in Multi-PWM for Robteq’s MGS1600 magnetic guide sensor Note: Pulse width is designed for capturing RC radio com
Motor Configurations Argument 1: InputNbr Min: 1 Max: Total Number of Pulse Inputs Argument 2: Polarity Type: Unsigned 8-bit Min: 0 Default: 0 = Non inverted Max: 1 Where: cc = Pulse input number nn = 0: Not inverted 1: Inverted Motor Configurations This section covers the various configuration parameter applying to motor operations. TABLE 15-22.
Commands Reference Command Arguments Description MVEL Channel Velocity Default Position Velocity MXMD Mode Separate or Mixed Mode Select MXPF Channel MaxPower Motor Max Power Forward MXPR Channel MaxPower Motor Max Power Reverse MXRPM Channel RPM Max RPM Value MXTRN Channel Turns Number of turns between limits OVH Voltage Overvoltage hysteresis OVL Voltage Overvoltage Cutoff Limit OTL Temperature Over Temperature Cutoff Limit PWMF Frequency PWM Frequency SCPR Channel Value
Motor Configurations Where: cc = Motor channel nn = Amps *10 Example: ^ALIM1 455: Set Amp limit for Motor 1 to 45.5A Note: Default value is typically set to 75% of the controller’s max amps as defined in the datasheet ATGA - Amps Trigger Action HexCode: 2C Description: This parameter sets what action to take when the Amps trigger is activated. The list is the same as in the DINA digital input actions.
Commands Reference ATGD - Amps Trigger Delay HexCode: 2D Description: This parameter contains the time in milliseconds during which the Amps Trigger Level (ATRIG) must be exceeded before the Amps Trigger Action (ATGA) is called. This parameter is used to prevent Amps Trigger Actions to be taken in case of short duration spikes.
Motor Configurations Where: cc = Motor channel nn = Amps *10 Example: ^ATRIG2 550: Set Amps Trigger to 55.0A BKD - Brake activation delay in ms HexCode: 0F Description: Set the delay in miliseconds from the time a motor stops and the time an output connected to a brake solenoid will be released. Applies to any Digital Ouput(s) that is configured as motor brake. Delay value applies to all motors in multi-channel products.
Commands Reference Syntax Scripting: setconfig(_BLFB, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Unsigned 8-bit Min: 0 Default: 0 = Other Sensor Max: 1 Argument 2: Sensor Where: cc = Motor channel nn = 0: Other feedback (Encoders, SSI sensors, Analog or RC sensors) 1: Brushless sensor feedback (Hall, Sin/Cos, Resolver) BLSTD - Stall Detection HexCode: 3A Description: This parameter controls the stall detection of brushless motors and of brushed motors
Motor Configurations Example: ^BLSTD 2: Motor will stop if applied power is higher than 10% and no motion is detected for more than 250ms CLERD - Close Loop Error Detection HexCode: 38 Description: This parameter is used to detect large tracking errors due to mechanical or sensor failures, and shut down the motor in case of problem in closed loop speed or position system. The detection mechanism looks for the size of the tracking error and the duration the error is present.
Commands Reference EDEC - Fault Motor Deceleration Rate HexCode: E9 Description: Set the rate of speed change during deceleration for a motor channel, when a fault takes place. The faults under which this rate will be used are, Safety Stop, Deadman Switch and Closed Loop Error. Fault Decceleration value is in 0.1*RPM per second. When using controllers fitted with encoder, the speed and deceleration value are actual RPMs.
Motor Configurations Where: cc = Encoder channel nn = Counter value EHLA - Encoder High Limit Action HexCode: 4E Description: This parameter lets you select what kind of action should be taken when the high limit count is reached on the encoder. The list of action is the same as in the DINA digital input action list Embedded in the parameter is the motor channel(s) to which the action should apply.
Commands Reference Syntax Serial: ^EHOME cc nn ~EHOME [cc] Syntax Scripting: setconfig(_EHOME, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Encoders Type: Signed 32-bit Min: -2147M Default: 0 Max: 2147M Argument 2: Value Where: cc = Encoder channel nn = Counter value to be loaded ELL - Encoder Low Count Limit HexCode: 4B Description: Defines a minimum count value at which the controller will trigger an action when the counter dips below that number.
Motor Configurations ELLA - Encoder Low Limit Action HexCode: 4D Description: This parameter lets you select what kind of action should be taken when the low limit count is reached on the encoder. The list of action is the same as in the DINA digital input action list Embedded in the parameter is the motor channel(s) to which the action should apply.
Commands Reference Syntax Scripting: setconfig(_EMOD, cc, aa) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Encoders Type: Unsigned 8-bit Min: 0 Default: 0 = Unused Max: 255 Argument 2: Use Where: cc = Encoder channel aa = 0: Unused 1: Command 2: Feedback mm = mot1*16 + mot2*32 + mot3*48 Example: ^EMOD 1 18 = Encoder used as feedback for channel 1 EPPR - Encoder PPR Value HexCode: 4A Description: This parameter will set the pulse per revolution of the encoder that is attached
Motor Configurations Where: cc = Encoder channel nn = PPR value Example: ^EPPR 2 200 : Sets PPR for encoder 2 to 200 ICAP - PID Integral Cap HexCode: 32 Description: This parameter is the integral cap as a percentage. This parameter will limit maximum level of the Integral factor in the PID. It is particularly useful in position systems with long travel movement, and where the integral factor would otherwise become very large because of the extended time the integral would allow to accumulate.
Commands Reference Syntax Scripting: setconfig(_KD, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Argument 2: Max: Total Number of Motors Gain Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000 Default: 0 Where: cc = Motor channel nn = Differential Gain *1,000,000 Example: ^KD 1 1500000: Set motor channel 1 Differential Gain to 1.5. Note: Do not use default values. As a starting point, use P=2, I=0, D=0 in position modes (including Speed Position mode).
Motor Configurations KP - PID Proportional Gain HexCode: 2E Description: Sets the PID’s Proportional Gain for that channel. The value is set as the gain multiplied by 10^6. This gain is used in all closed loop modes. In Torque mode, on brushless contontrollers, the FOC’s PID is used instead and this parameter is used for the speed limiting tuning.
Commands Reference Syntax Serial: ^MAC cc nn ~MAC [cc] Syntax Scripting: setconfig(_MAC, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Acceleration Type: Signed 32-bit Min: 0 Max: 500000 Default: 10000 = 1000.0 RPM/s Where: cc = Motor channel nn = Acceleration time in 0.
Motor Configurations Where: cc = Motor channel nn = Deceleration time in 0.1 RPM per second Note: In Closed Loop Torque Mode the value is translated in miliAmps/sec. MLX - Molex Input HexCode: D5 Description: Configure this parameter in order to change the sensors that will be connected to the molex connector. In brushless controllers if SSI sensors are used then hall sensor inputs are re-mapped to the digital input pins, as dictated in the controller model’s datasheet.
Commands Reference Where: cc = Motor Channel nn = 0: Not inverted 1: Inverted Syntax Scripting: setconfig(_MDIR, cc, nn) MMOD - Operating Mode HexCode: 27 Description: This parameter lets you select the operating mode for that channel. See manual for description of each mode.
Motor Configurations Syntax Serial: ^MVEL cc nn ~MVEL [cc] Syntax Scripting: setconfig(_MVEL, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Signed 32-bit Min: 0 Default: 1000 RPM Max: 30000 Argument 2: Velocity Where: cc = Motor channel nn = Velocity value in RPM MXMD - Separate or Mixed Mode Select HexCode: 05 Description: Selects the mixed mode operation.
Commands Reference MXPF - Motor Max Power Forward HexCode: 28 Description: This parameter lets you select the scaling factor for the PWM output, in the forward direction, as a percentage value. This feature is used to connect motors with voltage rating that is less than the battery voltage. For example, using a factor of 50% it is possible to connect a 12V motor onto a 24V system, in which case the motor will never see more than 12V at its input even when the maximum power is applied.
Motor Configurations Argument 2: MaxPower Type: Unsigned 8-bit Min: 25 Default: 100% Max: 100 Where: cc = Motor channel nn = Max Power MXRPM - Max RPM Value HexCode: 36 Description: Commands sent via analog, pulse or the !G command only range between -1000 to +1000. The Max RPM parameter lets you select which actual speed, in RPM, will be considered the speed to reach when a +1000 command is sent.
Commands Reference Syntax Scripting: setconfig(_MXTRN, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Turns Type: Signed 32-bit Min: 10 Max: 100000 Default: 10000 = 1000.0 turns Where: cc = Motor channel nn = Number of turns * 10 Example: ^MXTRN 1 2000: Set max turns for motor 1 to 200.
Motor Configurations OVL - Overvoltage Cutoff Limit HexCode: 02 Description: Sets the voltage level at which the controller must turn off its power stage and signal an Overvoltage condition. Value is in volts multiplied by 10 (e.g. 450 = 45.0V) . The power stage will turn back on when voltage dips below the Overvoltage Clearing threshold that is set with the the OVH configuration command.
Commands Reference Example: ^OTL 75 : Set Over temperature limit to 75 Celsius degrees. PWMF - PWM Frequency HexCode: 06 Description: This parameter sets the PWM frequency of the switching output stage. It can be set from 1 kHz to 30 kHz. The frequency is entered as kHz value multiplied by 10 (e.g. 185 = 18.5 kHz). Beware that a too low frequency will create audible noise and would result in lower performance operation.
Motor Configurations Argument 1: Channel Min: 1 Max: Total Number of SSI Sensors Argument 2: Value Type: Signed 32-bit Min: -65535 Max: 65535 Default: 4096 Where: cc = SSI Sensor channel nn = CPR value Example: ^SCPR 2 16384 : Sets CPR for SSI Sensor 2 to 16384 (14 bits). SHL - SSI Sensor High Count Limit HexCode: D8 Description: Defines a maximum count value at which the controller will trigger an action when the SSI counter goes above that number.
Commands Reference SHLA - SSI Sensor High Limit Action HexCode: DA Description: This parameter lets you select what kind of action should be taken when the high limit count is reached on the SSI Sensor. The list of action is the same as in the DINA digital input action list Embedded in the parameter is the motor channel(s) to which the action should apply.
Motor Configurations Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of SSI Sensors Argument 2: Value Type: Signed 32-bit Min: -2147M Max: 2147M Default: 0 Where: cc = SSI Sensor channel nn = Counter value to be loaded, or Counter offset. SLL - SSI Sensor Low Count Limit HexCode: D7 Description: Defines a minimum count value at which the controller will trigger an action when the counter dips below that number.
Commands Reference SLLA - SSI Sensor Low Limit Action HexCode: D9 Description: This parameter lets you select what kind of action should be taken when the low limit count is reached on the SSI Sensor. The list of action is the same as in the DINA digital input action list Embedded in the parameter is the motor channel(s) to which the action should apply.
Motor Configurations Syntax Serial: ^SMOD cc (aa + mm) ^SMOD [cc] Syntax Scripting: setconfig(_SMOD, cc, aa) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of SSI Sensors Argument 2: Use Type: Unsigned 8-bit Min: 0 Max: 255 Default: 0 = Unused Where: cc = SSI Sensor channel aa = 0: Unused 1: Command 2: Feedback 3: Absolute Feedback mm = mot1*16 + mot2*32 + mot3*48 Example: ^SMOD 1 19 = Encoder used as absolute feedback for channel 1 THLD - Short Circuit Detectio
Commands Reference Example: ^THLD 1 : Set short circuit detection sensitivity to medium. Note: You should never disable the short circuit protection. TNM - Motor Torque Constant HexCode: DF Description: This configuration parameter sets the motor torque constant. It is a value with which we can convert the current (A) to torque (NM) and vice versa. This value is in miliNm/Amps and is usually referred in the motor datasheets. The conversion is used by the TC and TSL commands and TRQ query.
Brushless Specific Commands Syntax Scripting: setconfig(_UVL, nn) Number of Arguments: 1 Argument 1: Voltage Type: Unsigned 16-bit Min: 50 = 5.0V Max: Max Voltage in Product Datasheet Default: 50 = 5.0V Where: nn = Volts *10 Example: ^UVL 100 : Set undervoltage limit to 10.0 V Brushless Specific Commands TABLE 15-23.
Commands Reference BADJ - Brushless zero angle HexCode: 60 Description: When being in sinusoidal mode and Sin/Cos, Resolver or SSI feedback sensors are used, this configuration command stores results of automatic zero degrees angle search after performing the Motor/Sensor Setup (%clmod 2/3). The angle represents the mechanical offset between the sensor’s zero position and the rotor’s zero position. The value is in electrical degrees ranging from 0 to 511 for a full electrical turn.
Brushless Specific Commands Argument 2: Value Min: -511 Type: Signed 16-bit Max: 511 Default: 0 Where: cc = Motor channel nn = Angle Example: ^BADV 1 20 : Advance motor 1 timing by 20 degrees BECC – BEMF Coupling Constant HexCode: BD Description: This configuration parameter is applicable only for sensorless motor controllers. In case of non-ideal back-EMF waveforms, this number is required to compensate for back-EMF coupling due to other two phases.
Commands Reference Syntax Scripting: setconfig(_BFBK, cc) Number of Arguments: Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Unsigned 8-bit Min: 0 Default: 0 = Encoder Max: 4 Argument 2: Sensor Where: cc = Motor channel nn = 0: Encoder 1: Hall 2: Hall + Encoder 3: SPI/SSI sensor 4: Sin/Cos sensor 5: Resolver BHL - Brushless Counter High Limit HexCode: 3E Description: This parameter allows you to define a minimum brushless count value at which the controller will trigger an action when
Brushless Specific Commands Example: ^BHL 10000 : Set brushless counter high limit Note: Counter is not an absolute position. A homing sequence is necessary to set a reference position. BHLA - Brushless Counter High Limit Action HexCode: 40 Description: This parameter lets you select what kind of action should be taken when the high limit count is reached on the brushless counter. The list of action is the same as in the DINA digital input action list.
Commands Reference BHOME - Brushless Counter Load at Home Position HexCode: 3C Description: This parameter contains a value that will be loaded in the brushless hall sensor counter when a home switch is detected, or when a Home command is received from the serial/ USB, or issued from a MicroBasic script.
Brushless Specific Commands Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Signed 32-bit Min: -2147M Default: -20000 Max: +2147M Argument 2: Value Where: cc = Motor channel nn = Counter value Example: ^BLL 1 -10000 : Set motor 1 brushless counter low limit Note: Counter is not an absolute position. A homing sequence is necessary to set a reference position.
Commands Reference 3: Motor stop 4: Forward limit switch 5: Reverse limit switch 6: Invert direction 7: Run MicroBasic script 8: Load counter with home value mm = mot1*16 + mot2*32 + mot3*48 Example: ^BLLA 1 37 : Reverse limit switch for motor 2 (5 + 32) BMOD - Brushless operating mode HexCode: 5F Description: Selects the operating mode when controlling brushless motors. Additional settings apply for each mode.
Brushless Specific Commands BPOL - Number of Pole Pairs and Speed Polarity of Brushless Motor HexCode: 39 Description: This parameter is used to define the number of pole pairs of the brushless motor connected to the controller. This value is used to convert the hall sensor transition counts into actual RPM and number of motor turns. Entering a negative number will invert the counter and the measured speed polarity.
Commands Reference Argument 2: Amps Type: Unsigned 16-bit Min: 0 Default: 50 = 5.0A Where: cc = Motor channel nn = Amps x 10 HPO - Hall Sensor Position HexCode: A5 Description: This parameter selects the Hall sensor spacing in the motor. Practically all brushless motors use Hall sensors with 120 degrees spacing. Some motors have Hall sensors with 60 degrees. Change this parameter only if the motor’s manual clearly specifies 60 degrees spacing.
Brushless Specific Commands HSM - Hall Sensor Map HexCode: A3 Description: Configure this parameter to match the ABC hall sensor cable pattern with the UVW motor windings wire pattern connected to the controller. For each hall sensor cable order and motor wire order, there are 6 combinations, one of which will make the motor spin smoothly and efficiently in both directions.
Commands Reference Syntax Scripting: setconfig(_KIF, cc) Number of Arguments: Argument 1: AmpsChannel Min: 1 Max: 2 * Total Number of Motors Argument 2: Gain Type: Unsigned 32-bit Min: 0 Max: 2,000,000,000 Default: 0 Where: cc (single channel) = 1: Flux Gain 2: Torque Gain cc (dual channel) = 1: Flux Gain for motor 1 2: Flux Gain for motor 2 3: Torque Gain for motor 1 4: Torque Gain for motor 2 nn = Gain * 1,000,000 Example: ^KIF 1 230000: Set motor channel 1 Flux Integral Gain to 0.23.
Brushless Specific Commands cc (dual channel) = 1: Flux Gain for motor 1 2: Flux Gain for motor 2 3: Torque Gain for motor 1 4: Torque Gain for motor 2 nn = Gain * 1,000,000 Example: ^KPF 4 230000: Set motor channel 2 Torque Proportional Gain to 0.23. PSA - Phase Shift Angle HexCode: E1 Description: When being in sinusoidal mode and Sin/Cos or Resolver feedback sensors are used, this configuration command defines the Phase Shift Angle between the Sin and Cos signals.
Commands Reference Syntax Serial: ^SPOL cc nn ~SPOL [cc] Syntax Scripting: setconfig(_SPOL, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Type: Unsigned 8-bit Min: 1 Default: 1 Max: 255 Argument 2: Number Where: cc = Motor channel nn = Number of poles SSF – Sensorless Start-Up Frequency HexCode: C0 Description: This configuration parameter is applicable only for sensorless motor controllers.
Brushless Specific Commands Example: ^SSF 1 150 : Set the sensorless start-up frequency of motor 1 at 15,0Hz. SVT – BEMF Integrator Limit HexCode: BE Description: This configuration parameter is applicable only for sensorless motor controllers. This defines the limit to which the back-EMF of a given phase should be integrated to commutate. It is representation of maximum flux linkage of the rotor. This number is filled after the automatic motor tuning.
Commands Reference SWD Value BIT 1 BIT 0 Swap for Hall (Bit 1) Swap for Encoder (Bit 0) Meaning 0 0 0 NO NO None 1 0 1 NO YES Swapped 2 1 0 YES NO Hall only Swapped 3 1 1 YES YES Hall+Encoder Swapped Syntax Serial: ^SWD cc nn ~ SWD [cc] Syntax Scripting: setconfig(_SWD, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Swap Windings Type: Unsigned 8-bit Min: 0 Max: 3 Default: 0 Where: cc = Motor channel nn = Motor’s Swap Win
Brushless Specific Commands TID - FOC Target Id HexCode: 8F Description: In brunshless motors operating in sinusoidal mode, this command sets the desired Flux (also known as Direct Current Id) for Field Oriented Control. This value must be 0 in typical application.
Commands Reference Where: cc = 1: Sine Zero Point for motor 1 2: Cosine Zero Point for motor 1 3: Cosine/Sine Ratio for motor 1 4: Sine Zero Point for motor 2 5: Cosine Zero Point for motor 2 6: Cosine/Sine Ratio for motor 2 nn = Calibration value AC Induction Specific Commands TABLE 15-24.
Brushless Specific Commands Where: cc = Motor channel nn = Motor’s Volts per Hertz * 1000 Example: ^VPH 1 200: Set Volts per Hertx to value 0.200 ILM - Mutual Inductance HexCode: 9B Description: This parameter is only used for AC Induction controllers when operating in FOC mode and contains motor’s mutual inductance (coupled to both stator and rotor).
Commands Reference Syntax Serial: ^ILLR cc nn ~ ILLR [cc] Syntax Scripting: setconfig(_ILLR, cc, nn) Number of Arguments: 2 Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Rotor Leakage Inductance Type: Unsigned 32-bit Min: 0 Max: 10000 Default: 10 Where: cc = Motor channel nn = Motor’s Rotor Leakage Inductance in μH. Example: ^RFC 1 67: Set Rotor Leakage Inductance of motor 1 to value 67μH.
Brushless Specific Commands Type: Unsigned 32-bit Min: 1 Max: 500000 Default: 20000 Where: cc = Motor channel nn = Motor’s Rotor Resistance in micro-ohm. Example: ^IRR 1 24500: Set Rotor Resistance of motor 1 to value 24500μΩ. MPW - Minimum Power HexCode: 97 Description: This parameter is only used for AC Induction controllers when operating in Volts per Hertz mode. It defines a minimum PWM output value so that there is always a minimal of rotor flux to create induction.
Commands Reference MXS - Optimal Slip Frequency HexCode: 96 Description: This parameter is only used for AC Induction controllers. The optimal slip is the value that the controller will work to maintain while operating in Constant Slip mode.
CAN Communication Commands Argument 1: Channel Min: 1 Max: Total Number of Motors Argument 2: Rotor Flux Current Type: Unsigned 16-bit Min: 0 Max: 500 Default: 10 Where: cc = Motor channel nn = Motor’s Rotor Flux Current in Amps * 10 Example: ^RFC 1 50: Set Rotor Flux Current for motor 1 to value 5A. CAN Communication Commands This section describes all the configuration parameters uses for CANbus operation. TABLE 15-25.
Commands Reference Syntax Scripting: setconfig(_CAS, nn) Number of Arguments: 1 Argument 1: Rate Type: Unsigned 8-bit Min: 0 Max: 1 Default: 0 = Off Where: nn = 0: Device is is in pre-operational state at power-up. 1: Device is is in operational state at power up.
CAN Communication Commands Number of Arguments: 1 Argument 1: Mode Type: Unsigned 8-bit Min: 0 Max: 5 Where: nn = 0: Disabled 1: CANOpen 2: MiniCAN 3: RawCAN 4: RoboCAN 5: MiniJ1939 CHB - CAN Heartbeat HexCode: 59 Description: Sets the rate in miliseconds at which the controller will send a heartbeat frame on the CAN bus. Heartbeat is sent when either MiniCAN, RawCAN, CANOpen are selected. A dedicated, non-user-alterable Heartbeat frame is sent when RoboCAN is selected.
Commands Reference Number of Arguments: 1 Argument 1: Address Type: Unsigned 8-bit Min: 0 Max: 127 Default: Product dependent Where: nn = 0: Listent to all nodes (RawCAN only) 1-127: Capture frames from specific node id only CNOD - CAN Node Address HexCode: 57 Description: Stores the product’s address on the CAN bus Syntax Serial: ^CNOD nn ~CNOD Syntax Scripting: setconfig(_CNOD, nn) Number of Arguments: 1 Argument 1: Address Type: Unsigned 8-bit Min: 0 Default: See datasheet Max: 127 Where: nn = Node
CAN Communication Commands CTPS - CANOpen TPDO SendRate HexCode: 5D Description: Sets the send rate for each of the 4 TPDOs when CANOpen is enabled.
Commands Reference FSA – DS402 PDS Finite State Automation Enable HexCode: CC Description: Enables or disables the PDS Finite State Automation (FSA), as dictated in DS402 specification. Syntax Serial: ^FSA nn ~FSA Syntax Scripting: setconfig(_FSA, nn) Number of Arguments: 1 Argument 1: Mode Type: Unsigned 8-bit Min: 0 Max:1 Default: 0 = Off Where: nn = 0: FSA is inactive. 1: FSA is active. TCP Communication Commands This section describes all the configuration parameters uses for TCP operation.
TCP Communication Commands Syntax Serial: ^DHCP nn ~ DHCP Syntax Scripting: setconfig(_DHCP, nn) Number of Arguments: 1 Argument 1: Enable DHCP Type: Unsigned 8-bit Min: 0 Max: 1 Default: 0 Where: nn = Enable DHCP 0: Disabled. 1: Enabled. Example: ^DHCP 1: Enable DHCP. GWA - Gateway Address HexCode: 69 Description: Configure this parameter in order to set the Gateway Address of your controller’s network. Gateway Address option includes 4 values representing each octet in the IP address v4 format.
Commands Reference Where: cc = octet nn = octet value Example: ^GWA 1 192_^GWA 2 168_^GWA 3 2_^GWA 4 1: Set Gateway Address 192.168.2.1. IPA - IP Address HexCode: 68 Description: Configure this parameter in order to set the IP Address. IP Address option includes 4 values representing each octet in the IP address v4 format. The default IP address, if DHCP is disabled, is 192.168.1.20.
TCP Communication Commands IPP - IP Port HexCode: 6B Description: Configure this parameter in order to set the IP Port. Default IP Port value is 9761. The IP address combined with the IP Port value are used to connect to the controller. Syntax Serial: ^IPP nn ~IPP Syntax Scripting: setconfig(_IPP, nn) Number of Arguments: 1 Argument 1: IP Port Type: Unsigned 16-bit Min: 0 Max: 65535 Default: 9761 Where: nn = IP Port Example: ^IPP 1300: Set IP Port 1300.
Commands Reference Octet Value 1 192 2 168 3 1 4 1 Where: cc = octet nn = octet value Example: ^PDNS 1 192_^PDNS 2 168_^PDNS 3 2_^PDNS 4 1: Set Primary DNS 192.168.2.1. SBM - Subnet Mask HexCode: 6A Description: Configure this parameter in order to set the Subnet Mask to define the range of IP addresses that can be used in your network. Subnet Mask option includes 4 values representing each octet in the IP address v4 format. Devices within the same sub-network can communicate directly.
TCP Communication Commands Where: cc = octet nn = octet value Example: ^SBM 1 255_^SBM 2 255_^SBM 3 254_^SBM 4 0: Set Gateway Address 255.255.254.0. SDNS - Primary DNS HexCode: 6E Description: Configure this parameter in order to set the address of the secondary DNS server. Secondary DNS option includes 4 values representing each octet in the IP address v4 format. Secondary DNS server default address is 0.0.0.0. By setting the secondary DNS server to 0.0.0.
Commands Reference WMOD - TCP Mode HexCode: 67 Description: Configure this parameter in order to enable the TCP functionality. When the TCP mode is set as Disabled the Ethernet hub is idle and no data packets are being transmitted or received. To communicate via TCP/IP this parameter must be set to Enabled. For communicating via Modbus TCP or Modbus TCP over RTU, TCP Mode must be set to Enabled.