Advanced Brushed and Brushless
Digital Motor Controllers
User Manual
V2.1,December 3,2020
visit www.roboteq.com to download the latest revision of this manual
Copyright 2019 Roboteq,Inc
Brushless Motor Connections and Operation RoboteQ
expected to perform their own product validation and not rely solely on data contained
Revision History
Date | Version | Changes |
December 3,2020 | 2.1 | Miscellaneous updates in order to conform to firmware v2.1 |
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.7 | Added Speed Position Mode
Major Additions to Brushless Motor Section Added RoboCAN protocol Miscellaneous updates |
May 10,2012 | 1.2 | Added CAN Networking
Added Closed Loop Count Position mode, Closed Loop Torque mode Extended command set |
January 8,2011 | 1.2 | Added Brushless Motor Connections and Operation |
July 15,2010 | 1.2 | Extended command set
Improved position mode |
May 15,2010 | 1.1 | Added Scripting |
January 1,2010 | 1.0 | Initial release |
The information contained in this manual is believed to be accurate and reliable.How-
ever,it may contain errors that were not noticed at the time of publication.Users are
in this manual.
原创力文档
max.book118.com
预览与源文档一致,下载高清无水印
SECTION 1
SECTION 2
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 SafetyRecommendations 17
SECTION 3 Connecting Sensorsand Actuators to Input/ Outputs 18
SECTION 4 VO Configuration and Operation 18
SECTION 5 Magnetic Sensor 18
SECTION 6 Command Modes 18
SECTION 7 Motor OperatingFeaturesand Options 18
SECTION 8 Brushless Motor Connections and Operation 18
SECTION 9 ACInduction MotorOperation 18
SECTION 10 ClosedLoop Speedand SpeedPosition Modes 18
SECTION 11 ClosedLoop Relative andTracking Position Modes 18
SECTION 12 ClosedLoop Count Position Mode 19
SECTION 13 Closed LoopTorque Mode 19
SECTION 14 Serial (RS232/RS485/ USB/TCP) Operation 19
SECTION 15 Commands Reference 19
Connecting PowerandMotors tothe Controller 21
Power Connections 21
Controller Power 22
Controller Powering Schemes 23
Mandatory Connections 24
Connection for Safe Operation with Discharged Batteries (note 1) 25
Use precharge Resistor to prevent switch arcing (note 2) 25
Protection against Damage due to Regeneration (notes 3) 25
Connect Case to Earth if connectingAC equipment (note 4) 25
Avoid Groundloops whenconnecting VO devices (note 5) 25
Connecting the Motors 26
Single Channel Operation 26
Power Fuses 27
Wire Length Limits 27
Electrical Noise ReductionTechniques 28
BatteryCurrent vs. Motor Current 28
Measured and Calculated Currents 29
Power Regeneration Considerations 30
Using the Controller with a Power Supply 30
Safety Recommendations 33
Possible Failure Causes 33
Motor Deactivation in Normal Operation 34
Motor Deactivation in Caseof Output Stage Hardware Failure 34
ManualEmergency Power Disconnect 36
Remote Emergency Power Disconnect 37
Protection using Supervisory Microcomputer 37
Self Protection against Power StageFailure 38
SafeTorque-Off (STO) 39
lRoboteQ | |
SECTION 3 | SafeTorque Off (STO) on Roboteq Controllers 40
Soft-STOinputs 40 Activating STO 40 Deactivating STO 40 Constraints when using STO 40 STO Failure Messages 41 Firmware implementation 41 Installation – Maintenance 42 STO Voltage source specification attention 42 Compliance and Safety Metrics 42 Technical Data 43 Connecting Sensorsand Actuators to Input/ Outputs 45 Controller Connections 45 Controller’s Inputs and Outputs 46 Connecting devices to Digital Outputs 47 Connecting Resistive Loads to Outputs 47 Connecting Inductive loads to Outputs 47 Connecting Switches or Devices to Inputs shared with Outputs 48 Connecting Switches or Devices to direct Digital inputs 48 Connecting a Voltage Source to Analog Inputs 49 Reducing noise on Analog Inputs 50 Connecting Potentiometers to AnalogInputs 50 Connecting Potentiometers for Commands with Safety band guards 51 Connecting Tachometer to Analog Inputs 52 Connecting ExternalThermistor to Analog Inputs 53 Using the Analog Inputs to Monitor Extemal Voltages 54 Connecting to RC Radios 55 Connecting SSl Sensors 55 SSI Sensors Overview 55 Connecting the SSl Sensor 56 Connecting Optical Encoders 56 Optical Incremental Encoders Overview 56 Recommended Encoder Types 57 Connecting the Encoder 58 Cable Length and Noise Considerations 58 Motor – Encoder Polarity Matching 59 |
SECTION 4 | VOConfiguration andOperation 61
Basic Operation 61 Input Selection 62 Digital Inputs Configurations and Uses 62 Analog Inputs Configurations and Use 63 Analog Min/Max Detection 64 Min , Max and Center adjustment 64 Deadband Selection 65 Command Correction 66 Use of Analog Input 66 Pulse Inputs Configurations and Uses 66 |
4 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
PowerOutput Circuit Operation …原仓力文档
max.book118.com
预览与源文档一致,下载高清无水印
SECTION 5
SECTION 6
SECTION 7
Use of Pulse Input 67
Digital Outputs Configurations and Triggers 68
Encoder Configurations and Use 68
SSI Configuration and Use 69
Hall and other Rotor Sensor Inputs 70
Sensor Min Max values 70
Relative Speed 70
Brake Release 70
Roboteq ProductsConnectionand Operation 73
Introduction to MGS1600 Magnetic Guide Sensor 73
Introduction to FLW100 Flowsensor 74
Introduction to BMS10X 0 Battery Management Systenm 74
AvailableInterfaces 74
MultiPWM interface 74
Enabling MultiPWM Communication 75
Accessing Sensor Information 76
Connecting Multiple Similar Sensors 76
Accessing Multiple Sensor Information Sequentially 77
Accessing Multiple Sensor Information Simultaneously 77
Command Modes 79
Input Command Modes and Priorities 79
USB vs Serial Communication Arbitration 81
CAN Commands Arbitration 81
Commands issued from MicroBasic scripts 81
Operating the Controller in RC mode 82
Input RC Channel Selection 83
Input RC Channel Configuration 83
Joystick Range Calibration 83
Deadband Insertion 83
Command Correction 83
Reception Watchdog 83
Using Sensors with PWM Outputs for Commands 84
Operating the Controller In Analog Mode 84
Input Analog Channel Selection 85
Input Analog Channel Configuration 85
Analog Range Calibration 85
Using Digital Input for Inverting direction 85
Safe Start in Analog Mode 85
Protecting against Loss of Command Device 85
Safety Switches 86
Monitoring and Telemetryin RC or Analog Modes 86
Using the Controller with a Spektrum Satellite Receiver 86
Using the Controller in Serial (USB/RS232/RS485/TCP) Mode 86
Motor Operating Featuresand Options 87
lRoboteQ | ||
SECTION | 8 | Global Power Configuration Parameters 88
PWM Frequency 88 Overvoltage Protection 88 Undervoltage Protection 88 Temperature-BasedProtection 88 Short Circuit Protection 89 Mixed Mode Select 89 Motor Channel Parameters 90 UserSelectedCurrent Limit Settings 90 Selectable AmpsThresholdTriggering 91 Programmable Acceleration & Deceleration 91 Forward and Reverse PowerAdjustment Gain 92 Selecting the Motor ControlModes 92 OpenLoop SpeedControl 92 ClosedLoop Speed Control 92 Closed Loop Speed Position Control 93 ClosedLoop Position Relative Control 93 ClosedLoop Count Position 94 Closed LoopPositionTracking 94 Torque Mode 94 Motion Control Modes Overview 95 Brushless Motor Connections and Operation 97 Introduction to Brushless Motors 97 Number of Poles 98 Trapezoidal Switching 99 Hall Sensor Wiring 100 Hall Sensor Verification 101 HallSensor Wiring Order 101 Determiningthe Wiring Order Empirically 102 Hall Sensor Alignment 103 Hall+Encoder Trapezoidal 104 Sinusoidal Commutation 105 Configuring the Controller for Sinusoidal Commutation 106 Selecting and Configuring Supported Angle Sensors 108 Preparation for Automatic Sensor Setup 114 Running the Automatic Sensor Setup 116 FieldOriented Control(FOC) 120 Interior Permanent Magnet Motor Operation 124 SensorlessTrapezoidal Commutation 126 Theory of Operation 126 Sensorless Parameters 128 Sensorless PWM Frequency 128 Sensorless Auto-tuning 128 ClosedLoop Modes in Sensorless 129 Operating Brushless Motors 129 Stall Detection 129 |
6 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
SECTION
SECTION
SECTION
9
10
11
Sensor Error Detection 130
Speed Measurement using the angle feedback Sensors 131
Distance Measurementusing Hall, SSl or other Sensors 131
AC Induction MotorOperation 133
Introduction to ACInduction Motors 133
Asynchronous Rotation and Slip 134
Connecting the Motor 135
Selecting and Connecting the Encoder 135
Testing the Encoder 135
OpenLoopVariable Frequency Drive Operation 136
Figuring the Motor’s Volts per Hertz 136
MaintainingSlip within Safe Range 137
Closed Loop SpeedMode with Constant Slip Control 137
Field Oriented Control(FOC) mode Operation 138
Configuring FOC Torque Mode 139
Configuring FOC Speed Mode 140
Speed Limiting in FOCTorque Mode 141
Induction Motor Parameters Calculation 141
No load testing 141
Locked rotortesting 144
Optimal slip calculation 146
Closed Loop Speed and Speed-Position Modes 147
Modes Description 147
Closed Loop Speed Mode 147
Closed Loop Speed Position Control 147
Motor Sensors 148
Tachometer or Encoder Mounting 148
Tachometer wiring 149
Brushless Hall Sensors as Speed Sensors 149
Speed Sensor and Motor Polarity 149
Controlling Speedin Closed Loop 151
PIDDescription 151
PID tuning in Closed Loop Speed Mode 152
PID Tuning in Speed Position Mode 153
Error Detection and Protection 154
Closed LoopRelativeandTracking Position Modes 155
Modes Description 155
Position Relative Mode 155
PositionTracking Mode 155
Selecting the Position Modes 156
PositionFeedback SensorSelection 156
Sensor Mounting 156
Feedback Sensor Range Setting 157
Adding Safety Limit Switches 158
Using Current Trigger as Protection 158
IRoboteQ
SECTION 12
SECTION 13
SECTION 14
Operating in Closed Loop Relative Position Mode 158
Operating in Closed Loop Tracking Mode 160
PositionMode Relative Control Loop Description 160
PID tuning in Position Mode 161
PID Tuning Differences between Position Relative and PositionTracking162
Loop Error Detectionand Protection 163
ClosedLoop Count Position Mode 165
Mode description 165
Sensor Types andMounting 166
Encoder Homereference 166
SSI Sensor Home reference 166
Preparing andSwitching to Closed Loop 166
Count Position Commands 167
Position CommandChaining 167
Position Accuracy Considerations 168
PIDTunings 169
Loop Error Detectionand Protection 169
ClosedLoopTorque Mode 171
Torque Mode Description 171
Torque ModeSelection, Configuration andOperation 172
Torque ModeTuning 172
Configuring the Loop Error Detection 172
Speed Limiting 173
Torque Mode Limitations 173
Serial (RS232/RS485/USB/TCP) Operation 175
Use and benefits of Serial Communication 175
Serial Port Configuration 176
Connector RS232 Pin Assignment 176
Connector RS485 Pin Assignment 176
Setting Different Bit Rates 176
ldi
1 178 档
Connecting to Arduino and other TTL Serial Microcomputers.book 178 com
RS485 Configuration 180 高清无水印
USB Configuration 180
TCP Configuration 180
Command Priorities 181
Communication Arbitration 181
CAN Commands 182
Script-generated Commands 182
Communication Protocol Description 182
Character Echo 182
Command Acknowledgment 182
CommandError 182
Watchdog time-out 183
Controller Present Check 183
8 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
Raw Redirect Mode 183
Configuration 183
Checking Received Frames 183
ReadingReceived Frames 184
Transmitting Frames 184
SECTION 15 Commands Reference 187
Commands Types 187
Runtime commands 187
Runtime queries 187
Maintenance commands 187
Configuration commands 188
Runtime Commands 188
AC- Set Acceleration 189
AX- Next Acceleration 190
B- Set UserBoolean Variable 190
BND- Spectrum Bind 191
C- Set Encoder Counters 191
CB- Set Brushless Counter 192
CG -Set Motor Commandvia CAN 192
CS- CAN Send 193
CSS- Set SSl Sensor Counter 194
CU -Raw Redirect Send 194
D0- Reset Individual Digital Out bits 195
D1- SetIndividual Digital Out bits 196
DC- Set Deceleration 196
DS- Set all Digital Out bits 197
DX- Next Deceleration 197
EES – Save Configuration in EEPROM 198
EX- Emergency Stop 199
G- Go to Speed or to Relative Position 199
GlQ- Goto Torque Amps 200
GID- GotoTorque Amps 201
H- LoadHome counter 201
MG- Emergency Stop Release 202
MS- Stopin all modes 202
P- Goto Absolute Desired Position 203
PR- Goto Relative Desired Position 203
PRX- Next Goto Relative Desired Position 204
PX- Next Go to Absolute Desired Position 204
R- MicroBasic Run 205
RC- Set Pulse Out 205
S- Set Motor Speed 206
SFT- Safety Stop 207
STT- STO Self-Test 207
SX-Next Velocity 208
VAR- SetUserVariable 208
lRoboteQ |
DS402 Runtime Commands 209
Velocity Mode 211 Other Modes 211 FEW- Following Error Window (DS402) 212 FET- Following ErrorTime Out (DS402) 213 INT -InterpolationTime Period (DS402) 213 MSL-Target Profile Velocity (DS402) 214 PAC- Profile Acceleration (DS402) 214 PDC- Profile Deceleration (DS402) 215 PLT- Software Position Limit (DS402) 215 POS- Target Position (DS402) 216 PSP- ProfileVelocity (DS402) 217 ROM- Modes of Operation (DS402) 217 S16- Target Velocity (DS402) 218 SAC- Velocity Acceleration(DS402) 218 SDC- Velocity Deceleration (DS402) 219 SPC-Target ProfileVelocity (DS402) 219 SPL- Velocity Min/ Max Amount (DS402) 220 TC- TargetTorque (DS402) 221 TSL- Torque Slope (DS402) 221 Runtime Queries 222 A- Read Motor Amps 224 Al- Read Analog Inputs 225 AIC- Read Analog Input after Conversion 225 ANG- Read Rotor Angle 226 ASI- Read Raw Sin/ Cos sensor 226 B- Read User Boolean Variable 227 BA- Read Battery Amps 227 BCR- Read Brushless Count Relative 228 BMC- Read BMS State Of Charge in AmpHours 229 BMF- Read BMS status flags 229 BMS- Read BMSswitch states 230 BS- Read BL Motor Speed in RPM 231 BSC- Read BMSState of Charge in percentage 232 BSR- Read BL Motor Speed as 1/1000 of Max RPM 232 C- Read Encoder Counter Absolute 233 CAN – Read Raw CAN frame 233 CB- Read Absolute Brushless Counter 234 CD- Read Raw Redirect Received Frames Count 234 CF- Read Raw CAN Received Frames Count 235 CHS- CANConsumer Heartbeat Status 235 ClA- Read Converted AnalogCommand 236 CIP- Read Internal Pulse Command 237 CIS- ReadInternal Serial Command 237 CL- Read RoboCANAlive Nodes Map 238 CR- Read Encoder Count Relative 238 CSR- Read Relative SSl Sensor Counter 239 |
10 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
CSS- Read Absolute SSl Sensor Counter 239
D- Read Digital Inputs 240
DDT- Read Raw Redirect Received Frame 240
Dl- Read Individual Digital Inputs 241
DO -Read Digital Output Status 242
DPA- Read DC/ Peak Amps 242
DR- Read Destination Reached 243
E- Read Closed Loop Error 243
F- Read Feedback 244
FC- Read FOC Angle Adjust 244
FLW- Read Flow Sensor Counter 245
FF- Read Fault Flags 246
FID – Read Firmware ID 246
FIN- Read Firmware ID (numerical) 247
FM -Read Runtime Status Flag 247
FS- Read Status Flags 248
HS- Read Hall Sensor States 249
ICL- Is RoboCAN Node Alive 250
K- ReadSpektrum Receiver 250
LK- Read Lock status 250
M- Read Motor Command Applied 251
MA- Read Field Oriented Control Motor Amps 252
MGD- Read Magsensor Track Detect 252
MGM – Read Magsensor Markers 253
MGS- Read Magsensor Status 254
MGT- Read Magsensor Track Position 254
MGY- Read Magsensor Gyroscope 255
MGX- Read MagSensor Tape Cross Detection 256
P- Read Motor Power Output Applied 256
PHA- Read Phase Amps 257
PI- Read Pulse Inputs 257
ICi-tReead PulseInput after Conve
原… 力 文 档
pi
节
2
SEC- Read Sensor Errors 260
SNA- Read Sensor Angle 261
SR- Read Encoder Speed Relative 261
SS- ReadSSI Sensor Motor Speed in RPM 262
SSR- Read SSl Sensor Speed Relative 262
STT- STO Self-Test Result 263
T- ReadTemperature 264
TM – ReadTime 264
TR -Read Position RelativeTracking 265
TRN- Read Control Unit typeandController Model 266
UID – Read MCUld 266
V- Read Volts 267
lRoboteQ |
VAR- ReadUser IntegerVariable 267
SL- Read SlipFrequency 268 DS402 Runtime Queries 268 AOM – Modes of Operation Display (DS402) 269 CW- Control Word (DS402) 270 SPE- Velocity Actual Value (DS402) 270 FEW- FollowingError Window (DS402) 271 FET- Following Error Time Out (DS402) 271 INT- InterpolationTime Period (DS402) 272 MSL- Max Motor Speed (DS402) 272 PAC- Profile Acceleration (DS402) 273 PDC- Profile Deceleration (DS402) 273 PLT- Software Position Limit (DS402) 274 PST- Position ActualValue 274 POS- Target Position (DS402) 275 PSP- Profile Velocity (DS402) 275 RMP – VLVelocity Demand(DS402) 276 ROM- Modes of Operation (DS402) 276 S16- Target Velocity (DS402) 277 SAC- Velocity Acceleration (DS402) 277 SDC- Velocity Deceleration (DS402) 278 SDM- SupportedDrive Modes(DS402) 278 SPL- VelocityMin/ Max Amount (DS402) 279 SW- Status Word (DS402) 279 TC- TargetTorque (DS402) 283 TRQ- TargetTorque (DS402) 284 TSL- Profile Acceleration (DS402) 284 VNM- Version Number (DS402) 285 Query History Commands 285 #- SendNext History Item / Stop Automatic Sending 286 #C- Clear Buffer History 286 # nn- Start Automatic Sending 287 # xx nn- Start automatic sending for specific stream 287 /?Q cc- Create data streams 287 //?- Dump the streams’ prefixes and delimiters 288 Maintenance Commands 289 CLMOD- Motor/ Sensor Setup 290 CLRST- Reset configuration to factory defaults 290 CLSAV- Save calibrations to Flash 290 DFU- Update Firmware via USB 291 EELD- Load Parameters from EEPROM 291 EELOG- Dump Flash Log Data 291 EERST- Reset FactoryDefaults 292 EESAV- Save Configuration in EEPROM 292 ERASE – Erase Flash Log Data 292 LK- Lock Configuration Access 292 RESET- Reset Controller 293 |
12 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
SLD- Script Load 293
STIME – SetTime 293
UK- Unlock Configuration Access 294
Set/ Read Configuration Commands 294
Setting Configurations 294
Reading Configurations 295
Configuration Read Protection 295
General ConfigurationandSafety 295
AMS- Analog keep withinGuard Bands 297
BEE- UserStorage in Battery Backed RAM 297
BRUN- Script Auto-Start 298
CLIN- Command Linearity 299
CPRI- Command Priorities 299
DFC- Default Command value 300
DMOD – Modbus Mode 301
ECHOF- Enable/ Disable Serial Echo 302
EE- User-Defined Values 302
ISM- Raw Redirect Mode 303
MDAL- ModbusData Alignment 304
MNOD- ModbusSlave ID 304
PMS- Pulse keep withinMin & Max Safety 305
RSBR- Set RS232/RS485 baudrate 305
RS485 – Enable RS485 306
RWD- Serial Data Watchdog 307
SCRO- Select Print outputport for scripting 307
SKCTR- Spektrum Center 308
SKDB- Spektrum Deadband 308
SKLIN- Spektrum Linearity 309
SKMAX- Spektrum Max 310
SKMIN- SpektrumMin 310
SKUSE- AssignSpektrumport to motor command 311
STO- STO Enable 311
TELS-Telemetry String 312
Analog, Digital, Pulse lO Configurations 312
ACTR- Analog Input Center (0) 313
ADB- Analog Input Deadband 314
AINA-Analog Input Use 315
ALIN- Analog Input Linearity 315
AMAX- Analog Input Max 316
AMAXA-AnalogInput Action at Max 317
AMIN -Analog InputMin 318
AMINA- Analog Input Action atMin 318
AMOD- AnalogConversionType 319
APOL-Analog Input Conversion Polarity 320
DINA- Digital Input Action 320
DINL- Digital Input Active Level 321
DOA- Digital OutputAction 322
lRoboteQ
DOL- Digital Outputs Active Level 323
PCTR- Pulse Input Center 323
PDB- Pulse Input Deadband 324
PINA- Pulse Input Use 324
PLIN – Pulse InputLinearity 325
PMAX- Pulse Input Max 326
PMAXA- Pulse Input Action at Max 326
PMIN- Pulse InputMin 327
PMINA- Pulse Input Action at Min 328
PMOD- Pulse Input CaptureType 328
PPOL- Pulse InputCapture Polarity 329
Motor Configurations 330
ALIM -Amps Limit 331
ATGA- AmpsTrigger Action 332
ATGD- AmpsTrigger Delay 333
ATRIG- AmpsTrigger Level 333
BKD- Brake Delay 334
BPR- Bypass Trajectory/Ramp 334
BRV- Brake Release Voltage 335
BHV- Brake HoldVoltage 336
BDT- Brake Delay Time 337
BLFB- Closed loop Feedback Sensor 337
BLSTD- StallDetection 338
CLERD- Close Loop Error Detection 339
EDEC- Motor Fault Deceleration Rate 340
EHL – Encoder Max Limit 340
EHLA -Encoder Action at Max 341
EHOME- Encoder Home Count 341
ELL – Encoder Min Limit 342
ELLA – Encoder Action at Min 343
EMOD- Encoder Usage 343
R c t
ulse
v Value
…
……35 档
iG
36 高
KPG- PIDProportional Gain 347
MAC- Motor Acceleration Rate 348
MDEC- Motor Deceleration Rate 348
MLX- MolexInput 349
MDIR- Motor Direction 350
MMOD – Operating Mode 350
MNRPM – Min Speed RPM 351
MVEL- Position ModeVelocity 351
MXMD -Mixed Mode 352
MXPF- Motor Max Power Forward 353
MXPR- Motor Max Power Reverse 353
MXRPM- Max Speed RPM 354
14 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
MXTRN – PositionTurns Min to Max 354
OVH – Overvoltage hysteresis 355
OVL- Overvoltage Limit 356
OTL- OverTemperature Limit 356
SED – Sensor Error Detection 357
SCPR- SSI Sensor Resolution 357
SHL- SSI Sensor MaxLimit 358
SHLA- SSI Sensor Actionat Max 359
SHOME- SSI Sensor Home Count 360
SLL- SSI Sensor Min Limit 360
SLLA- SSI Sensor Action at Min 361
SMOD- SSISensor Usage 362
TNM- Motor Torque Constant 362
UVL- Undervoltage Limit 363
Brushless Specific Commands 364
BADV- Brushless timing angle adjust 365
BECC- BEMF Coupling Constant 366
BFBK- Brushless Sinusoidal Angle Sensor 366
BHL- Brushless Intenal Sensor Max Limit 367
BHLA- Brushless Internal Sensor Action at Max 368
BHOME- Brushless Internal Sensor HomeCount 368
BLL- Brushless Internal Sensor Min Limit 369
BLLA- Brushless Internal Sensor Action at Min 370
BMOD- Brushless Switching Mode 371
BPOL- Number of Pole Pairs 371
BZPW- Brushless Reference Seek Power 372
HPO- Hall Sensor Position Type 372
HSAT- Hall Sensor AngleTable 373
HSM- Hall Sensor Map 374
KIF- Current PID Integral Gain 375
KPF- Current PID Proportional Gain 376
LD- Motor d-axis Inductance 376
LQ- Motor q-axis Inductance 377
PSA- Phase Shift Angle 378
RS- Motor Stator Resistance 379
SPOL- SinCos/SSI Sensor Poles 379
SSF- Sensorless Start-Up Frequency 380
SVT- BEMFIntegrator Limit 380
SWD- Swap Windings 381
TID- FOCTarget ld 382
VK- Motor Voltage constant 383
ZSMA- Cos Amplitude 384
ZSMC- SinCos Calibration 384
AC Induction Specific Commands 385
BFBK- AC Induction Operating Mode 385
ILM – Mutual Inductance 386
LLR – Rotor Leakage Inductance 387
lRoboteQ |
IRR- Rotor Resistance 388
MPW- Minimum Power 388 MXS- Optimal Slip Frequency 389 RFC- Rotor Flux Current 390 VPH-AC InductionVolts per Hertz 390 CAN Communication Commands 391 CAS-CANOpen Auto start 392 CBR- CAN BitRate 392 CEN -CAN Mode 393 CHB- CAN Heartbeat 393 CHLA- CAN Consumer Heartbeat Lost Action 394 CLSN -CAN Listen Node ID 394 CNOD -CAN Node ID 395 CSRT- MiniCAN SendRate 395 CTPS- CANOpenTPDO SendRate 396 CTT- CANOpen Transmission Type 396 FSA- DS402 PDS Finite State Automation Enable 397 TCP Communication Commands 397 DHCP- Enable DHCP 397 GWA- Gateway Address 398 IPA- IP Address 399 IPP- IPPort 400 PDNS- Primary DNS 400 SBM – Subnet Mask 401 SDNS- Primary DNS 402 WMOD -TCP Mode 403 |
16 AdvancedDigitalMotor Controllers User Manual V2.1, December 3, 2020
IRoboteQ
Refer to the Datasheet for Hardware-Specific Issues
原创力文档
max.book118.com
预览与源文档一致下载高清无水印
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.These include:
· Number and types of l/O
· Connectors pin-out
· Wiring diagrams
· Maximum voltage and operating voltage
·Thermal and environmental specifications
· Mechanical drawings and characteristics
·Available storage for scripting
· Battery or/and Motor Amps sensing
· Storage size of user variables to Flash or Battery-backed RAM
User Manual Structure and Use
The user manual discusses issues that are common to all controllers inside a given prod- uct family.Except for a few exceptions,the information contained in the manual does not repeat the data that is provided in the datasheets.
For CAN please refer to “CAN Networking Manual”For Modbus please refer to “Modbus Manual”For Microbasic scripting please refer to “Microbasic Scripting Manual”For Robo- run+Utility please refer to “Roborun+Utility User Manual”This manual is divided into 15 sections organized as follows:
SECTION 1 Connecting Power and Motors to the Controller
This section describes the power connections to the battery and motors,the mandatory vs.optional connections.Instructions and recommendations are provided for safe opera- tion under all conditions.
SECTION 2 Safety Recommendations
This section lists the possible motor failure causes and provides examples of prevention methods and possible ways to regain control over motor if such failures occur.
18 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
User Manual Structure and Use
SECTION 12 Closed Loop Count Position Mode
This section describeshow 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 descnibeshow to select,configure and operate the controller in Closed Loop Torque mode.
SECTION 14 Serial (RS232/RS485/USB/TCP)Operation
This section describeshow to communicate to the controller via the RS232,R5485,USB or TCP interface.
SECTION 15 Commands Reference
This section lists and describes in detail all configuration parameters,runtime commands, operating queries,and maintenance commands available in the controller.
Introduction
RoboteQ
20 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Power Connections
SECTION 1
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
may occur to the unit,motor,wiring,and batteries as a result of its misuse.Plea e
The controller is a high power electronics device.Serious damage,including fire
follow the instructions in this section very carefully.Any problem due to wiring
errors may have very serious consequences and will not be covered by the product’s
warranty.
Power Connections
Power connections are described in the controller model’s datasheet.Depending on the model type,power connection is done via wires,fast-on tabs,screw terminals or copper bars coming out of the controller.
Controllers with wires as power connections have Ground (black),VMot (red)power ca- bles and a Power Control wire fyellowi.The power cables are located at the backend of the controller.The various power cables are identified by their position,wire thickness and color:red is positive(+),black is negative or ground (-).
Controllers with tabs,screw terminals or copper bars have their connector identified in print on the controller.
22 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Controller Powering Schemes
increases by around 20V the low voltage threshold at which the controller will start operat- ing 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 |
Action |
Ground | Any Voltage | Controller is Off.Required Off Configuration. |
Floating | 0V | Controller is Off.Not Recom- mended Off Configuration. |
Floating | Above VMotMin (1) | Controller is On.
Power Stage is Active (2) |
7V to max PwrCtl (3)Volts | Any Voltage | Controller is On.
Power Stage is Active (2) |
Note 1:VMotMin =7V on all controller rated up to 60V.VMotMin =28V on all controllers rated above 60V.See product datasheet
Note 2:Power Stage is active but turned off when overvoltage or undervoltage condition. Note 3:35V max on 30V controllers.60V max on all products rated above 30V |
Note:All ground terminals (-)are connected to each other inside the controller.On dual channel controllers,the two VMot main battery wires are also connected to each other internally.However,you must never assume that connecting one wire of a given battery potential will eliminate the need to connect the other.When pre-charging the controller’s capacitors,the Power Control input must be grounded.See the note on capacitor pre-
charging on page 25.”Capacitor precharging”
Controller Powering Schemes
Roboteq controllers operate in an environment where high currents may circulate in
unexpected manners under certain condition.Please follow these instructions.Roboteq reserves the right to void product warranty if analysis determines that damage is due to improper controller power connection.
The example diagram on Figure 1-2 on page 24 showshow to wire the controller and how to tun power On and Off.All Roboteq models use a similar power circuit.See the controller datasheet for the exact wiring diagram for your controller model.
Connecting Power and Motors to the Controller | RoboteQ |
SW1 Main
F2 1A
Note 1
On/Off Switch 1A
1
Backup
Batten
Resistor 100 Ohm 5W
Note 2
Note 3
F1
SW2
Emergency
Contactor or
Cut-off Switch
PwrCtrl/Yellow
Ground/Black
VMot/Red
White/U
Green/V
Blue/W
Hall sedso
Connector
U
V
HAHB/HC
GND/+5V
Motor
人w
Hall
Sensors
Ground/Black
Earth Tab
Note 4
Main
Batten
Wo Connector
Note 5
Do not Connect!
FIGURE 1-2.Brushless DC Controller power wiring diagram
Mandatory Connections
It is imperative that the controller is connected as shown in the wiring diagram provided in the datasheet in order to ensure safe and trouble-free operation.All connections shown as thick black lines are mandatory.
· Connect the thick black wire(s)or the ground terminal to the minus (-)terminal of the battery that will be used to power the motors.Connect the thick red wire(s)or VMot terminal to the plus (+)terminal of the battery.The motor battery may be of 12V up to the maximum voltage specified in the controller model datasheet.
·The controller must be powered On/Off using switch SW¹on the Power Control
wire/terminal.Grounding this line powers Off the controller.Floating or pulling this
line to a voltage will power On the controller.(SW1 is a common SPDT 1 Amp or
more switch).
Use a suitable high-current fuse F¹as a safety measure to prevent damage to the wiring in case of a major controller malfunction.(Littlefuse ATO or MAXI series).
· The battery must be connected in permanence to the controller’s Red wire(s)or VMot terminal via a high-power emergency switch SW2 as an additional safety
measure.Partially discharged batteries may not blow the fuse,while still having
enough power left to cause a fire.Leave the switch SW2 closed at all times and
open only in case of an emergency.Use the main On/Off switch SW1 for normal operation.This will prolong the life of SW2,which is subject to arcing when open- ing under high current with the consequent danger of contact welding.
If installing in an electric vehicle equipped with a Key Switch where SW2 is a con- tactor,and the key switch energizes the SW2 coil,then implement SW1 as a relay. Connect the Key Switch to both coils of SW1 and SW2 so cutting off the power to the vehicle by the key switch and SW2 will set the main switch SW1 in the OFF
position as well.
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 en- sure 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 control- ler’s internal logic.The motors will continue to be powered by the main battery while the main battery voltage is higher than the secondary battery voltage.
Use precharge Resistor to prevent switch arcing (note 2)
Insert a 1000hm,5W resistor across the SW2 Emergency Switch.This will cause the con- troller’s internal capacitors to slowty charge and maintain the full battery voltage by the time the SW2 switch is turned on and thus eliminate damaging arcing to take place inside the
switch.Make sure that the controller is tumed Off with the Power Control wire grounded while the SW2 switch is off.The controller’s capacitors will not charge if the Power Control wire is left fioating and arcing will then occur when the Emergency switch is turned on.
Protection against Damage due to Regeneration (notes 3)
The voltage generated by motors rotating while not powered by the controller can cause serious damage even if the controller is Off or disconnected.
· Use the main SW1 switch on the Power Control wire/terminal to turn Off and keep Off the controller.In this way the controller cannot be powered up under any un- wanted circumstances.
· Countermeasures should betaken to deal with any regeneration power if the bat- tery or BMS system does not support energy to return back to it.
· Disconnecting the controller from the battery while motors are rotating could lead to a serious damage.In this case a regeneration brake system is needed.
Connect Case to Earth if connecting AC equipment (note 4)
If building a system which uses rechargeable batteries,it must be assumed that periodi- cally a user will connect an AC battery charger to the system.Being connected to the AC main,the charger may accidentally bring AC high voltage to the system’s chassis and to the controller’s enclosure.A similar danger exists when the controller is powered via a power supply connected to the mains.
Some controller models in metallic enclosures are supplied with an Earth tab,which per mits earthing the metal case.Connect this tab to a wire connected to the Earth while the charger is plugged in the AC main,or if the controller is powered by an AC power supply or is being repaired using any other AC equipment (PC,Voltmeter etc.)
Avoid Ground loops when connecting l/O devices (note 5)
When connecting a PC,encoder,switch or actuators on the VO connector,be very careful that you do not create a path from the ground pins on the VO connector and the battery
minus terminal.Should the controller’s main Ground wires (thick black)or terminals
be disconnected while the VMot wires (thick red)or terminals are connected,the high current would flow from the ground pins,potentially causing serious damage to the controller and/or your external devices.
· Do not connect a wire between the l/0 connector ground pins and the battery mi- nus terminal.Look for hidden connection and eliminate them.
· Have a very firm and secure connection of the controller ground wire and the bat- tery minus terminal.
· Do not use connectors or switches on the power ground cables.
26 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Power Fuses
The single channel version of the controller incorporates a hardware setting inside the
controller which ensures that both channels switch in a synchronized manner and respond to commands sent to channel 1.
Important Warning
Before pairing the outputs,attach the motor to one channel and then the other.Veri- fy that the motor responds the same way to command changes.
Power Fuses
For low Amperage applications (below 30A per motor),it is recommended that a fuse be inserted in series with the main battery circuit as shown in Figure 1-2 on page 24.
The fuse will be shared by the two output stages and therefore must be placed before the Y connection to the two power wires.Fuse rating should be the sum of the expected cur rent on both channels.Note that automotive fuses above 40A are generally slow,will be of limited effectiveness in protecting the controller and may be omitted in the high current application.The fuse will mostly protect the wiring and battery against after the controller has failed.
Important Warning
Fuses are typically slow to blow and will thus allow temporary excess current to flow through them for a time (the higher the excess current,the faster the fuse will blow).This characteristic is desirable in most cases,as it will allow motors to draw surges during acceleration and braking.However,it also means that the fuse may not be able to protect the controller.
Wire Length Limits
The controller regulates the output power by switching the power to the motors On and Off at high frequencies.At such frequencies,the wires’inductance produces undesirable effects such as parasitic RF emissions,ringing,and overvoltage peaks.The controller has built-in capacitors and voltage limiters that will reduce these effects.However,should the wire inductance be increased,for example by extended wire length,these effects will be amplified beyond the controller’s capability to correct them.This is particularty the case for the main battery power wires.
Important Warning
Avoid long connection between the controller and power source,as the added in- ductance 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.
If the controller must be located at a long distance from the power source,the effects of the wire inductance may be reduced by using one or more of the following techniques:
28 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Measured and Calculated Currents
FIGURE 1-4.Instant and average current waveforms
The relation between Battery Current and Motor current is given in the formula below:
Motor Current =Battery Current /PWM Ratio
Example:If the controller reports 10A of battery current while at 10%PWM,the current in the motor is 10/0.1=100A.
Measured and Calculated Currents
Some Roboteq Brushed DC motor controllers,have current sensors for measuring the
battery current and estimate the motor current.At 20%PWM and above,the motor cur rent is computed using the formula above.Below 20%,and approaching 0%,this method causes unstable and imprecise readings.At these levels the formula used is
Motor Current =Battery Current /0.20
This approximation creates a more stable value but one that is increasingly inaccurate as the PWM approaches 0%.This approximation produces usable value nevertheless.
Roboteq’s Brushless motor controllers use sensors on the motor outputs or/and on the battery ground terminal.Controllers using sensors on the battery terminal outputs suffer the same limitation at low PWM as discussed above.
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.
Whether sensors are on the motor or/and battery terminals can be found in the product’s datasheet
Important Warning
Do not connect a motor that is rated at a higher current than the controller.
30 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Using the Controller with a Power Supply
Avoid deceleration that is quicker than the natural deceleration due to the friction in the motor assembly (motor,gears,load).Any deceleration that would be quicker than natural friction means that braking energy will need to betaken out of the sys- tem,causing a reverse current flow and voltage rise.
Place a battery in parallel with the power supply output.This will provide a reservoir into which regeneration current can flow.It will also be very helpful for delivering
high current surges during motor acceleration,making it possible to use a lower
current power supply.Batteries mounted in this way should be connected for the
first time only while fully charged and should not be allowed to discharge.The power supply will be required to output unsafe amounts of current if connected directty to a discharged battery.Consider using a decoupling diode on the power supply’s output to prevent battery or regeneration current to flow back into the power supply.
Place a shunt regulator such as Roboteq’s SR5K.This device will monitor the
voltage at the controller and place resistive load in parallel with the power supply in order to absorb the regenerated current.The diagram below shows to wire the SR5K shunt regulator.
+
Power Supply
V+
V+
Shunt Regulator
v
V-
Motor
Controller
+
FIGURE 1-5.Shunt Regulator wiring
Note:The schematic above is provided for reference only.It may not work in all conditions.
Connecting Power and Motors to the Controller | RoboteQ |
32 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Possible Failure Causes
SECTION 2
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 re- liably,and failures are rare,a failure is possible as with any other electronic equipment.If there is any danger that a loss of motor control can cause damage or injury,you must plan on that possibility and implement methods for stopping the motor independently of the controller operation.
Below is a list of failure categories,their effect and possible ways to regain control,or min- imize the consequences.The list of possible failures is not exhaustive and the suggested prevention methods are provided as examples for information only.
Important Safety Disclaimer
Dangerous uncontrolled motor runaway condition can occur for a number of rea-
sons,including,but not limited to command or feedback wiring failure,configura- tion error,faulty firmware,errors in user MicroBasic script or in the user program,or controller hardware failure.The user must assume that such failures can occur and
must take all measures necessary to make his/her system safe in all conditions.
The information contained in this manual,and in this section in particular,is provid-
ed for information only.Roboteq will not be liable in case of damage or injury as a result of product misuse or failure.
Possible Failure Causes
The dangerous unintended motor operation could occur for a number of reasons,includ- ing,but not limited to:
· Failure in Command device
· Feedback sensors malfunction
· Wiring errors or failure
· Controller configuration error
· Faulty firmware
Safety Recommendations
Errors or in user MicroBasic
scripts
·
oversights
· Controller hardware failure
Motor Deactivation in Normal Operation
In normal operation,the controller is always able to tum 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.A number of features discussed throughout this manual are available to stop motor operation in case of an abnormal situation.These include:
· Watchdog on missing incoming serial/USB commands
· Loss detection of Radio Pulse
· Analog command outside the valid range
· Limit switches
· Stall detection
· Close Loop error detection
· Other …
Additional features can easily be added using MicroBasic scripting.
Ultimately,the controller can be simply turned off by grounding the Power Control pin.As- suming there is no hardware damage in the power stage,the controller output will be off (i.e.motor wires floating)when the controller is off.
Important Warning:
While cutting the power to the motors is generally the best thing to do in case of major failure,it may not necessarily result in a safe situation.
Motor Deactivation in Case of Output Stage Hardware Failure
On brushed DC motor controllers,the power stage for each motor is composed of 4 MOSFETs (semiconductor switches).In some cases of MOSFET failures,it is possible that one or both motors will remain permanently powered with no way to stop them either via software or by turning the controller off.
On brushless motor controllers,shorted MOSFETs will not cause the motor to turn on its own.Nevertheless,it is still advised to follow the recommendations included in this section.
The figures below show all the possible combinations of shorted MOSFETs switches in a brushed DC motor controller.
34 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ | Motor Deactivation in Case of Output Stage Hardware Failure |
FIGURE 2-1.MOSFET Failures resulting in no motor activation
![]() |
FIGURE 2-2.MOSFET Failures resulting in battery short circuit and no motor activation |
![]() FIGURE 2-3.MOSFET Failure resulting in motor activation |
Two failure conditions (15 and 16)will result in the motor spinning out of control re- gardless of whether the controller is on or off.While these failure conditions are rare, users must take them into account and provide means to cut all power to the control- ler’s power stage.
On controllers with STO circuitry an extra test is taken place upon power-up or when- ever the STT command is executed (see STT-STO Self-Test,p.205).During this test the FETS are checked whether they are shorted (and so damaged)or not.If either of them is shorted then the MOSFail bit in the fault flags is set,as long as the EStop bit and the FETs Off bit in Status flags.This fault is cleared only when the STT runs again and the MOSFET failure goes away.
36 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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 pow- ered directly from the system’s battery.If powered from the controller’s 5V output,keep in mind that in case of a total failure of the controller,the 5V output may or may not be interrupted.
Controller
On/Of Switch
PwiCtrl
Ground
VMot
RC Recalver RC Swtch
RB
AC2
RC1
Ground
Main
Ratteny
Vo Connt
FIGURE 2-6 Example of remotely operated safety disconnect
The receiver must operate in such a way that the contactor relay will be off if the transmit- ter if off or out of range.
The transmitter should have a visible and easy to reach an emergency switch for the op- erator.That switch will be used to deactivate the relay remotely.It could also be used to shutdown entirely the transmitter,assuming it is determined for certain that this will deac- tivate the relay at the controller.
Protection using Supervisory Microcomputer
In applications where the controller is commanded by a PC,a microcomputer or a PLC,
that supervisory system could be used to verify that the controller is still responding and cut the power to the controller’s power stage in case a malfunction is detected.The su- pervisory system would only require a digital output or other means to activate/deactivate the contactor relay as shown in the figure below.
38 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Safe Torque-Off (STO)
The controller must have the Power Control input wired to the battery so that it can oper ate 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.5A (de- pending on the controller model)for more than 0.5s.
The contactor must berated high enough so that it can cut the full load current.For even higher safety,additional precaution should betaken to prevent and to detect fused contac- tor blades.
This contactor circuit will only detect and protect against damaged output stage condi-
tions.It will not protect against all other types of fault.Notice therefore,the presence of an emergency switch in series with the contactor coil.This switch should be operated
manually or remotely,as discussed in the Manual Emergency Power Disconnect the Re- mote Emergency Power Disconnect and the Protection using Supervisory Microcomputer earlier in this section of the manual.
Using this contactor circuit,turning off the controller will normally deactivate the digital output and this will cut the power to the controller’s output stage.
Important Warning
Fully autonomous and unsupervised systems cannot depend on electronics alone to ensure absolute safety.While a number of techniques can be used to improve safety, they will minimize but never totally eliminate risks.Such systems must be mechani- cally designed so that no moving parts can ever cause harm in any circumstances.
Safe Torque-Off (STO)
Safe Torque Off is a safe method for switching controller in a state where no torque is
generated,regardless whether the controller is operating normally or is faulty.This func- tion is a mechanism that prevents the drive from restarting unexpectedly.STO has the
immediate effect that the drive cannot supply any torque-generating energy.STO can be used wherever the drive will be brought to a standstill in a sufficiently short time by the
load torque or friction or where coasting down of the drive is not relevant to safety.STO enables safe working and has a wide range of use in motion control systems with moving axes.The advantage of the integrated STO safety function compared with standard safety technology using electromechanical switchgear is the elimination of separate components and the effort that would be required to wire and service them.Because of the rapid elec- tronic switching times,the function has a shorter switching time than the electromechani- cal components in a conventional solution.
Specific motor controllers implement Safe Torque-Off (STO)circuitry,which is certified
from TUV (T-version -Certification No.M6A 1045040001 Rev.01).STO is the most com- mon safety function,meant for motor controllers,ensuring that upon trigger no torque will be generated even after the controller power cycle.For controllers without the specific cir cuit the STO is implemented in firmware alone and digital inputs 1 and 2 are usually used (check controller’s datasheet).
40 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Safe Torque-Off (STO)
STO Failure Messages
In case a failure is detected in the STO circuit the following failure message will be visible according on how the user operates the controller.
1. Status LED on Controller
The status LED pattern will be the below in case of STO failure
FIGURE 2-9.STO fault status LED pattern
☑ | Faut –
OverHeat STO Fault |
2. STO | Fault LED at | Roborun+utility in failure | |||
OverVolt | 曲U!nderVolt | Short EStop | TuneFault | MOSFail | DefConfig | ||
FIGURE 2-10.STO fault position in Fault Flags |
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 correctty
· Check wiring
· Check cabling for short circuits or open circuits
If the failure persists,contact Roboteq support.
IMPORTANT WARNING
Same status LED pattern is used for undervoltage and overvoltage faults and that
should not be confusing.If STO fault appear it is normal for the controller voltage to be off and undervoltage fault to trigger.Either way this Status LED pattern indicates a situation that should be treated with caution.
Firmware implementation
The STO circuit will operate regardless of the MCU activity.However,when operating nor mally the MCU will perform the following functions:
1. Self-test that the STO circuits,switches and the power MOSFETs are functional.
This is done every time the controller is powered on.It can also be done at any time using command STT (seeSTT·STO Self-Test,p.205)from the system’s PC or PLC. The self-test can also be initiated by the controller itself using its scnipting language, at periodic time intervals,or any other userdefine rule(s).
lf the self-test fails,the controller will stop driving the MOSFETs and set a fault flag that can be monitored by the PLC/Computer.It can also activate one of its digital
outputs to indicate the fault.
Safety Recommendations
2. The STO inputs are monitored continuously every 1ms.If one or both STO inputs are at level zero and the MOSFET driver supply voltage has not dropped,an STO fault is detect- ed.The STO fault flag is set.A user digital output can be activated to indicate the fault.
Installation -Maintenance
The STO circuit needs to be tested before first installation and at least every 3 months according to the below sequence:
1. Activate STO (both logic level O)
2. Check that STO is active (through Roborun+Utility/Serial)
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 Robo- run+Utility/Seriall.
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.com and register to site/forum for any news about safety function.
STO Voltage source specification attention
In order to have maximum response at STO implementation,user/installer/integrator
should use voltage source with low output capacitance.In any other case,latency in acti- vation might occur.
Compliance and Safety Metrics
The STO function is compliant to:
· IEC 61800-5-2:2007,SIL 3
· IEC 61508:2010,SIL 3
· IEC 62061:2005,SIL 3
· ISO 13849-1:2015,Category 3 Performance Level e
TABLE 2-1.STO compliance and safety metrics
Metric acc.To IEC 61508,IEC 61800-5-2,IEC 62061 | Value |
SIL | Up to 3 |
PFH | 5 FIT |
Mission Time and Proof Test Interval | 20 vears |
Performance Level | e |
Category | 3 |
MTTFD | >100 years |
42 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Safe Torque-Off (STO)
Technical Data
TABLE 2-2.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°℃ to 55℃ |
Storage Temperature | -20°℃ to 70℃ |
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 ww.robotea.com |
All connected cables must have length <3m |
Safety Recommendations
RoboteQ
44 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Controller Connections
SECTION 3
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 neces- sary connections.
The power connections are used for connecting to the batteries and motor,and will typ- ically carry large current loads.Details on the controller’s power wiring can be found at “Connecting Power and Motors to the Controller”section of this manual.
The DSub and plastic connectors are used for all low-voltage,lowcurrent connections to the Radio,Microcontroller,sensors,and accessories.This section covers only the connec- tions to sensors and actuators.
For information on how to connect the RS232 or the RS485 ports,see “Serial (RS232/ RS485/TCP/USB)Operation”section.
The remainder of this section describeshow to connect sensors and actuators to the con- troller’s low-voltage l/O pins that are located on the DSub and plastic connectors.
Connecting Sensors and Actuators to Input/Outputs
Controller’s Inputs and Outputs
The controller includes several inputs and outputs for various sensors and actuators.De- pending on the selected operating mode,some of these VOs provide command,feedback and/or safety information to the controller.
When the controller operates in modes that do not use these l/Os,these signals are ig- nored or can become available via the RS232/RS485/TCP/USB port for user application. Below is a summary of the available signals and the modes in which they are used by the controller.The actual number of the signal of each type,voltage or current specification, and their position on the l/O connector is given in the controller datasheet.
TABLE 3-1.Controller’s IO signals and definitions
Signal | VO type | Use/Activation |
DOUT1
to DOUTn |
Digital Output | -Activated when motor(s)is powered
-Activated when motor(s)is reversed -Activated when overtemperature -Activated when overvoltage -Mirror Status LED -Deactivates when output stage fault -User activated (RS232/RS485/TCP/USB or via scripting) |
DIN1
to DINn |
Digital Input | -Safety Stop
-Emergency stop -Motor Stop (deadman switch) -Invert motor direction -Forward or reverse limit switch -Run MicroBasic Scnipt -Load Home counter -Soft STO |
AIN1
to AINn |
Analog Input | -Command for the motor(s)
·Speed or position feedback -Trigger Action similar to Digital Input if under or over user-selectable threshold |
PIN1
to PINn |
Pulse Input | -Command for the motr(s)
Speed or position feedback .Trigger Action similar to Digital Input if under or over user selectable threshold |
ENC1a/b
to ENC2a/b |
Encoder Inputs | -Speed or position feedback
Trigger action similar to Digital Input if under or over userselectable count threshold |
46 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Connecting devices to Digital Outputs
Connecting devices to Digital Outputs
Depending on the controller model,2 to 8 Digital Outputs are available for multiple pur- poses.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.a 24V battery)at the other.
Connecting Resistive Loads to Outputs
Resistive or other non-inductive loads can be connected simply as shown in the diagram below.
Lights,LEDs,or any other
non-inductive load
FIGURE 3-1.Connecting resistive loads to Dout pins
Connecting Inductive loads to Outputs
The diagrams on Figure 3-2 show how to connect a relay,solenoid,valve,small motor,or other inductive load to a Digital Output:
Relay,Valve
Motor,Solenoid
FIGURE 3-2.Connecting to Dout
inductive loads pins
48 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Connecting a Voltage Source to Analog Inputs
A pull up resistor must be installed when using a pull down switch.
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 mak- ing a direct connection to the controller’s analog inputs.When measuring absolute voltag- es,configure the input in “Absolute Mode”using the PC Utility.
Ground
FIGURE 3-6.0-5V Voltage source connected to Analog inputs
Using extemal resistors,it is possible to alter the input voltage range to OV/10V or
-10V/+10V.
Ground
FIGURE 3-7.External resistor circuit for 0 to 10V capture range
50 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ | Connecting a Voltage Source to Analog Inputs |
+5V
Internal Resistors and Converter
20kOhm
A/D `
1K to 10K
33kOhm
Ground
Ohm Pot
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 Potentiometers for Commands with Safety band guards
When a potentiometer is used for sensing a critical command (Speed or Brake,for exam- ple)it is critically important that the controller reverts to a safe condition in case wiring is sectioned.This can be done by adding resistors at each end of the potentiometer so that the full OV or the full 5V will never be present,during normal operation,when the potenti- ometer is moved end to end.
Using this circuit shown below,the Analog input will be pulled to OV if the two top wires of the pot are cut,and pulled to 5V if the bottom wire is cut.In normal operation,using the shown resistor values,the analog voltage at the input will vary from 0.2V to 4.8V.
220 Ohm Ground
FIGURE 3-10.Potentiometer wiring in Position mode
52 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
TABLE 3-2 Recommended NTC characteristics
IRoboteQ | 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. lfthis protection is disabled,there will be no way of stopping it other than pressing the emergency stop button or disconnecting the power.
Connecting External Thermistor to Analog Inputs
Using external thermistors,the controller can be made to supervise the motor’s tempera- ture and cut the power output in case of overheating.Connecting thermistors is done ac- cording to the diagram shown in Figure 3-12.Use a 10kOhm Negative Coefficient Therm- istor (NTC)with the temperature/resistance characteristics shown in the table below.
Recommended part is Vishay NTCALUG03A103GC,Digikey item BC2381-ND.
.
Temp (C) |
-25 | 0 | 25 | 50 | 75 | 100 |
Resistance (kOhm) | 129 | 32.5 | 10.00 | 3.60 | 1.48 | 0.67 |
Ground
FIGURE 3-12.NTC Thermistor wiring diagram
Thermistors are non-inear devices.Using the circuit described in Figure 3-12,the controller will read the following values according to the temperature.For best precision,the analog input must be configured to read in Relative Mode.
The analog input must be configured so that the minimum range voltage matches the
desired temperature and that action be triggered when that limit is reached.For example 500mV for 80oC,according to the table.The action can be any of the actions in the list. An emergency or safety stop (i.e.stop motor with Fault Deceleration,until the operator moves command to idle)would be a typical action to trigger.
54 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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 to RC Radios
The pulse inputs are designed to allow direct connection to an RC radio without additional components.
Optional
Power
to
Radio
R/C Channel 1
R/C Channel 2
MCU
RIC Radio Ground
Controller Ground
Controller
Power
R/C Radio
5VOut
FIGURE 3-15.RC Radio powered by controller electrical diagram
Connecting to PWM Joysticks and Position Sensors
The controller’s pulse inputs can also be used to connect to sensors with PWM outputs. These sensors provide excellent noise immunity and precision.When using PWM sen-
sors,configure the pulse input in Duty Cycle mode.Beware that the sensor should always be pulsing and never output a steady DC voltage at itsends.The absence of pulses is con- sidered by the controller as a loss of signal.
Connecting SSl Sensors
SSI Sensors Overview
SSI sensors are absolute encoders that send their data using Synchronous Serial Interface (SSI).Using SSl protocol offers reduced wiring and EMI immunity.SSl sensors as abso-
lute encoders they report a signal respective to the shaft position and can be used in both multi-turn and single-turn applications.Roboteq controllers support the use of SSl sensors with resolution up to 16 bits.
Connecting Sensors and Actuators to Input/Outputs
Connecting the SSl 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 sig- nals for each sensor.The figure below shows the connection to the SSl Sensor.
5V Out|
Data
5V
人
Controller
GND’
Clock
GND
551 Encod
]cik
Data
FIGURE 3-16.Controller Connection to typical SSl Encoder
Connecting Optical Encoders
Optical Incremental Encoders Overview
Optical incremental encoders are a means for capturing speed and traveled distance on a motor.Unlike absolute encoders which give out a multi-bit number (depending on the res- olution),incremental encoders output pulses as they rotate.Counting the pulses tells the application how many revolutions,or fractions of,the motor has turned.Rotation velocity can be determined from the time interval between pulses or by the number of pulses
within a given time period.Because they are digital devices,incremental encoders will measure distance and speed with perfect accuracy.
Since motors can move in forward and reverse directions,it is necessary to differentiate the manner that pulses are counted so that they can increment or decrement a position counter in the application.Quadrature encoders have dual channels,A and B,which are electrically phased 90°apart.Thus,the direction of rotation can be determined by monitor ing the phase relationship between the two channels.In addition,with a dua-channel en- coder,a four-time multiplication of resolution is achieved by counting the rising and falling edges of each channel (A and B).For example,an encoder that produces 250 Pulses per Revolution (PPR)can generate 1,000 Counts per Revolution (CPR)after quadrature.
1 Pulse
=4 Transitions
=4 Counts
Count Dawn
Count Up
FIGURE 3-17.Quadrature encoder output waveform
Connecting Optical Encoders
The figure below shows the typical construction of a quadrature encoder.As the disk ro- tates in front of the stationary mask,it shutters light from the LED.The light that passes through the mask is received by the photodetectors.Two photodetectors are placed side by side at so that the light making it through the mask hits one detector after the other to produces the 90°phased pulses.
FIGURE 3-18.Typical quadrature encoder construction
Unlike absolute encoders,incremental encoders have no retention of absolute position upon power loss.When used in positioning applications,the controller must move the motor until a limit switch is reached.This position is then used as the zero references for all subsequent moves.
Recommended Encoder Types
The module may be used with most incremental encoder modules as long as they include the following features:
· Two quadrature outputs (Ch A,Ch B),single ended
· 3.0V minimum swing between 0 Level and 1 Level on quadrature output
· 5VDC operation.50mA or less current consumption per encoder
More sophisticated incremental encoders with index and other features may be used, however these additional capabilities will be ignored.
The choice of encoder resolution is very wide and is constrained by the module’s maxi- mum pulse count at the high end and measurement resolution for speed at the low end.
Specifically,the controller’s encoder intertace can process 1 million counts per second, unless otherwise specified in the product datasheet.
Commercial encoders are rated by their numbers of “Pulses per Revolution”(also some- times referred to as “Number of Lines”or “Cycles per Revolution”).Carefully read the
manufacturer’s datasheet to understand whether this number represents the number of pulses that are output by each channel during the course of a 360 degrees revolution rath- er than the total number of transitions on both channels during a 360 degrees revolution. The second number is 4 times larger than the first one.
The formula below gives the pulse frequency at a given RPM and encoder resolution in Pulses per Revolution.
Pulse Frequency in counts per second =RPM/60*PPR*4
58 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Connecting the 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 oper ation immediately.
Motor -Encoder Polarity Matching
When using encoders for closed loop speed or position control,it is imperative that when the motor is turning in the forward direction,the counter increments its value and a posi- tive speed value is measured.The counter value can be viewed using the PC utility.
If the Encoder counts backward when the motor moves forward,correct this by either:
1-Swapping Channel A and Channel B on the encoder connector.This will cause the en- coder module to reverse the count direction,
2-Enter a negative number in the PPR configuration will also cause the counter to count in the reverse direction
3-Swapping the leads on the motor.This will cause the motor to rotate in the opposite direction.
Connecting Sensors and Actuators to Input/Outputs
RoboteQ
60 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Basic Operation
SECTION 4
and Operation
This section discusses the controller’s digital and analog inputs and output and how they can be used.
Basic Operation
The controller’s operation can be summarized as follows:
· Receive commands from a radio receiver,joystick or a microcomputer
·Activate the motor according to the received command
· Perform continuous check of fault conditions and adjust actions accordingly
· Report real-time operating data
The diagram below shows a simplified representation of the controller’s internal operation. The most noticeable feature is that the controller’s serial,digital,analog,pulse,and encod- er inputs may be used for practically any purpose.
Configuration
RS232/USB
Command
Priority
Selection
Command
Switchbox
Pulse Inputs
Estop/Limit Switches
Digital Inputs
Encoder Inputs
Amps
Temperature
Voltages
Scipt\ Configuration Configuration
Motor
Outputs
Digital Outputs
Configuration
Analog Inputs
Input Capture
Output Driver
Commands
Feedback
and
Motor
FIGURE 4-1.Simplified representation of the controller’s internal operation
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.All inputs,even when they are sharing the same pins on the connector,are captured and evaluated by the controller.Whether input is used,and what it is used for,is set individually using the descriptions that follow.
Important Notice
On shared l/O pins,there is nothing stopping one input to be used as analog or
pulse at the same time or for two separate inputs to act identically or in conflict
with one another.While such an occurrence is normally harmless,it may cause the controller to behave in an unexpected manner and/or cause the motors not to run. Care must be exercised in the configuration process to avoid possible redundant or conflictual use.
Digital Inputs Configurations and Uses
Each of the controller’s digital Inputs can be configured so that they are active high or ac- tive low.Each output can also be configured to activate one of the actions from the list in the table below.In multi-channel controller models,the action can be set to apply to any or all motor channels.
TABLE 4-1.Digital input Action List
Action | Applicable
Channel |
Description |
No Actio | Input causes no action | |
Safety Stop | Selectable | Stops the selected motor(s)channel with Fault Deceleration, until the command is moved back to idle or command direc- tion is reversed |
Emergency stop | All | Stops the controller entirely until the controller is powered down,or a special command is received via the serial port |
Motor Stop (deadman switch) | Selectable | Stops the selected motor(s)while the input is active.Motor resumes when input becomes inactive |
Invert motor direction | Selectable | Inverts the motor direction,regardless of the command mode in use |
Forward limit switch | Selectable | Stops the motor until the command is changed to reverse |
Reverse limit switch | Selectable | Stops the motor until the command is changed forward |
Bun script | NA | Start execution of MicroBasic script |
Load Home counter | Selectable | Load counter with a Home value |
Soft STO | Selectable | Configure input to act as an STO input |
62 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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.When enabled,it is possible to select the whether
capture must be an absolute voltage or relative to the controller’s 5V Output.Details on how to wire analog inputs and the differences between the Absolute and Relative captures can be found in “Using the Analog Inputs to Monitor External Voltages”page 50.
TABLE 4-2.Analog Capture Modes
Analog Capture Mode | Description |
Disabled | Analog capture is ignored (forced to O) |
Absolute | Analog capture measures real volts at the input |
Relative | Analog captured is measured relative to the 5V Output which is typically around 4.8V to 5.1V depending on the controller model and the load. Correction is applied so that an input voltage measured to be the same as the 5V Output voltage is reported at 5.0V |
The raw Analog capture then goes through a series of processing shown in the diagram below.
Use
Select
Command
Feedback
Selectable Action
Selectable Action
Min/Max/Center Deadband Exponent
Analog Input
Aln>Max
Aln<Min
FIGURE 4-2.Analog Input processing chain
64 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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 O 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.The Utility also features an Auto-calibration function for automatically capturing these values.
Deadband Selection
The adjusted analog value is then adjusted with the addition of a deadband.This parameter
selects the range of movement change near the center that should be considered as a 0
command.This value is a percentage from 0 to 50%and is useful,for example,to allow some movement of a joystick around its center position before any power is applied to a motor.The graph below shows output vs input changes with a deadband of approximately 40%.
Output
FIGURE 4-5.Effect of deadband on the output
Note that the deadband only affects the start position at which the joystick begins to take effect.The motor will still reach 100%when the joystick is in its full position.An illustration of the effect of the deadband on the joystick action is shown in Figure 4-6 below.
Deadband
Centered
Position
FIGURE 4-6.Effect of deadband on joystick position vs.motor command
The deadband value is set independently for each input using the PC configuration 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 stron- ger 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.The graph below shows the output vs input change with exponential,logarithmic and linear corrections.
Output
FIGURE 4-7.Effect of exponential /logarithmic correction on the output
The exponential or log correction is selected separately for each input using the PC Con- figuration Utility.
Use of Analog Input
After the analog input has been fully processed,it can be used as a motor command or, if the controller is configured to operate in a closed loop,as a feedback value (typically speed or position).
Each input can therefore be configured to be used as command or feedback for any motor channel(s).The mode and channel(s)to which the analog input applies are selected using the PC Configuration Utility.
Pulse Inputs Configurations and Uses
The controller’s Pulse Inputs can be used to capture pulsing signals of different types.
TABLE 4-3.Pulse Inputs Capture Modes
Catpure Mode | Description | Typical use |
Disabled | Pulse capture is ignored (forced to O) | |
Pulse | Measures the On time of the pulse | RC Radio |
66 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
522
Pulse Inputs Configurations and Uses
TABLE 4-3.(continued)
Catpure Mode | Description | Typical use |
Duty Cycle | Measures the On time relative to the full On/Off period | Hall position sensors and joysticks with pulse output |
Frequency | Measures the repeating frequency of pulse | Encoder wheel |
MagSensor | Gets Data from MagSensor
(MultiPWM,see section 5) |
Magnetic Sensor (MGS1600) |
BMS | Gets Data from BMS (MultiPWM,see section 5) | Battery Management System (BMS1040) |
Pulse Count | Counts the number of Pulses’ | Quadrature Encoder |
Flow Sensor | Gets Data from FlowSensor
(MultiPWM,see section 5) |
Flow Sensor (FLW100) |
1 The counter will increment every time a pulse is received.The count can be read using the PI query.In order to reset the counter de-configure capture mode to disabled and then back to pulse count. |
The capture mode can be selected using the PC Configuration Utility.
The captured signals are then adjusted and can be used as command or feedback accord- ing to the processing chain described in the diagram below.
Use
Select
Command
Feedback
Min/Max/Center
Pulse Input
Exponent
Deadband
Capture
FIGURE 4-8.Pulse Input processing chain
Except for the capture,all other steps are identical to those described for the Analog cap- ture mode.
Use of Pulse Input
After the pulse input has been fully processed,it can be used as a motor command or, if the controller is configured to operate in a closed loop,as a feedback value (typically speed or position).
Each input can therefore be configured to be used as command or feedback for any motor channells).The mode and channells)to which the analog input applies are selected using the PC Configuration Utility.
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 as- signment for each available Digital Output.
TABLE 4-4.Digital Outputs action modes
Action | Output activation | Typical Use |
No action | Not changed by any intemal controller events. | Output may be activated using
Serial commands or user scripts |
Motor(s)is on | When selected motor channel(s)has power applied to it. | Brake release |
Motor(s)is reversed | When selected motor channel(s)has power applied to it in reverse direction. | Back-up warning indicator |
Overvoltage | When battery voltage above over-limit | Shunt load activation |
Overtemperature | When over-temperature limit exceeded | Fan activation.Waming buzzer |
Status LED | When status LED is ON | Place Status indicator in visible location. |
Encoder Configurations and Use
On controller models equipped with encoder inputs,extemal encoders enable a range
of precision motion control features.See “Connecting Optical Encoders”page 52 for a detailed discussion on how optical encoders work and how to physically connect them to the controller.The diagram below shows the processing chain for each encoder input.
Selectable Action
Input
Selectable Action
Count
Use
Select
Feedback
Speed as %。
of Max RPM
Encoder PPR Max RPM
32-bit
up/down
Counter
L
Speed Measure
Speed in RPM
Count >Max
Count<Min
Scalling
Encoder
FIGURE 4-9.Encoder input processing
The encoder’s two quadrature signals are processed to generate up and down counts
depending on the rotation direction.The counts are then summed inside a 32-bit counter. The counter can be read directly using serial commands and/or can be used as a position feedback source for the closed loop position mode.
68 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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 nu- merical value,in RPM,using a serial command.
Configuring the encoder parameters is done easily using the PC Configuration Utility.
SSl Configuration and Use
On controller models equipped with SSl sensor inputs,SSl sensors enable a range of pre- cision motion control features.See “Connecting SSl Sensors”page 51 for a detailed dis- cussion on how SSl sensors work and how to physically connect them to the controller. The diagram below shows the processing chain for each encoder input.
Selectable Action
Counter
or
Absolute
Counter
Use
Select
Speed
Measure
Speed as %o of Max RPM
Count
Speed in RPM
u n
SSI Sensor Input
Selectable Action
Ln
Count>Max
Count<Min
Scalling
Feedback
SSI Sensor Resolution Max RPM
FIGUER 4-10.SSI Sensor input processing
The SSl sensor’s signal is processed to generate up and down counts depending on the
rotation direction.The counts are then summed inside a 32-bit counter.The counter can
be read directty using serial commands and/or can be used as a position feedback source
for the closed loop position mode.
Also taking into consideration that SSl sensors are absolute sensors,the sensor can be configured in order to indicate the absolute position of the rotor shaft (Absolute Feed- back).In that case,the counter holds the absolute position of the rotor shaft.
The count information is also used to measure rotation speed.Using the SSl Sensor Res- olution (which represent the counts per revolution,SCPR)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 SSI Sensor parameters is done easily using the PC Configuration Utility.
70 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brake Release
FIGURE 4-11.Brake drive circuit and connection
The configuration is similar since the brake outputs are shared with digital outputs.For more details see product’s datasheet.
Safety Recommendations
RoboteQ
72 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Introduction to MGS1600 Magnetic Guide Sensor
SECTION 5
Connection and
Operation
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.
Introduction to MGS1600 Magnetic Guide Sensor
Roboteq’s Magnetic Guide Sensor is a sensor capable of detecting and reporting the posi- tion of a magnetic field along its horizontal axis.The sensor is intended for applications in Automatic Guided Vehicles using inexpensive adhesive magnetic tape to form a guide on the floor.The tape creates an invisible field that is immune to dirt and unaffected by light- ing conditions.The sensor can be interfaced directly to any of Roboteq’s motor controllers in order to create an effective AGV solution with just two components.
The sensor generates the following information about the track:
·Tape Detect
·Position of Left Track
·Position of Right Track
·Presence of Left Marker
·Presence of Right Marker
Magnetic Guide Sensor Connection and Operation | RoboteQ |
Introduction to FLW100 Flowsensor
Roboteq’s FLW100 is a high-resolution sensor especially designed for accurate contact- less 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.The sensor uses an embedded infrared camera that is pointed to the floor and measures the displacement distance and speed along the X and Y axis by comparing images at each frame.Distance is measured with 0.1mm resolution with excellent accuracy.
The sensor generates among others the following information:
· Xaxis distance in mm,
· Y axis distance in mm.
Introduction to BMS10X0 Battery Management System
RoboteQ’s BMS10x0 is a battery management and protection system for building cost-ef- fective,ultra-efficient and high current power sources using Lithium battery cells.The
BMS connects to an array of battery cells at one end,and to a user load at the other.Avail- able in a 40V and 60V versions,it is optimized for 6-cell to 15-cell battery packs.
The product generates among others the following information:
· BMS State of Charge in AmpHours (Ah),
· BMS State Of Charge in percentage,
· BMS Status Flags,
· BMS Switch States.
Available Interfaces
All the above data can be transmitted to the Roboteq controller and other devices using one of the following methods:
TABLE 5-1.Available Interfaces between Roboteq Products
Method | To Roboteq Controllers | To PLCs | To PCs |
MultiPWM | Preferred | Unsuitable | Unsuitable |
Serial | Not Recommended | Preferred | Suitable |
CANbus | Suitable | Preferred | Suitable(1) |
USB | N/A | Unsuitable | Suitable |
Notes:
1:PC must be fitted with CAN adapter |
MultiPWM interface
The recommended interfacing method to Roboteq motor controller is the MultiPWM
mode.As the name implies,this proprietary method uses a succession of variable duty- cycle pulses to carry the data sent by the Magnetic sensor,the FlowSensor or the Battery Management System.
74 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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.
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 con- figuration,while the Battery Management System needs to be explicitly configured.To enable the capture,the selected pulse input on the controller must be configured to the respective option when using the PC utility.
Puse lnputs
Plnt:
Capture Type Disabled
Input Use:No
Freueng Capture Polarl ;Cycle
Input Deadban[ BM
Duee Cont Action on Min:
Row Senso Action on Max.7WoReter
Pulse Width
FIGURE 5-2.Multi-PWM configuration
When changing via the console use
^PMOD cc nn to enable pulse input cc in MultiPWM mode.
Where nn:
4:For Magnetic Sensor
5:For Battery Management System
7:For Flow Sensor
pdshi
pd*h2
Pnmhn
ono
Magnetic Guide Sensor Connection and Operation | lRoboteQ |
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 realtime mirror image of sensor data is then present inside the controller.From there the sensor informa- tion can be read using serial,USB,CAN or MicroBasic scripts like any other of the control- ler’s operational parameters.
The following Motor Controller queries are available for reading the captured sensor data.
TABLE 5-2.Accessing Roboteq Sensor Information
Magnetic Sensor | |
?MGD | Read tape detect |
2MGT nn | Read left track when nn=1 or right track when nn=2 |
?MGM nn | Read left marker when nn=1 or right track when nn=2 |
Flow Sensor | |
?FLW nn | Read X Counter in mm when nn=1 orY Counter in mm when nn=2 |
Battery Management System | |
?BMC | Read BMS State Of Charge in AmpHours (Ah) |
?BSC | Read BMS State Of Charge in per cent |
?BMF | Read BMS status flags |
?BMS | Read BMS switch states |
Details on these commands can be found in the Commands Reference section of this manual
Connecting Multiple Similar Sensors
More than one similar sensors can be connected to a single motor controller.For Magnet- ic sensors,this can be useful in AGV designs that must be able to move in the forward
and reverse direction along with the guide.Connecting multiple sensors can be done by connecting each sensor to one of the available pulse input,as shown in the figure below.
Motor Controller
7.30v spey
8
FIGURE 5-3.Connecting multiple sensors to a motor controller
76 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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 en- abling and disabling pulse inputs via serial commands or MicroBasic scripting.Examples:
^PMOD 10:Serial command to Disable Sensor on pulse input 1
SetconfigLPMOD,1,0):Microbasic instruction to disable sensor on Pulse input 1
APMOD 24:Enable Sensor on Pulse input 2
SetconfigLPMOD,2,4):Microbasic instruction to enable sensor on Pulse input 2
The sensor information can then be accessed with the respective queries as discussed above (?MGD,?MGT,?MGM,?FLW.
Accessing Multiple Sensor Information Simultaneously
It is possible to have all sensors enabled at the same time by having theirrespective pulse input configured accordingly.
When more than one pulse input is configured that way,the sensor data is accessible
using the ?MGD,?MGT,?MGM,?MGY or ?FLW queries as follows,where x is the pulse input number (1,2,3 etc.).
Reading Tape Detect
?MGD x or GetValue(_MGD,x)
Returns the Tape Detect state of Sensor at Pulse input x
Example:
?MGD 2:Returns the Tape Detect state of Sensor 2
Reading Marker Detect
?MGM 2*(x-1)+1 or GetValue(_MGM,2*(x-1)+1)
Returns the state of the Left Marker Detect state of Sensor at Pulse input x
?MGM 2*(x-1)+2 or GetValue(_MGM,2*(x-1)+2)
Returns the state of the Right Marker Detect state of Sensor at Pulse input x
Examples:
?MGM 1:Returns the Left Marker Detect state of Sensor at input 1
?MGM 2:Returns the Right Marker Detect state of Sensor at input 1
Magnetic Guide Sensor Connection and Operation | RoboteQ |
?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 GetValueLMGT,3*(x-1)+2) Returns the Right Track Position of Sensor at input x ?MGT 3*(x-1)+3 or GetValueLMGT,3*(x-1)+3) Retums the Active(Left or Right)Track Position of Sensor at input x Examples: ?MGT 1:Returns the Left Track Position of Sensor at input 1 ?MGT 2:Returns the Right Track Position of Sensor at input 1 ?MGT 4:Returns the Left Track Position of Sensor at input 2 ?MGT 5:Returns the Right Track Position of Sensor at input 2 ?MGT 7:Returns the Left Track Position of Sensor at input 3 Reading Flow Sensor Counters ?FLW 2*(z-1)+1 or GetValueLFLW,2*(z-1)+1) Returns the Counter of the X axis of Sensor at Pulse input z, ?FLW 2*(z-1)+2 or GetValueLFLW,2*(z-1)+2) Returns the Counter of the Y axis of Sensor at Pulse input z Examples: ?FLW 1:Returns the Counter of the X axis of Sensor at Pulse input 1 ?FLW 2:Returns the Counter of the X axis of Sensor at Pulse input 1 ?FLW 3:Returms the Counter of the Y axis of Sensor at Pulse input 2 ?FLW 4:Returns the Counter of the Y axis of Sensor at Pulse input 2 |
78 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Input Command Modes and Priorities
SECTION 6
Modes
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,Frequencyl
·Analog signal (0 to 5V)
· Spektrum Radio (on selected models)
· CAN Intertace
· Microbasic Script
One,many or all command modes can be enabled at the same time.When multiple
modes are enabled,the controller will select which mode to use based on a user select- able priority scheme and the hardcoded priorities concening the CAN interface and the Microbasic script.Setting the priorities is done using the PC configuration utility.
This scheme uses a priority table containing three parameters and let you select which
mode must be used in each priority order.During operation,the controller reads the first priority parameter and switches to that command mode.If that command mode is found to be active,that command is then used.If no valid command is detected,the controller switches to the mode defined in the next priority parameter.If no valid command is recog- nized in that mode,the controller then repeats the operation with the third priority param- eter.If no valid command is recognized in that last mode,the controller applies a default command value that can be set by the user (typically 0).
Brushless Motor Connections and Operation
lRoboteQ
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
· !GlQ-SetTorque Amps
· !GID-Set Flux Amps
arrive within the watchdog timeout period via the RS232,RS485,TCP or USB ports.The
mode will be considered inactive,and the next lower priority level will be selected as soon as the watchdog timer expires.Note that disabling the watchdog will cause the serial
mode to be always active after the first command is received,and the controller will never switch to a lower priority mode.
If the abovementioned commands are called from a script then the Script mode is en- abled and if they are called from CAN network the CAN mode is enabled.
In the pulse mode,the mode is considered active if a valid pulse train is found and re- mains present.
In analog mode,the mode is considered active at all time,unless the Center at Start safety is enabled.In this case,the Analog mode will activate only after the joystick has been cen- tered.The Keep within Min/Max safety mode will also cause the analog mode to become
inactive,and thus enable the next lower priority mode,if the input is outside of a safe range.
The example in Figure 6-1 shows the controller connected to a microcomputer,a RC ra- dio,and an analog joystick.If the priority registers are set as in the configuration below:
1-Serial
2-Pulse
3-Analog
then the active command at any given time is given in the table below.
RoboteQ 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.
USB vs Serial Communication Arbitration
Commands may arrive through the RS232,RS485,TCP or the USB port at the same time.They are executed as they arrive in a first come first served manner.Commands that are arriving via USB are replied on USB.Commands arriving via the RS232 are re- plied on the RS232 and so on.Redirection symbol for redirecting outputs to the other port exists (e.g.a command can be made to respond on USB even though it arrived on RS232).
CAN Commands Arbitration
On controllers fitted with a CAN interface,commands received via CAN are processed as they arrive regardless if any other mode,apart from Script mode,is active at the same time.CAN mode has the highest priority from all other modes apart from script mode.
Commands issued from MicroBasic scripts
When sending a Motor command from a MicroBasic script,it will be interpreted by the controller with higher priority than any other interface.If a serial command is received from the seria/USB port at the same time a command is sent from the script,the script command will prevail.
Important Warning
Script and CAN commands are also subject to the serial Watchdog timer.Script
commands have the highest priority and CAN commands similar priority to serial commands.as shown below:
TABLE 6-2.Command Priorities
Priority | Mode | Configurable |
1 | Script Mode | No |
2 | CAN Mode | No |
3,4,5 | Serial Mode(RS232,RS485,TCPUSB) | Yes (see CPRI) |
Pulse Mode | ||
Analog Mode |
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 posi- tion 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.
The RC mode provides the simplest method for remotely controlling a robotic vehicle:little else is required other than connecting the controller to the RC receiver and powering it On.
FIGURE 6-2.R/C radio control mode
The speed or position information is communicated to the controller by the width of a pulse from the RC receiver:a pulse width of 1.0 millisecond indicates the minimum joy- stick position and 2.0 milliseconds indicates the maximum joystick position.When the joystick is in the center position,the pulse should be 1.5ms.
joystick position: min center max
1.05ms
0.45ms
0.9ms
R/C pulse timing
FIGURE 6-3.Joystick position vs.pulse duration default values
The controller has a very accurate pulse capture input and is capable of detecting changes in joystick position (and therefore pulse width)as small as 0.1%.This res- olution is superior to the one usually found in most low cost RC transmitters.The controller will therefore be able to take advantage of the better precision and better
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 lone input on single channel products).Which channel and which pin on the input connector depends on the controller model and can be found in the controller’s datasheet.
Changing the input assignment is done using the PC Configuration utility.
Input RC Channel Configuration
Internally,the measured pulse width is compared to the reference minimum,center,and maximum pulse width values.From this is generated a command number ranging from
-1000(when the joystick is in the min.postion),to O when the joystick is in the center po- sition)to+1000 (when the joystick is in the max position).This number is then used to set the motor’desired speed or position that the controller will then attempt to reach.
For best results,reliability,and safety,the controller will also perform a series of correc- tions,adjustments and checks to the R/C commands,as described below.
Joystick Range Calibration
The Joystick min,max,and center position are adjustable.For best control accuracy,the controller can be calibrated to capture and use your radio’s specific timing characteristics and store them into its internal Flash memory.This is done using a simple calibration pro- cedure described page 64.
Deadband Insertion
The controller allows for a selectable amount of joystick movement to take place around the center position before activating the motors.See the full description of this feature at “Deadband Selection“page 65
Command Correction
The controller can also be set to translate the joystick motor commands so that the motor responds differently depending on whether the joystick is near the center or near the
extremes.Five different exponential or logarithmic translation curves may be applied.
Since this feature applies to the R/C,Analog and RS232 modes,it is described in detail in “Command Correction”page 66,in the General Operation section of the manual.
Reception Watchdog
Immediately after it is powered on,if in the R/C mode,the controller is ready to receive pulses from the RC radio.
If valid pulses are received on any of the enabled Pulse input channels,the controller will consider the RC Pulse mode as active.If no higher priority command is currently active (See”Input Command Modes and Priorities”page 73),the captured RC pulses will serve to activate the motors.
84 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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.
Changing the input assignment is done using the PC Configuration utility.See “Analog In- puts Configurations and Use”on page 59.
Input Analog Channel Configuration
An Analog input can be Enabled or Disabled.When enabled,it can be configured to cap- ture absolute voltage or voltage relative to the 5V output that is present on the connector. See “Analog Inputs Configurations and Use”on page 59
Analog Range Calibration
If the joystick movement does not reach full OV and 5V,and/or if the joystick center point does not exactly output 2.5V,the analog inputs can be calibrated to compensate for this. See”Min,Max and Center adjustment”on page 60 and “Deadband Selection”on page 61.
Using Digital Input for Inverting direction
Any digital input can be configured to change the motor direction when activated.See
“Digital Inputs Configurations and Uses”on page 58.Inverting the direction has the same effect as instantty moving the command potentiometer to the same level the opposite
direction.The motor will first return to O at the configured deceleration rate and go to the inverted speed using the configured acceleration rate.
Safe Start in Analog Mode
By default,the controller is configured so that in Analog command mode,no motor will start until all command joysticks are centered.The center position is the one where the input equals the configured Center voltage plus the deadband.
After that,the controller will respond to changes to the analog input.The safe start check is not performed again until power is turned off.
Protecting against Loss of Command Device
By default,the controller is protected against the accidental loss of connection to the
command potentiometer.This is achieved by adding resistors in series with the potenti- ometer that reduces the range to a bit less than the full OV to 5V swing.If one or more
wires to the potentiometer are cut,the voltage will actually reach OV and 5V and be con- sidered a fault condition,if that protection is enabled.See “Connecting Potentiometers for Commands with Safety band guards”on page 49.
86 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Power Output Circuit Operation
SECTION 7
Features and
Options
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 offusing Pulse Width Modulation (PWM)technique in order to deliv- er more or less power to the motors.The PWM ratio that is applied is the result of a com- putation that combines the user command and safety related corrections.In closed-oop operation,the command and feedback are processed together to produce the adjusted
motor command.The diagram below gives a simplified representation of the controller’s operation.
Configurraiion Car ratior Confgu ration Configuration
Acoeleraton
Decoeleration
PWM
Channel
Miing
Configuration
Estop
Limit Switches,
Amps Temperature Voltages
Mator
Command
Channel Mixing
Cam nds
Powe Output
Short Detect
Safety Che ecks
Motor Outs
Feadb:
FIGURE 7-1.Simplified diagram of power output operation
88 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
PWM period time.The short fault will remain off until the command is brought back to
Global Power Configuration Parameters
Short Circuit Protection
The controller has got two levels of short circuit protection software and hardware
protection.Some Roboteq controllers includes a circuit that will detect very high current surges that are consistent with short circuits conditions.Check with controller datasheet for details.
The firmware utilizes the current sensors in order to detect short circuit.When such a
condition occurs,the power transistor for the related motor channel is cut off within a
idle.
The protection is very effective but has a few restrictions:
Only shorts between two motor outputs of the same channel are detected.Shorts
between a motor wire and VMot are also detected.Shorts between motor output and Ground are not detected.
It is noted that the software short circuit triggering is affected also from the load induc- tance values and input battery voltage level.
Since the controller can handle very large current during its normal operation,Only direct short circuits between wires will cause a sufficiently high current for the detection to
work.Short circuits inside motors or over long motor wires may go undetected.
Mixed Mode Select
Mixed mode is available as a configuration option in dual channel controllers to create
tanklike steering when one motor is used on each side of the robot:Channel 1 is used for moving the robot in the forward or reverse direction.Channel 2 is used for steering and will change the balance of power on each side to cause the robot to tun.Figure 7-2 below llustrateshow the mixed mode motor arrangement.
Motor 1
Controller
Motor 2
FIGURE 7-2.Effect of commands to motor examples in mixed mode
The controller supports 3 mixing algorithms with different driving characteristics.The table below showshow each motor output responds to the two commands in each of these
modes.
Motor Operating Features and Options
TABLE 7-1.Mixing Mode characteristics
Input | Mode 1 | Mode 2 | Mode 3 | ||||
Throttle | Steering | M1 | M2 | M1 | M2 | M1 | M2 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 300 | 300 | -300 | 300 | -300 | 300 | -300 |
0 | 600 | 600 | -600 | 600 | -600 | 600 | -600 |
0 | 1000 | 1000 | -1000 | 1000 | -1000 | 1000 | -1000 |
0 | -300 | -300 | 300 | -300 | 300 | -300 | 300 |
0 | -600 | -600 | 600 | -300 | 300 | -600 | 600 |
0 | -1000 | -1000 | 1000 | -1000 | 1000 | -1000 | 1000 |
300 | 300 | 600 | 0 | 600 | 0 | 522 | 90 |
300 | 600 | 900 | -300 | 900 | -300 | 762 | -120 |
300 | 1000 | 1000 | -700 | 1000 | -1000 | 1000 | -400 |
300 | -300 | 0 | 600 | 0 | 600 | 90 | 522 |
300 | -600 | -300 | 900 | -300 | 900 | -120 | 762 |
300 | -1000 | .700 | 1000 | -1000 | 1000 | -400 | 1000 |
600 | 300 | 900 | 300 | 900 | 300 | 708 | 480 |
600 | 600 | 1000 | 0 | 1000 | -200 | 888 | 360 |
600 | 1000 | 1000 | -400 | 1000 | ·1000 | 1000 | 200 |
600 | -300 | 300 | 900 | 300 | 900 | 480 | 708 |
600 | -600 | 0 | 1000 | -200 | 1000 | 360 | 888 |
600 | -1000 | -400 | 1000 | -1000 | 1000 | 200 | 1000 |
1000 | 300 | 1000 | 700 | 1000 | 400 | 900 | 1000 |
1000 | 600 | 1000 | 400 | 1000 | -200 | 1000 | 1000 |
1000 | 1000 | 1000 | 0 | 1000 | -1000 | 1000 | 1000 |
1000 | -300 | 700 | 1000 | 400 | 1000 | 1000 | 900 |
1000 | -600 | 400 | 1000 | -200 | 1000 | 1000 | 1000 |
1000 | -1000 | 0 | 1000 | -1000 | 1000 | 1000 | 1000 |
Motor Channel Parameters
User Selected Current Limit Settings
The controller has current sensors at each of its output stages.Every 1 ms,this current is measured and a correction to the output power level is applied if higher than the user preset value.
The current limit may be set using the supplied PC utility.The maximum limit is dependent on the controller model and can be found on the product datasheet.
90 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Channel Parameters
The limitation is performed on the Motor current and not on the Battery current.See “Bat- tery Curent 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.
TABLE 7-2.Possible Action List when Amps threshold is exceeded
Action | Applicable
Channel |
Description |
No Action | ■ | Input causes no action |
Safety Stop | Selectable | Stops the selected motor(s)channel with Fault Deceler ation,until command is moved back to idle or command direction is reversed |
Emergency stop | All | Stops the controller entirely until controller is powered down,or a special command is received via the serial port |
This feature is very different from amps limiting.Typical uses for it are for stall detection or “soft limitswitches”When,for example,a motor reaches an end and enters stall con- dition,the current will rise,and that current increase can be detected and the motor be made to stop until the direction is reversed.
Programmable Acceleration &Deceleration
When changing speed command,the controller will go from the present speed to the de- sired one at a user selectable acceleration.This feature is necessary in order to minimize the surge current and mechanical stress during abrupt speed changes.
This parameter can be changed by using the PC utility.Acceleration can be different for each
motor.A different value can also be set for the acceleration and for the deceleration.The ac-
celeration value is entered in RPMs per second.In open loop installation,where speed is not
actually measured,the acceleration value is relative to the Max RPM parameter.For example,
f the Max RPM is set to 1000 (default value)and acceleration to 2000,this means that the
controller will go from 0 to 100%power in 0.5 seconds.In closed loop Torque Mode the
Acceleration and Deceleration values are entered in miliAmps per second.In case of Safety
Stop the motor will ramp down based on the Fault Deceleration configuration value.
In order to by-pass the ramping process,either the acceleration or the deceleration values need to be set to 0.
Important Warning
Depending on the load’s weight and inertia,a quick or no acceleration can cause considerable current surges from the batteries into the motor.A quick or no
deceleration will cause an equally large,or possibly larger,regeneration current
surge.Always experiment with the lowest acceleration value first and settle for the slowest acceptable value.
92 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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.
Speed
Command
Trajectory
Position Feedback
Position Counter
Expected Position
Motor
PWM
PID
■
FIGURE 7-5.Closed Loop Speed Position mode
Closed Loop Position Relative Control
In this mode,illustrated in Figure 7-6,the axle of a geared down motor is typically cou- pled to a position sensor that is used to compare the angular position of the axle versus a desired position.The motor will move following a controlled acceleration up to a user defined velocity and decelerate to smoothly reach the desired destination.This feature of the controller makes it possible to build ultra-high torque “jumbo servos”that can be used to drive steering columns,robotic arms,life-size models and other heavy loads.Details on how to wire the position sensing potentiometers and operating in this mode can be found in”Closed Loop Relative and Tracking Position Modes”on page 141. FIGURE 7-6.Motor with potentiometer assembly for position operation |
![]() Expected Position Position Command PWM Trajectory Motor
-1000 to +1000 Feedback Position Sensor |
FIGURE 7-7.Closed Loop Position Relative mode |
94 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motion Control Modes Overview
Torque Command
PID
PWM
A
Current Sensor
Motor
Current Feedback
FIGURE 7-10.Closed Loop Torque mode
Motion Control Modes Overview
In the figure 7-11,the block diagram of the whole motion control modes architecture
supported in RoboteQ controllers.The motion control mechanism utilizes a cascaded PID control technique for position,speed and current control modes.More details for each
control mode operation and tuning are included in separate chapters at sections 10-13, respectively.
Note:The dashed lines at the output of position and speed controllers illustrate the alter- native operating scheme of each mode in case the speed or FOC torque gains respective- ly are equal to zero.
Current controller
L
umt Moir vp
(Brwshkss.
IPM
tntactsn)
svwmr
Position relattke and cnunt position controllers
cct
Ume
P*
PID
P
Aastralua
Delerutius,Speed
Pak
p*
rip
urit
Motor
0.
Ad e
akulalea
Tracking Pasition controller
Umt
Sped contraller
Mot
tnise
positn
Ve
wie
S
P
Oarke
red
at
trolle
ab
Umt
Pak
as
L
P
riD
FIGURE 7-11.Close loop operating modes diagram
Motor Operating Features and Options | RoboteQ |
Below is the description of the parameters illustrated in Figure 7-11.
P*=position reference command value,in counts at count position and speed position modes and in-1000/1000 command at tracking position and position relative modes P=measured position from motor sensor,in counts at count position and speed position modes and in-1000/1000 command at tracking position and position relative modes P₄=position reference command value every msec,calculated from trajectory function according to configured acceleration,deceleration and speed S*=speed reference command value in rpm S=measured motor mechanical speed in rpm l*=reference current command value in Ampere l*=q-axis reference current command value in Ampere (Torque Amps command) l*=d-axis reference current command value in Ampere (Flux Amps command) l*=q-axis current measurement in Ampere (Torque Amps) l*=d-axis current measurement in Ampere (Flux Amps) V=qaxis reference votage command Volts V₄=daxis reference voltage command in Volts V=reference instantaneous applied 3-phase voltage command at mosfet bridge in Volts !=measured motor phase A instantaneous current =measured motor phase B instantaneous current 0=measured motor electric angle |
96 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Introduction to Brushless Motors
SECTION 8
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 de- scribed 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.
Introduction to Brushless Motors
Brushless motors,or more accurately Brushless DC Permanent Magnet Synchronous mo- tors (since there are other types of motors without brushes)contain permanent magnets and electromagnets.The electromagnets are arranged in groups of three and are powered in sequence in order to create a rotating field that drives the permanent magnets.The
electromagnets are located on the non-rotating part of the motor,which is normally in the motor casing for traditional motors,in which case the permanent magnets are on the ro- tor that is around the motor shaft.On hub motors,such as those found on electric bikes, scooters and some other electric vehicles,the electromagnets are on the fixed center part of the motor and the permanent magnets on the rotating outer part.
Brushless Motor Connections and Operation | RoboteQ |
FIGURE 8-1.Permanent Maanet 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 con- troller to apply,in sequence,current to each of the 3 motor windings in order to cause the rotor to spin.There are fundamentally two methods of generating the rotating magnetic field in the motor’s winding:
·Trapezoidal Commutation
· Sinusoidal Commutation
Within each commutation method is then a method for detecting the actual position of the rotor in order to synchronize the generated rotating field.These are:
· Hall sensors
· Encoders(Absolute or relative)
· Sensorless (Trapezoidal only)
All Roboteq brushless controllers support Trapezoidal with Hall sensor feedback.Sinusoidal and alternative rotor detection techniques are available on selected models.Refer to the controller’s datasheet to determine which modes are supported.
Number of Poles
One of the key characteristics of a brushless motor is the number of poles of permanent magnets pairs it contains.A full 3-phase cycling of motor’s electromagnets will cause the rotor to move to the next permanent magnet pole.A full 3-phase cycle is known as electri- cal turn which will be different from the physical (mechanical)tum of the shaft if the motor number of pole pairs is greater than one:increasing the number of pole pairs will cause the motor to rotate more slowly for a given rate of change on the winding’s phases.
Roboteq controllers use the number of motor pole pairs to measure the number of turns a motor has made as well as motor speed.
Determining the Number of Poles
The number of pole pairs on a particular motor is usually found in the motor’s specifica- tion sheet.The number of pole pairs can also be measured by applying a low DC current (around 1A)between any two of the three motor phase wires and then counting the
number of cogs you feel when rotating the motor by hand for a full turn.It can also bede- termined by rotating the motor shaft by hand a full turn.Then take the number of counts reported by the hall counter in the Roborun PC utility,and divide it by 6.
#Pole Pairs =Hall Counts per turn /6
98 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Trapezoidal Switching
The number must be entered using the Number of Pole Pairs menus in the in the Roborun PC utility..
D General
Motor 1
Motor Conhguration
Motor Direction:Direct
FIGURE 8-2.Number of
Number ofPale Pairs2
pole pairs configuration
Or by sending the configuration command:
^BPOL channel nn
See “BPOL”in the command reference section for details.This parameter is not need-
ed 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.The number of pole pairs is a critical configuration in sinu- soidal mode.
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 other- wise a negative speed is measured when the motor is moved in the positive direction.
Trapezoidal Switching
In trapezoidal switching,the controller applies current to two of the 3 motor wires,in turn and in altemating direction.A total of 6 combinations of current flow are possible,result- ing in the rotor getting a changing magnetic field every 60 degrees of electrical rotation.
The controller must therefore know where the rotor is in relation to the electromagnets so that current can be applied to the correct winding at any given point in time.The simplest and most reliable methodis to use three Hall sensors inside the motor.The diagram be- low shows the direction of the current in each of the motor’s windings depending on the state of the 3 hall sensors.
FIGURE 8-3.Hall sensors sequence
Brushless Motor Connections and Operation | lRoboteQ |
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.Additionally,1nF capacitors to ground are present at the controller’s input in order to remove high frequency spikes which may be induced by the switching at the motor wires.
GND
FIGURE 8-4.Hall sensor inputs equivalent circuit
Both 120 degrees and 60 degrees Hall sensors spacing,are supported (see “HPO”in the command reference section).Hall sensors can typically be powered over a wide voltage range.The controller supplies 5V for powering the Hall sensors.
Important Notice
120 degrees Hall sensor spacing is by far the most common.Use 60 degrees only if that is specified in the motor’s documentation or label.
Unless specified otherwise in the datasheet,Hall sensor connection to the controller is
done using Molex Microfit 3.0 connectors.These high quality connectors provide a reliable connection and include a lock tab for secure operation.The connector pin-out is shown in the controller model’s datasheet.
In several controller models,the Hall inputs can be alternatively mapped to digital inputs on the l/O connector.This makes it possible to use the hall sensors for rotor commutation, and SSl sensors for other purposes at the same time (see “MLX”in the command ref-
100 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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.4.
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. On hub motors where the Hall sensor wires are inside the same cable as the motor power wires,separate the two sets of wires the nearest from the motor as possible.
Important Notice
Make sure that the motor sensors have a digital output with the signal either at 0 or at 1.Sensors that output are gradually changing are typically analog signals will cause the motor to run imperfectly.
Hall Sensor Verification
Hall Sensor miswiring is a very common cause when the motor is not running.You can send the following query to verify that the hall sensors are seen by the controller:
?HS [channell
The reply is one or two numbers,depending on the number of channels,of values be- tween 0 and 7 with each bit representing the state of each of the HA,HBand HC sen- sors.
Turn the motor slowly by hand while sending frequent ?HS queries.Verify that all valid combinations appear at one time or the other and that none of the invalid combination ever show.
For 120 degrees spaced sensors,1-2-3-4-5-6 are valid combinations,while 0 and 7 are invalid combinations.For 60 degrees spaced Hall sensors,0-1-3-4-6-7 are valid combina- tions,while 2 and 5 are invalid combinations.
Note that HS query does not work on the first generation HBL and VBL family of products.
Hall Sensor Wiring Order
The order of the Hall sensors and these of the motor connections must match in order for
the motor to spin.Unfortunately,there is no standard naming and ordering convention for
brushless motors.
The Hall Sensor and Motor Phases naming convention used in Roboteq controllers is A, B and C for the sensors and U,V and W for the motor phases.When rotating the motor
shaft clockwise by hand,the controller expects the sensor A to be a mirror of the voltage generated between wires U and W,sensor B between V and U,sensor C between W and
Brushless Motor Connections and Operation | lRoboteQ |
V.See figure 8-5.The sine wave voltage will be inverted when turning the motor in the opposite direction.
FIGURE 8-5.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.To do this,you can either connect the
motor wires permanently and then try different combination of Hall sensor wiring,or you can connect the Hall sensors permanently and try different combinations of motor wiring. There is a total of 6 possible combinations of wiring three sensors on three controller
inputs.There are also 6 possible combinations of wiring three motor wires on three con- troller outputs.Only one of the 6 combinations will work correctly and smoothly while allowing the controller to drive the motor in both directions.
Alternatively,instead of swapping Hall sensors or motor phases,you can use the “Hall
Sensor Map”configuration from the PC Utility menu (see”HSM”in the command refer- ence section).,or from the following console command:
^HSM ch nn
Try each of the 6 available values of HSM (0-5)and retain the one that will make the motor spin in both directions while drawing the same low current.
When testing a combination,apply a low amount of power (5 to 10%).Applying too high power may trigger the stall protection.Once a combination that make the motor spin is found,increase the power level and verify that rotation is smooth,at very slow speed and at high speed and in both directions.
Important Notice
Beware that while only one combination is valid,there may be other combinations that will cause the motor to spin.When the motor spins with the wrong wiring
combination,it will do so very inefficiently.Make sure that the motor spins equally smoothly in both directions.Try all 6 combinations and select the best.
102 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Trapezoidal Switching
Important Notice
It is not possible to change the motor direction by changing the Hall/Phase order.If the motor is not tuning in the desired direction,chose “Inverted”in the “Motor Di- rection”configuration menu in the PC Utility.
Hall Sensor Alignment
It is very important that the hall sensors be precisely aligned vs the electromagnets in- side the motor so that commutation be done exactly at the right time.Bad alignment will cause the motor to run inefficiently.
A first,and generally reliable clue that Hall Sensors are not properly aligned is to run the motor in the forward and then reverse direction while in Open Loop.Verify that for a given command level in open loop,the motor reaches the identical speed and consumes the
same amount of current.
Another simple verification methodis to use an oscilloscope to view the shape of the
phase voltage.While the motor is running,place a probe between ground and any of the motor phases.Verify that the voltage looks like the shape on the figure 8-6.Look for sym- metrical ramps on the left and night.An imbalance in the ramps indicates that the commu- tation happens at the wrong time because of bad Hall Sensor position.
FIGURE 8-6.Ground to Phase voltage waveform on motor with correct and wrong commutations
The most precise evaluation of the Hall Sensors alignment is done using an oscilloscope and the circuit descnbed in figure 8.7.Compare the shape of the Hall Sensor signal to this of the voltage that is generated on the motor phases as the shaft is rotated by an external force.Verify that the zero-crossing of the phase voltages is occurring at exactly the same time as the Hall Sensor transitions,as shown in figure 8-5.
104 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Sinusoidal Commutation
In sinusoidal commutation,all three wires are permanently energized with a sinusoidal current that is 120 degrees apart on each phase as shown in figure 8-9.
FIGURE 8-9.Three phase current creating a rotating magnetic field
At its most basic operation,the controller measures the rotor’s angular position,adds or subtracts 90o depending on the desired rotation direction,and applies the result to the 3-phase PWM generator.
FIGURE 8-10.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.
FIGURE 8-11.Magnetic field perpendicular to rotor magnets
Brushless Motor Connections and Operation | RoboteQ |
The principle benefit of sinusoidal commutation is the quiet,rumble-free,motor operation resulting from the smoothly rotating and always aligned magnetic field.
However,sinusoidal commutation is more complex to configure,calibrate,tune and oper ate.For best and fastest results it is recommended that you follow these step rigorously:
1-Configure the Controller for Sinusoidal Commutation (page 100)
2-Select and Configure a Supported Angle Sensors (page 102)
4-Prepare for Automatic Sensor Setup (page 107)
5-Run the Automatic Sensor Setup (page 110)
6-Set,Test and Troubleshoot FOC-Field Oriented Control
Configuring the Controller for Sinusoidal Commutation
Sinusoidal mode is selected via the Switching Mode configuration menu in the Roborun PC utility
·Switching Mode: Snusoidal V
Reference Seek Power (A):5
D n Hall Counter
Sinusoidal Setings
FIGURE 8-12.Sinusoidal configuration
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 per-
manent magnet pole.A full 3-phase cycle is known as electrical turn which will be differ- ent from the physical (mechanical)turn of the shaft if the motor number of pole pairs is
greater than one.The figure below show the relationship between mechanical degree and electrical degree in the case of a two pole pairs motor.
106 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Mechanical Degrees
FIGURE 8-13.Mechanical vs electrical degrees
See “Determining the Number of Poles”on page 92 for details on how to determine the number of pole pairs and configuring the controllers.
The number must be entered using the Number of Pole Pairs menus in the in the Roborun PC utility.
D General
4 Motor 1
当 Motor Coniguratfion
Motor Direction.Direct
Number cf Pole Pairs;2
FIGURE 8-14.Number of pole pairs configuration
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 other- wise a negative speed is measured when the motor is moved in the positive direction.
Configuring Number of Sensor Poles
Single pole absolute sensors like Resolvers,sin/cos and SSl encoders typically return an angular value that is equal to the mechanical angle.The controller then converts the mea- suredangle into the electrical angle for its internal operation,using the formula:
Electrical Angle =(Sensor Angle*Number of Poles)modulo 360
108 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Sinusoidal Settings
SinCos/SSi Sensor Poles:1
Sinusoidal Angle Sensor: Encoder
√
AngleTiming Advance: QEncoder
Hall
Angle Zero Adjust Q Hall +Encoder
D FOC Parameters
D Hall Sensor Angle Table
SPI/ SSI Sensor
[Sin/Cos Sensor
D Sine/Cosine Calibration Values
FIGURE 8-16.Encoder Sinusoidal configuration
Or by sending the configuration command:
^BFBK ch mode
Where mode:
0:Encoder
1:Hall
2:Hall+Encoder
3:SSl sensor
4:Sin/Cos Sensor
5:Resolver
Each mode requires a various amount of additional setup and/or calibration as descnibed in the following sections.
Incremental Encoder-Only
A quadrature encoder can be used to determine the rotor position.Enter the Encoder PPR using the PC Utility.
nr Encoders
Anr Encoder 1
·Pulses /Rev: 1000
FIGURE 8-17.Encoder PPR configuration
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×4 =512 Pulse per revolution.
This will result in 2048 counts for a full turn of the rotor,and therefore the electrical angle to be measured with 360/2048*4=0.7 degrees,resulting in a very smooth changing sinusoidal drive to the motor.A significantly lower resolution encoder will results in a step- ping sinusoid.A higher resolution encoder will not improve the waveform.
Brushless Motor | Connections and Operation | RoboteQ |
Since encoders do not give an absolute position,a reference search sequence is per- | ||
formed automatically by the controller at every power up or when the controller switches | ||
from a different mode to sinusoidal mode with encoder feedback | ||
The search can also be forced manually by pressing the Sensor Setup button on the Diag- | ||
nostic tab of the PC utility,or by sending the following maintenance command from the | ||
console or the serial/USB port | ||
%CLMOD 2 (for channel 1)or | ||
%CLMOD 3 (for channel 2). | ||
Before trusting that reference search will be successful at every power up,try repeated- | ||
ly to send the sensor tuning (%CLMOD)command under rea-life load conditions.After | ||
reference search is completed,verify that the motor turns with the same efficiency in the | ||
forward and reverse direction. | ||
Proper operation of the encoder can be verified by viewing the counter with the query: | ||
?C [channel] | ||
And verifying that it increments by the Encoder’s CPR (counts per revolution,or PPR*4) | ||
when making a full turn,and returns to its original value after a full turn in the reverse di- | ||
rection. | ||
Hall-Only | ||
In this mode,the Hall sensors are used to determine the angular position of the rotor. | ||
Since transitions of the Hall pattern occur at every 60 degrees only,the controller will | ||
estimate the current angle by interpolating in between two transition based on the cur | ||
rent motor speed.This technique works well as long as speed is stable and changes are | ||
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 Trape- | ||
zoidal mode,this mode will result is quieter motor operation because of the sinusoidal | ||
commutation. | ||
Proper operation of the Hall sensors can be verified by checking that the hall counter | ||
changes by6*the number of poles over a full mechanical turn in the PC Utility or by us- | ||
ing the query: | ||
?CB[channel] | ||
Alternatively,the following query can be run to view the state of the logic level of each | ||
Hall inputs. | ||
?HS[channel] | ||
The Hall-only mode requires only a one time tuning during which their actual angular po- | ||
sition of each Hall sensor will be detected and stored.See “Automatic Sensor Setup”on | ||
page 107. |
110 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Hall +Encoder
If the motor is fitted with Hall sensors and an Incremental Encoder,the controller can
be configured to use both sensors together.The Encoder’s PPR must be configured as
described above.In this mode,the controller’s operation is identical to when an Encoder alone is used for feedback,except that there is no need for the reference search se-
quence described above.When first energized,the motor will operate using the Hall sen- sor until the first change to the Hall pattern is detected.This will set the angle reference for the encoder.For this mode,it is critical that both the number of Encoder PPRs and the motor number of pole pairs be entered correctly.Both counters must count in the same direction.
The Hall Encoder mode requires only a one time tuning during which their actual angular position of each Hall sensor will be detected and stored.See “Automatic Sensor Setup” on page 107.
See above and below how to verify that the Encoder and Hall sensors are operating cor rectly.
Sin/Cos Analog
Some controller models can be interfaced to absolute position sensors with Sine/Cosine output.These sensors are usually made using Hall technology and are built into the motor. They provide two analog voltage output that are usually 90 degrees apart.The rotor angle is determined by measuring the voltage ratio between the two signals.The controller can compensate for differences in amplitudes between the two signals.
There are sensors whose signals are not 90 degrees apart.The controller can be con- figured for use with sensors that have practically any phase shift.This is done using the PSA-Phase Shift Angle configuration parameter.Note that angles are in 0-511 degrees notation.
The proper operation of the Sin/Cos sensor can be verified by plotting in realtime the volt- ages of the sin and cos signals inside the Diagnostic tab of the PC utility
FIGURE 8-18.Diagnostic Tab with Auto Setup
Brushless Motor Connections and Operation | RoboteQ | |
Or using the following queries.
?ASl [channel] Sin/cos sensors require a one-time setup and calibration.See “Automatic Sensor Setup” on page 107. Important Warning The Tuning Fault LED will be on in the Roborun screen and the motor will NOT start if the Sin/Cos has not been setup/calibrated. Important Notice Electrical noise on the sensor output will cause wrong angle readings.Shield the wires and keep them as far as possible from the motor wires.If noise persists,add a 10nF to 100nF ceramic capacitor between the input pin and ground pin on the con- troller’s connector Synchro Resolver Synchro Resolvers are a form of Sine/Cosine sensor based on transformer technology.It is composed of a fixed primary coil,and two secondary coils positioned at 90o from each other and that rotate with the rotor.A fixed frequency excitation voltage is fed in the pn- mary.As the secondary coils turn,and take turn being parallel with the fixed primary,the voltage amplitude induced in each varies as shown in the figure below. |
||
以以从
Rotatingl Secandary 1 o- Fixed Primary O— Rotating□ Secondary 2 |
Prima
W A |
|
FIGURE 8-19.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.Resolvers require one time calibrations similar to these for the sin/cos sensors and can be tested the same way. Important Warning The Tuning Fault LED will be On in the Roborun Screen and the motor will NOT start if the Resolver has not been setup/calibrated. |
112 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Digital Absolute Encoder (SSl)Feedback
Some advanced motors,incorporate an absolute position sensor with a high speed serial interface based on the SSl protocol.
Controllers support SSl encoders with resolution from 12 to 15bits.SSl encoders give the angle’s absolute position.Nevertheless,a calibration of the zero-angle reference must be done once in order to capture the mechanical offset of the sensor vs the actual 0 degrees position.
The SSI’s sensor resolution is set by entering 2 to the power of the number of bits (i.e. 4096,8192,…)in the SPI/SSI Sensor Resolution field in the PC utility..
SSI Sensors
nr
SSI Sensor1
Use:No Action
SPNSSI Sensor Resclution:[4096
FIGURE 8-20.SPI/SSI Sensor Resolution configuration
Or by sending the configuration command:
^SCPR channel nn
After enabling the Sinusoidal Mode and SSI Angle Feedback,verify first that the SSI
Counter displays a stable number that is different from zero.This will indicate that data is 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 SSl 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 us- ing the following queries respectively:
?CSS Ichannel]
?SS [channel]
Typically,SPl encoders are single pole sensors,meaning that they output 0 to their maxi- mum value over a full mechanical turn.
Important Notice
The SSl sensor is used for commutation only.It cannot be used for position mode. Use single tun sensor only.Multi-turn sensors are not supported.
Brushless Motor Connections and Operation | RoboteQ |
Preparation for Automatic Sensor Setup
The rotor’s angle sensor is a critical element for good sinusoidal commutation.Wrong or unstable angle reading can cause excessive current consumption,vibration,or even dam- age.The sensor must be correctly and firmly attached to the motor so that it never slips during operation.The table below shows the setup and calibration steps required for each sensor type.
TABLE 8-1.Setup and calibration steps
Setup | Encoder | Hall | Hall+ Encoder | SSI | Sin/ Cos | Resolver |
Min/Max Range Calibration | No | No | No | No | Yes | Yes |
Zero reference search | Yes(1) | No | No | Yes | Yes | Yes |
Hall Position Mapping | No | Yes(2 | Yes(2) | No | No | No |
Linearity Correction Map | No(3) | No | No(3) | Yes(3) | Yes | Yes |
SensorWinding Order | Yes | Yes | Yes | Yes | Yes | Yes |
Note 1:Zero reference search must be performed at every powerup for Encoder mode
Note 2:Hall position mapping is optional but recommended for best results
Note 3:Linearity Correction is optional for digital encoders
Sensor setup and calibration is generally a one-time procedure.Sensor information is stored in the controller’s configuration and calibration flash.
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 tum.For best accu- racy the rotor is driven for a full turn in the forward direction,and another full turn in the reverse direction.
For the reference search to work,the current that is injected into the motor must be
strong enough to pull the rotor in perfect alignment.The motor must not be loaded during this sequence.For best results,the current should be set equal to the motor’s nominal amps rating.
Enter the value in Amps s in the “Reference Seek Power”configuration menu in the Rob- orun PC utility.
·Switching Mode:Sinusoidal
·Relerence Seek Power (A):10.0
FIGURE 8-21.Reference Seek Power configuration
Or by sending the configuration command:
^SREF channel amps (in amps *10)
114 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Important Warning
Do not select an amperage value that is above the maximum nominal value pub- lished in the motor’s datasheet.
Important Warning
Calibration data is specific to a motor+sensor set.Changing the motor and/or sen– sor requires recalibration.
Sensor Min/Max Range
Analog sensors like Sin/Cos and Resolvers have voltage outputswings that can vary from one sensor to another.During Automatic Setup,the motor is forced into rotation and
the min and max voltages for each sensor output signal is captured over a full tum of the sensor.These values then determine offsets and multiplier that are saved in calibration memory and subsequently used to scale the signals as necessary to produce a correct angle measurement.
The min/max range calibration is a one time operation for a given sensor.
Zero Reference Search for Absolute Sensors
All absolute sensors (Sin/Cos,Resolver,SSl)cannot be trusted to be mounted so that
their 0 degree reference position exactly matches this of the motor’s windings.During
Zero Reference search,the motor is driven over known angular positions.The sensor mea- surement is compared with the expected rotor position and an Angle Adjustment vale is computed and stored in configuration memory.
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 2P 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.See also “Incre- mental Encoder-Only”on page 103
Hall Sensors Position Mapping
Hall sensors are often not precisely located at the 0,60,120,180,.…positions.While
some imprecision has little effect in trapezoidal mode,misalignment of even a few de-
grees will have disruptive effect when operating in sinusoidal mode.When used with Hall sensors,the automatic setup procedure captures and maps the angle at which each of the six hall transitions occurs within an electrical turn,regardless of their wiring order.
Linearity Correction Map
Sensor are not alway totally linear.This causes the sensed angle to be measured with
periodic errors along the sensor travel.During the automatic setup process,the controller maps the values read from the sensor for every mechanical degree over a full turn.It then build a correction table which is applied in real-time as the motor spins.
Brushless Motor Connections and Operation | RoboteQ |
FIGURE 8-22.Sensor non-linearity correction
Windings and Sensor Order.
The wiring order of the U,V,W motor cable,the A,B,C Hall Sensors inputs,the A,B
Encoder inputs and/or the Sin,Cos signals are all related to each other.Swapping any of the motor wires will make the motor turn in the opposite direction.Swapping any sensor cables affects the angle and counting direction.
The Automatic Setup will detect the wiring order of the motor and sensors,and set the
corresponding bits in the SWD configuration register in order to virtually swap the connec- tions so that all are moving/sensing in the same direction.
Running the Automatic Sensor Setup
The V2.x firmware has a new feature for Automatic Setup and Calibration of all the sup- ported 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.Map the angular position of the Hall sensors and store the values in the HSAT Hall Sensor Angle configuration table
d.Find themin,max and zero levels of the analog signals in case of sin-cos and
resolver for normalization of sine and cosine.The values are stored in the ZSMC
calibration register
After configuring the controller for sinusoidal mode (See page 100)and after selecting and configuring the Angle Sensor (See page 102),click on the Diagnostic tab of the Roborun+ PC Utility.
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 2P radians.
116 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteG Sinusoidal Commutation
RM
Motor Control Uulty
F..
1 x
* ** *
F FaK
U
H*
=
w?
Sm aurCn iiuai. i
* 4
!
旋 2
… law
二 e ; wtwdusan 印 图
Jecawt sy Jtuws tihb aw zarn.x
FIGURE 8-23.Diagnostic Tab with Auto Setup
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 com- mands %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).Make sure that the motor is not loaded. Adjust the Reference Search Current and try again.See “Reference Search Power”on
page 108
After setup is finished,depending on the sensor type,the Utility will print the following captured parameters on the console tab indicating that the process is complete:
TABLE 8-2.Motor/Sensor Setup parameters
Sensor | Captured Values | Description |
All types | BADJ
SWD |
Zero Reference
Winding/Sensor Order |
Hall,Hall+Encoder | HSAT | Hall Sensor Map |
Sin/Cos,Resolver | ZSMC | Min/Max/Zero |
Brushless Motor Connections and Operation | lRoboteQ |
Perform the Setup a few times to verify that it produces the same values.If the Zero Ref- erence in particular varies significantly,increase the Adjust the Reference Search Current and try again.See “Reference Search Power”on page 108.
The reference search will settle on a given electrical angle location.On a two pole motor, this electrical angle value exists in 2 mechanical locations for that motor.After performing a first search,rotate the motor shaft and repeat the search.On a perfectly constructed
motor,the search will settle at the same electrical angle on any of the other poles.In
practice,it is expected that the values will be off by one or two degrees from one pole to another.
If the value is consistent from one measurement to another,and difference is larger than a few degrees,this means the poles are not placed with precision in the motor and the motor will not run efficiently.If the difference is very large (20 degrees or more),it is likely that the angle sensor is not working correctly or that the number of poles of the motor
and/or sensor are not configured correctly.
Real-Time Charting
The Diagnostic tab includes a Fast-Updating that can be used to monitor useful infor mation during the Setup phase.For instance for observing that the Sin and Cos inputs see a Sinusoidal shaped signal as the motor turns,or that the captured angle is chang- ing steadily without noise or glitches.The chart is also useful for testing the motor im- mediately after Setup.The table below shows the parameters that can be monitored in the chart.
TABLE 8-3.Diagnostics monitor values
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 torque) |
Hall Status | State of all 3 Hall into a single O-7 value |
Hall A | State of Hall A input |
Hall B | State of Hall B input |
Hall C | State of Hall C input |
FOC Angle Correction | Correction determined and applied by FOC |
Battery Volts | Battery Volts |
Power Per Phase U | PWM on Phase U |
Power Per Phase V | PWM on Phase V |
Power Per Phase W | PWM on Phase W |
Sense U | Sensed voltage level at output U |
Sense V | Sensed voltage level at output V |
118 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
Parameter | Description |
Sense W | Sensed voltage level at output W |
BEMF U | BEMF voltage on floating phase U(sesorless-only) |
BEMFV | BEMF voltage on floating phase V (sesorless-only) |
BEMF W | BEMF voltage on floating phase W(sesorless-only) |
BEMF Integrator | BEMF Integrator (sesorless-only |
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 2P radians.
Sensor Linearity Correction
For Sin/Cos,Resolver and SSl encoders,it is possible to automatically check and even- tually apply automatic correction to the sensor linearity.From the diagnosticstab,select channel 1 or 2 and press the “Sensor Linearity Correction”button.The motor will spin for a few electrical revolutions and then stop.
RR
RoboteQ
=a
:=
Motor Control Ufiity
=
w20=1
S
Crafed SWR
w
□6a chs
**
w *
33 1日
露!第
■渊
层
Z
1**4?4
wc
一
端
FIGURE 8-24.Sensor Linearity Capture and Correction
Brushless Motor Connections and Operation
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.If the graphs is noisy,has glitches or looks otherwise unusual,then
press close an do the Sensor Linearity procedure again.If the performance is not better then the correction can be cleared by pressing the “Reset Linearity Correction”button.
Basic Motor Check
After the Automatic Setup completed successfully,the motor is ready to run.Use the
sliders on the Diagnostics Tab or on the Run Tab to apply power.Always run first in open loop,and preferably with no or light load.Apply first a small command (100-200)and verify that the motor spins without noise or rumble while using low current.Run the motor in the opposite direction and verify that for the same command value,it reaches the same speed and draws the same current.If the motor runs smoothly and with symmetrical per- formance,repeat the test with higher command value.
If the performance is different in the forward vs reverse direction,the zero reference may be wrong.Run the setup again.Noise or rumble typically points to problems with the sen- Sor.
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 curent.The resulting magnetic field is then no longer op- timally perpendicular to the rotor’s permanent magnets.
FIGURE 8-25.Perpendicular and non-perpendicular fields
As can be seen in figure 8-25,when the magnetic field is at an angle other than exactly perpendicular to the rotor’s magnets,the rotor is pulled by a force that can bedecom- posed in two forces:
Lateral force causing torque,and therefore rotation.This force results from the Quadra- ture current lq,which is also called Torque current.
Parallel force that pulls the rotor outwards,creating no motion.This force results from the Direct Current ld,which is also called Flux current.
Field Oriented Control is a technique that measures the useful Torque current and wasted Flux current component of the motor current.It then automatically adjust the power (out-
120 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Desired Torque Current
Desired Flux Current
Sinusoidal Commutation
put voltage amplitude)and phase angle applied to each motor phase in order to eliminate the wasted Flux current.
ld
PI Regulator
Inverse
Park
lq
PI Regulator
iq
Clarke
id
Angle
Capture
Sensor
MOSFET Bridges
svem
中Va
Motor
ig
Park
ib
u
Vp
Va
8
la
Vg
0
FIGURE 8-26.FOC operation
Field Oriented Control is available on most models of Roboteq motor controllers.It uses a classical implementation as described in the figure 8-26.The current in the motor phase is captured,along with the rotor’s angle.From this are computed the useful lq and wasteful ld.Two Proportiona-Integral (Pl)regulators then work in parallel to control the output volt- age amplitude and phase so that the desired Torque(lq)and Flux (ld)currents are met.The desired Flux current is typically set to 0 for brushless dc motors,and so the regulator will work to totally eliminate the Flux current.The output of the Pl d-q axis current controllers yield the d-q axis reference voltage commands (Vd,Vq)applied to the motor through the Space Vector Pulse Width Modulation (SVPWM)technique.
Both Pl regulator have usersettable gains.They can be changed from the menus in the RoborunPlus utility.
Closed Loop Torque
Flux Proportional Gain:0.003
Flux Integral Gain:0.3
Torque Proportional Gain:00
Torque lntegral Gain: QQ
FIGURE 8-27.Current PI Gains
Or by sending the configuration command for single Channel Controllers:
^KPF 1 nn =Proportional Gain for Channel 1 Flux
^KPF 2nn =Proportional Gain for Channel 1 Torque
^KIF 1 nn =Integral Gain for Channel 1 Flux
^KIF 2 nn =Integral Gain for Channel 1 Torque
Brushless Motor Connections and Operation | lRoboteQ |
Or by sending the configuration command for dual Channel Controllers:
^KPF 1 nn =Proportional Gain for Channel 1 Flux ^KPF 2 nn =Proportional Gain for Channel 2 Flux ^KPF 3 nn =Proportional Gain for Channel 1 Torque ^KPF 4 nn =Proportional Gain for Channel 2 Torque ^KIF 1 nn =Integral Gain for Channel 1 Flux ^KIF 2 nn =Integral Gain for Channel 2 Flux ^KIF 3 nn =Integral Gain for Channel 1 Torque ^KIF 4 nn =Integral Gain for Channel 2 Torque Where nn =Gain*1000000,e.g.12500000 =12.5 (on version 2.x of firmware) FOC Gains Determination &Tuning Good PI gains are important for the controller to quickly reach and stabilize the desired ld and lq current.A very good approximation of the gain values can be calculated from the motor’s Resistance and Inductance using the formulas: Flux Proportional gain =Motor Phase Inductance(Henry)”Bandwidth Flux Integral gain =Motor Phase Resistance(Ohm)”Bandwidth Bandwidth is in rad/sec and according to Nyquist criteria the current loop bandwidth can- not 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. Usually even smaller bandwidth can be as effective as the 50Hz.It is better to start with the smaller possible gains and then tune according to the behavior of the motor.Test in open loop with caution. Example calculation for 50Hz bandwith,11mOhm Phase resistance and 90uH Phase In- ductance Ki=0.011*314=3.45 Kp=0,00009*314 =0.028 The FOC Proportional and Integral gains for brushless dc motors could be automatically calculated from “Motor characterization”tool at Roborun+(see Roborun+Utility User Manual for more details). |
122 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sinusoidal Commutation
FOC Testing and Troubleshooting
Verify that FOC is operating correctly by monitoring the following values with the PC Utility:
Channel
Value Min Max Cr
DC/Peak Anps 1
Motoar Ames 1
√
FOC Rux Ames 1
FOC Torque Amps 1
FOC Angle Comection 1
FIGURE 8-27.FOC performance monitoring
Optimal performance is achieved when:
· FOC Quadrature Amps are close to 0.
· Motor Amps and FOC Torque Amps values are close.
· FOC Angle Correction is stable for stable motor Power (output voltage amplitude).
Check also when changing motor power how fast FOC Flux Amps is corrected to zero. Tune FOC Pl as necessary.
Unstable FOC correction is generally a sign of imperfections of the angle sensing (noise, non-linearity,bad calibration,…).Bad angle sensing causes the wrong values of ld and lq to be measured,which the FOC algorithm falsely attempts to correct,worsening the cur- rent stability.
Field Weakening
Field weakening is a technique that is used to achieve faster motor rotation speed.This
is done by having some Flux (ld)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.This can be done from the console,the serial port,or from a Mi- croBasic script with the command:
!GID ch Amps*10
The amount of Flux current should be different at low and high speed,typically starting with zero,and increasing after a given RPM threshold is reached.Below is an example of a MicroBasic script that changes the Flux set point according to such a rule
top:
Speed =abs(getvalue(_S,1))’Read motor speed from Encoders
‘ch
peedif -50
00`l00er 1M RPM above 5000
else
FluxSetpoint =0 ‘No Flux current below 5000 RPM
end if
124 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Interior Permanent Magnet Motor Operation
FIGURE 8-30.IPM motor required lg,Ild with produced electromagnetic torque.
In order to effectively operate the IPM motors at MTPA curve,the following data required to be set during controller configuration from Roborun+utility:
D-axis Stator Inductance (Ld-mH):0.0
Q-axis Stator Inductance (Lq-mH):Q.0
Voltage Constant (Vk-V/kRPM):0.0
Or by sending the configuration command for Single Channel Controllers:
NLD cc nn
where cc =motor channel and nn =motor d-axis inductance (H)*1000000
ALO cc nn
where cc =motor channel and nn =motor q-axis inductance (H)*1000000
AVK cc nn
where cc =motor channel and nn =peak value of motor induced phase to phase voltage amplitude (produced back-emf)per krpm speed *1000
Above values are necessary in order to calculate the optimal ld,lq current commands
needed to be applied to FOC motor operation.Typically,these values are included in each IPM motor technical datasheet.Alternatively,the d-q axis motor inductances can be cal- culated from “Motor characterization”tool at Roborun+utility (see Roborun+Utility User Manual for more details).
Furthermore,the switching mode should be set to”Sinusoidal”and the FOC gains should be inserted according to the method described in “FOC Gains Determination &Tuning”
chapter at Section 8,considering as phase inductance the d-axis inductance Ld for flux
proportional gain and q-axis inductance Lq for torque proportional gain,respectively.It is noted that the IPM motor operation algorithm applies only at close loop operating modes, including FOC torque and flux gains.In all other cases,IPM motor can operate as a brush- less dc motor.
126 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Sensorless Trapezoidal Commutation
The figure above shows the state of the transistorswitches during one of the six commu- tations phases.The current flows from the battery through the U winding,then through the V winding to ground.The W winding is floating.Since no current is flowing through W, the W terminal has the voltage potential of the BEMF that is induced in the W winding, added to the voltage at the motor’s center point.The center point motor is exactly half the V+voltage,assuming that all windings have the same resistance.
FIGURE 8-32.Sixephases Trapezoidal commutation,BEMF and Zero Crossing
The figure above shows the voltage at each of the windings during the 6 commutation phases.Notice how the voltage of the floating phase ramps between O and V+,and be- tween V+and 0,as the rotor moves 60 degrees.The point in the ramp that is exactly at half the supply voltage is called Zero Crossing.Commutation must occur 30 degrees of rotation later.Roboteq controllers use Back EMF Integration technique in order to deter mine that precise moment.
Phase Voltage
Back EMF Integrator
FIGURE 8-33.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.Sensorless can therefore NOT be used if torque is required at stall or
128 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Operating Brushless Motors
After the setup is complete,the motor will stop,BECC and SVT values will be printed on the console and saved in the controller’s configurations flash memory.
In case BECC is reported as a negative number,the calibration will be treated as a failure, and the error message “BEMF Integration Limit Detection FAILED!”will be displayed in the console
If the calibration was successful,message “BEMF integration limit detection OK”will be printed in the console and the values of BECC and SVT will be displayed too,then the motor is ready to use.Send motor commands in open loop and verify that it runs in both direction with reliability startup.
Further verification is possible by using an oscilloscope connected to any of the motor phases.Verify that the signal is symmetrical as shown in figure 8-5.If it is imbalanced, this means that the Back EMF Integrator Limit (SVT)needs further adjustment.You can change the value manually until the left and right ramps look symmetrical.
Important Warning
Beware that the motor will spin at maximum speed during calibration/auto-tuning. Make sure it is safe to do so before initiating.Be ready to cut to power instantly at any time during the tuning process.
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.
Position modes,and the Speed Position modes cannot be used reliably with sensorless motors.
Operating Brushless Motors
This section covers operating features that are common to Brushless Motor control,re- gardless of the commutation mode.
Once configured and tuned,a brushless motor can be operated exactly like a DC motor and all other sections in this manual are applicable.In addition,the Hall sensors or encod- ers,provide extra information about the motor’s state compared to DC motors.This infor mation enables the additional features discussed below.
Stall Detection
The rotor sensors and the encoders can be used to detect whether the motor is spinning or not.The controller includes a safety feature that will stop the motor power if no rotation is detected while a given amount of power is applied for a certain time.Three combina- tions of power and time are available:
130 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Operating Brushless Motors
Speed Measurement using the angle feedback Sensors
Information from Hall,SPI/SSI,sin/cos sensors,(and even Sensorless)is used by the con- troller 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 mo- tor be well constructed and that the placement between sensors be accurate.On preci- sion motors,this results in a stable speed being reported.On less elaborate motors,such as low-cost hub motors,the reported speed may oscillate by a few percent.
Speed measurement is very precise with digital absolute sensors (SPl).Sin/Cos sensors operating without noise also give a very precise value.
The motor’s number of poles must be entered as a controller parameter in order to pro- duce an accurate RPM value.See discussion above.The speed information can then be used as feedback in a closed loop system.Motor with a more precise Hall sensor posir- tioning will work better in such a configuration than less precise motors.
If the reported speed is negative when the slider is moved in the positive direction,you can correct this by putting a negative number of poles in the motor configuration.This will be necessary in order to operate the motor in closed loop speed mode using hall sensor speed capture.
Distance Measurement using Hall,SSl or other Sensors
When Hall sensors are used,the controller automatically detects the direction of rotation, keeps track of the number of Hall sensor transition and updates a 32-bit up/down counter. The number of counts per revolution is computed as follows:
Counts per Revolution =Number of Poles*6
With Resolver or Sin/Cos sensors,the controller accumulates the sensor angle data to
recreate an accurate and high resolution 32-bit counter.For these sensors,the number of counts per revolution is:
Counts per Revolution =Number of Sensor Poles*512
With SSl sensor,the controller accumulates the SSl data difference to recreate an ac- curate and high resolution 32-bit counter.For these sensors,the number of counts per revolution is:
Counts per Revolution =Number of Sensor Poles *SSl Sensor CPR
The counter information can then be read via the Serial/USB port,CAN bus,or can be
used from a MicroBasic script.The counter can also be used to operate the brushless mo- tor in a Closed Loop Position mode,within some limits
Brushless Motor Connections and Operation
RoboteQ
132 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Introduction to AC Induction Motors
SECTION 9
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”They work on the principle of induction where a rotating electro-magnetic field it created by applying a three-phase current at the stators electromagnets.This in turn induces a current inside the rotor’s conductors,which in turns produces rotor’s magnetic field that tries to follow sta- tor’s magnetic field,pulling the rotor into rotation.
FIGURE 9-1.AC-Induction Motor
Benefits of AC Induction Motors are:
·Induction motors are simple and rugged in construction.They are more robust and can operate in any environmental condition.
·Induction motors are cheaper in cost due to simple rotor construction,absence of brush- es,commutators,and slip rings
134 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Selecting and Connecting the Encoder
Connecting the Motor
An AC Induction motors have just 3 power wires which must be connected to the control- ler’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.This is done using an incremental en- coder.Most AC induction motors come with a built-in quadrature encoder.These encoders typically have a relatively low number of counts.32 or 64 Pulses Per Revolution (PPR)rota- tion are typical values.A low count encoder results in low frequency pulses.
When using encoders up to 128 Pulses Per Revolution,the controller evaluates the rota- tion speed by measuring the time between encoder pulses.This results in measurement with a resolution of 0.1Hz even at full speed.
When using encoders with higher PPR,speed is measured by counting the number of encoder signal transitions over a 10ms period.Prefer therefore a high-count encoder of around 1000 PPR for better speed measurement resolution.
Unless otherwise noted in the product’s datasheet,all Roboteq’s AC Induction Motor
Controllers have to pull up resistors that can connect to open collector encoder outputs. Controllers also have capacitors to help filter out any electrical noises that contribute to fake encoder readings.
Controller I/O Connector
5VOut
Encoder
4.7K
A
B
10nF
GND
FIGURE 9-3.Encoder connection
Testing the Encoder
To test the encoder,use the PC utility to enable the encoder and set its number of Pulses Per Revolution (PPR).Go to the Utility’s Run tab,enable the Encoder Count in the chart. Make a full turn of the motor shaft by hand.Verify that the counter has changed by the
number of PPR*4.
Prior to enabling Constant Slip or FOC Modes,operate the motor in open loop Volts per
Hertz mode with slip control disabled.To disable slip control,set the encoder as No Action in the configuration menu.
136 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Closed Loop Speed Mode with Constant Slip Control
Watt | 3500 |
V | 48Bat |
Amps | 100 |
RPM | 1450 |
Nm | 23 |
50Hz V fase 3 x
Encoder 64 Pulses
FIGURE 9-5.ACIM label
For this motor,the VPH can be determined by dividing the 48V phase to phase motor
voltage amplitude by the 50Hz frequency.In this case 0.96 Volts per Hertz.It is worth
mentioning that the rated voltage in the calculated VPH is related to the amplitude of the phase to phase voltage (not RMS value).Therefore,if the motor manufacturer provides the nominal stator voltage in RMS,it should be transformed to peak voltage value.
You can validate that the rated VPH is applied if the motor at no load reaches the rated speed when applying maximum motor command (Power =1000).
Note that this value is for the optimal torque as rated on the label.If the load is a lot light- er,the VpH will be too high and result in excessive current consumption.If the load is a
lot heavier,the VpH will be too low and the motor will not be able to drive it.The VpH will therefore need to be different from this computed based on actual load conditions.Always first monitor the motor consumption at no load.Adjust the VpH to a lower value if the no load current appears too high.
Maintaining Slip within Safe Range
Open Loop,or Scalar,the mode does not require encoders for its operation.If the load is known to always be within the motor’s max torque,the motor can be trusted to always be able to drive it.In this case,an encoder does not need to be connected.If an encoder is connected -to measure and report speed,for example -then it must be configured as “No Action”in the PC Utility.
For added safety,however,an encoder can be installed and enabled to measure the ro- tor’s speed,and therefore the slip,in real-time.When the encoder is enabled and config- ured as “Feedback”the controller will lower the voltage and frequency if the slip exceeds twice the value stored in the Optimal Slip configuration.
Prior to enabling the encoder as Feedback,verify that the encoder count direction has the same polarity as the motor command.
Closed Loop Speed Mode with Constant Slip Control
In this mode,the controller will automatically adjust the voltage and frequency in order to reach and maintain the desired speed,even as the load is changing,while operating with- in the optimal slip range.
138 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Field Oriented Control (FOC)mode Operation
The challenge in induction motors is that the rotor flux’s absolute position cannot be mea- sured physically.It is determined mathematically using known speed,voltage and current, and a model representation of the motor’s main parameters shown in the figure below.
LIs
Stator
Leakage
Inductance
XO
Lm
Mutual
Inductance
LIr
Rotor
Leakage Inductance
XX
Rs
Stator
Resistance
W
Rr
Rotor
Resistance
FIGURE 9-7.Electrical representation of ACIM
These parameters include per phase rotor resistance ‘Rr’,rotor leakage inductance ‘Lir’,
mutual inductance ‘Lm’and rotor leakage inductance ‘Lir’.Usually,motor manufacturer will provide you an equivalent circuit of the induction motor that contains Rr,Rs,Lm,LIr,LIs
in FOC,therefore,rotor flux and motor torque can be individually controlled regardless
of load and speed.FOC offers better dynamic performance,accurate curent control and ensures maximum efficiency,unlike traditional scalar control methods such as Open Loop VpHand Constant Slip Control.
Under FOC operation,AC induction motors can be run in either FOC torque mode or FOC speed mode.FOC torque mode allows users to command a torque to a motor in terms of Amps.While FOC speed will regulate the speed at the command/desired value.
Note that,with a bad tuning of FOC (flux and torque)PID,the motor Amps can be higher than the Amps Limit.If that happened,try use lower bandwidth for FOC tuning (see in
Chapter FOC Gains Determination &Tuning).
Configuring FOCTorque Mode
To configure FOC mode,first set the controller in Open Loop (Volts per Hertz)mode as
described in one of the previous sections.Verify that the motor is spinning in the desired direction and that encoder is working and is counting with the correct polarity.See Testing the Encoder section above.
Once the encoder is verified to work and the motor spins in the open loop,follow these steps.Using the Roborun PC utility:
·Enter the motor parameters under the section “Motor Parameters”in RoboRun
configuration.Usually,motor manufacturer will provide you an equivalent circuit of the induction motor that contains Rr,Rs,Lm,LIr,Lls.
·Set the Flux Amps.In order to find the optimal flux amps,run the motor in Volts per
Hertz (VpH)mode with small/no load using the motor’s rated VpH ratio.Then watch the flux amps in the PC utility.Enter this value in the configuration.This flux amps can be
140 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Induction Motor Parameters Calculation
to set motor RPM to 800 on channel 1 when MaxSpeed is set to 1000 RPM.Correspond- ing if MaxSpeed is set to 2000 RPM,any value on the slider will give 2 times RPM.
Speed can be also set as an absolute RPM value using the S command from Serial,USB, CAN or Microbasic.
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.
· When in”FOC Torque Mode”command some torque to the motor and cause the motor to spin to the speed limit.Some low frequency ripple will be noticed in the speed which should be minimized by increasing PID gains.Increase the PID gains to a point where no nipple is seen.
·If in“FOC Speed Mode”tune the speed PID gains by looking at the response time of the motor.And then move to case 1)to check the ripple in the speed.
Induction Motor Parameters Calculation
The motor parameters of Induction Motors are crucial when the Field Oriented Control
Close loop torque/speed control is needed.More specifically,the rotor induced flux abso- lute position is determined mathematically using known speed,voltage and current,and a model representation of the motor’s main parameters shown in the figure below.
FIGURE 9-8.Electrical Representation of ACIM for motor characteristics calculation
These parameters include per phase rotor resistance ‘R;,rotor leakage inductance ‘L, mutual inductance ‘L and rotor leakage inductance ‘L,’core losses R,are neglected).
Furthermore,in order to set the FOC(Flux and Torque)PID gains,the Stator Resistance (R)and Stator Inductance(L)needed,according to the method as described in chapter “FOC Gains Tuning”at Section 8.The most common ways,to manually estimate induc- tion motor parameters through the controller,are to test induction motor under no-load and locked rotor conditions.
No load testing
The no-load test,like the open circuit test on a transformer,gives information about ex- citing flux l current,the magnetizing inductance L,and rotational losses.The test is per-
AC-induction-Motor-Operation | lRoboteQ | |
zero(s≈0).Therefore,the motor equivalent circuit is expressed as follows:
formed by applying balanced rated voltage on the stator windings at the rated frequency. The small power provided to the motor is due to core losses,friction and winding loses. The motor will consume the necessary flux I,current in order to establish the appropriate magnetic field.Motor will rotate at almost a synchronous speed,which makes slip nearly FIGURE 9-9.Electrical Representation of ACIM during no load testing |
||
Assuming that the R,(2),L,(H)are much lower than the magnetizing inductance L(H),
the following equation can be extracted: |
||
![]() |
(9.1) | |
where V,(V)is the phase stator voltage applied (RMS value),f,(Hz)is the stator frequency
and |(A)is the RMS motor amps. In order to implement the above mentioned no load test with RoboteQ induction motor controllers,please follow these steps: · Set the operating mode to “Volts per Hertz”mode.Encoder feedback action needed. · Configure the Volt per Hertz setting according to motor nominal voltage (peak value of stator voltage according to manufacturer)and frequency. · Run the motor without load up to the maximum available voltage (Com- mand=1000),utilizing small acceleration/deceleration value.Be sure that the con- figured volt per hertz is correct,by checking the “Stator speed RPM”to be approxi- mately equal to manufacturer’s synchronous rated speed. ·Calculate the applied V,by the following equation: |
||
![]() |
(9.2) | |
where m,is the output PWM level (%1000)applied which is equal to Motor Power output measurement in Roborun+utility (-1000 to 1000 range)and V is the battery volts M.in the considered no-load test them,is 1000,therefore the applied voltage can be calculated
· Measure the motor RMS current from the utility (Motor Amps).Furthermore,the peak amps value should be configured as “Rotor Flux current”in the configuration tab. · Calculate the magnetizing inductance for the no load test according to equation (9.1). |
142 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Induction
Motor
Parameters
Calculation
Example:
The following data have been given from the induction motor manufacturer:
P=400W(nominal power)
l=23 A(nominal stator current)
V=24V(Input dc voltage at controller)
f₁=90 Hz(Nominal stator frequencyl
n₄=2700 rpm (Synchronous speed)
p=2(pole pairs)
Therefore,the Volts per Hertz ratio introduced in configuration tab is
Then the motor run volts per Hertz and the respective results from Roborun+utility are illustrated below.
Channel
Motor Command 1
Motor Power 1
Motor Amps 1
BattAmps 1
Battery Vots
Sip 1
Rotor Speed RPM 1
Stator Speed RPM 1
Value √ 1000
[1000 23,1
4.9
24.1
0.7
2673
2697
FIGURE 9-10.No load testing monitoring
From the above results,it can been observed that the stator speed is close to the syn- chronous speed (2700 rpm),while the slip is very small due to the no-oad operation.
Therefore,by applying equation (9.1)the magnetizing inductance is:
Furthermore,the rotor “Rotor Flux current”should be set in the configuration as (Motor Amps)x√2=32.7 A
144 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Induction Motor Parameters Calculation
· Configure the Volt per Hertz setting according to five times lower the motor
nominal voltage (peak value of stator voltage according to manufacturer)and
frequency (1/5 of nominal V/f).The reason for configuring lower V/f ratio than in
no-load test is to appropriately weaken the induced field and reduce the produced torque at startup,in order to be easier to lock the rotor for the test.
· Lock the rotor by appropriate tool/device and increase the command up reaching the 80%of the rated motor current.If the produced torque is high and the rotor cannot be locked,then reduce appropriately the Volt per Hertz at configuration and repeat the test.
Calculate the applied V,by utilizing equation (9.2).
·Calculate the input phase motor power P,by utilizing the following equation:
(9.9)
where V V)is the battery dc volts,I(A)is the battery dc current,n is the controller ef-
ficiencylassume 0.95 efficiency for RoboteQ controllers).Battery volts and amps can be
measured from Roborun+utility.
·Measure thel₄(A)current from the Roborun+utility (FOC Torque Amps).
·Calculate the LL,R R,motor parameters by applying the equations (9.3)-(9.8).
Example:
For the same induction motor at no load test example,the Volts per Hertz ratio is set 5 times lower than the nominal,that is 0.053.The respective results taken from Roborun+ utility are shown below:
Channel Value
Motor Command 1 151
Motor Power 1 151
Motor Ampe 1 18.4
BattAmps 1 2.1
Battery Voks 242
Sip 1 68.9
Roter Speed RPM1 0
Stator Speed RPM 1 2067
FIGURE 9-12.Locked rotor testing monitoring
Therefore,the input phase motor power P is equal to
phase impedance is Z =0.081 Q according to equation (9.4).
146 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
IRoboteQ
Modes Description
SECTION 10
Speed-Position Modes
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 output votlage so that the motor maintains a constant speed.Two closed loop speed modes are available:
Closed Loop Speed Mode
This mode is the traditional closed loop technique where speed is measured with a speed sensor.The speed is compared to the desired speed and the speed PID control loop
output provides the reference current (if FOC torque gains are set)or voltage (if the FOC torque gains are zero)commands,in order to reach and maintain that speed.The internal current control is described in the Field Oriented Control (FOC)operation chapter.
Speed Command
PID
PWM
FOC Current
Control
Motor
Speed Feedback
Speed Sensor
FIGURE 10-1.Closed Loop Speed Mode
Closed Loop Speed Position Control
In this mode,the controller computes the position at which the motor must be at every 1ms.Then a PID compares that expected position with the current position and applies the necessary reference speed (if speed and FOC torque gains are set)or voltage (if the speed and FOC torque gains are zero)command in order for the motor to reach that posi- tion.This mode is especially effective for accurate control at very slow speeds.
148 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Zero 100
Tachometer
wiring
Tachometer wiring
The tachometer must be wired so that it creates a voltage at the controller’s analog input that is proportional to rotation speed:OV at full reverse,+5V at full forward,and O when stopped.
Connecting the tachometer to the controller is as simple as shown in the diagram below.
5V Out
Max Speed Adjust
10kOhm pot
Ana In
A/D’
20kOhm
33kOhm
1kOhm
Ground
Internal Resistors and Converter
Adjust
Ohm pot
1kOhm
Tach
FIGURE 10-4.Tachometer wiring diagram
Brushless Hall Sensors as Speed Sensors
On brushless motor controllers,the Hall Sensors and most other types of rotor position sensors that are used to switch power around the motor windings,can also used to mea- sure speed and distance traveled.
Speed is evaluated by measuring the time between the transition of the Hall Sensors.A 32 bit up/down counter is also updated at each Hall Sensor transition.
Speed information picked up from the Hall Sensors can be used for closed loop speed op- eration without any additional hardware on both sinusoidal and trapezoidal commutation. Likewise,the position counter that is updated at every Hall transition can also be used to operate the motor in Speed Position mode.
Speed Sensor and Motor Polarity
The tachometer,encoder or brushless sensor 《Hall,Sin/Cos,SPl)polarity (i.e.which rota- tion direction produces positive or negative speed information)is related to the motor’s rotation speed and the direction the motor turns when power is applied to it.
In the Closed Loop Speed mode,the controller compares the actual speed,as measured by the sensor,to the desired speed.If the motor is not at the desired speed and direction, the controller will apply power to the motor so that it turns faster or slower,until reached.
Closed Loop Speed Mode | RoboteQ |
Important Warning
The speed sensor 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. If this protection is disabled,there will be no way of stopping it other than pressing the emergency stop button or disconnecting the power. 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 select- ed motor channel.If an encoder is used,configure the encoder channel with the en- coder’s Pulses Per Revolution value.On the brushless motor,if the rotor sensor (Hall, Sin/Cos,.)sensors are used,configure the correct number of motor pole pairs. 3. Click on the Run tab of the PC utility.Configure the Chart recorder to display the speed information if an encoder is used.Display Feedback if an analog sensor is used. 4. Verify that the motor sliders are in the“0”(Stop)position. 5. If a tachometer is used,verify that the reported feedback value read is O when the motors are stopped.If not,adjust the Analog Center parameter. 6. Move the cursor of the desired motor to the right so that the motor starts rotating, and verify that a positive speed is reported.Move the cursor to the left and verify that a negative speed is reported. 7. If the reported speed polarity is the same as the applied command,the wiring is cor rect. 8. If the tachometer polarity is opposite of the command.If an encoder is used,swap its ChA and ChB outputs.Alternatively,swap the motor leads if using a brushed DC motor only.The speed polarity can also be inverted by entering a negative number of encoder PPR.On brushless motors,entering a negative number of poles will invert the speed measured by the Hall,SinCos,or Resolver sensor.If using SSl sensor,the speed polari- ty can be inverted by entering a negative number of SSl sensor resolution. 9. Set the controller operating mode to Closed Loop Speed mode using the Roborun utility. 10. Move the cursor and verify that speed stabilizes at the desired value.If speed is un- stable,tune the PID values. Important Warning It is critically important that the tachometer or encoder wiring be extremely robust. If the speed sensor reports an erroneous speed or no speed at all,the controller will consider that the motor has not reached the desired speed value and will gradually increase the applied power to the motor until the closed loop error is triggered and the motor is then stopped. |
150 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Controlling Speed in Closed Loop
Controlling Speed in Closed Loop
When using encoder feedback or Hall Sensor (brushless motor)feedback,the controller will measure and report speed as the motor’s actual RPM value.
When using analog or pulse as input command,the command value will range from 0 to +1000 and 0 to -1000.In order for the max command to cause the motor to reach the de- sired actual max RPM,an additional parameter must be entered in the encoder or brush- less 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.
PID Description
The controller performs both Closed Loop Speed modes using a full featured Proportional, Integral and Differential (PID)algorithm.This technique has a long history of usage in con- trol systems and works on performing adjustments to the Power Output based on the dif- ference measured between the desired speed or position (set by the user)and the actual speed or position (captured by the sensor on the motor).
Figure 9-3 shows a representation of the PID algorithm.Every 1 millisecond,the controller measures the actual motor speed or position and subtracts it from the desired speed or position to compute the error.
The resulting error value is then multiplied by a user selectable Proportional Gain.The
resulting value becomes one of the components used to command the motor.The effect of this part of the algorithm is to regulate current if torque FOC gains are set or voltage (if torque FOC gains are zero)of the motor proportionally with the difference between
the current and desired speed or position:when far apart,high power is applied,with the power being gradually reduced as the motor moves to the desired speed or destination.
A higher Proportional Gain will cause the algorithm to apply a higher level of power for a given measured error thus making the motor react more quickly to changes in commands and/or motor load.
The Differential component of the algorithm computes the changes to the error from one 1 ms time period to the next.This change will be a relatively large number every time
an abrupt change occurs on the desired speed value or the measured speed value.The value of that change is then multiplied by a user selectable Differential Gain and added to the output.The effect of this part of the algorithm is to give a boost of extra power when starting the motor due to changes to the desired speed or position value.The differential component will also help dampen any overshoot and oscillation.
The Integral component of the algorithm performs a sum of the error over time.In Speed mode,this component helps the controller reach and maintain the exact desired speed
when the error is reaching zero (i.e.measured speed is near to,or at the desired value).In Speed Position mode,the Integral parameter can help maintain a slightly tighter difference between the desired and actual position,but makes no significant difference and can be omitted altogether.
152 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
PIDTuning in Speed Position Mode
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.In this case,consider changing the PID gains on the fly during motor operation with seria/CAN commands of with a MicroBasic script
In slow systems,use the integrator limit parameter to prevent the integrator to reach sat- uration prematurely and create overshoots.Beware to set speeds that can physically be reached by the motor under load.If the motor is not physically able,there will be a loop error,which if it becomes too large,will cause a fault to be detected and the motor to be stopped.
PID Tuning in Speed Position Mode
As discussed,in Closed Loop Speed Position mode,every millisecond,the controller com- putes a successive desired position.The PID then works to make the motor follow the
computed trajectory.This mode works much better than the regular Closed Loop Speed mode when the motor must operate at very low speed.When the motor is stopped,it will maintain its position even if pulled,as for example on a robot stopped downhill.
The PID therefore must be tuned for position mode.In position mode (the Position Gains are used),most of the work is done by the proportional gain.It acts essentially as an
imaginary rubber belt between the controller’s internal destination counter and the motor: the higher the difference,the more the belt is stretched,and the stronger the motor will turn.Once the imaginary belt has stiffened the motor will run at the desired speed.
Try initially with only a small amount of P gain
P=2
l=0
D=0
With the controller configured in Speed Position mode and the motor stopped,do a first check of the PID’s stiffness by attempting to rotate the motor by hand.It should feel
increasingly hard to rotate away from the rest position.With a higher P gain,it will be- come harder to move than lower gains.As a rule of thumb,on a mobile robot,use a gain that makes it very hard to move the wheel more than a quarter turn away from the rest position.Test then by applying a speed command and verifying the motor runs smoothly under all load conditions.
The l and D gain can generally be omitted in Speed Position mode.
Beware to set speeds that can physically be reached by the motor under load.The Closed Loop Speed Position mode relies on the fact that the motor will actually be able to follow the computed trajectory.If the motor is not able,the controller will pause updating the
destination counter until the motor caught up.This will result in inaccurate speed and can be a problem in mobile robot applications depending on precise control of their left and right side motor.
154 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
IRoboteQ
Modes Description
SECTION 11
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 control- ler 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. The controller will move the motor so that it reaches this position.
This feature makes it possible to build ultra-high torque”jumbo servos”that can be used to drive steering columns,robotic arms,life-size models and other heavy loads.
The two position modes are similar and differ as follows:
Position Relative Mode
The controller accepts a command ranging from-1000 to+1000,from serial/USB,analog joystick,pulse input or CAN command.The controller reads a position feedback sensor
and converts the signal into a-1000 to+1000 feedback value at the sensor’s min and max range respectively.The controller then moves the motor so that the feedback matches the command,using a controlled acceleration,set velocity,and controlled deceleration.This
mode requires several settings to be configured properly but results in very smoothly con- trolled motion.
Position Tracking Mode
This mode is identical to the Position Relative mode in the way that commands and feed- back are evaluated.However,the controller will move the motor simply using a PID com- paring the command and feedback,without controlled acceleration and as fast as possible. This mode requires fewer settings but often results in a motion that is not as smooth and harder to control overshoots.
156 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Feedback Sensor Range Setting
A gear box is necessary to greatly increase the torque of the assembly.It is also neces- sary to slowdown 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.
The mechanical coupling between the motor and the sensor must be as tight as possible. If the gear box is loose,the positioning will not be accurate and will be unstable,potential- ly causing the motor to oscillate.
Some sensors,such as potentiometers,have a limited rotation range of typically 270
degrees (3/4 of a turn),which will in turn limit the mechanical motion of the motor/poten- tiometer assembly.Consider using a multi-turn potentiometer as long as it is mounted in a manner that will allow it to turn throughout much of its range,when the mechanical assembly travels from the minimum to maximum position.When using encoders,best results are achieved when the encoder is mounted directly on the motor shaft.
Feedback Sensor Range Setting
Regardless of the type of sensor used,feedback sensor range is scaled to a -1000 to +1000 value so that it can be compared with the -1000 to +1000 command range.
On analog and pulse sensors,the scaling is done using themin/max/center configuration parameters
When encoders are used for feedback,the encoder count is also converted into a -1000 to +1000 range.In the encoder case,the scaling uses the Encoder Low Limit and Encoder High Limit parameters.See”Serial (RS232/USB)Operation”on page 161 for details on
these configuration parameters.Beware that encoder counters produce incremental val- ues.The encoder counters must be reset using the homing procedure before they can be used as position feedback sensors.
Important Notice
Potentiometers are mechanical devices subject to wear.Use better quality potenti-
ometers and make sure that they are protected from the elements.Consider using
a solid state hall position sensor in the most critical applications.Optical encoders
may also be used,but require a homing procedure to be used in order to determine the zero position.
Important Warning
If there is a polarity mismatch,the motor will turn in the wrong direction and the position will never be reached.The motor will turn until the Closed Loop Error de-
tection is triggered.The motor will then stop until the error disappears,the control- ler is set to Open Loop,or the controller is reset.
158 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Operating in Closed Loop Relative Position Mode
and decelerates at a controlled rate to stop precisely at the end position.The graph below shows the speed and position vs.time during a position move.
Position
Acceleration Deceleration
FIGURE 11-2.Position Mode Functionality
When tuning the controller on,the default acceleration,deceleration and velocity are pa- rameters retrieved from the configuration EEPROM.In most applications,these parame- ters can be left unchanged and only change in commands used to control the change from one position to the other.In more sophisticated systems,the acceleration,deceleration
and velocity can be changed on the fly using Serial/USB commands or from within a Mi- croBasic script.
When using Encoders as feedback sensors,the controller can accurately measure the speed and the number of motor turns that have been performed at any point in time.The complete positioning algorithm can be performed with the parameters described above.
When using analog or pulse sensors as feedback,the system does not have a direct way to measure speed or number of turns.It is therefore necessary to configure an additional parameter in the controller which determines the number of motor turns between the
point the feedback sensor gives the minimum feedback value (-1000)to the maximum feedback value(+1000).
In the Closed Loop Relative Position mode,the controller will compute the position at
which the motor is expected to be at every millisecond in order to follow the desired ac- celeration and velocity profile.This computed position becomes the setpoint that is com- pared with the feedback sensor and a correction is applied at every millisecond.
For troubleshooting,the computed position can be monitored in realtime by enabling the Tracking channel in the PC utility’s chart recorder.
160 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
母部
Sen
PID tuning in Position Mode
Pmpor tlonal
Gain
x
Irtegator
Limit
Desired Position
E=1Ema
Z
Speed or
Power (Vatage) command
器
Differential
Gain
Measured Posiian
Ihiagral Gain
X
FIGURE 11-3.PID algorithm used in Position Mode
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.The effect of this part of the algorithm is to give a boost of extra power when starting the motor due to changes to the desired position value.The differential compo- nent will also help dampen any overshoot and oscillation.
The Integral component of the algorithm performs a sum of the error over time.In the position mode,this component helps the controller reach and maintain the exact desired position when the error would otherwise be too small to energize the motor using the Proportional component alone.Only a very small amount of Integral Gain is typically re- quired in this mode.
In systems where the motor may take a long time to physically move to the desired
position,the integrator value may increase significantly causing then difficulties to stop without overshoot.The Integrator Limit parameter will prevent that value from becoming unnecessarily large.
PID tuning in Position Mode
As discussed above,three parameters -Position Proportional Gain,Position Integral Gain and Position Differential Gain -can be adjusted to tune the position control algorithm.The ultimate goal in a well tuned PID is a motor that reaches the desired position quickly with- out overshoot or oscillation.
Because many mechanical parameters such as motor power,gear ratio,load and in- ertia are difficult to model,tuning the PID is essentially a manual process that takes experimentation.
Closed Loop Relative and Tracking Position Modes | lRoboteQ |
The Roborun PC utility makes this experimentation easy by providing one screen for
changing the Proportional,Integral and Differential gains and another screen for running and monitoring the motor. When tuning the motor,first start with the Integral and Differential Gains at zero,increas- ing the Proportional Gain until the motor overshoots and oscillates.Then add Differential gain until there is no more overshoot.If the overshoot persists,reduce the Proportional Gain.Add a minimal amount of Integral Gain.Further fine tune the PID by varying the gains from these positions. To set the Proportional Gain,which is the most important parameter,use the Roborun util- ity to observe the three following values: · Command Value · Actual Position · Actual Speed With the Integral Gain set to 0,the PID output should be: PID Output=(Command Value -Actual Position)*Proportional Gain The PID output can be the speed command or the applied power(voltage),depending on whether the speed gains are set or zeroed respectively.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 (voltage)to the motor de- pending on the command given. Verify that when the Command Value equals the Actual Position,the Applied Power (Volt- age)equals to zero.Note that the Applied Power {Voltage)value is shown without the sign in the PC utility. In the case where the load moved by the motor is not fixed,the PID must be tuned with the minimum expected load and tuned again with the maximum expected load.Then try to find values that will work in both conditions.If the disparity between minimal and maxi- mal possible loads is large,it may not be possible to find satisfactory tuning values. PID Tuning Differences between Position Relative and Position Tracking The PID works the same way in both modes in that the desired position is compared to the actually measured position. In the Closed Loop Relative mode,the desired position is updated every ms and so the PID deal with small differences between the two values. In the Closed Loop Tracking mode,the desired position is changed whenever the com- mand is changed by the user. Tuning for both modes requires the same steps.However,the P I and D values can be ex- pected to be different in one mode or the other. |
162 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Loop Error Detection and Protection
Loop Error Detection and Protection
The controller will detect large tracking errors due to mechanical or sensor failures,and shutdown 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.Three levels of sensitivity are provided in the controller configuration:
1:250ms and Error>100
2:500ms and Error>250
3:1000ms and Error>500
When an error is triggered,the motor channel is stopped until the error has disappeared, the motor channel is reset to open loop mode.
The loop error can be monitored in realtime using the Roborun PC utility.
These values can be accordingly modified during runtime using the runtime commands FET and FEW,or via the respective SDOs in DS402 mode.
Closed Loop Relative and Tracking Position Modes | RoboteQ |
164 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
IRoboteQ
Mode
description
SECTION 12
Count Position
Mode
In the Closed Loop Position mode,the controller can move a motor a precise number of 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.Using acceleration,deceleration
and top velocity,the controller computes the position at which the motor is expected to be at every one millisecond interval.A PID then computes the speed to give to the motor in order to maintain that position.A comparator looks at the desired position and the com- puted current position and issues a Destination Reached flag.The figure below shows a representation of this mode.
Destinafion Reached
Desired End Posilion
Desired Veloaity
PID
Desired Acceleralion
Oulput Speed ar
Power (Vallage)command
Measured Position from molor sensor
Sensor
Motor
Desired Position at Instant
Trajectory Computation
二
FIGURE 12-1 Closed Loop Position mode
166 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Count Position Commands
While in Open Loop,enable the Speed channel in the Roborun Chart Recorder.Move the slider in the positive direction and verify that the measured speed polarity is also positive. If a negative speed is reported,swap the two encoder wires to change the measured po- larity,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 con- troller,the motor will operate in Closed Loop and will attempt to go to the 0 counter posi- tion.Beware therefore that the motor has not already turned before switching to Closed Loop.Reset the counter if needed prior to closing the loop.
Count Position Commands
Moving the motor is done using a set of simple commands.
To go to an absolute encoder position value,use the !P command
To go to a relative encoder position count that is relative to the current position,use the !PR command.
The Acceleration,Deceleration and Velocity are fixed parameters that can be changed us- ing the ^MAC,^MDEC and ^MVEL configuration settings.These can also be changed on the fly,anytime using the !AC and !DC commands.
The velocity can also be changed at any time using the !S command:
New position destination command can be issued at any time.If the previous destination is not reached while the new is sent,the motor will move to the new destination.If this causes a change of direction,the motor will do the change using the current acceleration and deceleration settings.See the Commands Reference section for details on all these commands
Position Command Chaining
It is possible to chain position commands in order to create seamless motion to a new
position after an initial position is reached.To do this,the controller can store the next goto position with,optionally,a new set of acceleration,deceleration and velocity values.
The commands that set the”next”move are identical to these discussed in the previous section,with the addition of an “X”at the end.The full command list is:
IPX nn mm Next position absolute
!PRX nn mm Next position relative
!ACX nn mm Next acceleration
!DCX nn mm Next deceleration
!SX Next velocity
168 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
PID Tunings
Beware that the Destination Reached flag will become true when the result of the trajec- tory computation equals the desired destination.In most practical situations,the motor will still be on its way to actually reach that destination.This can be an important consid- eration when chaining commands,as the new command will become active before the motor has actually reached the previous destination
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.
Loop Error Detection and Protection
The controller will detect large tracking errors due to mechanical or sensor failures,and
shutdown 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 po- sition)and the duration the error is present.Three levels of sensitivity are provided in the controller configuration:
1:250ms and Error>100
2:500ms and Error>250
3:1000ms and Error>500
When an error is triggered,the motor channel is stopped until the error has disappeared, the motor channel is reset to open loop mode.The error will also be cleared when send- ing a new Position Destination using the !P command with value equal to actual position (feedback).
The loop error can be monitored in realtime using the Roborun PC utility.
Closed Loop Count Position Mode
RoboteQ
170 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
IRoboteQ
Torque Mode Description
SECTION 13
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 directty related to the current.Therefore,controlling the current controls the torque.
Command
Output
Motor
PID
Driver
Motor Amps
FIGURE 13-1.Torque mode
Torque mode is mostly used in electric vehicles since applying a higher command gives more “push”similarly to how a gas engine would respond to stepping on a pedal.Like- wise,releasing the throttle will cause the controller to adjust the power output so that the zero amps flow through the motor.In this case,the motor will coast and it will take a neg- ative command (i.e.negative amps)to brake the motor to a full stop.When the sinusoidal mode is selected,the field oriented current control is utilized,in order to regulate the lq (Torque Amps)and ld (Flux Amps)at the reference values for each kind of motor selected (brushless dc,IPM,Induction).
172 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Torque Mode Limitations
Speed Limiting
All 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 override con- trol which provides very smooth motor output but requires PID tuning.
Therefore for the torque loop we use the Torque Proportional Gain (KPF)and the Torque In- tegral Gain (KIF),in Closed Loop Torque parameters,and the speed limit is tuned using the Speed Proportional Gain (KPG),the Speed Integral Gain (KIG)and the Speed Differential Gain {KDG),in Closed Loop Speed parameters.The speed loop PID tuning can either be done in “Closed Loop Torque Mode”at the speed limit or in”Closed Loop Speed Mode” by looking at the response time.
Torque Mode Limitations
The torque mode uses the Motor Amps and not the Battery Amps.See “Battery Current vs.Motor Current”on page 28.In some Roboteq controllers,Battery Amps is measured and Motor Amps is estimated.The estimation is fairly accurate at power level of 20%and higher.Its accuracy drops below 20%of PWM output and no motor current is measured at all when the power output level is 0%,even though current may be flowing in the
motor,as it would be the case if the motor is pushed.The torque mode will therefore not operate with good precision at low power output levels.
Furthermore the resolution of the amps capture is limited to around 0.5%of the full range. On high current controller models,for example,amps are measured with 500mA incre-
ments.If the amps limit is set to 100A,this means the torque will be adjustable with a 0.5% resolution.If on the same large controller the amps limit is changed to 10A,the torque will be adjustable with the same 500mA granularity which will result in 5%resolution.For best results use an amps limit that is at least 50%than the controller’s max rating.On newer
Brushless motor controllers,amps sensors are placed at the motor output and motor amps are measured directly.Torque mode will work effectively on these models.
Closed Loop Torque Mode
RoboteQ
174 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Use and benefits of Serial Communication
cated remote controlled robots than is possible using the RC mode.RS232 and RS485
SECTION 14
Serial (RS232/
RS485/USB/TCP)
Operation
This section describeshow 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 soft- ware on a PC or microcomputer.
The full set of commands accepted by the controller is provided in “Commands Refer ence”on page 169.
If you wish to use your PC simply to set configuration parameters and/or to exercise the controller,you should use the RoborunPlus PC utility.
Use and benefits of Serial Communication
The serial communication allows the controller to be connected to PCs,PLC,microcom-
puters or wireless modems.This connection can be used to both send commands and
read various status information in real-time from the controller.The serial mode enables
the design of complex motion control system,autonomous robots or more sophisti-
commands are very precise and securely acknowledged by the controller.They are also
the method by which the controller’s features can be accessed and operated to their
fullest extent.
When operating in RC or analog input,serial communication can still be used for monitor ing or telemetry.
When connecting the controller to a PC,the serial mode makes it easy to perform simple diagnostics and tests,including:
· Sending precise commands to the motor
· Reading the current consumption values and other parameters
· Obtaining the controller’s software revision and date
· Reading inputs and activating outputs
· Setting the programmable parameters with a user-friendly graphical interface ·Updating the controller’s software
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
· No Parity
Communication is done withoutflow control,meaning that the controller is always ready to receivedata and can send data at any time.
Connector RS232 Pin Assignment
14 25
1 13
8 1
FIGURE 14-1.DB25 and DB15 connectors pin code locations
When used in the RS232 mode,the pins on the controller’s DB15 or DB25 connector (de- pending on the controller modell are mapped as described in the table below
TABLE 14-1.RS232 Signals on DB15 and DB25 connectors
Pin
Number |
Input or
Output |
Signal | Description |
2 | Output | Data Out | RS232 Data from Controller to PC |
3 | nput | Data In | RS232 Data In from PC |
5 | Ground | Controller ground |
Connector RS485 Pin Assignment
When used in the RS485 mode,the pins on the controller’s DB15,DB25 or DB9 con-
nector (depending on the controller modell)are mapped as described in each controller’s datasheet.
Setting Different Bit Rates
It is possible to set RS232 and RS485 bit rate to lower values.This operation cannot be
done while the controller is connected via RS232 or RS485.Beware that once the bit rate is different than the default 115200,it will no longer be able to communicate with the PC utility if serial connection is used.From the Console,send the following commands:
^RSBR nn
where nn =
176 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Setting Different Bit Rates
0:115200
1:57600
2:38400
3:19200
4:9600
10:230400
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.
It is critical that you do not confuse the connector’s pin numbering.The pin numbers on the drawing are based on viewing the connectors from the front.Most connectors
brands have pin numbers molded on the plastic.
DB15 Male To Controller
DB9 Female To PC
10 01
06 9O
RX Data 2 C O2
Data Out
Data In
O7 10 O
TX Data 31 3
O B t O
4O 04
Os 12 O
GND 50 5 13 O
GND
O6
14 O
O7
15O
O 8
DB9 Female | DB25 Male |
To PC | To Controller |
10 01
06 4O
RX Data 2i O 2 Data Out
TX Data 3( O7 ts O 03 Data In
Oa 8 O
40 O 9 n O 04
GND 5O 05 GND
ta O
9O
200 210 220 250 240 sO |
06
07 08 0 O 10 On 012 O 13 |
FIGURE 14-2.PC to controller RS 232 cable/connector wiring diagram
The 9 pin to 15 pin cable is provided by Roboteq for controllers with 15 pin connectors.
Controllers with 25 pins connectors are fitted with a USB port that can be used with any USB cables with a type B connector.
Data Out
Data In
GND
Serial (RS232/USB)Operation
RoboteQ
Extending the RS232 Cable
RS232 extension cables are available at most computer stores.However,you can easily
build one using a 9-pin DB9 male connector,a 9-pin DB9 female connector and any 3-con-
ductor cable.DO NOT USE COMMERCIAL 9-PINTO 25-PIN CONVERTERS as these do
not match the 25-pin pinout of the controller.These components are available at any elec-
tronics distributor.A CAT5 network cable is recommended,and cable length may be up to
100′(30m).Figure 14-3 shows the wiring diagram of the extension cable.
DB9 Female
DB9 Male
1 〇
O 6
RX Data 2C
O 7
TX Data 3(
O 8
4〇
O 9
GND 5(
6 O
7 O
O 1
8 O
9 O
O 4
)3
)5
FIGURE 14-3.RS232 extension cable/connector wiring diagram
Connecting to Arduino and otherTTL 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.RS232 has the following differences from TTL serial:
TABLE 14-2.Connecting with TTL devices
RS232 | TTL Serial | |
Voltage Levels | +10V/-10V | 0-3V |
Logic level | Inverted | Non-Inverted |
ATTL to RS232 adapter must be therefore be used to convert to the Arduino serial inter- face.Newer Roboteq controller allows the RS232 signal to be non-inverted.Intertacing to Arduino or other TTL Serial interface can therefore be done with just a resistors,and 2 optional diodes as shown in the diagram below:
178 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Connecting to Arduino and other TTL Serial Microcomputers
FIGURE 14-4.Simplified TTL to RS232 connection
TxD RxD
The data sent from the TTL serial port are 0-3V and can be directly connected to the con- troller’s RS232 input where it will be captured as valid O-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 O-3.3V by the protection diodes that are included in the AF duino MCU.However,to avoid any stress it is highly recommended to insert the 2 diodes shown on the diagram.
To operate,the RS232 output must be set to inverted.This must be done from the Con-
sole of the Roborun Utility while connected via USB.This will only work on newer control-
ler models fitted with firmware version 1.6a or more recent.
From the Console,send the following commands:
^RSBR nn
where nn =
5:115200+Inverted RS232
6:57600+Inverted RS232
7:38400+Inverted RS232
8:19200+Inverted RS232
9:9600+Inverted RS232
Make sure that the controller respond to this command with a +.Check that the value has been accepted by sending ~RSBR.If a-is replied or if the value is different than the one entered,then the hardware and/or firmware does not support serial inverted and cannot be used with this circuit.
Send %EESAV from the console to store the new configuration to flash.
180 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Command Priorities
heun/Oupun
① Sare
bCommads
b等CW
4YTcr
TcPWor isle
Ersbe DHCP.Disatlss
IPPert 9ZSI
P Address
PGge Ae
pSbomt Mask
+Primary DNS
Seco day NS
Y MuE
P]f Eheoters
b 事 Oigal bpus
Aalog lreuts
¥ Plae lhede
Dipesl Oups
田曰
FIGURE 14-6.TCP configuration
AIITCP/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.
Command Priorities
The controller will respond to commands from one of five possible sources:
· CAN or Script Command
· Serial (RS232,RS485,TCP or USB)
· Pulse
· Analog
· Spektrum Radio (when available)
One,two,three or four (except from CAN or Script command,which is always enabled) command modes can be enabled at the same time.When multiple modes are enabled, the controller will select which mode to use based on a user selectable priority scheme. The priority mechanism is described in details in “Input Command Modes and Priorities” on page 73.
Communication Arbitration
Commands may arrive through the RS232,RS485,TCP or the USB port at the same time. They are executed as they arrive in a first come first served manner.Commands that are arriving via USB are replied on USB.Commands arriving via the UART are replied on the UART.Redirection symbol for redirecting outputs to the other port exists (e.g.a command can be made respond on USB even though it arrived on RS232).
Serial (RS232/USB)Operation
CAN Commands
Commands arriving via CAN have bigger priority than serial commands and will not con- flict with motor command arriving via serial,TCP or USB.CAN commands are also subject to the serial Watchdog timer.Motors will be stopped and command input will switch ac- cording to the Priority table if the Watchdog timer is allowed to timeout.
Script-generated Commands
Commands that are issued from a user script have bigger priority than serial and CAN
commands and will not conflict with motor command arriving via serial,TCP USB or CAN. Script commands are also subject to the serial Watchdog timer.Motors will be stopped and command input will switch according to the Priority table if the Watchdog timer is al- lowed to timeout.
Communication Protocol Description
The controller uses a simple communication protocol based on ASCll characters.Com- mands are not case sensitive.?a is the same as ?A. Commands are terminated by car- riage return (Hex Ox0d,v’).
The underscore’_character is interpreted by the controller as a carriage return.This alter- nate character is provided so that multiple commands can be easily concatenated inside a single string.
All other characters lower than Ox20 (space)have no effect.
Character Echo
The controller will echo back to the PC or Microcontroller every valid character it has re- ceived.If no echo is received,one of the following is occurring:
· echo has been disabled
· the controller is Off
· the controller may be defective
Command Acknowledgment
The controller will acknowledge commands in one of the two ways:
For commands that cause a reply,such as a configuration read or a speed or amps que- ries,the reply to the query must be considered as the command acknowledgment.
For commands where no reply is expected,such as speed setting,the controller will issue a”plus”character (+)followed by a Carriage Return after every command as an acknowl- edgment.
Command Error
If a command or query has been received,but is not recognized or accepted for any rea- son,the controller will issue a”minus”character (-)to indicate the error.
182 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Raw Redirect Mode
If the controller issues the”-“character,it should be assumed that the command was not recognized or lost and that it should be repeated.
Watchdog time-out
For applications demanding the highest operating safety,the controller should be config- ured to automatically switch to another command mode or to stop the motor (but other- wise remain fully active)if it fails to receive a valid command on its RS232,RS485,TCR USB or CAN ports,or from a MicroBasic Script for more than a predefined period.
By default,the watchdog is enabled with a timeout period of 1 second.Timeout period can be changed or the watchdog can be disabled by the user.When the watchdog is en- abled and timeout expires,the controller will accept commands from the next source in the priority list.See Command Priorities on page 167.
Controller Present Check
The controller will reply with an ASCll ACK character (0x06)anytime it receives a QRY character (0x05).This feature can be used to quickly scan a serial port and detect the
presence,absence or disappearance of the controller.The QRY character can be sent at any time (even in the middle of a command)and has no effect at all on the controller’s normal operation.
Raw Redirect Mode
In the Raw Redirect mode,received unprocessed data coming from either RS232 or
RS485 interfaces,can be read by the user.Likewise,the user can send data with any
content towards either RS232 or RS485 interfaces.The data are split into frames.In ASCll mode one frame is the sequence of characters ending with a termination character (v). In RTU mode one frame is defined based on the Modbus RTU regulations (after specific silent time goes by,see Modbus Manual for more details).
Configuration
Raw Redirect mode is enabled for either RS232 or RS485 interfaces using the Raw Redi- rect Mode (see ISM-Raw Redirect Mode,in page 300)configuration command.By de-
fault ASCll mode is used,however if the respective Modbus Mode (see DMOD-Modbus Mode,in page 298)is set to RTU then the received data will be handled according to the Modbus RTU regulations (See Modbus Manual for more details).
Checking Received Frames
Received frames are first loaded in the 256-byte FIFO buffer.Before a frame can be read, it is necessary to check if any frames are present in the buffer using the ?CD query.The query can be sent from the serial/USB port,or from a MicroBasic script using the getval- ue(_CD)function.The query will return the number of frames that are currently pending, and copy the oldest frame into the read buffer,from which it can then be accessed.Send- ing ?CD again,copies the next frame into the read buffer.
The query usage is as follows:
Serial (RS232/USB)Operation
Syntax:?CD
Reply:CD=number of framespending
Reading Received Frames
After a frame has been moved to the read buffer,the byte size and the data can be read with the ?DDT query.The query can be sent from the serial/USB port,or from a MicroBa- sicscnipt using the getvalue(_DDT,n)function or getvaluel(_SDT,n)function for ASCll
mode.The query usage is as follows:
Syntax:?DDT lee]
Reply:DDT=byte size:data0:data1:……:dataN
Where:ee =frame element
1 =byte size
2-64 =data0 to data62
Examples:
Q:?DDT
R:DDT=8:82:111:98:111:116:101:113
Q:?DDT 3
R:DDT=111
Q:?SDT
R:SDT=“Roboteq”
Transmitting Frames
ASCll or RTU data can easily be transmitted using the Send Raw USART Frames Com- mand !CU.This command can be used to enter the port to send the data (RS232 or
RS485),the frame length and the data,one element at a time.The frame is sent immedi- ately after the frame length is entered,and so it should be entered last.
Syntax:!CU ee nn
Where:ee =frame element
1=outport (0 for RS232 and 6 for RS485)
2 =frame length
184 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
Raw Redirect Mode
3 to 18=data0 to data15
nn =value
Examples:!CS 10 Enter O in outport (RS232)
!CS 349 Enter 49 in Data 0
!CS 450 Enter 50 in Data 1
!CS 451 Enter 51 in Data 2
!CS 23 Enter 2 in frame length.Send data frame
Serial (RS232/USB)Operation
RoboteQ
186 Advanced Digital Motor Controller User Manual V2.1 December 3,2020
IRoboteQ
Commands Types
SECTION 15
Reference
This section lists all the commands accepted by the controller.Commands are typically sent via theseral (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 scnipt written using the MicroBasic language (See “MicroBasic Scnipting Manual”).
Commands Types
The controller will accept and recognize four types of commands:
Runtime commands
These start with”!”when called via the serial communication (RS232,RS485,TCP or
USB),or using the setcommand(MicroBasic function.These are usually motor or oper- ation commands that will have immediate effect le.g.to turn on the motor,set a speed or activate digital output).Most of Runtime commands are mapped inside a CANopen
Object Directory,allowing the controller to be remotely operated on a CANopen standard network (See “CAN Networking Manual”).See “Runtime Commands”on page 169 for the full list and description of these commands.
Runtime queries
These start with”?”when called via the serial communication (RS232,RS485,TCP or
USB),or using the getvalue)Microbasic function.These are used to read operating values at runtime (e.g.read Amps,Volts,power level,counter values).All runtime queries are
mapped inside a CANopen Object Directory,allowing the controller to be remotely inter- rogated on a CANopen standard network (See “CAN Networking Manual”).See Runtime commands are commands that can be sent at any time during controller operation and
are taken into consideration immediately.Runtime commands start with”!”and are fol- lowed by one to three letters.Runtime commands are also used to refresh the watchdog timer to ensure safe communication.Runtime commands can be called from a MicroBasic script using the setcommand)function..
Maintenance commands
These are only available trough serial (RS232,RS485,TCP or USB)and start with “%”
They are used for all of the maintenance commands such as le.g.set the time,save con- figuration to EEPROM,reset,load default,etc.J.
Commands Reference
Configuration commands
These start with”~”for read and”A”for write when called via the serial communication (RS232,RS485,TCP or USB),or using the getconfig0 and setconfig()MicroBasic func- tions.They are used to read or configure all the operating parameters of the controller
le.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
Runtime commands are commands that can be sent at any time during controller oper- ation and are taken into consideration immediately.Runtime commands start with”!” and are followed by one to three letters.Runtime commands are also used to refresh the watchdog timer to ensure safe communication.Runtime commands can be called from a MicroBasic script using the setcommand0 function.
TABLE 15-1.Runtime Commands
Command | Arguments | Description |
AC | Channel Acceleration | Set Acceleration |
AX | Channel Acceleration | Next Acceleration |
B | VarNbr Value | Set User Boolean Variable |
BND | None | Spectrum Bind |
C | Channel Value | Set Encoder Counters |
CB | Channel Value | Set Brushless Counter |
CG | Channel Value | Set Motor Command via CAN |
CS | Element Value | CAN Send |
CSS | Channel Value | Set SSl Sensor Counter |
CU | Element Value | Raw Redirect Send |
DO | OutputNbr | Reset Individual Digital Out bits |
D1 | OutputNbr | Set Individual Digital Out bits |
DC | Channel Deceleration | Set Deceleration |
DS | Value | Set all Digital Out bits |
DX | Channel Value | Next Decceleration |
EES | None | Save Configuration in EEPROM |
EX | None | Emergency Shutdown |
G | Channel Value | Go to Speed or to Relative Position |
GIQ | Channel Value | Go to Torque Amps |
GID | Channel Value | Go to Flux Amps |
H | Channel | Load Home counter |
MG | None | Emergency Stop Release |
MS | Channel | Stop in all modes |
P | Channel Destination | Go to Absolute Desired Position |
PR | Channel Delta | Go to Relative Desired Position |
PRX | Channel Delta | Next Go to Relative Desired Position |
PX | Channel Delta | Next Go to Absolute Desired Position |
188 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime
Commands
Command | Arguments | Description |
R | 【Option] | MicroBasic Run |
RC | Channel Value | Set Pulse Out |
S | Channel Value | Set Motor Speed |
SFT | Channel Value | Safety Stop |
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.Acceleration value is in 0.1*RPM per second.When using controllers fitted with encoder,the speed and acceleration value are actual RPMs.Brush- less motor controllers use the hall sensor for measuring actual speed and acceleration will also be in actual RPM/s.When using the controller without speed sensor,the acceleration value is relative to the Max RPM configuration parameter,which itself is a userprovided number for the speed normally expected at full power.Assuming that the Max RPM pa- rameter is set to 1000,and acceleration value of 10000 means that the motor will go from 0 to full speed in exactly 1 second,regardless of the actual motor speed.In Closed Loop Torque mode acceleration value is in 0.1*miliAmps per second.This command is not
applicable if either of the acceleration (MAC)or deceleration (MDEC)configuration value is set to 0.
Syntax Serial: !AC cc nn
Syntax Scripting:setcommandL_AC,cc,nn)
setcommandLACCEL,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
Where:
cc =Motor channel
nn=Acceleration value in 0.1 *RPM/s
Example:
!AC 12000:Increase Motor 1 speed by 200 RPM every second if speed is measured by encoder
!AC 220000:Time from 0 to full power is 0.5s if no speed sensors are present and Max RPM is set to 1000
190 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Where:
nn =Variable number
mm =0or1
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.
Syntax Serial: !BND [ccl
Syntax Scripting:setcommandLBND,cc)
setcommand(_BIND,cc)
Number of Arguments:1
Argument 1:[Channel] Min:None
Where:
cc =Motor channel Example:
Type:Unsigned 8-bit
Max:Total Number of Motors
!BND:Binds Spektrum receiver with its transmitter,on supporting controller models
C-Set Encoder Counters
Alias:SENCNTR HexCode:04 CANOpen id:0x2003
Description:
This command loads the encoder counter for the selected motor channel with the value contained in the command argument.Beware that changing the controller value while op- erating in closed-loop mode can have adverse effects.
Syntax Serial: !C [cc]nn
Syntax Scripting:setcommand(_C,cc,nn)
setcommandLSENCNTR,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Encoders
192 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
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).It can be used to enter the header,
bytecount,and data,one element at a time.The frame is sent immediately after the byte-
count is entered,and so it should be entered last.
Syntax Serial: !CS ee nn
Syntax Scripting:setcommand(_CS,ee,nn)
setcommandLCANSEND,ee,nn)
Number of Arguments:2
Argument 1:Element
Min:1 Max:10
Argument 2:Value Type:Unsigned 8-bit
Min:0 Max:255
Where:
ee =
1:Header
2:Bytecount
3 to 10:Data0 to data7
nn =value
Example:
!CS 15:Enter 5 in header
!CS 32:Enter 2 in data 0
!CS 43:Enter 3 in data 1
!CS 22:Enter 2 in bytecount and send CAN frame
194 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Argument 2:Value Type:Unsigned 8-bit
Min:0 Max:255
Where:ee =frame element
1=outport (0 for RS232 and 6 for RS485)
2 =frame length
3 to 18=data0 to data15
nn =value
Examples:!CS 10 Enter O in outport (RS232)
!CS 349 Enter 49 in Data 0
!CS 450 Enter 50 in Data 1
!CS 451 Enter 51 in Data 2
!CS 23 Enter 2 in frame length.Send data frame
D0 -Reset Individual Digital Out bits
Alias:DRES HexCode:09 CANOpen id:0x200A
Description:
The D0 command will tum off the single digital output selected by the number that fol- lows.
Syntax Serial: !D0 nn
Syntax Scripting:setcommand(_D0,nn)
setcommand(LDRES,nn)
Number of Arguments:1
Argument 1:OutputNbr Type:Unsigned 8-bit
Min:1 Max:Total number of Digital Outs
Where:
nn =Output number
Example:
!D02:will deactivate output 2
Note:
Digital Outputs are Open Collector.Activating an outputs will force it to ground.Deactivat- ing an output will cause it to float.
196 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
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 12000:Reduce Motor 1 speed by 200 RPM every second if speed is mea- sured by encoder
!DC 220000:Time from full power to stop is 0.5s if no speed sensors are present and Max RPM is set to 1000
DS -Set all Digital Out bits
Alias:DOUT HexCode:09 CANOpen id:0x2008
Description:
The D command will turn ON or OFF one or many digital outputs at the same time.The number can be a value from 0 to 255 and binary representation of that number has 1bit affected to its respective output pin.
Syntax Seriat: !DS nn
Syntax Scripting:setcommand(_DS,nn)
setcommand(_DOUT,nn)
Number of Arguments:1
Argument 1:Value Type:Unsigned 8-bit
Min:0 Max:255
Where:
nn =Bit pattern to be applied to all output lines at once
Example:
!DS 03:will activate outputs 1 and 2.All others are off
Note:
Digital Outputs are Open Collector.Activating an outputs will force it to ground.Deactivat- ing an output will cause it to float.
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
198 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
EX-Emergency Stop
Alias:ESTOP HexCode:OE CANOpen id:Ox200C
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.
Syntax Serial: !EX
Syntax Scripting:setcommand(_EX,1)
setcommand(_ESTOP 1)
Number of Arguments:0
G-Go to Speed or to Relative Position
Alias:GO HexCode:00 CANOpen id:Use CG
Description:
G is the main command for activating the motors.The command is a number ranging 1000 to+1000 so that the controller respond the same way as when commanded using Analog or Pulse,which are also-1000 to +1000 commands.The effect of the command differs from one operating mode to another.
In Open Loop Speed mode the command value is the desired power output level to be applied to the motor.
In Closed Loop Speed mode,the command value is relative to the maximum speed that is stored in the MXRPM configuration parameter.
In Closed Loop Position Relative and in the Closed Loop Tracking mode,the command is the desired relative destination position mode.
The G command has no effect in the Position Count mode.
In Torque mode,the command value is the desired Motor Amps relative to the Amps Limit configuration parameters
Syntax Serial: !G Inn]mm
Syntax Scripting:setcommand(_G,nn,mm)
setcommand(_G0,nn,mm)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
200 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
GID -Go to Torque Amps
Alias:- HexCode:7B CANOpen id: ·
Description:
GID is the command for the flux amps in closed loop torque mode only for brushless con- trollers in sinusoidal mode.In other cases it is void.The value is set in Amps*10.A non-ze- ro value creates field weakening and can be used to achieve higher rotation speed
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 weak- ening).
H-Load Home counter
Alias:HOME HexCode:0D CANOpen id:Ox200B
Description:
This command loads the Home count value into the Encoder,SSI Sensor,or Brushless
Counters.The Home count can be any user value and is set using the EHOME,SHOME and BHOME configuration parameters.When SSl sensors are used as absolute encoders (Absolute Feedback)then this command loads to the Home count value the SSI sensor counter.In this case the Home count value is used as offset to the SSl sensor Counter. Beware that loading the counter with the home value while the controller is operating in closed loop can have adverse effects.
Syntax Serial: !H [cc]
Syntax Scripting:setcommand(_H,cc)
setcommand(_HOME,cc)
Commands Reference
Number of Arguments:1
Argument 1:Channel Type:Unsigned 8-bit
Min:1 Max:Total Number of Encoders
Where:
cc =Motor channel
Example:
!H 1:Loads encoder counter 1,SSl sensor counter 1 and brushless counter 1 with their preset home values.
MG -Emergency Stop Release
Alias:MGO HexCode:OF CANOpen id:Ox200D
Description:
The MG command will release the emergency stop condition and allow the controller to return to normal operation.Always make sure that the fault condition has been cleared
before sending this command
Syntax Serial: !MG
Syntax Scripting:setcommandLMG,1)
setcommandLMGO,1)
Number of Arguments:0
MS-Stop in all modes
Alias:MSTOP HexCode:10 CANOpen id:0x200E
Description:
The MS command will stop the motor for the specified motor channel.
Syntax Serial: !MS [cc]
Syntax Scripting:setcommandLMS,cc)
setcommandLMSTOP cc)
Number of Arguments:1
Argument 1:Channel Type:Unsigned &-bit
Min:1 Max:Total Number of Motors
Where:
cc =Motor channel
原创力文档
max.book118.com
预览与源文档一致,下载高清无水印
202 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
P-Go to Absolute Desired Position
Alias:MOTPOS HexCode:02 CANOpen id:0x2001
Description:
This command is used in the Position Count mode to make the motor move to a specified feedback sensor count value.
Syntax Serial: !P [cc]nn
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 110000:make motor go to absolute count value 10000.
PR-Go to Relative Desired Position
Alias:MPOSREL HexCode:11 CANOpen id:Ox200F
Description:
This command is used in the Position Count mode to make the motor move to a feedback sensor count position that is relative to its current desired position.
Syntax Serial: PR [cc]nn
Syntax Scripting:setcommand(_PR,cc,nn)
setcommand(_MPOSREL,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Delta Type:Signed 32-bit
Min:-2147M Max:+2147M
204 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Syntax Serial: !PX [nn]cc
Syntax Scrnipting:setcommandLPX,nn,cc)
setcommandLNXTPOS,nn,cc)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Delta Type:Signed 32-bit
Min:-2147M Max:+2147M
Where:
cc=Motor channel
nn =Absolute count position
Example:
!P 15000 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.
Syntax Serial: !R [nn]
Syntax Scripting:setcommand(_R,nn)
setcommand(_BRUN,nn)
Number of Arguments:1
Argument 1:[Option] Min:None
Type:Unsigned 8-bit
Max:2
Where
nn =
None:Start/resume script
0:Stop script
1:Start/resume script
2:Reinitialize and restart script
RC-Set Pulse Out
Alias:RCOUT HexCode:1A CANOpen id:0x2016
Description:
Set the pulse width on products with pulse outputs.Command ranges from -1000 to +1000,resulting in pulse width of 1.0ms to 1.5ms respectively.
206 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
SFT-Safety Stop
Alias:HexCode:8D
Description:
CanOpen id:Ox202C
With this command the motor speed decelerates to zero according to the fault decelera- tion speed ramp.This command can be used when the user wants to decelerate the mo- tor speed to zero at all modes.A safe stop flag will be generated during the deceleration and it will be reseted when the motor command will be zero.
Syntax Serial:!SFT [cc]
Syntax Scripting:setcommand LSFT,cc)
Number of Arguments:1
Min:1 Max:Total number of Motors
Where:
cc=Notor channel
Example:
!SFT 1:The motor 1 will start decelerate its speed according to deceleration speed ramp.
STT-STO Self-Test
Alias: · HexCode:70 CANOpen id:-
Description:
With this command the STO Self-Test process is executed in order to check whether
there is a fault.This process is applicable only on motor controllers with STO circuit im- plemented on their board.The result of the test is taken back using the STT query.Along with the STO self-test an extra test is also taken place in order to detect whether either of the power MOSFETs are shorted (so damaged)or not.This test takes place even if the STO feature is disabled and during power-up.In case of STO fault the Respective STO
Fault bit in the Fault Flags is set.The STO fault is triggered when:
· Any of the transistors or other component of the STO circuit is damaged.
· The respective jumper is placed on the board.
In case of MOSFET fault the MOSFail bit in the fault flags is set,as long as the EStop bit and the FETs Off bit in Status flags.This fault is cleared only when the STT runs again and the MOSFET failure goes away.
Syntax Serial:!STT
Syntax Scripting:setcommandLSTT,1)
Number of Arguments:0
208 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
DS402 Runtime Commands
Runtime commands created to support DS402 specification are descnibed below:
TABLE 15-2.
Command | Arguments | Description |
CW | Channel Value | Control Word (DS402) |
FEW | Element Value | Following Error Window (DS402) |
FET | Element Value | Following Error Time Out (DS402) |
INT | Flement Value | Interpolation Time Period (DS402) |
MSL | Element Value | Max Motor Speed (DS402) |
PAC | Channel Value | Profile Acceleration (DS402) |
PDC | Channel Value | Profile Deceleration (DS402) |
PLT | Element Value | Software Position Limit (DS402) |
POS | Channel Value | Target Position (DS402) |
PSP | Channel Value | Profile Velocity (DS402) |
ROM | Channel Value | Modes of Operation (DS402) |
SPE | Channel Value | Target Velocity (DS402) |
SAC | Flement Value | Velocity Acceleration (DS402) |
SDC | Element Value | Velocity Deceleration (DS402) |
SPC | Channel Value | Target Profile Velocity (DS402) |
SPL | Element Value | Velocity Min/Max Amount (DS402) |
TC | Channel Value | Target Torque (DS402) |
TSL | Channel Value | Torque Slope (DS402) |
CW-Control Word (DS402)
Alias:CW HexCode:56 CANOpen id:Ox6040
Description:
This command controls the PDS-FSA.Bits 9,6,5,and 4 of the ControlWord are operation mode specific.The halt function (bit 8)behavior is operation mode specific.If the bit is 1, the commanded motion shall be interrupted,after releasing the halt function,the com-
manded motion shall be continued if possible.
TABLE 15-3.Control Word Mapping
15 11 10 9 8 7 6 4 3 2 1 0
R | R | OMS | H | FR | OMS | EO | QS | EV | SO |
LSB
MSB
R→Reserved,OMS→Operation mode specific,H→Halt,FR→Fault reset,
EO →Enable operation QS →Quick stop,EV →Enable voltage,and SO →Switch on
RoboteQ
Commands Reference
TABLE 15-4.Command Coding
Command | Bits of the Control Word | Transition | ||||
Bit 7 | Rit 3 | Bit 2 | Bit 1 | Bit 0 | ||
Shutdown | 0 | X | 1 | 1 | 1 | 2,6,8 |
Switch On | 0 | 0 | 1 | 1 | 1 | 3 |
Switch On+Enable Operation | 0 | 1 | 1 | 1 | 1 | 3+4 |
Disable Voltage | 0 | X | X | 0 | X | 79,10,12 |
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 | O->1 | X | X | X | X | 15 |
Bits 9,6,5,and 4 of the ControlWord are operation mode specific.The halt function (bit 8)behavior is operation mode specific.If the bit is 1,the commanded motion shall be
interrupted,After releasing the halt function,the commanded motion shall be continued if possible,see Table 15-5.
TABLE 15-5.Halt bit (bit 8)
Bit | Value | Definition |
8 | 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.Control Word Mapping in Profile Position Mode
15 10 9 8 7 6 5 4 3 0
see Table 15-3 | Change on set-point | Halt | see
Table 15-3 |
Abs/rel | Change Set Immediately | New Set Point | see Table 15-3 |
MSB LSB
In Profle Position Mode the operation specific bits are mapped in Table 15-7.With bits 4, 5 and 9,user can define when the command for next Position (0x607A-POS)will be pro- cessed.Bit 6 defines whether the command is absolute or relative to the current position.
210 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
TABLE 15-7.Definition of Bits 4,5,6,and 9 in Profile Position Mode
Bit 9 | Bit 5 | Bit 4 | Definition |
0 | 0 | 0->1 | Positioning shall be completed (target reached)before the next one gets started. |
X | 1 | 0->1 | Next positioning shall be started immediately |
1 | 0 | 0->1 | Positioning with the current profile velocity up to the current set-point shall be proceeded and then next positioning shall be applied |
Bit | Value | Definition | |
6 | 0 | Target position shall be an absolute value | |
1 | Target position shall be a relative value.Positioning moves shall be performed relative to the preceding (internal absolute)target position |
Velocity Mode
TABLE 15-8.Control Word Mapping in Velocity Mode
15 9 8 7 6 5 4 3 0
see Table 15-3 | Halt | see Table 15-3 | Reference Ramp | Unlock Ramp | Enable Ramp | see Table 15-3 |
MSB LSB
In Velocity Mode the operation specific bits are mapped on Table 15-9.With bits 4,5 and 6,user can configure the available ramp related options as shown in Table 15-9.
TABLE 15-9 Definition of Bits 4,5,and 6 in Velocity Mode
Bit | Value | Definition |
4 | 0 | Motor shall be halted.Slow down on quick stop ramp (EDEC)and stay in operation en- abled |
1 | Velocity demand value shall accord with ramp output value | |
5 | 0 | Ramp output value shall be locked to current output value |
1 | Ramp output value shall follow ramp input value | |
6 | 0 | Ramp input value shall be set to zero |
1 | Ramp input value shall accord with ramp reference | |
Note:Bit 4 has got higher priority than bit 5. |
Other Modes
Those modes use some bits of the controlword.Table 15-10 shows the structure of the controlword.Table 15-11 defines the values for bit 8 of the controlword.
TABLE 15-10.Controlword for profile torque mode
15 98 7 6 43 0
See Table 15-3 | Halt | See Table 15-3 | reserved | See Table 15-3 |
MSB
LSB
Commands Reference
TABLE 15-11.Definition of bit 8
Bit | Value | Definition |
8 | 0 | The motion shall be executed or continued |
1 | Axis shall be stopped according to the halt option code (605Dh) | |
Note:At cyclic synchronous modes Halt function is not active |
Syntax Serial:!CW cc nn
Syntax Scripting:SetCommand(_CW,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 16-bit
Where
cc =Motor channel
nn =Control word value
FEW-Following Error Window (DS402)
Alias:FEW HexCode:99 CanOpen id:0x6065
Description:
This command indicates the configured range of the tolerated position values symmet- rically to the position demand value.If the position actual value is out of the following
error window,a following error occurs.If the value of the following error window is FFFF FFFFh,the following control is disabled.
Syntax Serial:!FEW cc nn
Syntax Scripting:SetCommandLFEW,cc,nn)
Arguments:2
Argument 1:Channel Min:1
Argument 2:Value
Where:
Type:Unsigned 8-bit
Max:Total of motors
Type:Unsigned 32-bit
cc =Motor channel
nn =Following Error Window (counts)
212 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
FET -Following ErrorTime Out (DS402)
Alias:FET HexCode:9A CanOpen id:Ox6066
Description:
This commandshall indicate the configured time for a following error condition,after that the bit 13 of the statuswordshall be set to 1.When the following error occurs,the control- ler goes to quick stop operation mode.The value is given in ms.
Syntax Serial:IFET cc nn
Syntax Scripting:SetCommand(_FET,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Where:
cc=Motor channel
Type:Unsigned 8-bit
Max:Total of motors
Type:Unsigned 16-bit
nn =Following Error Time out (ms)
INT -Interpolation Time Period (DS402)
Alias:INT HexCode:9C CanOpen id:Ox60C2
Description:
This command indicates the configured interpolation cycle time.The interpolation time period value is given in (interpolation time base)x10(interpolation time index)s(seconds). The interpolation time index is dimensionless.The default value of the interpolation time is 0.001 s(1 milisecond).
Syntax Serial:!INT ee nn
Syntax Scripting:SetCommand(_INT,ee,nn)
Arguments:2
Argument 1:Eelment Type:Unsigned 8-bit
Min:1 Max:2x Total number of motors
214 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Syntax Scripting:SetCommandLPAC,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2 Value
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 32-bit
Where:
cc=Motor channel
nn =Profile acceleration in 10xRPM/second
PDC-Profile Deceleration (DS402)
Alias:PDC HexCode:5F CANOpen id:Ox6084
Description:
This command is used to set the configured deceleration in 10xRPM/second.
Syntax Serial:IPDC cc nn
Syntax Scripting:SetCommandLPDC,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Where:
cc=Motor channel
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 32-bit
nn =Profile deceleration in 10xRPM/second
PLT -Software Position Limit (DS402)
Alias:PLT HexCode:9D CanOpen id:0x607D
Description:
This command indicates the configurated maximal and minimal software position limits. These parameters define the absolute position limits for the position demand value and the position actual value.Every new target has been checked against these limits.To dis- able the software position limits,the min position limit (1st element)and the max position limit (2nd element)shall be set to 0.The positions limits is given in same position units as the target position.
Syntax Serial:!PLT ee nn
216 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Where:
cc=Motor channel
nn =Target position
PSP-Profile Velocity (DS402)
Alias:PSP HexCode:5D CANOpen id:Ox6081
Description:
This command is used to set the velocity in RPM,normally attained at the end of the ac- celeration ramp during a profiled motion and is valid for both directions of motion.
Syntax Serial:!PSP cc nn
Syntax Scripting:SetCommandLPSR,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Where:
cc=Motor channel nn =Profile velocity
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 16-bit
ROM-Modes of Operation (DS402)
Alias:ROM HexCode:5A CANOpen id:Ox6060
Descniption:
This command configures the modes of operation.
Syntax Serial:!ROM cc nn
Syntax Scripting:SetCommand(_ROM,cc,nn)
Arguments:2
Argument 1:Channel | Type:Unsigned 8-bit |
Min:1 | Max:Total number of motors |
Argument 2:Value | Type:Signed 8-bit |
Where
cc=Motor channel
nn =Modes of operation
218 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
3:Delta speed in 10xRPM for channel 2
4:Delta time in seconds for channel 2
2×(m-1)+1:Delta speed in 10xRPM for channel m.
2×(m-1)+1:Delta time in seconds for channel m.
nn =Delta speed/time
SDC-Velocity Deceleration (DS402)
Alias:SDC HexCode:59 CANOpen id:Ox6049
Description:
This command configures the velocity deceleration.
Syntax Serial:!SDC ee nn
Syntax Scrnipting:SetCommand(_SDC,ee,nn)
Arguments:2
Argument 1:Element | Type:Unsigned 8-bit |
Min:1 | Max:2 xTotal number of motors |
Argument 2:Value | Type:Unsigned 32-bit |
Where:
ee =
1:Delta speed in 10xRPM for channel 1
2:Delta time in seconds for channel 1
3:Delta speed in 10xRPM for channel 2
4:Delta time in seconds for channel 2
2×(m-1)+1:Delta speed in 10xRPM for channel m.
2×(m-1)+1:Delta time in seconds for channel m.
nn =Delta speed/time
SPC-Target Profile Velocity (DS402)
Alias:SPC HexCode:66 CanOpen id:Ox60FF
Description:
Sets the required velocity of the system in RPM.Positive values shall indicate forward di- rection and negative values shall indicate reverse direction.This command is applicable to profile velocity and cyclic synchronous velocity modes.
Commands Reference | RoboteQ | |
Syntax Serial:!SPC cc nn
Syntax Scripting:SetCommand(_SPC,cc,nn) |
||
Arguments:2
Argument 1:Channel Min:1 Argument 2:Value Where: |
Type:Unsigned 8-bit
Max:Total of motors Type:Signed 32-bit |
|
cc =Motor channel
nn =Speed command in RPM SPL-Velocity Min/Max Amount (DS402) Alias:SPL HexCode:57 CANOpen id:0x6046 Description: This command configures the minimum and maximum amount of velocity in RPM.The vl velocity max amount is mapped internally to the vl velocity max positive and vl velocity max negative values.The vl velocity min amount is be mapped internally to the vl velocity min positive and vl velocity min negative values as shown in Figure 15-1.It is applicable to Velocity mode. FIGURE 15-1.Velocity Min Max Amount |
||
Syntax Serial:!SPL ee nn
Syntax Scripting:SetCommand(_SPL,ee,nn) Arguments:2 Argument 1:Eelment Type:Unsigned 8-bit Min:1 Max:2 x Total number of motors |
220 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Commands
Argument 2:Value
Where:
ees
1:Min amount for channel 1 2:Max amount for channel 1 3:Min amount for channel 2 4:Max amount for channel 2
Type:Unsigned 32-bit
2×(m-1)+1:Min amount for channel m.
2×(m-1)+2:Max amount for channel m.
nn =Velocity max/min amount
TC-TargetTorque (DS402)
Alias:TC HexCode:5B CANOpen id:Ox6071
Description:
This command configures the input value in 100xNm for the torque where the controller in torque mode.
Syntax Serial:!TC cc nn
Syntax Scrnipting:SetCommand(LTC,cc,nn)
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Where:
cc =Motor channel
Type:Unsigned 8-bit
Max:Total number of motors
Type:Signed 16-bit
nn =Torque input value in 100xNm
TSL-Torque Slope (DS402)
Alias:TSL HexCode:60 CANOpen id:Ox6087
Description:
This command is used to set the rate of change of torque,in 10xmiliNm/second as long as the Torque Constant (TNM)is 1000 miliNm/A.
Syntax Serial:!TSL cc nn
Syntax Scripting:SetCommand(TSL,cc,nn)
Commands Reference
Arguments:2
Argument 1:Channel
Min:1
Argument 2:Value
Where:
cc=Motor channel nn =Torque slope
Type:Unsigned 8-bit
Max:otal number of motors
Type:Unsigned 32-bit
Runtime Queries
Runtime queries can be used to read the value of real-time measurements at any time
during the controller operation.Real-time queries are very short commands that start with “?”followed by one to three letters.In some instances,queries can be sent with or with- out a numerical parameter.
Without parameter,the controller will reply with the values of all channels.When a nu-
merical parameter is sent,the controller will respond with the value of the channel select- ed by that parameter.
Example:
Q:?T
R: T=20:30:40
Q: ?T2
R:T=30
All queries are stored in a history buffer that can be made to automatically recall the past 16 queries at a userselectable time interval.See”Query History Commands”on page 19Z
Routine queries can be sent from within a MicroBasic Script using the getvalue()function.
TABLE 15-12.Runtime Queries
Command | Argument | Description |
A | Channel | Read Motor Amps |
Al | InputNbr | Read Analog Inputs |
AIC | InputNbr | Read Analog Input after Conversion |
ANG | Channel | Read Rotor Angle |
ASI | Channel | Read Raw Sin/Cos sensor |
B | VarNbr | Read User Boolean Variable |
BA | Channel | Read Battery Amps |
BCR | Channe | Read Brushless Count Relative |
BS | Channel | Read BL Motor Speed in RPM |
BSC | SensorNumber | Read Battery State of Charge in percentage |
BSR | Channel | Read BL Motor Speed as 1/1000 of Max RPM |
222 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
TABLE 15-12.Runtime Queries
Command | Argument | Description |
BMC | SensorNumber | Read Battery State Of Charge in AmpHours |
BMF | SensoNumbe | Read BMS Status Flags |
BMS | SensorNumber | Read BMS Switch States |
C | Channe | Read Encoder Counter Absolute |
CAN | Element | Read Raw CAN frame |
CB | Channe | Read Absolute Brushless Counter |
CD | None | Read Raw Redirect Received Frames Count |
CF | None | Read Raw CAN Received Frames Count |
CHS | Channel | CAN Consumer Heartbeat Status |
CIA | Channel | Read Converted Analog Command |
CIP | Channel | Read Internal Pulse Command |
CIS | Channe | Read Internal Serial Command |
CL | Group | Read RoboCAN Alive Nodes Map |
CR | Channe | Read Encoder Count Relative |
CSR | Channel | Read Relative SSI Sensor Counter |
CSS | Channel | Read Absolute SSI Sensor Counter |
D | None | Read Digital Inputs |
DI | InputNbr | Read Individual Digital Inputs |
DDT | Element | Read Raw Redirect Received Frame |
DO | None | Read Digital Output Status |
DPA | Channel | Read Motor DC/Peak Amps |
DR | Channel | Read Destination Reached |
E | Channel | Read Closed Loop Error |
F | Channel | Read Feedback |
FC | Channel | Read FOC Angle Adjust |
FLW | SensorNumber | Read Flow Sensor Counter |
FF | None | Read Fault Flags |
FID | None | Read Firmware ID |
FIN | None | Read Firmware ID (numerical) |
FM | Channel | Read Runtime Status Flag |
FS | None | Read Status Flags |
HS | Channel | Read Hall Sensor States |
ICL | Nodeld | Is RoboCAN Node Alive |
K | Channel | Read Spektrum Receiver |
LK | None | Read Lock status |
M | Channel | Read Motor Command Applied |
MA | AmpsChannel | Read Field Oriented Control Motor Amps |
MGD | SensorNumber | Read Magsensor Track Detect |
MGM | SensorNumber | Read Magsensor Markers |
MGS | SensorNumber | Read Magsensor Status |
Commands Reference
TABLE 15-12.Runtime Queries
Command | Argument | Description |
MGT | Channel | Read Magsensor Track Position |
MGY | Channel | Read Magsensor Gyroscope |
MGX | SensorNumber | Read MagSensor Tape Cross Detection |
P | Channe | Read Motor Power Output Applied |
PHA | CurrentSensorNumber | Read Phase Amps |
PI | InputNbr | Read Pulse Inputs |
PIC | InputNbr | Read Pulse Input after Conversion |
S | Channel | Read Encoder Motor Speed in RPM |
SCC | None | Read Script Checksum |
SEC | Channel | Read Sensor Errors |
SDT | Element | Read Raw Redirect Received Frame as string |
SNA | Channe | Read Sensor Angle |
SR | Channe | Read Encoder Speed Relative |
SS | Channel | Read SSl Sensor Motor Speed in RPM |
SSR | Channel | Read SSI Sensor Speed Relative |
STT | Fault Indication | STO Self-Test Result |
T | SensorNbr | Read Temperature |
TM | Element | Read Time |
TR | Channel | Read Position Relative Tracking |
TRN | None | Read Control Unit type and Controller Model |
UID | Element | Read MCU Id |
V | SensorNumber | Read Volts |
VAR | VarNumber | Read User Integer Variable |
A-Read Motor Amps
Alias:MOTAMPS HexCode:00 CANOpen id:Ox2100
Description:
Measures and reports the motor Amps,in Amps*10,for all operating channels.For brush- less controllers this query reports the RMS value.Note that the current flowing through the motors is often higher than this flowing through the battery.
Syntax Serial: ?A [ccl
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalueLA,cc)
result =getvalue(_MOTAMPS,cc)
Reply:
A=aa Type:Signed 16-bit Min:0
224 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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 Mo- tor 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.See controller datasheet to find which Amps is measured by your particular model.
Al -Read Analog Inputs
Alias:ANAIN HexCode:10 CANOpen id:Ox2146
Description:
Reports the raw value in mV of each of the analog inputs that are enabled.Input that is disabled will report 0.The total number of Analog input channels varies from one control- ler model to another and can be found in the product datasheet.
Syntax Serial: ?Al [cc]
Argument: InputNbr
Min:1 Max:Max Number of Analog Inputs
Syntax Scripting:result =getvalueLAl,cc)
result =getvalueLANAIN,cc)
Reply:
Al=nn Type:Signed 16-bit Min:0 Max:5300
Where:
cc =Analog Input number
nn =Millivolt for each channel
AIC -Read Analog Input after Conversion
Alias:ANAINC HexCode:23 CANOpen id:Ox2147
Description:
Returns value of an Analog input after all the adjustments are performed to convert it to a command or feedback value (Min/Max/Center/Deadband/Linearity).If an input is disabled, the query retuns 0.The total number of Analog input channels varies from one controller model to another and can be found in the product datasheet.
Syntax Serial: ?AlC [cc]
Commands Reference | RoboteQ |
Argument: InputNbr
Min:1 Max:Total Number of Analog Inputs Syntax Scripting:result =getvalueLAlC,cc) result =getvalue(_ANAINC,cc) Reply: AIC=nn Type:Signed 16-bit Min:-1000 Max:1000 Where: cc =Analog Input number nn =Converted analog input value +/-1000 range ANG -Read Rotor Angle Alias:ANG HexCode:42 CANOpen id:0x2132 Description: On brushless controller operating in sinusoidal mode,this query returns the realtime val- ue of the rotor’s electrical angle of brushless motor.This query is useful for verifying trou- bleshootingsin/cos and SPI/SSI sensors.Angle are reported in 0-511 degrees. Syntax Serial: ?ANG [cc] Argument: Channel Min:1 Max:Total Number of Motors Syntax Scripting:result =getvalueLANG,cc) Reply: ANG=nn Type:Unsigned 16-bit Min:0 Max:511 Where: cc =Motor channel nn =Rotor electrical angle ASl -Read Raw Sin/Cos sensor Alias:ASl HexCode:33 CANOpen id: Description: Returns realtime raw values of ADC connected to sin/cos sensors of each motor or the realtime values of the raw data reported by the SSl sensor of the motor.This query is useful for verifying troubleshooting sin/cos sensors and SSl sensors. Syntax Serial: ?ASl [ccl Argument: Channel Min:1 Max:2*Number of Motors Syntax Scripting:result =getvalue(ASl,cc) |
226 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Reply:
ASl=nn Type:Unsigned 16-bit Min:0 Max:65535
Where:
CC =
1:Sin input 1/SSl input 1
2:Cos input 1
3:Sin input 2/SSl 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 intemal variables that can be read and written to/from within a user MicroBasic script.It is used to pass boolean states between user scripts and a microcomputer connected to the controller.The total number of user boolean variables varies from one controller model to another and can be found in the product datasheet.
Syntax Serial: ?B [nn]
Argument: VarNbr
Min:1 Max:Total Number of Bool Variables
Syntax Scripting:result =getvalue(_B,nn)
result =getvalue(_BOOL,nn)
Reply:
B=bb Type:Boolean Min:0 Max:1
Where:
nn =Boolean variable number
bb =0 or 1 state of the variable
BA -Read Battery Amps
Alias:BATAMPS HexCode:0C CANOpen id:0x210C
Description:
Measures and reports the Amps flowing from the battery in Amps *10.Battery Amps are often lower than motor Amps.
Syntax Serial: ?BA [ccl
Argument: Channel:
Min:1 Max:Total Number of Motors
Syntax Scnpting:result =getvalueLBA,cc)
result =getvalue(_BATAMPS,cc)
Commands Reference | RoboteQ |
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.See controller datasheet to find which Amps is measured by your particular model. BCR -Read Brushless Count Relative Alias:BLRCNTR HexCode:09 CANOpen id:0x2109 Description: Returns the amount of Internal sensor (Hall,SinCos,Resolver)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.If the query is used via RoboCAN,the query will be refreshed by default every 20ms,reseting the counter.Therefore a second argument has been introduced dictating the refresh rate. Syntax Serial:?BCR [cc,nn] Arguments:2 or 1 Argument 1: Channel Min:1 Max:Total Number of Motors Argument 2: Time in millisecond,refresh rate (only if used in RoboCAN). BCR=nn,cc Type:Signed 32-bit Min:2147M Max:2147M Where: cc=Motor channel nn=value Example: ?BCR 1:Ask for BCR for channel 1 ②01?BCR 10:Ask from node 1 for BCR for channel 1 only once,the rate value is zero. @02?BCR 1100:Ask from node 2 for BCR for channel 1 with rate of 100ms. |
228 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
BMC -Read BMS State Of Charge in AmpHours
Alias:- HexCode:4C CANOpen id:Ox2141
Description:
When one or more BMS10X0 are connected to the controller,this query reports the Bat- tery’s State Of Charge in AmpHours,which is connected to the respective BMS10X0.If 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 con- nected 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.
Syntax Serial:?BMC [cc]
Argument: SensorNumber
Min:None Max:Total Number of Pulse Inputs
Syntax Scripting:result =getvalue(_BMC,cc)
Reply:
BMC=nn Type:Unsigned 8-bit Min:0 Max:255
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
p:BMS10X0 at pulse input p
nn =AmpHours (Ah)
BMF-Read BMS status flags
Alias:- HexCode:4D CANOpen id:0x2142
Description:
When one or more BMS10X0 are connected to the controller,this query reports the
status flags of the respective BMS10X0.If only one BMS10X0 is connected to any pulse input this query will report the data of that device,regardless which pulse input it is con- nected 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.
Syntax Serial:?BMF [cc]
Argument:
SensorNumber
Min:None
Max:Total Number of Pulse Inputs
Commands Reference | RoboteQ | |
Syntax Scripting:result =getvalue(_BMF,cc)
Reply: BMF=f1+f2*2+f3*4+…+fn*2^n-1Type:Unsigned 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 |
8-bit Min:0 Max:255 | |
p:BMS10X0 at pulse input p
and f1 =Unsafe Temperature f2 =Over or Under Voltage Error Set f3=Amp Trigger Set f4 =Over Current Eror Set f5 =Short Load or Inv Charger f6 =Bad State Of Health f7 =Config Error f8 =Internal Fault BMS -Read BMS switch states Alias:- HexCode:4E CANOpen id:0x2143 Description: When one or more BMS10X0 are connected to the controller,this query reports the switch states of the respective BMS10X0.If only one BMS10X0 is connected to any pulse input this query will report the data of that device,regardless which pulse input it is con- nected to.If more than one BMS10X0 is connected to pulse inputs and these inputs are enabled and configured in BMS MutiPWM mode,then the argument following the query is used to select the sensor. Syntax Serial:?BMC [cc] Argument: SensorNumber Min:None Max:Total Number of Pulse Inputs Syntax Scripting:result =getvalue(_BMC,cc) |
230 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Reply:
BMC=f1+f2*2+f3*4+…+fn*2^n-1Type:Unsigned
Where:
8-bit Min:0 Max:255
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
…-
p:BMS10X0 at pulse input p
and
f1 =Pack Switch
f2 =Load Switch
f3 =Charger Switch
f4 =Brake Resistor /Aux Switch
f5 =Reserved
f6 =Bluetooth Vcc switch
f7 =Reserved
f8=Reserved
BS -Read BL Motor Speed in RPM
Alias:BLSPEED HexCode:OA CANOpen id:Ox210A
Description:
On brushless motor controllers,reports the actual speed measured using the motor’s In- ternal sensors (Hall,SinCos,Resolver)as the actual RPM value.To report RPM accurately, the correct number of motor poles must be loaded in the BLPOL configuration parameter.
Syntax Serial: ?BS [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalueLBS,cc)
result =getvalueLBLSPEED,cc)
Reply:
BS=nn Type:Signed 32-bit Min:-65535 Max:65535
Where:
cc =Motor channel
nn =Speed in RPM
Commands Reference | RoboteQ |
BSC-Read BMS State of Charge in percentage
Alias:- HexCode:50 CANOpen id:Ox213A Description: When one or more BMS10X0 are connected to the controller,this query reports the Bat- tery’s State Of Charge in percentage,which is connected to the respective BMS10X0.If 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 con- nected 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. Syntax Serial:?BSC [cc] Argument: SensorNumber Min:None Max:Total Number of Pulse Inputs Syntax Scripting:result =getvalue(_BSC,cc) Reply. BSC=nn Type:Unsigned 8-bit Min:0 Max:255 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 p:BMS10X0 at pulse input p nn =State Of Charge (%) BSR-Read BL Motor Speed as 1/1000 of Max RPM Alias:BLRSPEED HexCode:0B CANOpen id:0x210B Description: On brushless motor controllers,returns the measured motor speed,using the motor’s Intemal sensors(Hall,Sin/Cos,Resolver),as a ratio of the Max RPM configuration param- eter.The result is a value of between 0 and +/-1000.Note that if the motor spins faster than the Max RPM,the return value will exceed 1000.However,a larger value is ignored by the controller for its internal operation.To report an accurate result,the correct number of motor poles must be loaded in the BLPOL configuration parameter. Syntax Serial! ?BSR |
232 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalueLBSR,)
result =getvalue(LBLRSPEED,)
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:Ox2104
Description:
Returns the encoder value as an absolute number.The counter is 32-bit with a range of +/-2147483648 counts.
Syntax Serial:?C [cc]
Argument: Channel
Min:1 Max:Total Number of Encoders
Syntax Scripting:result =getvalue(C,cc)
result =getvalueLABCNTR,cc)
Reply:
C=nn Type:Signed 32-bit Min:-2147M Max:2147M
Where:
cc =Encoder channel number
nn =Absolute counter value
CAN -Read Raw CAN frame
Alias:CAN HexCode:27 CANOpen id:
Description:
This query is used in CAN-enabled controllers to read the content of a received CAN
frame in the RawCAN mode.Data will be available for reading with this query only after a ?CF query is first used to check how many received frames are pending in the FIFO
buffer.When the query is sent without arguments,the controller replies by outputting all elements of the frame separated by colons.
Syntax Serial: ?CAN [ee]
Commands Reference | lRoboteQ | |
Argument: Element
Min:1 Max:10 |
||
Syntax Scripting:result =getvalue(CAN,ee)
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.The counter is 32-bit with a range of +/- 2147483648 counts. Syntax Serial: ?CB [cc] Argument: Channel Min:1 Max:Total Number of Motors Syntax Scripting:result =getvalue(_CB,cc) result =getvalueLBLCNTR,cc) Reply: CB=nn Type:Signed 32-bit Min:-2147M Max:2147M Where: cc =Motor channel nn =Absolute counter value CD -Read Raw Redirect Received Frames Count Alias:CD HexCode:8E CANOpen id:- Description: This query is used to read the number of received Raw Redirect framespending in the FIFO buffer and copies the oldest frame into the read buffer,from which it can then be |
234 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
accessed using the ?DDT or ?SDT queries.Sending ?CD again,copies the next frame into the read buffer.
Syntax Serial:?CD
Argument:None
Syntax Scripting:result =getvalue(_CD,1)
Reply:
CD=nn Type:Unsigned 8bit Min:0 Max:255
Where:
nn =Number of frames in receive queue
CF-Read Raw CAN Received Frames Count
Alias:CF HexCode:28 CANOpen id:
Description:
This query is used to read the number of received CAN framespending in the FIFO buf- fer and copies the oldest frame into the read buffer,from which it can then be accessed using the ?CAN query.Sending ?CF again,copies the next frame into the read buffer.The controller can buffer up to 16 CAN frames
Syntax Serial: ?CF
Argument: None
Syntax Scnipting:result =getvalue(CF,1)
Reply:
CF=nn Type:Unsigned 8-bit Min:0 Max:16
Where:
nn =Number of frames in receive queue
add chapter:
CHS -CAN Consumer Heartbeat Status
Alias:- HexCode:94 CANOpen id:-
Description:
Retums the the status of the respective consumer heartbeat channel.With CANOpen
enabled,there are 4 slots in order to monitor heartbeats.Their status can be checked with this query.
Syntax Serial:?CHS [ccl
Argument:Heartbeat Channel
Commands Reference | RoboteQ |
Min:1 Max:4
Syntax Scripting:result =getvalue(_CHS,cc) Reply: ClA=nn Type:Unsigned 8-bit Min:0 Max:127 Where: cc =Heartbeat channel nn =Heartbeat Status: 0:Not configured 1:Pending (waiting for the first heartbeat message from node) 2:Active (node is sending heartbeat regularly) 127:Inactive (node stopped sending heartbeat) CIA-Read Converted Analog Command Alias:CMDANA HexCode:1A CANOpen id:Ox2117 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 con- figured as Motor Command.This query can be used,for example,to read the com- mand joystick from within a MicroBasic script or from an external microcomputer, even though the controller may be currently responding to Serial or Pulse command because of a higher priority setting.The returned value is the raw Analog input value with all the adjustments performed to convert it to a command (Min/Max/Center/Deadband/ Linearity). Syntax Serial: ?ClA [cc] Argument: Channel Min:1 Max:Total Number of Motors Syntax Scripting:result =getvalueLClA,cc) result =getvalueLCMDANA,cc) Reply: ClA=nn Type:Signed 32-bit Min:-1000 Max:1000 Where: cc =Motor channel nn =Command value in +/-1000 range |
236 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
CIP -Read Internal Pulse Command
Alias:CMDPLS HexCode:1B CANOpen id:Ox2118
Description:
Returns the motor command value that is computed from the Pulse inputs whether or
not the command is actually applied to the motor.The Pulse input must be configured as Motor Command.This query can be used,for example,to read the command
joystick from within a MicroBasic script or from an extemal microcomputer,even though the controller may be currentty responding to Seria or Analog command because of a higher priority setting.The returned value is the raw Pulse input value with all the ad- justments performed to convert it to a command (Min/Max/Center/Deadband/Linearityl.
Syntax Serial: ?CIP[cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(_ClIP cc)
result =getvalueLCMDPLS,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 MicroBa- sic script whether or not the command is actually applied to the motor.This query can be used,for example,to read from an external microcomputer the command generated inside MicroBasic script,even though the controller may be currently respond- ing to a Pulse or Analog command because of a higher priority setting.
Syntax Serial: ?CIS[cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(ClS,cc)
result =getvalueLCMDSER,cc)
Reply:
CIS=nn Type:Signed 32-bit Min:-1000 Max:1000
Where:
cc =channe
nn =command value in +/-1000 range
Commands Reference | RoboteQ |
CL-Read RoboCAN Alive Nodes Map
Alias:CALIVE HexCode:26 CANOpen id: Description: With CL it is possible to see which nodes in a RoboCAN are alive and what type of device is present at each node.A complete state of the network is represented in sixteen 32- bit numbers.Within each 32-bit word are 8 groups of 4-bits.The 4-bits contain the node information.E.g.bits O-3 of first number is for node 0,bits 8-11 of first number is for node 2,bits 4-7 of second number is for node 5 and bits 12-15 of fourth number is for node 11, etc. Syntax Serial: ?CL nn Argument: Group Min:1 Max:16 Syntax Scripting:result =getvalue(_CL,nn) result =getvalueLCALIVE,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.Each 4-bit word: 0b0000:Inactive node 0b0001:Active motor controller 0b0011:Active magsensor 0b0101:Active RIOX 0b0111:Active BMS 0b1001:Active OTS 0b1011:Active FLW CR-Read Encoder Count Relative Alias:RELCNTR HexCode:08 CANOpen id:0x2108 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. Syntax Serial: ?CR [cc] Argument: Channel Min:1 Max:Total Number of Encoders |
238 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Syntax Scripting:result =getvalueLCR,cc)
result =getvalueLRELCNTR,cc)
Reply:
CR=nn Type:Signed 32-bit Min:-2147M Max:2147
Where:
cc =Motor channel
nn =Counts since last read using ?CR
CSR -Read Relative SSI Sensor Counter
Alias:- HexCode:6D CANOpen id:Ox213F
Description:
Retuns 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.
Syntax Serial:?CSR [cc]
Argument: Channel
Min:1 Max:Total Number of SSI Encoders
Syntax Scripting:result =getvalue(_CSR,cc)
Reply:
CSR=nn Type:Signed 32-bit Min:-2147M Max:2147
Where:
cc=SSl sensor channel
nn =Counts since last read using ?CSR
CSS-Read Absolute SSI Sensor Counter
Alias:- HexCode:6E CANOpen id:Ox213E
Description:
Retuns the SSl encoder value as an absolute number.The counter is 32-bit with a range of +/-2147483648 counts.
Syntax Serial:?CSS [cc]
Argument: Channel
Min:1 Max:Total Number of SSl Encoders
Syntax Scripting:result =getvalue(_CSS,cc)
Commands Reference | RoboteQ | |
Reply:
CSS=nn Type:Signed 32-bit Where: |
Min:-2147M Max:2147 | |
cc =SSl sensor channel
nn =Absolute counter value D-Read Digital Inputs Alias:DIGIN HexCode:OE CANOpen id:Ox210E Descrijption: 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 in- puts.The total number of Digital input channels varies from one controller model to anoth- er and can be found in the product datasheet. Syntax Serial: ?D Argument: None Syntax Scripting:result =getvalueLD,1) result =getvalueLDIGIN,1) Reply D=nn Type:Unsigned 32-bit Where: nn=b1+b2*2+b3*4+…+bn*2^n-1 Example: Q:?D R:D=17:Inputs 1 and 5 active,all others inactive DDT -Read Raw Redirect Received Frame Alias:DDT HexCode:8F CANOpen id:- Description: This query is used in Raw Redirect mode to read the content of a received Raw Redirect frame.Data will be available for reading with this query only after a ?CD query is first used to check how many received frames are pending in the FIFO buffer.When the query is sent without arguments,the controller replies by outputting all elements of the frame separated by colons. Syntax Serial:?DDT [ee] Argument:Element Min:1 Max:64 |
240 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Syntax Scripting:result =getvalue(_DDT,ee)
Reply:
CAN =dd1:dd2:dd3:…:dd64 Type:Unsigned 8-bit Min:0 Max:255
Where:
ee =Byte in frame
dd1 =byte size
dd2 to dd64 =data0 to data62
Examples:Q:?DDT
R:DDT=8:82:111:98:111:116:101:113
Q:?DDT 3
R:DDT=111
Dl -Read Individual Digital Inputs
Alias:DIN HexCode:OF CANOpen id:0x2145
Description:
Reports the status of an individual Digital Input.The query response is a boolean value (0 or 1).The total number of Digital input channels varies from one controller model to anoth- er and can be found in the product datasheet.
Syntax Serial: ?Dl [cc]
Argument: InputNbr
Min:1 Max:Total Number of Digital Inputs
Syntax Scripting:result =getvalueLDI,cc)
result =getvalueLDIN,cc)
Reply:
Dl=nn Type:Boolean Min:0 Max:1
Where:
cc =Digital Input number
nn =0 or 1 state for each input
Example:
Q:?DI
R:Dl=1:0:1:0:1:0
Q:?DI 1
R:Dl=0
Commands Reference | RoboteQ |
DO -Read Digital Output Status
Alias:DIGOUT HexCode:17 CANOpen id:Ox2113 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.The total number of Digital output channels varies from one controller model to another and can be found in the product datasheet. Syntax Serial: ?DO Argument: None Syntax Scripting:result =getvalueLDO,1) result =getvalueLDIGOUT,1) Reply: DO=nn Type:Unsigned 16-bit Min:0 Max:65536 Where: nn=d1+d2*2+d3*4+…+dn*2^n-1 Example: Q:?DO R:DO=17:Outputs 1 and 5 active,all others inactive DPA -Read DC/Peak Amps Alias:- HexCode:6E CANOpen id:- Description: Applicable only for brushless controllers.Measures and reports the Peak Amps,in Amps*10,for all operating channels. Syntax Serial:?DPA [ccl Argument: Channel Min:1 Max:Total Number of Motors Syntax Scripting:result =getvalue(_DPA,cc) Reply DPA =aa Type:Signed 16-bit Min:0 Where: cc =Motor channel aa =Amps*10 for each channel |
242 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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.The Destination Reached bit is latched and is cleared once it has been read.
Syntax Serial: ?DR [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(LDR,cc)
result =getvalueLDREACHED,cc)
Reply:
DR=nn Type:Unsigned 8-bit Min:0 Max:1
Where:
cc =Motor channel
nn =
0:Not yet reached
1:Reached
E-Read Closed Loop Error
Alias:LPERR HexCode:18 CANOpen id:0x2114
Description:
In closed-oop modes,returns the difference between the desired speed or position and the measured feedback.This query can be used to detect when the motor has reached the desired speed or position.In open loop mode,this query returns 0.
Syntax Serial: ?E [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(LE,cc)
result =getvalue(LPERR,cc)
Commands Reference | RoboteQ | |
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:Ox2110 Description: Reports the value of the feedback sensors that are associated to each of the channels in closed-oop modes.The feedback source can be Encoder,Analog or Pulse.Selecting the feedback source is done using the encoder,pulse or analog configuration parameters.This query is useful for verifying that the correct feedback source is used by the channel in the closed-oop mode and that its value is in range with expectations. |
||
Syntax Serial:
Argument: |
?F [cc]
Channel Min:1 Max:Total Number of Motors |
|
Syntax Scripting:result =getvalue(F,cc)
result =getvalueLFEEDBK,cc) Reply: F=nn Type:Signed 32-bit Min:-2147M Max:2147M Where: cc =Motor channel nn =Feedback values FC-Read FOC Angle Adjust Alias:FCHexCode:47 CANOpen id:0x2135 Description: Read in realtime the angle correction that is currently applied by the Field Oriented algo- rithm in order achieve optimal performance Syntax Serial: ?FC [cc] Argument: Channel Min:1 Max:Total Number of Motors Syntax Scripting:result =getvalueLFC,cc) Reply: FC=nn Type:Signed 16-bit Min:-512 Max:512 |
244 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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.If only one FLW100 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 FLW100 is connected to pulse in- puts and these inputs are enabled and configured in FlowSensor MultiPWM mode,then the argument following the query is used to select the sensor.
Syntax Serial:?FLW [ccl
Argument: SensorNumber
Min:1 Max:2*Total Number of Pulse Inputs
Syntax Scripting:result =getvalue(_FLW,cc)
Reply:
FLW=nn Type:Signed 32-bit Min:-2147M Max:2147M
Where:
cc =(When only one sensor enabled)
1:X Counter
2:Y Counter
cc =(When several sensors enabled)
1:X Counter of sensor at pulse input 1
2:Y Counter of sensor at pulse input 1
3:X Counter of sensor at pulse input 2
4:Y Counter of sensor at pulse input 2
((p-1)*2)+1:X Counter of sensor at pulse input p
((p-1)*2)+2:Y Counter of sensor at pulse input p
nn =Distance in mm*10.
Commands Reference | RoboteQ | |
FF-Read Fault Flags
Alias:FLTFLAG HexCode:15 CANOpen id:Ox2112 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(LFF,1)
result =getvalueLFLTFLAG,1) Reply: FS=f1+f2*2+f3*4+…+fn*2^n-1Type:Unsigned 16-bit Where: f1 =Overheat f2 =Overvoltage f3 =Undervoltage f4 =Short circuit f5=Emergency stop f6 =Motor/Sensor Setup fault f7 =MOSFET failure f8=Default configuration loaded at startup Example: Q:?FF R:FF=2:Overvoltage fault |
Min:0 Max:65535 | |
FID -Read Firmware ID
Alias:FID HexCode:1E CANOpen id: Description: This query will report a string with the date and identification of the firmware revision of the controller. Syntax Serial: ?FID Argument: None Syntax Scripting:result =getvalue(LFID,1) Reply: FID=ss Type:String |
246 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Where:
ss =Firmware ID string
Example:
Q:?FID
R:FID=Roboteq v1.6 RCB50005/01/2016
FIN -Read Firmware ID(numerical)
Alias:- HexCode:3F CANOpen id:Ox2137
Description:
This query will report the version and the date of the firmware revision of the controller.
Syntax Serial:?FIN [ee]
Argument:
Element
Min:None
Max:4
Syntax Scripting:result =getvalue(_FIN,ee)
Reply:
FID =nn Type:Unsigned 16-bit Min:0
Where:
ee =Firmware Version Element
1:Version
2:Month
3:Day
4:Year
nn =Value.
FM-Read Runtime Status Flag
Alias:MOTFLAG HexCode:30 CANOpen id:0x2122
Description:
Report the runtime status of each motor.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: ?FM [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Commands Reference | RoboteQ |
Syntax Scripting:result =getvalueLFM,cc)
result =getvalueLMOTFLAG,cc) Reply: FM=f1+f2*2+f3*4+…+fn*2n-1 Type:Unsigned 16-bit Min:0 Max:255 Where: cc =Motor channel f¹=Amps Limit currently active f2 =Motor stalled f3 =Loop Error detected f4 =Safety Stop active f5 =Forward Limit triggered f6 =Reverse Limit triggered f7 =Amps Trigger activated Example: Q:?FM 1 R:FM=6:Motor 1 is stalled and loop error detected Note: f2,f3 and f4 are cleared when the motor command is making the motor idle (e.g.O in closed loop speed).When f5 or f6 are on,the motor can only be commanded to go in the reverse direction. FS -Read Status Flags Alias:STFLAG HexCode:14 CANOpen id:Ox2111 Description: Report the state of status flags used by the controller to indicate a number of internal conditions during normal operation.The response to this query is the single number for all status flags.The status of individual flags is read by converting this number to binary and look at various bits of that number. Syntax Serial: ?FS Argument: None Syntax Scripting:result =getvalueLFS,1) result =getvalueLSTFLAG,1) Reply: FS=f1+f2*2+f3*4+…+fn*2^n-1Type:Unsigned 16-bit Min:0 Max:65535 Where f1 =Serial mode |
248 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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 mosttly useful for trouble-
shooting.When no sensors are connected,all inputs are pulled high and the value 7 will be replied.For 60 degrees spaced Hall sensors,O-1-3-4-6-7 are valid combinations,while 2 and 5 are invalid combinations.For 120 degrees spaced sensors,1-2-3-4-5-6 are valid combinations,while 0 and 7 are invalid combinations.In normal conditions,valid values should appear at one time or the other as the motor shaft is rotated
Syntax Serial ?HS [ccl
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalueLHS,cc)
result =getvalueLHSENSE,cc)
Reply
HS=ha+2*hb+4*hc Type:Unsigned 8-bit Min:0 Max:7
Where:
cc =channel
ha =hall sensor A
hb =hall sensor B
hc =hall sensor C
Example:
Q:?HS 1
R:HS=5:sensors A and C are high,sensor B is low
Note:
Function not available on HBLxxxxx products
Commands Reference | RoboteQ |
ICL-Is RoboCAN Node Alive
Alias:ICL HexCode:46 CANOpen id: Descrijption: This query is used to determine if specific RoboCAN node is alive on CAN bus. Syntax Serial: ?ICL cc Argument: Nodeld Min:1 Max:127 Syntax Scripting:result =getvalue(ICL,cc) Reply: ICL=nn Type:Unsigned 8-bit Min:0 Max:1 Where: cc=Node ld nn = 0:Not present 1:Alive K-Read Spektrum Receiver Alias:SPEKTRUM HexCode:21 CANOpen id:Ox211A Description: On controller models with Spektrum radio support,this query is used to read the raw values of each of up to 6 receive channels.When signal is received,this query returns the value 0. Syntax Serial: ?K[cc] Argument: Channel Min:1 Max:6 Syntax Scripting:result =getvalueLK,cc) result =getvalueLSPEKTRUM,cc) Reply: K=nn Min:0 Max:1024 Where: cc =Radio channel nn =Raw joystick value,or O if transmitter is off or out of range LK -Read Lock status Alias:LOCKED HexCode:1D CANOpen id: Description: Retuns the status of the lock flag.If the configuration is locked,then it will not be possi- ble to read any configuration parameters until the lock is removed or until the parameters |
250 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
are reset to factory default.This feature is useful to protect the controller configuration from being copied by unauthorized people.
Syntax Serial: ?LK
Argument: None
Syntax Scripting:result =getvalueLLK,1)
result =getvalueLLOCKED,1)
Reply:
LK=ff Type:Unsigned 8-bit Min:0 Max:1
Where:
ff =
0:unlocked
1:locked
M-Read Motor Command Applied
Alias:MOTCMD HexCode:01 CANOpen id:0x2101
Description:
Reports the command value that is being used by the controller.The number that is
reported will be depending on which mode is selected at the time.The choice of one
command mode vs.another is based on the command priority mechanism.In the Serial mode,the reported value will be the command that is entered in via the RS232,RS485, TCP or USB port and to which an optional exponential correction is applied.In the Analog and Pulse modes,this query will report the Analog or Pulse input after it is being convert- ed using themin,max,center,deadband,and linearity corrections.This query is useful for viewing which command is actually being used and the effect of the correction that is being applied to the raw input.
Syntax Serial: ?M [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(_M,cc)
result =getvalueLMOTCMD,cc)
Reply:
M=nn Type:Signed 32-bit Min:-2147M Max:2147M
Where:
cc =Motor channel
nn =Command value used for each motor.0 to +/-1000 range
Example:
Q:?M
R:M=800:-1000
Q:?M 1R:
M=800
Commands Reference | lRoboteQ |
MA-Read Field Oriented Control Motor Amps
Alias:MEMS HexCode:25 CANOpen id:Ox211C Description: On brushless motor controllers operating in sinusoidal mode,this query returns the Torque (also known as Quadrature or lq)current,and the Flux (also known as Direct,or ld) current.Current is reported in Amps x 10. Syntax Serial: ?MA nn Argument: AmpsChannel Min:1 Max:2*Total Number of Motors Syntax Scripting:result =getvalue(_MA,nn) result =getvalue(_MEMS,nn) Reply: MA=mm Type:Signed 16-bit Where: nn = 1:Flux Amps 1(ld) 2:Torque Amps 1(lq) 3:Flux Amps 2 (ld) 4:Torque Amps 2(lq) mm =Amps*10 MGD -Read MagsensorTrack Detect Alias:MGDET HexCode:29 CANOpen id:Ox211D Description: When one or more MGS1600 Magnetic Guide Sensors are connected to the controller, this query reports whether a magnetic tape is within the detection range of the sensor.If no tape is detected,the output will be 0.If only one sensor is connected to any pulse in- put,no argument is needed for this query.If more than one sensor is connected to pulse inputs and these inputs are enabled and configured in Magsensor MultiPWM mode,then the argument following the query is used to select the sensor Syntax Serial: ?MGD [ccl Argument: SensorNumber Min:None Max:Total Number of Pulse Inputs Syntax Scripting:result =getvalueLMGD,cc) result =getvalue(_MGDET,cc) Reply: MGD=nn Type:Unsigned B-bit Min:0 Max:1 |
252 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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
p:Sensor at pulse input p
nn =
0:No track detected
1:Track detected
MGM -Read Magsensor Markers
Alias:MGMRKR HexCode:2B CANOpen id:Ox211F
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller, this query reports whether left or right markers are present under sensor.If only one sen- sor is connected to any pulse input this query will report the data of that sensor,regard- less which pulse input it is connected to.If more than one sensor is connected to pulse inputs and these inputs are enabled and configured in Magsensor MultiPWM mode,then the argument following the query is used to select the sensor
Syntax Serial: ?MGM [cc]
Argument: SensorNumber
Min:1 Max:2*Total Number of Pulse Inputs
Syntax Scripting:result =getvalueLMGM,cc)
result =getvalueLMGMRKR,cc)
Reply:
MGM=mm Type:Unsigned 8-bit Min:0 Max:1
Where:
cc =(When only one sensor enabled)
1:Left Marker
2:Right Marker
cc=(When several sensors enabled)
1:Left Marker of sensor at pulse input 1
2:Right Marker of sensor at pulse input 1
3:Left Marker of sensor at pulse input 2
4:Right Marker of sensor at pulse input 2
((p-1)*2)+1:Left Marker of sensor at pulse input p
((p-1)*2)+2:Right Marker of sensor at pulse input p
nn =
0:No marker detected
1:Marker detected
Commands | Reference | RoboteQ |
MGS | -Read Magsensor Status | |
MGT | Alias:MGSTATUS HexCode:2C CANOpen id:Ox2120
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 in- put,no argument is needed for this query.If more than one sensor is connected to pulse inputs and these inputs are enabled and configured in Magsensor MultiPWM mode,then the argument following the query is used to select the sensor. Syntax Serial: ?MGS Argument: SensorNumber Min:None Max:Total Number of Pulse Inputs Syntax Scripting:result =getvalueLMGS,) result =getvalue(MGSTATUS,) Reply: MGS=f1+f2*2+f3*4+…+fn*2n-1 Type:Unsigned 16-bit Where: cc =(When only one sensor enabled) None or 1:Current sensor cc =(When only several sensors enabled) 1:Sensor at pulse input 1 2:Sensor at pulse input 2 p:Sensor at pulse input p f1:Tape cross f2:Tape detect f3:Left marker present f4:Right marker present f9:Sensor active -Read MagsensorTrack Position Alias:MGTRACK HexCode:2A CANOpen id:Ox211E Description: When one or more MGS1600 Magnetic Guide Sensors are connected to the controller, this query reports the position of the tracks detected under the sensor.If only one sensor is connected to any pulse input,the argument following the query selects which track to read.If more than one sensor is connected to pulse inputs and these inputs are enabled and configured in Magsensor MultiPWM mode,then the argument following the query is used to select the sensor.The reported position of the magnetic track in milimeters,us- ing the center of the sensor as the O reference. Syntax Serial: ?MGT cc Argument: Channel Min:1 Max:3*Total Number of Pulse Inputs |
254 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Syntax Scripting:result =getvalue(MGT,cc)
result =getvalueLMGTRACK,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 pulse input 2
((p-1)*3)+1:Left Track of sensor at pulse input p
((p-1)*3)+2:Right Track of sensor at pulse input p
((p-1)*3)+3:Active Track of sensor at pulse input p
nn =position in millimeters
MGY -Read Magsensor Gyroscope
Alias:MGYRO HexCode:2D CANOpen id:Ox2121
Description:
When one or more MGS1600 Magnetic Guide Sensors are connected to the controller,
this query reports the state of the optional gyroscope inside the sensor.If only one sen- sor is connected to any pulse input,no argument is needed for this query.If more than
one sensor is connected to pulse inputs and these inputs are enabled and configured in Magsensor MultiPWM mode,then the argument following the query is used to select the sensor
Syntax Serial: ?MGY [cc]
Argument: Channell
Min:None Max:Total Number of Pulse Inputs
Syntax Scripting:result =getvalueLMGY,cc)
result =getvalueLMGYRO,cc)
Reply:
MGY=nn Type:Signed 16-bit Min:-32768 Max:32767
Where:
cc =(When only one sensor enabled)
None or 1:Current sensor
cc =(When several sensors enabled)
Commands Reference | RoboteQ | |||
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.If more than one sen- sor is connected to pulse inputs and these inputs are enabled and configured in Magsen- sor MultiPWM mode,then the argument following the query is used to select the sensor. Syntax Serial:?MGY [cc]
Syntax Scripting:result =getvalue(_MGY,cc) Reply: MGY =aa Type:1-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 p:sensor at pulse input p nn =Tape Cross Flag P -Read Motor Power Output Applied Alias:MOTPWR HexCode:02 CANOpen id:0x2102 Description: Reports the actual PWM level that is being applied to the motor at the power output stage.This value takes into account all the internal corrections and any limiting resulting from temperature or over current.A value of 1000 equals 100%PWM.The equivalent mo- tor phase to phase voltage amplitude is the battery voltage *PWM level. |
256 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Syntax Serial: ?P |cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(LP,cc)
result =getvalueLMOTPWR,cc)
Reply:
P=nn Type:Signed 16-bit Min:-1000 Max:1000
Where:
cc =Motor channel
nn =0 to +/-1000 power level
Example:
Q:?P1
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 locat- ed in the motor phases.Applicable only for brushless and AC Induction motor controllers.
Syntax Serial:?PHA [cc]
Argument: Channel
Min:1 Max:Total Number Of Current Sensors
Syntax Scripting:result =getvalue(_PHA,cc)
Reply:
PHA=aa Type:Signed 16-bit Min:-32767 Max:32767
Where:
cc =Current Sensor
aa =Amps*10
PI-Read Pulse Inputs
Alias:PLSIN HexCode:11 CANOpen id:0x6402
Description:
Reports the value of each of the enabled pulse input captures.The value is the raw num- ber in microseconds when configured in Pulse Width mode.In Frequency mode,the
retumed value is in Hertz.In Duty Cycle mode,the reported value ranges between 0 and
Commands Reference | RoboteQ |
4095 when the pulse duty cycle is 0%and 100%respectively.In Pulse Count mode,
the 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. Syntax Serial: ?Pl [cc] Argument: InputNbr Min:1 Max:Total Number of Pulse Input Syntax Scripting:result =getvalueLPl,cc) result =getvalueLPLSIN,cc) Reply: Pl=nn Type:Unsigned 16-bit Min:0 Max:65536 Where: cc =Pulse capture input number nn =Value Note: The total number of Pulse input channels varies from one controller model to another and can be found in the product datasheet. PIC-Read Pulse Input after Conversion Alias:PLSINC HexCode:24 CANOpen id:Ox6404 Description: Returns value of a Pulse input after all the adjustments were performed to convert it to a command or feedback value (Min/Max/Center/Deadband/Linearity).If an input is disabled, the query returns 0. Syntax Serial: ?PIC [cc] Argument: InputNbr Min:1 Max:Total Number of Pulse Input Syntax Scripting:result =getvalueLPIC,cc) result =getvalueLPLSINC,cc) Reply. PIC=nn Type:Signed 16-bit Min:-1000 Max:1000 Where: cc =Pulse input number nn =Converted input value to +/-1000 range |
258 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
S-Read Encoder Motor Speed in RPM
Alias:ABSPEED HexCode:03 CANOpen id:Ox2103
Description:
Reports the actual speed measured by the encoders as the actual RPM value.To report RPM accurately,the correct Pulses per Revolution(PPR)must be stored in the encoder configuration
Syntax Serial: ?S [cc]
Argument: Channel
Min:1 Max:Total Number of Encoders
Syntax Scripting:result =getvalue(S,cc)
result =getvalueLABSPEED,cc)
Reply:
S=nn Type:Signed 32-bit Min:-65535 Max:65535
Where:
cc =Motor channel
nn =Speed in RPM
SCC-Read Script Checksum
Alias:SCC HexCode:45 CANOpen id:0x2133
Descniption:
Scans the script storage memory and computes a checksum number that is unique to
each script.If not script is loaded the query outputs the value OxFFFFFFFE Since a stored script cannot be readout,this query is useful for determining if the correct version of a
given script is loaded.
Syntax Serial: ?SCC
Argument: None
Syntax Scripting:result =getvalueLSCC,1)
Reply:
SCC=nn Type:Unsigned 32-bit
Where:
nn =Checksum number
Commands Reference | lRoboteQ |
SDT-Read Raw Redirect Received Frame as string
Alias:SDT HexCode:90 CANOpen id:- Description: This query is used in Raw Redirect mode to read the content of a received Raw Redirect frame in string format.Data will be available for reading,with this query,only after a ?CD query is first used to check how many received frames are pending in the FIFO buffer. Syntax Serial:?SDT Argument:None Reply: SDT=ss Type:String Where: ss =ASCll string Example: Q:?SDT R:SDT=Roboteq SEC-Read Sensor Errors Alias:SEC HexCode:8D CANOpen id: Description: This query is used to read the number of sensor errors.If a Hall sensor is configured then it will return the number of fault error states.If a SinCos sensor is configured it will return the result of (sin^2(x)+cos^2(x))*1000.The returned value is indicative of the quality of the sin/cos signal.The closer the value is to 1000 the better is the signal. Syntax Serial: ?SEClccl Argument:Channel Min:1 Max:Total Number of Motors Syntax Scripting:result=getvalue(_SEC,cc) Reply: SEC=nn Type:unsigned 8-bit Min:0 Max: |
260 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Where:
cc =Motor channel
nn =Number of sensor errors
SNA -Read Sensor Angle
Alias:- HexCode:79 CANOpen id:-
Description:
On brushless controller operating in sinusoidal mode,this query retums the realtime vah ue of the rotor’s angle sensor of brushless motor.This query is useful for verifying trouble- shootingsin/cos and SPI/SSI sensors.Angle are reported in 0-511 degrees..
Syntax Serial:?SNA [ccl
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:
Retuns the measured motor speed as a ratio of the Max RPM (MXRPM)configuration
parameter.The result is a value of between O and +/1000.As an example,if the Max RPM is set at 3000 inside the encoder configuration parameter and the motor spins at 1500
RPM,then the returned value to this query will be 500,which is 50%of the 3000 max. Note that if the motor spins faster than the Max RPM,the retumed value will exceed 1000.However,a larger value is ignored by the controller for its internal operation.
Syntax Serial
Argument:
?SR [cc]
Channel
Min:1 Max:Total Number of Encoders
Syntax Scripting:result =getvalueLSR,cc)
result =getvalueLRELSPEED,cc)
Reply:
SR =nn Type:Signed 16-bit Min:-1000 Max:1000
Commands Reference | lRoboteQ |
Where:
cc =Motor channel nn =Speed relative to max SS -Read SSl Sensor Motor Speed in RPM Alias:- HexCode:6A CANOpen id:0x213C Description: Reports the actual speed measured by the SSI sensors as the actual RPM value.To report RPM accurately,the correct Counts per Revolution (SCPR)must be stored in the encoder configuration. Syntax Serial:?SS [cc] Argument: Channel Min:1 Max:Total Number of SSl sensors Syntax Scripting:result =getvalue(_SS,cc) Reply: SS =aaType:Signed 32-bit Min:-65535 Max:65535 Where cc =Motor channel aa =Speed in RPM. SSR -Read SSl 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.As an example,if the Max RPM is set at 3000 inside the encoder configuration parameter and the motor spins at 1500 RPM,then the retumed value to this query will be 500,which is 50%of the 3000 max. Note that if the motor spins faster than the Max RPM,the returned value will exceed 1000.However,a larger value is ignored by the controller for its internal operation. Syntax Serial:?SSR [ccl Argument: Channel Min:1 Max:Total Number of SSl sensors Syntax Scripting:result =getvalue(_SSR,cc) Reply: SSR =aa Type:Signed 16-bit Min:-1000 Max:1000 |
262 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
Where:
cc=Motor channel
aa =Speed relative to max.
STT-STO Self-Test Result
Alias:- HexCode:70 CANOpen id:-
Description:
Returns the result of the latest executed STO Self-Test process.This process is applicable only on motor controllers with STO circuit implemented on their board.If the result is
not successful the Respective STO Fault bit in the Fault Flags is set.The fault is triggered when:
·Any of the transistors or other component of the STO circuit is damaged.
· Any of the Power MOSFETs is damaged.
· The respective jumper is placed on the board.
Syntax Serial:?STT xx
Argument:Fault Indication
Min:1(STO Result)Max:2 (MOSFET Result)
Syntax Scripting:result =getvalue(_STT,xx)
Reply:
If xx=1(STO Result)
STT=ff Type Singed 32-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.Any of the Power MOSFETs is damaged.
lfxx=2(MOSFET Resulti
STT=f1+f2*2+f3*4+…+fn*2^n-1 Type:Signed 32-bit Min:0 Max:4095
Where:
f1 =Top MOSFET of U1 phase is damaged
f2 =Bottom MOSFET of U1 phase is damaged
f3 =Top MOSFET of V1 phase is damaged
Commands Reference | RoboteQ | |
f4 =Bottom MOSFET of V1 phase is damaged
f5=Top MOSFET of W1 phase is damaged f6 =Bottom MOSFET of W1 phase is damaged f7 =Top MOSFET of U2 phase is damaged f8=Bottom MOSFET of U2 phase is damaged f9 =Top MOSFET of V2 phase is damaged f10 =Bottom MOSFET of V2 phase is damaged f11 =Top MOSFET of W2 phase is damaged f12 =Bottom MOSFET of W2 phase is damaged |
||
T-Read Temperature
Alias:TEMP Description: |
HexCode:12 CANOpen id:Ox210F | |
Reports the temperature at each of the Heatsink sides and on the internal MCU silicon chip.The reported value is in degrees C with a one degree resolution.
Syntax Serial: ?T[cc] Argument: SensorNbr Min:1 Max:Total Number of Motors +1 Syntax Scripting:result =getvalue(T,cc) result =getvalue(TEMP cc) Reply: T=cc Type:Signed 8-bit Min:-40 Max:125 Where: CC= 1:MCU temperature 2:Channel 1 side 3:Channel 2 side tt =temperature in degrees Note: On some controller models,additional temperature values may reported.These are mea- sured 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. TM -Read Time Alias:TIME HexCode:1C CANOpen id:Ox2119 Description: Reports the value of the time counter in controller models equipped with RealTime clocks with internal or external battery backup.On older controller models,time is count- |
264 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
ed in a 32-bit counter that keeps track the total number of seconds,and that can be
converted into a full day and time value using external calculation.On newer models,the time is kept in multiple registers for seconds,minutes,hours (24h format),dayofmonth, month,year in full
Syntax Serial: ?TM [ee]
Argument:
Element
Min:None
Max:6
Syntax Scripting:result =getvalueLTM,ee)
result =getvalueLTIME,ee)
Reply:
TM =nn Type:Unsigned 32-bit Min:O
Where:
ee =date element in new controller model
1:Seconds
2:Minutes
3:Hours (24h format)
4:Dayofmonth
5:Month
6:Year in full
nn =Value
TR-Read Position Relative Tracking
Alias:TRACK HexCode:20 CANOpen id:
Description:
Reads the real-time value of the expected motor position in the position tracking closed loop mode and in speed position
Syntax Serial: ?TR [cc]
Argument: Channel
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(_TR,cc)
result =getvalue(TRACK,cc)
Reply:
TR=nn Type:Signed 32-bit Min:-2147M Max:2147M
Where:
cc =Motor channel
nn =Position
Commands Reference | RoboteQ |
TRN -Read Control Unit type and Controller Model
Alias:TRN HexCode:1F CANOpen id: Descrijption: 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. Syntax Serial: ?TRN Argument: None Syntax Scripting:result =getvalue(TRN,1) Reply: TRN=ss Type:String Where: ss =Control Unit ld String:Controller Model ld String Example: Q:?TRN R:TRN=RCB500:HDC2460 UID -Read MCU Id Alias:UID HexCode:32 CANOpen id: Description: Reports MCU specific information.This query is useful for determining the type of MCU: 100=STM32F10X,300 =STM32F30X.The query also produces a unique ld number that is stored on the MCU silicon. Syntax Serial: ?UID [eel Argument: Element Min:1 Max:5 Syntax Scripting:result =getvalueLUID,ee) Reply UID =nn Type:Unsigned 32-bit Min:1 Max:4294M Where: ee =Data element 1:MCU type 2:MCU Device ld 3-5:MCU Unique ID nn s value |
266 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Runtime Queries
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 intemal 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.The 5V output will typically show the controller’s internal
regulated 5V minus the drop of a diode that is used for protection and will be in the 4.7V range.The battery voltage is monitored for detecting the undervoltage or overvoltage con- ditions.
Syntax Serial: ?V [ee]
Argument: SensorNumber
Min:1 Max:3
Syntax Scripting:result =getvalue(V,ee)
result =getvalueLVOLTS,ee)
Reply:
V=nn Type:Unsigned 16-bit
Where:
ee =
1:Internal volts
2:Battery volts
3:5V output
nn =Volts*10 for intemal and battery volts.Milivolts for 5V output
Example:
Q:?V
R:V=135:246:4730
Q:?V 3
R:V=4730
VAR-Read User Integer Variable
Alias:VAR HexCode:06 CANOpen id:0x2106
Description:
Read the value of dedicated 32-bit internal variables that can be read and written to/from
within a user MicroBasic script.It is used to pass 32-bit signed number between user
scripts and a microcomputer connected to the controller.The total number of user integer
variables varies from one controller model to another and can be found in the product
datasheet.
Syntax Serial:?VAR [ee]
Argument: VarNumber
Min:1 Max:Total Number of User Variables
Commands Reference
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 be- tween the rotor and the stator of an AC Induction motor.
Syntax Serial:?SL [ccl
Argument: VarNumber
Min:1 Max:Total Number of Motors
Syntax Scripting:result =getvalue(_SL,cc)
Reply:
SL=nn Type:Signed 16-bit Min:-32768 Max:32768
Where:
cc =Motor channel
nn =Slip Frequency in Hertz*10
DS402 Runtime Queries
Runtime queries created to support DS402 specification are described below:
TABLE 15-13.
Command | Arguments | Description |
AOM | Channel | Modes of Operation Display (DS402) |
CW | Channel | Control Word (DS402) |
SPE | Channel | Velocity Actual Value {DS402) |
FEW | Element Value | Following Error Window (DS402) |
FET | Element Value | Following Error Time Out (DS402) |
INT | Element Value | Interpolation Time Period (DS402) |
268 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Command | Arguments | Description |
MSL | Element Value | Max Motor Speed (DS402) |
PAC | Channel | Profile Acceleration (DS402) |
PDC | Channel | Profile Deceleration (DS402) |
PLT | Element Value | Software Position Limit (DS402) |
POS | Channel | Target Position (DS402) |
PSP | Channel | Profile Velocity (DS402) |
PST | Channel | Position Actual Value (DS402) |
RMP | Channel | Velocity Demand (DS402) |
ROM | Channel | Modes of Operation (DS402) |
S16 | Channel | Target Velocity (DS402) |
SAC | Flement | Velocity Acceleration (DS402) |
SDC | Element | Velocity Deceleration (DS402) |
SDM | None | Supported Drive Modes (DS402) |
SPC | Channel Value | Target Profile Velocity (DS402) |
SPL | Element | Velocity Min/Max Amount (DS402) |
SW | Channel | Status Word (DS402) |
TC | Channel | Target Torque (DS402) |
TRQ | Channel | Torque Actual Value (DS402) |
TSL | Channel | Torque Slope (DS402) |
VDV | Channel Value | Velocity Demand Value (DS402) |
VSA | Channel Value | Velocity Sensor Actual Value (DS402) |
VNM | None | Version Number (DS402) |
AOM-Modes of Operation Display (DS402)
Alias:AOM HexCode:63 CANOpen id:Ox6061
Description:
Read the actual operation mode.
Syntax Serial:?AOM [cc]
Reply:AOM=nn
Syntax Scripting:nn =GetValueLROM,cc)
Argument:Channel
Min:1
Result:Value
Where:
cc =Motor channel
Type:Unsigned 8-bit
Max:Total number of motors
Type:Signed 8-bit
nn =Actual operation mode
Commands Reference | lRoboteQ |
CW-Control Word (DS402)
Alias:CW HexCode:56 CANOpen id:Ox6040 Descrijption: Read the value of the control word. Syntax Serial:?CW [cc] Reply:CW=nn Syntax Scripting:nn =GetValue(LCW,cc) Argument:Channel Type:Unsigned 8-bit Min:1 Max:Total number of motors Result:Value Type:Unsigned 16-bit Where: cc=Motor channel nn =Control word value SPE-Velocity Actual Value (DS402) Alias:SPE HexCode:96 CANOpen id:0x6044,and Ox606C Description: Reads the velocity actual value in RPM if it isn’t in Position mode.In Closed Loop Count Position mode,the query reports the position in sensor count.In Closed Loop Position Relative mode and in Closed Loop Tracking Position mode,the postion is provided in rang -1000 to 1000 scaled by the minimum and maximum sensor value. Syntax Serial:?SPE [ccl Reply:SPE=nn Syntax Scripting:nn =GetValue(SPE,cc) Argument:Channel Type:Unsigned 8-bit Max:Total number of motors Type:Signed 32-bit Min:1 Result:Value Where: cc =Motor channel nn =Velocity/position actual value |
270 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
FEW-Following Error Window (DS402)
Alias:FEW HexCode:99 CanOpen id:Ox6065
Description:
Read the configured following error window for the position mode in counts.If the value is FFFF FFFFh,the following control is disabled.
Syntax Serial:?FEW [ccl
Reply:FEW=nn
Syntax Scripting:nn=SetCommand(_FEW,cc)
Argument:Channel Min:1
Result:Value
Where:
Type:Unsigned 8-bit
Max:Total number of motors
Type Unsigned 32-bit
cc=Motor Channel
nn =Following error window in counts
FET -Following ErrorTime Out (DS402)
Alias:FET HexCode:9A CanOpen id:0x6066
Description:
Read the configured following error time out for the position mode in milliseconds.
Syntax Serial:?FET[cc]
Reply:FET=nn
Syntax Scripting:nn =SetCommand(_FET,cc)
Argument:Channel
Min:1
Result:Value
Where:
cc=Motor channel
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 16-bit
nn=Following error time out
Commands Reference | RoboteQ | |
INT -Interpolation Time Period (DS402)
Alias:INT HexCode:9C CanOpen id:Ox60C2 Description: Read the parameters for the Interpolation cycle time.The interpolation time base is the element 1 and the interpolation time index is element 2.The interpolation time value comes out of the following formula: <Interpolation Time(seconds)>=<Interpolation Time Base>x10^<Interpolation Time Index> Syntax Serial!?INT [ee] Reply:INT=ee Syntax Scripting:nn=GetValue(_INT,ee) |
||
Argument:Element
Min:1 Result:Value |
Type:Unsigned 8-bit
Max:2xTotal number of motors Type:element 1:Unsigned 8-bit element 2:Signed 8-bit |
|
Where
ee= 1:Interpolation time base for channel 1 2:Interpolation time index for channel 1 3:Interpolation time base for channel 2 4:Interpolation time index for channel 2 2x(m-1)+1:Interpolation time base for channel m 2x(m-1)+2:Interpolation time index for channel m MSL -Max Motor Speed (DS402) Alias:MSL HexCode:9B CanOpen id:0x6080 Description: Read the configured maximum motor speed in profile position,profile velocity,profile torque,cyclic synchronous velocity,cyclic synchronous torque and cyclic synchronous po- sition modes. |
272 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Syntax Serial:?MSL[ccl
Reply:MSL=nn
Syntax Scripting:nn =GetValueLMSL,cc)
Argument:Channel | Type:Unsigned &-bit |
Min:1 | Max:Total number of motors |
Result:Value | Type:Unsigned 32-bit |
PAC-Profile Acceleration (DS402)
Alias:PAC HexCode:5E CANOpen id:0x6083
Description:
Read the configured acceleration in 10xRPM/second.
Syntax Serial:?PAC [ccl
Reply:PAC=nn
Syntax Scripting:nn =GetValueLPAC,cc)
Argument:Channel
Min:1
Result:Value
Where:
cc=Motor channel
Type:Unsigned 8-bit
Max:Total number of motors
Type:Unsigned 32-bit
nn =Profile acceleration in 10xRPM/second
PDC-Profile Deceleration (DS402)
Alias:PDC HexCode:5F CANOpen id:Ox6084
Description:
Read the configured deceleration in 10xRPM/second.
Syntax Serial:?PDC [ccl
Reply:PDC=nn
Syntax Scripting:nn =GetValue(_PDC,cc)
Argument:Channel Type:Unsigned 8-bit
Min:1 Max:Total number of motors
Commands Reference | IRoboteQ | |
Result:Value Type:Unsigned 32-bit
Where: cc =Motor channel nn =Profile deceleration in 10xRPM/second PLT -Software Position Limit(DS402) Alias:PLT HexCode:9D CanOpen id:Ox607D Description: Read the position limits. Syntax Serial:?PLT [ee] Reply:PLT=nn Syntax Scripting:nn =GetValueLPLT,cc) |
||
Argument:element Min:1
Result:Value |
Type:Unsigned B-bit
Max:2xTotal number of motors Type:element 1:Unsigned 8-bit element 2:Signed 8-bit |
|
Where
ee= 1:Software position min limit for channel 1 2:Software position max limit for channel 1 3:Software position min limit for channel 2 4:Software position max limit for channel 2 2x(m-1)+1:Software position min limit for channel m 2x(m-1)+2:Software position max limit for channel m PST-Position Actual Value Alias:PST HexCode:95 CanOpen id:0x6064 Description: Read the actual value of the position sensor. |
274 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Syntax Serial:?PSTlccl
Reply:PST=nn
Syntax Scripting:nn =GetValue(_PST,cc)
Argument:Channel Type:Unsigned 8-bit
Min:1 Max:Total number of motors
Result:Value Type:Singed 32-bit
POS-Target Position (DS402)
Alias:POS HexCode:5C CANOpen id:Ox607A
Description:
Read the configured target position.
Syntax Serial:?POS [ccl
Reply:POS=nn
Syntax Scripting:nn =GetValue(_POS,cc)
Argument:Channel
Min:1
Result:Value
Where:
cc=Motor channel nn =Target position
Type:Unsigned 8-bit
Max:Total number of motors
Type:Signed 32-bit
PSP-Profile Velocity (DS402)
Alias:PSP HexCode:5D CANOpen id:0x6081
Description:
Read the configured velocity in RPM.
Syntax Serial:?PSP [ccl
Reply:PSP=nn
Syntax Scripting:nn =GetValue(_PSP,cc)
Argument:Channel | Type:Unsigned 8-bit |
Min:1 | Max:Total number of motors |
Result:Value | Type:Unsigned 16-bit |
Commands Reference | lRoboteQ | |
Where:
cc =Motor channel nn =Profile velocity RMP-VLVelocity Demand (DS402) Alias:RMP HexCode:62 CANOpen id:Ox6043 Description: Read the instantaneous velocity in RPM generated by the ramp function.Positive values shall indicate forward direction and negative values shall indicate reverse direction. Syntax Serial:?RMP [cc] Reply:RMP=nn Syntax Scripting:nn =GetValue(_RMP cc) |
||
Argument:Channel
Min:1 Result:Value Where: |
Type:Unsigned 8-bit
Max:Total number of motors Type:Signed 32-bit |
|
cc=Motor channel
nn =Velocity in RPM ROM-Modes of Operation (DS402) Alias:ROM HexCode:5A CANOpen id:Ox6060 Description: Read the configured modes of operation. Syntax Serial:?ROM [ccl Reply:ROM=nn Syntax Scripting:nn =GetValueLROM,cc) Argument:Channel Type:Unsigned 8-bit Min:1 Max:Total number of motors Result:Value Type:Signed &-bit Where: cc=Motor channel nn =Modes of operation |
276 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
S16-Target Velocity (DS402)
Alias:MOTVEL HexCode:03 CANOpen id:Ox6042
Description:
Read the target velocity in RPM for velocity mode.Positive values shall indicate forward direction and negative values shall indicate reverse direction.
Syntax Serial:?S [ccl
Reply:S=nn
Syntax Scripting:nn =GetValue(_S,cc)
nn =GetValue(LMOTVEL,cc)
Argument: Channel: Type:Unsigned 8-bit
Min:1 Max:Total number of motors
Result:Value Type:Signed 16-bit
Min:-500000 Max:500000
Where:
cc =Motor channel
nn =Target velocity in RPM
SAC-Velocity Acceleration (DS402)
Alias:SAC HexCode:58 CANOpen id:Ox6048
Descniption:
Read the configured velocity acceleration.
Syntax Serial:?SAC lee]
Reply:SAC=nn
Syntax Scripting:nn =GetValue(_SAC,ee)
Argument:Element
Min:1
Result:Value
Where:
ee =
Type:Unsigned 8-bit
Max:2xTotal number of motors
Type:Unsigned 32-bit
1:Delta speed in 10xRPM for channel 1
2:Delta time in seconds for channel 1
Commands Reference | RoboteQ |
3:Delta speed in 10xRPM for channel 2
4:Delta time in seconds for channel 2 2×(m-1)+1:Delta speed in 10xRPM for channel m. 2×(m-1)+1:Delta time in seconds for channel m. nn =Delta speed/time SDC-Velocity Deceleration (DS402) Alias:SDC HexCode:59 CANOpen id:Ox6049 Description: Read the configured velocity deceleration. Syntax Serial:?SDC [ee] Reply:SDC=nn Syntax Scripting:nn =GetValueLSDC,ee) Argument:Element Type:Unsigned 8-bit Min:1 Max:2 xTotal number of motors Result:Value Type:Unsigned 32-bit Where ee = 1:Delta speed in 10xRPM for channel 1 2:Delta time in seconds for channel 1 3:Delta speed in 10xRPM for channel 2 4:Delta time in seconds for channel 2 2×(m-1)+1:Delta speed in 10xRPM 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:Ox6502 Description: Read the supported drive modes.Roboteq controllers support the following modes: · Profile Position Mode (PP). · Velocity Mode (VL). · Profile Velocity Mode {PV). ·Torque Mode (TQ). |
278 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Syntax Serial:!SDM
Reply:SDM=nn
Syntax Scripting:nn =GetValue(LTSL)
Result:Value Type:Unsigned 32-bit
Where:
nn =Supported drive modes
SPL-Velocity Min/Max Amount (DS402)
Alias:SPL HexCode:57 CANOpen id:Ox6046
Description:
Read the configured minimum and maximum amount of velocity in RPM.
Syntax Serial:?SPL lee]
Reply:SPL=nn
Syntax Scripting:nn =GetValue(_SPL,ee)
Argument:Eelment Type:Unsigned 8-bit
Min:1 Max:2xTotal number of motors
Result: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)+2: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.
RoboteQ
Commands Reference
TABLE 15-14.Status Word Mapping
15 1413 12 11 10 9 8 7 6 5 4 3 2 1 0
NU | OMS | ILA | TR | RM | MS | W | SOD | QS | VE | F | OE | SO | RTSO |
MSB LSB | |||||||||||||
NU →Not Used,OMS →Operation mode specific,ILA →Intenal limit active
TR →Target reached,RM →Remote,W →Warning,SOD →Switch on disabled, QS→Quick stop,VE →Voltage enabled,F →Fault,OE →Operation Enabled, SO →Switch on RTSO →Ready to switch on. |
If bit 4 (voltage enabled)of the status word is always 1.If bit 5(quick stop)of the status
word is 0,this shall indicate that the PDS is reacting on a quick stop request (quick stop
mode is always 2).Bit 7 (warning)is always 0.Bit 9 (remote)of the status word is al-
ways 1.If bit 10 (target reached)of the status word is 1,this shall indicate that the PDS
has reached the set-point.Bit 10 shall also be set to 1,if the operation mode has been
changed.The change of a target value by software shall alter this bit.If halt occurred and
the PDS has halted then bit 10 shall be set to 1,too.If the same internal value is com-
manded then bit 10 shall not alter,if bit 10 is supported (see Table 15-16).If bit 11 (internal
limit active)of the status word is 1,this shall indicate that,current limit has been reached
or the motor command is out of limits.
TABLE 15-15.State Coding
Status Word | PDS FSA state |
XXXX XXXX XOxx 0000 | Not ready to switch on |
XXXX XXXX X1xx 0000 | Switch on disabled |
XXXX XXXX X01x 0001 | Ready to switch on |
XXXX XXXX x01x 0011 | Switched on |
XXXX XXXX ×01x 0111。 | Operation enabled |
XXXX XXXX x0Ox 0111。 | Quick stop active |
XXXX XXXX XOxx 1111。 | Fault reaction active |
XOX XQ×X0xx 1000 | Fault |
TABLE 15-16.Definition of Bit 10
Bit | Value | Definition |
10 | 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 | |
Note:In Roboteq controllers,Halt operation mode is 2.Slow down on slow down ramp and stay in operation enable. |
280 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Profile Position Mode
TABLE 15-17.Status Word Mapping in Profile Position Mode
15 14 13 12 11 10 9 0
see Table 15-14 | Not Used | Set-Point Acknowledge | see Table 15-14 | Target Reached | see Table 15-14 |
MSB LSB
In Profile Position Mode the operation specific bits are mapped in Table 15-17.Status Word Mapping in Profile Position Mode with bits 10 and 12 user can acknowledge the status of the controller as shown in Table 10 and Table 12.Bit 13 is always 0.
Profile Torque Mode
The profile torque mode uses some bits of the statusword for mode specific purposes. Table 15-18 shows the structure of the status word.Target torque reached is defined table 15-19.
TABLE 15-18.Statusword for profile torque mode
15 1413 1211 10 9 0
see Table 15-14 | reserved | see Table 15-14 | Target reached | see Table 15-14 |
MSB
LSB
TABLE 15-19.Definition of bit 10
Bit | Value | Definition |
10 | 0 | Halt (bit 8 in controlword)=0:Target torque not reached Halt (bit 8 in controlword)=1:Axis decelerates |
1 | Halt (bit 8 in controlword)=0:Target torque reached Halt (bit 8 in controlword)=1:Velocity of axis is 0 |
Velocity
Mode
The Velocity mode uses some bits of the statusword for mode specific purposes.Table 15-20 shows the structure of the status word.
TABLE 15-20.Statusword for
1413
15
velocity mode
12 11
10
9
0
see Table 15-14 | reserved (0) | see Table 15-14 | reserved (0) | see Table 15-14 |
MSB LSB
Commands Reference
lRoboteQ
Cyclic Synchronous Position Mode
The cyclic synchronous position mode uses three bits of the statusword for mode-specific purposes.Table 15-21 shows the structure of the statusword.Table 15-22 defines the val ues forbit 10,12,and 13 of the statusword.
TABLE 15-21.Statusword for
1413
15
profile cyclic synchronous position mode
12 11 10
9
0
see Table 15-14 | Following error | Drive follows
the command value |
See Table 15-14 | reserved | see Table 15-14 |
MSB LSB
TABLE 15-22.Definition of bit 10,bit 12,and bit 13
Bit | Value | Definition |
10 | 0 | Reserved |
1 | Reserved | |
12 | 0 | Drive does not follow the command value -Target position ignored |
1 | Drive follows the command value -Target position used as input to position control loop | |
13 | 0 | No following error |
1 | Following error |
Cyclic Synchronous Velocity Mode and Cyclic Synchronous Torque Mode
The Cyclic synchronous velocity and Cyclic synchronous torque mode use some bits of statusword.Table 15-23 shows the structure of the statusword.Table 15-24)defines the values for bit 10,12,and 13 of the statusword.
TABLE 15-23.Statusword for
1413
15
profile cyclic synchronous velocity mode
12 11 10
9
0
see Table 15-14 | reserved | Drive follows the command
value |
see Table 15-14 | reserved | see Table 15-14 |
MSB LSB
TABLE 15-24.Definition of bit 10,bit 12,and bit 13
Bit | Value | Definition |
10 | 0 | Reserved |
1 | Reserved | |
12 | 0 | Target velocity or torque ignored |
1 | Target velocity or torque used as input to velocity or torque control loop | |
13 | 0 | Reserved |
1 | Reserved |
282 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
DS402 Runtime Queries
Profile Velocity Mode
TABLE 15-25.Status Word Mapping in Profile Velocity Mode
15 14 13 12 11 10 9 0
see Table 15-14 | Not
Used |
Speed | see
Table 15-14 |
Target
Reached |
see Table 15-14 |
MSB LSB
In Profile Velocity Mode the operation specific bits are mapped in Table 15-25.With bits 10 and 12 user can acknowledge the status of the controller as shown in Table 15-26 and Table 15-27.Bit 13 is always 0.
TABLE 15-26.Definition of bit 12 in Profile Velocity Mode
Bit | Value | Definition |
12 | 0 | Speed is not equal 0 |
1 | Speed is equal 0 |
TABLE 15-27.Definition of Bit 12 in Profile Position Mode
Bit | Value | Definition |
12 | 0 | Previous setpoint already processed,waiting for new set-point |
1 | Previous set-point still in process,set-point overwriting shall be accepted |
Syntax Serial:?SW [ccl
Reply:SW=nn
Syntax Scripting:nn =GetValueLSW,cc)
Argument:Channel Type:Unsigned 8-bit
Min:1 Max:Total number of motors
Result:Value Type:Unsigned 16-bit
Where:
cc =Motor channel
nn =Status word value
TC-TargetTorque (DS402)
Alias:TC HexCode:5B CANOpen id:0x6071
Description:
Read the configured target torque in 100xNm when the controller in torque mode.
Commands Reference | RoboteQ |
Syntax Serial:?TC [cc]
Reply:TC=nn Syntax Scripting:nn =GetValue(TC,cc) Argument:Channel Type:Unsigned 8-bit Min:1 Max:Total number of motors Result:Value Type:Signed 16-bit Where: cc =Motor channel nn =Torque input value in 100×Nm TRQ-Target Torque (DS402) Alias:TRQ HexCode:7A CANOpen id:0x6077 Description: Read the actual torque in 100xNm. Syntax Serial:?TRQ [cc] Reply:TRQ=nn Syntax Scripting:nn =GetValueLTRQ,cc) Argument:Channel Type:Unsigned 8-bit Min:1 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 10xmiliNm/second as long as the Torque Constant (TNM)is 1000 miliNm/A. |
284 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Query History Commands
Syntax Serial:!TSL [ccl
Reply:TSL=nn
Syntax Scripting:nn =GetValue(_TSL,cc)
Argument:Channel Type:Unsigned 8-bit
Min:1 Max:Total number of motors
Result:Value Type:Unsigned 32-bit
Where:
cc=Motor channel
nn =Torque slope
VNM-Version Number (DS402)
Alias:VNM HexCode:65 CANOpen id:Ox67FE
Description:
Read the version number of the CiA 402 profile.
Syntax Serial:!VNM
Reply:VNM=nn
Syntax Scripting:nn =GetValueLTSL)
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 que- ries are received,the new one will be added to the history buffer while the firsts are re- moved in order to fit the 16 query buffer.
Queries can then be called from the history buffer using manual commands,or automati- cally,at user selected intervals.This feature is very useful for monitoring and telemetry.
Commands Reference
Additionally,the history buffer can be loaded with a set of user selected queries at power on so that the controller can automatically issue operating values immediately after power up.See “TELS-Telemetry String”configuration command for details on how to set up
the startup Telemetry string.”Another feature is the streams.In this case the data can be printed after a prefix and separated with a delimiter.In order to enable a stream,the spe- cial character “/”needs to be typed in front of the first query.
A command set is provided for managing the history buffer.These special commands start with a“#”character.
TABLE 15-28.Query History Commands
Command | Description |
# | Send the next value.Stop automatic sending |
#C | Clear buffer history |
#nn | Start automatic sending |
#xx nn | Start automatic sending for specific stream |
/<prefix>””<delimiter>”?Q cc | Create data streams |
/l? | Dump the streams’prefixes and delimiters |
#-Send Next History Item /Stop Automatic Sending
A#alone will call and execute the next query in the buffer.If the controller was in the
process of automatically sending queries from the buffer,then receiving a #will cause the sending to stop.
When a query is executed from the history buffer,the controller will only display the query result (e.g.A=10:20).It will not display the query itself.
Syntax:
#
Reply: Qg
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 re-
ceiving this command will also cause the sending to stop
Syntax:
#C
Reply:None
286 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Query History Commands
#nn -Start Automatic Sending
This command will initiate the automatic retrieving and execution of queries from the
history buffer.The number that follows the command is the time in miliseconds between repetition.A single query is fetched and executed at each time interval.
Syntax:
#nn
Reply: QQ at every nn time intervals
Where:
QQ =is reply to query in the buffer.
nn = time in ms
Range: nn = 1to 32000ms
#xx nn -Start automatic sending for specific stream
Using this syntax one can set the refresh rate of each stream.This is used only in case of using streams.
Syntax:
#xx nn
Reply:The respective stream at every nn ms.
Where:
xx =the stream.
nn = time in ms.
/?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:
/”<prefix>””<delimiter”?Q cc
Reply:The regular reply of the query ?Q cc.
Where:
Q= is reply the query symbol.
cc = motor channel
D=1000:6:0
D=1000:6:0 F=26:137:4958 1000 2405 D=1000:6:0 D=1000:6:0 F=26:137:4953 D=1000:6:0 D=1000:6:0 F=26:137:4949 1000 2445 D=1000:6:0 D=1000:6:0 F-26:136:4954 D=1000:6:0 D=1000:6:0 F=25:136:4956 1000 2485 D=1000:6:0 D=1000:6:0 F=26:136:4958 D=1000:6:0 D=1000:6:0 F=26:136:4955 1000 2525 |
706
706 706 705 |
Commands Reference
prefix = the prefix for the stream
delimiter =the delimiter for the stream
For example,if one wants a log of the Motor Power(P),Motor Amps(A)and Encoder Speed(S) of channel 1,with refresh rate 50ms,prefix”d=”and delimiter:’they should type:
/”d=””:”?p 1_?a 1_?s 1_#50
Two more stream examples are shown below:
/”f=””:”?t 1_?v 2_?v 3#100
/?p 1_?f 1_?e 1_#200
The outcome of these three streams are shown in the image below:
-Ou Data
|
![]() |
|
/F=”.”x1_N2_N3_#100
01_41_?e1_#200 |
||
Send
Send Send Send Send Send Send Send Send Stop |
||
|g 1300
//? #c |
Tme~
Get Set
Cortroler Log
FIGURE 15-2.Data streams
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
Ot Data
p₁201?s1#50
f=”.:””A1_2v2_2v3_#100
p1_#1_7e1_#200
Send
Send
Send
Send
Send
Send
91300
//?
Send
Send
Send
FIGURE 15-3.Data streams prefixes
Cortroler tog
F=26:136:4952
1000 2645
705
D=1000:6:0
D=1000-6:0
F=25:137:4953
D=1000:5.0
D=1000-6:0
F=26:137:4953
1000 2685
705
D=1000:6.0
D=1000:5:0
F=26:137:4956
1)prefix=’D= delim=
prefix= F=delim=
delim=(tab)
Maintenance Commands
This section contains a few commands that are used occasionally to perform mainte- nance functions.
TABLE 15-29.Maintenance Commands
Command | Arguments | Description |
CLMOD | None | Motor/Sensor Setup |
CLRST | Key | Reset configuration to factory defaults |
CLSAV | Key | Save calibrations to Flash |
DFU | Key | Update Firmware via USB |
EELD | None | Load Parameters from EEPROM |
EELOG | None | Dump Flash Log Data |
EERST | Key | Reset Factory Defaults |
EESAV | None | Save Configuration in EEPROM |
ERASE | None | Erase Flash Log Data |
LK | Key | Lock Configuration Access |
RESET | Key | Reset Controller |
SLD | Key | Script Load |
STIME | Time | Set Time |
UK | Key | Unlock Configuration Access |
Commands Reference | RoboteQ |
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 (sensor- less)and will configure accordingly the respective fields in order to have a smooth motor spin and alignment between the motor and the sensor directions.During setup no motor command can be applied to the motors.For more details see Section 8. Note:The motor will spin. Syntax:%CLMOD nn Where: 0:Exit/Stop Setup Mode. 2:Setup channel 1. 3:Setup channel 2. CLRST -Reset configuration to factory defaults Argument:Key Description: This command resets all configurations to their factory default Syntax: %CLRST safetykey Where: safetykey =321654987 CLSAV-Save calibrations to Flash Argument:Key Description: Saves changes to calibration to Flash.Calibration parameters are stored permanentty until new values are stored..This command must be used with care and must be followed by a 9-digit safety key to prevent accidental use. Syntax: %CLSAV safetykey Where: safetykey =321654987 |
290 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Maintenance Commands
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.When this mode is entered,you must launch the separate upgrade utility (DFULoader)to start the firmware upgrade process.
Syntax:
%DFU safetykey
Where:
safetykey =321654987
EELD -Load Parameters from EEPROM
Argument:None
Description:
This command reloads the configuration that are saved in EEPROM back into RAM and activates these settings.
Syntax:
%EELD
EELOG -Dump Flash Log Data
Argument:None
Description:
This command is used in order to Dump the Flash Log Data.Each data entry is printed in a row with each value to be separated with a tab.The values,that are going to be printed, are the following:
· timestamp (milisseconds since power-up),
· maximum absolute motor current since the time of the previous entry,
· maximum battery voltage since the time of the previous entry,
· maximum heatsink temperature since the time of the previous entry and
· Fault Flags that have caused the entry.
Each entry is saved to flash at every new fault or every 10 minute when a fault is active.
Note:Flash Log Data are not working when any of the motor channels are configured in resolver sinusoidal mode.
Syntax:%EELOG
Commands Reference | IRoboteQ |
EERST -Reset Factory Defaults
Argument:Key Description: The EERST command will reload the controller’s RAM and EEPROM with the facto- ry 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-dig- it safety key to prevent accidental use. Suntax: %EERST safetykey Where: safetykey =321654987 EESAV -Save Configuration in EEPROM Argument:None Description: Controller configuration that have been changed using any Configuration Command can then be saved in EEPROM.Once in EEPROM,it will be loaded automatically in the controller every time the unit is powered on.If the EESAV command is not called after changing a configuration,the configuration will remain in RAM and active only until the controller is turned off.When powered on again,the previous configuration that was in the EEPROM is loaded.This command uses no parameters Syntax: %EESAV ERASE-Erase Flash Log Data Argument:None Description: This command is used in order to Erase the Flash Log Data. Syntax:%ERASE LK -Lock Configuration Access Argument:Key Description: This command is followed by any user-selected secret 32-bit number.After receiving it, the controller will lock the configuration and store the key inside the controller,in area which cannot be accessed.Once locked,the controller will no longer respond to configu- ration reads.However,it is still possible to store or to set new configurations. Syntax: %LK secretkey |
292 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Maintenance Commands
Where:
secretkey =32-bit number (1 to 4294967296)
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.It wil
reply with HLD and stand ready to accept script bytecodes in intel Hex Format.The exact
download and data format is described in the MicroBasic section of the manual.The
timeout for the communication is 3 seconds.After the timeout expires,the controller will
retum“ .”
Syntax:
%SLD
STIME-Set Time
Argument:Hours Mins Secs
Description:
This command sets the time inside the controller’s clock that is available in some con-
troller models.The clock circuit will then keep track of time as long as the clock remains
under power.On older controller models,the clock is a single 32-bit counter in which the
number of seconds from a preset day and time is stored (for example 02/01/00 at 3:00).
On newer model,the clock contains 6 registers for seconds,dates,minuted,hours,day-
ofmonth,month,year.The command syntax will be different for each of these models.
Syntax:
%STIME nn:Older models%STIME ee nn:Newer models
Where:
Older models:nn =number of secondsNewer modelsee =1:Seconds2:Minutes3:Mours (24h format)4:Dayofmonth5:Month6:Year in fullnn =Value
Commands Reference
UK -Unlock Configuration Access
Argument:Key
Description:
This command will release the lock and make the configuration readable again.The command must be followed by the secret key which will be matched by the controller in- ternally against the key that was entered with the LK command to lock the controh ler.If the keys match,the configuration is unlocked and can be read.
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 con- troller 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.To simplify the config- uration process and avoid errors,it is highly recommended to use the RoborunPlus
PC utility to read and set configuration.
Some configuration parameters may be absent depending on the presence or ab- sence of the related feature on a particular controller model.
Setting Configurations
The general format for setting a parameter is the”A”character followed by the command name followed by parameterls)for that command.These will set the parameter in the con- troller’s RAM and this parameter becomes immediately active for use.The parameter can also be permanently saved in EEPROM by sending the %EESAV maintenance command.
Some parameters have a unique value that applies to the controller in general.For exam- ple,overvoltage or undervoltage.These configuration commands are therefore followed by a single parameter:
AUVL 100:Sets Undervoltage limit to 10.0V
^OVL 400:Sets Overvoltage limit to 40.0V
Other parameters have multiple value,with typically one value applying to a different chan- nel.Multiple value parameters are numbered from 1 to n.For example,Amps limit for a motor channel or the configuration of an analog input channel.
AALIM 1250:Sets Amps limit for channel 1 to 25.0A
AAMIN 42000:Sets low range of analog input 4 to 2000
294 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Using O as the first parameter value will cause all elements to be loaded with the same content.
AADB 010:Sets the deadband of all analog inputs to 10%
Important Notice
Saving configuration into EEPROM can take up to 20ms per parameter.The control– ler will suspend the loop processing during this time,potentially affecting the con– troller operation.Avoid saving configuration to EEPROM during motor operation.
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 con- troller will give the value of all channels.If a channel number is sent,the controller wil
give the value of the selected channel.
The reply to parameter read command is the command name followed by”=”followed by the parameter value.When the reply contains multiple values,then the different values are separated by”:”The list below describes every configuration command of the control- ler.For Example:
~ALIM:Read Amps limit for all channels
Reply:ALIM=750:650
~ALIM 2: Read Amps limit for channel 2
Reply:ALIM=650
Configuration parameters can be read from within a MicroBasic script using the getcon- fig0 function.The setconfig0 function is used to load a new value in a configuration pa- rameter.
Important Warning
Configuration commands can be issued at any time during controller operation.
Beware that some configuration parameters can alter the motor behavior.Change configurations with care.Whenever possible,change configurations while the
motors are stopped.
Configuration Read Protection
The controller may be locked to prevent the configuration parameters to be read.Given the large number of possible configurations,this feature provides effective system-level copy protection.The controller will reply to configuration read requests only if the read protection is unlocked.If locked,the controller will respond a”-“character.
General Configuration and Safety
The commands in this group are used to configure the controller’s general and safety settings.
RoboteQ
Commands Reference
TABLE 15-30.General and Safety Configurations
Command | Arguments | Description |
ACS | Enable | Analog Center Command to Start |
AMS | Enable | Analog keep within Guard Bands |
BEE | Address Value | User Storage in Battery Backed RAM |
BRUN | Enable | Script Auto-Start |
CLIN | Channel Linearity | Command Linearity |
CPRI | Level Command | Command Priorities |
DFC | Channel Value | Default Command value |
DMOD | Mode | Modbus Mode |
ECHOF | OffOn | Enable/Disable Serial Echo |
EE | Address Date | User-Defined Values |
ISM | None | Raw Redirect Mode |
MDAL | Option | Modbus Data Alignment |
MNOD | ID | Modbus Slave ID |
PMS | Enable | Pulse keep within Min &Max Safety |
RS485 | Enable | Enable RS485 |
RSBR | BitRate | Set RS232/RS485 baudrate |
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 Max | Spektrum Max |
SKMIN | Channel Min | Spektrum Min |
SKUSE | Channel Port | Assign Spektrum port to motor command |
STO | Enable | Safe Torque Off |
TELS | String | Telemetry string |
ACS-Analog Center Command to Start
HexCode:OB
Description:
This parameter enables the analog safety that requires that the input be at zero or centered before it can be considered as good.This safety is useful when oper ating with a joystick and requires that the joystick be centered at power up before mo- tors can be made to run.On muti-channel controllers,this configuration acts on all analog command inputs,meaning that all joysticks must be centered before any one becomes active.
Syntax Serial:^ACS nn
~ACS
Syntax Scripting:setconfig(_ACS,nn)
296 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Number of Arguments:1
Argument 1:Enable
Type:Unsigned 8-bit
Min:0 Max:1
Default:1
Where:
nn =
0:Safety disabled
1:Safety enabled
AMS -Analog keep within Guard Bands
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..
Syntax Serial:^AMS nn
~AMS
Syntax Scripting:setconfigLAMS,nn)
Number of Arguments:1
Argument 1:Enable
Type:Unsigned 8-bit
Max:1
Min:0
Default:1 =Enabled
Where:
nn =
0:Disabled
1:Enabled
BEE -User Storage in Battery Backed RAM
HexCode:64
Description:
Store and retrieve user data in battery backed RAM.Storage is quasi permanent,limited only by the on-board battery (usually several years).Unlike storage in Flash using the EE configuration commands,there are no limits in the amount or frequency of read and write cycles with BEE.This feature is only available on selected models,see product data-
sheet.Battery must be installed in the controller for storage to be possible.
Syntax Serial:^BEE aa dd
~BEE aa
Commands Reference | RoboteQ | |
Syntax Scripting:setconfig(_BEE,aa,dd)
Number of Arguments:2 Argument 1:Address Min:1 Argument 2:Value Type:Signed 16-bit Min:-32768 Default:0 Where: |
Max:Total Number of BEE
Max:32767 |
|
aa =Address
dd =Data Example: ^BEE 1555:Store value 555 in Battery Backed RAM location 1 ~BEE 1:Read data from RAM location 1 BRUN -Script 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.The 2 seconds wait time can be circumvented by putting 2 in the command argu- ment.However,this must be done only on scripts that are known to be bug-free.A crash- ing script will cause the controller to continuously reboot with little means to recover. Syntax Serial:^BRUN nn ~BRUN Syntax Scripting:setconfigLBRUN,nn) |
||
Number of Arguments:1
Argument 1:Enable Type:Unsigned 8-bit Min:0 Default:0 =Disabled |
Max:2 | |
Where:
nn = 0:Disabled 1:Enabled after 2 seconds 2:Enabled immediately |
298 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
CLIN -Command Linearity
HexCode:OD
Description:
This parameter is used for applying an exponential or a logarithmic transformation on the command input,regardless of its source(serial,pulse or analog).There are 3 exponential and 3 logarithmic choices.Exponential correction make the commands change less at the beginning and become stronger at the end of the command input range.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.A linearity transform is also available for all analog and pulse inputs.Both can be enabled although in most cases,it is best to use the Command Linearity parameter for modifying command profiles
Syntax Serial:^CLIN cc nn
~CLIN [cc]
Syntax Scripting:setconfigLCLIN,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Linearity
Type:Unsigned 8-bit
Min:0 Max:7
Default:0 =Linear
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 11:Sets linearity for channel 1 to exponential weak
CPRI-Command Priorities
HexCode:07
Description:
This parameter contains up to 3 variables (4 on controllers with Spektrum radio support) and is used to set which type of command the controller will respond in priority and in which order.The first item is the third priority,the second item is the fourth priority,and the third item is the fifth priority.The first priority belongs to the script mode and the sec-
Commands Reference | RoboteQ | ||
ond priority belongs to the CAN mode.Each priority item is then one of the three (four) command modes:Serial,Analog (Spektrum)or RC Pulse.See Command Priorities in the User Manual.Default prority orders are:1-Serial,2-Pulse,3-None. | |||
Syntax Serial:^CPRl pp nn
~CPRI Ipp] Syntax Scripting:setconfig(_CPRI,pp,nn) Number of Arguments:2 Argument 1:Level Min:1 Default:See descrniption |
Max:3 or 4
Max:2 or 3 |
||
Argument 2:Command
Where: |
Type:Unsigned 8-bit
Min:0 Default:See description |
||
pp =Priority rank
nn = 0:Serial 1:RC 2:Analog (or Spektrum) 3:None (orAlalog) 4:None Example: ^CPRI 12: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. DFC-Default Command value HexCode:OE Description: The default command values are the command applied to the motor when no valid com- mand is fed to the controller.Value 1001 causes no change in position at power up unti a new position command is received Syntax Serial:^DFC cc nn ~DFC |cc] Syntax Scripting:setconfigLDFC,cc,nn) Number of Arguments:2 |
300 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Value
Type:Signed 16-bit
Min:-1000 Max:1001
Default:0
Where:
cc:Motor channel
nn:Command value
Example:
ADFC 1500:Sets motor command to 500 when no command source are detected
^DFC 21001: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.
Syntax Serial:^DMOD nn
~DMOD
Syntax Scripting:setconfigLDMOD,nn)
Number of Arguments:1
Argument 1:Modbus Mode
Type:Unsigned 8-bit
Min:0 Max:4
Default:0
Where:
nn =
0:Off
1:TCP
2:RTU over TCP
3:RS232 ASCIl
4:RS485 ASCII
Example:
^DMOD 3:Enable Modbus RS232 ASCll mode.
Commands Reference | RoboteQ | |
ECHOF-Enable/Disable Serial Echo
HexCode:09 Description: This command is used to disable/enable the echo on the RS232,RS485,TCP or USB port. By default,the controller will echo everything that enters the serial communication port. By setting ECHOF to 1,commands are no longer being echoed.The controller will only reply to queries and the acknowledgements to commands can be seen. Syntax Serial:^ECHOF nn ~ECHOF Syntax Scripting:setconfig(_ECHOF,nn) |
||
Number of Arguments:1
Argument 1:OffOn Type:Unsigned 8-bit Min:0 Default:0 =Echo on Where: |
Max:1 | |
nn =
0:Echo is enabled 1:Echo is disabled Example: AECHOF 1:Disable echo EE -User-Defined Values HexCode:00 Description: Read and write userdefined 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 com- mand alters data contained in a RAM area.The %EESAV Maintenance Command,or !EES Real Time Command must be used to copy the RAM array to Flash.The Flash is copied to RAM every time the device powers up. Syntax Serial:^EE aa dd ~EE aa Syntax Scripting:setconfig(_EE,aa,dd) Number of Arguments:2 Argument 1:Address Min:1 Max:Total Number of Storage words |
302 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Argument 2:Data
Type:Signed 16-bit
Min:-32768
Default:0
Where:
Max:+32767
aa =Address
dd =Data
Example:
^EE 1555:Store value 555 in RAM location 1
%EESAV or !EES:Copy data from temporary RAM to Flash
EE 1:Read data from RAM location 1
Note:
See product datasheet to know the total available EE storage.
Do not transfer to Flash with %EESAV or !EES at high frequency as the number of write cycles to Flash are limited to around 10000.
Avoid transfering to Flash while the product is performing critical operation
Write to address locations 1 and up.Writing at address O will fill all RAM location with the value
ISM -Raw Redirect Mode
HexCode:E9
Description:
Configure this parameter in order to enable Raw Redirect Mode and the interface to be used.
Syntax Serial:^ISM nn
~ISM
Syntax Scripting:setconfigLISM,nn)
Number of Arguments:1
Argument 1:Modbus Mode
Type:Unsigned 8-bit
Min:0 Max:2
Default:0
Where:
nn =
0:Of
1:RS232
2:RS485
Commands Reference | RoboteQ |
Example:
AISM 1:Enable ModbusRaw Redirect mode on RS232 interface. MDAL -Modbus Data Alignment HexCode:CA Descrijption: Configure this parameter in order to set the alignment of the Modbus byte frame.This op- tion depends on what the Modbus master supports. Syntax Serial: AMDAL nn ~MDAL Syntax Scripting:setconfigLMDAL,nn) Number of Arguments:1 Argument 1: Modbus Data Alignment Type:Unsigned B-bit Min:0 Max:3 Default:0 Where nn = 0:High Word/High Byte 1:High Word/Low Byte 2:Low Word/High Byte 3:Low Word/Low Byte Example: ^MDAL 2:Configure Modbus Data Alignment to Low Word/High Byte. MNOD -Modbus Slave ID HexCode:A2 Description: Configure this parameter in order to set Modbus Slave Node ID of the controller.In that way this controller wil be distinguished inside a Modbus network. Syntax Serial:^MNOD nn ~MNOD Syntax Scripting:setconfigLMNOD,nn) Number of Arguments:1 Argument 1:Modbus Node ID Type:Unsigned B-bit |
304 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Min:0 Max:127
Default:1
Where:
nn =Node ID
Example:
^MNOD 3:Configure Modbus Node ID to 3.
PMS-Pulse keep within Min &Max Safety
HexCode:F4
Description:
This configuration is used to make sure that the pulse input command is always within a user preset minimum and maximum safe value.It is useful to detect,for example,that the wire connection is broken.If the safety is enabled and the input is outside the safe range,the Pulse input command will be considered invalid.
The controller will then apply a motor command based on the priority logic.
Syntax Serial:^PMS nn
~PMS
Syntax Scripting:setconfigLPMS,nn)
Number of Arguments:1
Argument 1:Enable
Type:Unsigned 8-bit
Min:0 Max:1
Default:1 =Enabled
Where:
nn =
0:Disabled
1:Enabled
RSBR-Set RS232/RS485 baudrate
HexCode:OA
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 al- low a simplified connection to devices that have TTL serial ports instead of full RS232 (not applicable for RS485 port).
Commands Reference | RoboteQ |
Syntax Serial:^RSBR nn
~RSBR Syntax Scripting:setconfigLRSBR,nn) Number of Arguments:1 Argument 1:BitRate Type:Unsigned 8-bit Min:0 Max:4 or 9 Default:0 =115200 Where nn = 0:115200 1:57600 2:38400 3:19200 4:9600 5:115200 +Inverted RS232 6:57600 +Inverted RS232 7:38400+Inverted RS232 8:19200 +Inverted RS232 9:9600+Inverted RS232 10:230600 Example: ARSBR 3:sets baud rate at 19200 Note: This configuration can only be changed while connected via USB or via scripting.After the baud rate has been changed,it will not be possible to communicate with the Roborun PC utility using the serial port until the rate is changed back to 115200.Slow bit rates may result in data loss if more characters are sent than can be handled.The inverted mode is only available on selected products. 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. Syntax Serial: ^RS485 nn ~RS485 Syntax Scripting:setconfigLRS485,nn) Number of Arguments:1 |
306 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Argument 1:Enable RS485
Type:Unsigned 8-bit
Min:0 Max:1
Default:0
Where:
nn =Enable RS485
0:Disabled.
1:Enabled.
Example:
ARS4851:Enable RS485.
RWD-Serial Data Watchdog
HexCode:08
Description:
This is the Serial Commands watchdog timeout parameter.It is used to detect when the controller is no longer receiving commands and switch to the next priority level.Any Real time Command arriving from RS232,RS485,TCP USB,CAN or Microbasic Scripting,The watchdog value is a number in ms (1000 =1s).The watchdog function can be disabled by setting this value to 0.The watchdog will only detect the loss of realtime commands,as shown in section 6.All other traffic on the serial port will not refresh the watchdog timer. As soon as a valid command is received,motor operation will resume.
Syntax Serial:^RWD nn
~RWD
Syntax Scripting:setconfigLRWD,nn)
Number of Arguments:1
Argument 1:Timeout
Type:Unsigneed 16-bit
Max:65000
Min:0
Default:1000 =1s
Where:
nn =Timeout value in ms
Example:
^RWD 2000:Set watchdog to 2s
ARWD 0:Disable watchdog
SCR0-Select Print output port for scripting
HexCode:5E
Description:
Selects which port the print statement sends data to.When 0,the last port which re- ceived a valid character will be the one the script outputs to.
Commands Reference | RoboteQ | |
Syntax Serial:^SRO nn
~SCRO Syntax Scripting:setconfigLSRO,nn) |
||
Number of Arguments:1
Argument 1:Port Type:Unsigned 8-bit Min:0 Default:0 =Last used Where: nn = 0:Last used 1:Serial 2:USB 3:RS485 if applicable, 4:TCP if applicable SKCTR -Spektrum Center HexCode:53 Description: |
Max:4 | |
Value captured from Spektrum radio that will be considered as 0 command | ||
Syntax Serial:^SKCTR cc nn
~SKCTR [ccl Syntax Scripting:setconfigLSKCTR,cc) Number of Arguments: Argument 1:Channel Min:1 Argument 2:Center Type:Unsigned 16-bit Min:0 Default:0 Where: |
Max:2
Max:1024 |
|
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. |
308 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
Syntax Serial:^SKDB cc nn
~SKDB [cc]
Syntax Scripting:setconfigLSKDB,cc)
Number of Arguments:
Argument 1:Channel
Min:1
Argument 2:Deadband
Type:Unsigned 8bit Min:0
Default:0
Where:
Max:2
Max:50
cc=Channel
nn =Deadband
SKLIN -Spektrum Linearity
HexCode:55
Description:
This parameter is used for applying an exponential or a logarithmic transformation a Spek- trum command input.There are 3 exponential and 3 logarithmic choices.Exponential cor
rection 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.
Syntax Serial:^SKLIN cc nn
~SKLIN [cc]
Syntax Scripting:setconfigLSKLIN,cc)
Number of Arguments:
Argument 1:Channel
Min:1
Argument 2:Linearity
Type:Unsigned 8-bit Min:0
Default:0 =Linear
Where:
Max:2
Max:6
cc =Input channel number
nn =
0:linear (no change)
1:exp weak
Commands Reference | IRoboteQ | |
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 [ccl |
||
Syntax Scripting:setconfigLSKMAX,cc)
Number of Arguments: Argument 1:Channel Min:1 Argument 2:Max Type:Unsigned 16-bit Min:0 Default:0 Where |
Max:2
Max:1024 |
|
cc =Channel
nn =Max value 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:setconfigLSKMIN,cc)
Number of Arguments: Argument 1:Channel Min:1 Argument 2:Min Type:Unsigned 16-bit Min:0 Default:0 |
Max:2
Max:1024 |
310 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
General Configuration and Safety
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 receiver is to be assigned to which motor command channel.
Syntax Serial:^SKUSE cc nn
-SKUSE[ccl
Syntax Scripting:setconfigLSKUSE,ccl
Number of Arguments:
Argument
Argument
1:Channel
2:Port
Min:1
Type:Unsigned 8-bit
Min:1
Max:2
Max:6
Where:
cc =Channel number
nn =Radio port
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:setconfigLSTO,nn)
Number of Arguments:1
Argument 1:STO Status
Type:Unsigned 8-bit
Min:0 Max:1
Default:0
Commands Reference
Where:
nn=STO status
0:Disabled.
1:Enabled.
Example:
^STO 1:Enable STO functionality.
TELS -Telemetry String
HexCode:47
Description:
This parameter command lets you enter the telemetry string that will be used when the controller starts up.The string is entered as a series of queries characters between a be- ginning and an ending quote.Queries must be separated by”:“colon characters.Upon the power up,the controller will load the query history buffer and it will automatically start executing commands and queries based on the information in this string.Strings up to 48 characters long can be stored in this parameter.
Syntax Serial:^TELS “string”
~TELS
Syntax Scripting:
Number of Arguments:1
Argument 1:Telemetry
Type:String
Min:““Max:48 characters
string
Default:“”=Empty string
Where:
string =string of ASCll characters between quotes
Example:
ATELS”?A:?V:?T#200″=Controller will issue Amps,Volts and temperature information automatically upon power up at 200ms intervals.
Analog,Digital,Pulse lO Configurations
These parameters configure the operating mode and how the inputs and outputs work.
TABLE 15-31.Input/Output Configurations
Command | Arguments | Description |
ACTR | InputNbr Center | Analog Input Center (0) |
ADB | InputNbr Deadband | Analog Input Deadband |
AINA | InputNbr Use | Analog Input Use |
312 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
TABLE 15-31.Input/Output Configurations
Command | Arguments | Description |
ALIN | InputNbr Linearity | Analog Input Linearity |
AMAX | InputNbr Max | Analog Input Max |
AMAXA | InputNbr Action | Analog Input Action at Max |
AMIN | InputNbr Min | Analog Input Min |
AMINA | InputNbr Action | Analog Input Action at Min |
AMOD | InputNbr Mode | Analog Conversion Type |
APOL | InputNbr Polarity | Analog Input Conversion Polarity |
DINA | InputNbr Action | Digital Input Action |
DINL | ActiveLevels | Digital Input Active Level |
DOA | OutputNbr Action | Digital Output Action |
DOL | ActiveLevels | Digital Outputs Active Level |
PCTR | InputNbr Center | Pulse Input Center |
PDB | InputNbr Deadband | Pulse Input Deadband |
PINA | InputNbr Use | Pulse Input Use |
PLIN | InputNbr Linearity | Pulse Input Linearity |
PMAX | InputNbr Max | Pulse Input Max |
PMAXA | InputNbr Action | Pulse Input Action at Max |
PMIN | InputNbr Min | Pulse Input Min |
PMINA | InputNbr Action | Pulse Input Action at Min |
PMOD | InputNbr Mode | Pulse Input Capture Type |
PPOL | InputNbr Polarity | Pulse Input Capture Polarity |
ACTR-Analog Input Center (0)
HexCode:16
Description:
This parameter is the measured voltage on input that will be considered as the center or the O value.The min,max and center are useful to set the range of a joystick or of a feed- back sensor.Internally to the controller,commands and feedback values are converted to 1000,0,+1000.
Syntax Serial:^ACTR cc nn
~ACTR [cc]
Syntax Scripting:setconfigLACTR,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Analog Inputs
Commands Reference | RoboteQ |
Argument 2:Center
Type:Unsigned 16-bit Max:10000 Min:0 Default:2500 mV Where: cc =Analog input channel nn =0 to 10000mV Example: ^ACTR 32000:Set Analog Input 3 Center to 2000mV Note: Center value must always be a number greater of equal to Min,and smaller or equal to Max Make the center value the same as the min value in order to produce a converted output range that is positive only (0 to +1000) ADB-Analog Input Deadband HexCode:17 Description: This parameterselects the range of movement change near the center that should be considered as a 0 command.This value is a percentage from 0 to 50%and is useful to allow some movement of a joystick around its center position without change at the con- verted output Syntax Serial:^ADB cc nn ~ADB [cc] Syntax Scripting:setconfigLADB,cc,nn) Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Analog Inputs Argument 2:Deadband Type:Unsigned 8-bit Max:50 Min:0 Default:5=5% Where: cc =Analog input channel nn =Deadband in % Example: ^ADB 610:Sets Deadband for channel 6 at 10% Note: Deadband is not used when input is used as feedback |
314 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
AINA -Analog Input Use
HexCode:19
Description:
This parameterselects whether an input should be used as a command feedback or left unused.When selecting command or feedback,it is also possible to select which channel this command or feedback should act on.Feedback can be position feedback if potentiom- eter is used or speed feedback if tachometer is used.Embedded in the parameter is the motor channel to which the command or feedback should apply.
Syntax Serial:^AINA cc (nn +mm)
~AINA [cc]
Syntax Scripting:setconfigLAINA,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Analog Inputs
Argument 2:Use
Type:Unsigned 8-bit
Min:0 Max:255
Default:0 =No action
Where:
cc =Analog input channel
nn =
0:No action
1:Command
2:Feedback
mm =
mot1*16+mot2*32+mot3*48
Example:
^AINA 117:Sets Analog channel 1 as command for motor 1.I.e.17 =1 (command)+16 (motor 1)
ALIN -Analog Input 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.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.
Syntax Serial:^ALIN cc nn
~ALIN [ccl
Commands Reference | RoboteQ | |
Syntax Scripting:setconfigLALIN,cc,nn)
Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Analog Inputs Argument 2:Linearity Type:Unsigned 8-bit Min:0 Max:6 Default:0 =Linear Where: cc =Analog input 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: ^ALIN 11:Sets linearity for channel 1 to exp weak AMAX-Analog Input Max HexCode:15 Description: This parameter sets the voltage that will be considered as the maximum command value. The min,max and center are useful to set the range of a joystick or of a feedback sensor.In- ternally to the controller,commands and feedback values are converted to -1000,0,+1000. Syntax Serial:^AMAX cc nn ~AMAX [cc] |
||
Syntax Scripting:setconfigLAMAX,cc,nn)
Number of Arguments:2 Argument 1:InputNbr Min:1 |
Max:Total Number of Analog Inputs | |
Argument 2:Max
Type:Unsigned 16-bit Min:0 Default:4900 mV Where: cc =Analog input channel |
Max:10000 |
316 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
nn =0 to 10000mV
Example:
^AMAX 44500:Set Analog Input 4 Max range to 4500mV
Note:
Analog input can capture voltage up to around 5.2V.Setting the Analog maximum above 5200 mV,means the conversion will never be able to reach +1000
AMAXA -Analog Input Action at Max
HexCode:1B
Descniption:
This parameterselects what action should betaken if the maximum value that is defined in AMAX is reached.The list of action is the same as these of digital inputs.For example, this feature can be used to create soft limitswitches,in which case the motor can be
made to stop if the feedback sensor in a position mode has reached a maximum value.
Syntax Serial:^AMAXA cc (aa +mm)
~AMAXA [cc]
Syntax Scripting:setconfigLAMAXA,cc,aa)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Analog Inputs
Argument 2:Action
Where:
Type:Unsigned 8-bit Min:0
Default:0 =No action
Max:255
cc =Analog input channel
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
Example:
^AMAXA 333:Stops motor 2.1.e.33=1(safety stop)+32 (motor2)
Commands Reference | lRoboteQ | |
AMIN -Analog Input Min
HexCode:14 Description: This parameter sets the raw value on the input that will be considered as the minimum command 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 convert- ed to -1000,0,+1000. Syntax Serial:^AMIN cc nn ~AMIN [ccl Syntax Scripting:setconfigLAMIN,cc,nn) Number of Arguments:2 Argument 1:InputNbr |
||
Min:1
Argument 2:Min Type:Unsigned 16-bit Min:0 Default:100 mV Where: cc =Analog input channel nn =0 to 10000mV Example: ^AMIN 5250:Set Analog Input 5 Min to 250mV Note: |
Max:Total Number of Analog Inputs
Max:10000 |
|
Analog input can capture voltage up to around 5.2V.Setting the Analog minimum between 5200 and 10000 mV means the conversion will always retum 0
AMINA-Analog Input Action at Min HexCode:1A Description: This parameterselects what action should betaken if the minimum value that is defined in AMIN is reached.The list of action is the same as these of the DINA configuration com- mand.For example,this feature can be used to create soft limitswitches,in which case the motor can be made to stop if the feedback sensor in a position mode has reached a minimum value. Syntax Serial:^AMINA cc (aa +mm) ~AMINA [ccl Syntax Scripting:setconfigLAMINA,cc,aa) |
318 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Analog Inputs
Argument 2:Action
Type:Unsigned 8-bit
Max:255
Min:0
Default:0 =No action
Where:
cc =Analog input channel
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
Example:
^AMINA 233:Stops motor 2.1.e.33=1(safety stop)+32 (motor2)
AMOD-Analog Conversion Type
HexCode:13
Description:
This parameter is used to enable/disable an analog input pin.When enabled,it can be
made to measure an absolute voltage from 0 to 5V,or a relative voltage that takes the 5V output on the connector as the 5V reference.The absolute mode is preferred whenever measuring a voltage generated by an outside device or sensor.The relative mode is the mode to use when a sensor or a potentiometer is powered using the controller’s 5V out- put of the controller.Using the relative mode gives a correct sensor reading even though the 5V output is imprecise.
Syntax Serial:^AMOD cc nn
~AMOD [cc]
Syntax Scripting:setconfigLAMOD,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Analog Inputs
Commands Reference | RoboteQ | |
Argument 2:Mode
Type:Unsigned 8-bit Min:0 Default:0 =Disabled Where: cc =Analog input channel nn = 0:Disabled 1:Absolute 2:Relative Example: ^AMOD 11:Analog input 1 enabled in absolute mode |
Max:2 | |
APOL-Analog Input Conversion Polarity
HexCode:1C Description: Inverts the analog capture polarity value after conversion.When this configuration bit is cleared,the pulse capture is converted into a-1000 to+1000 command or feedback value. When set,the converted range is inverted to +1000 to -1000. Syntax Serial:^APOL cc nn ~APOL[ccl Syntax Scripting:setconfigLAPOL,cc,nn) Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Analog Inputs Argument 2:Polarity Type:Unsigned 8-bit Min:0 Max:1 Default:0 =Non inverted Where cc =Analog input channel nn = 0:Not inverted 1:Inverted DINA-Digital Input Action HexCode:OF 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 |
320 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
switch,emergency stop,safety stop or invert direction.Embedded in the parameter is the motor channel(s)to which the action should apply.
Syntax Serial:^DINA cc (aa +[mm])
~DINA [ccl
Syntax Scripting:setconfigLDINA,cc,aa)
Number of Arguments:2
Argument 1:InputNbr
Min:0 Maxx Total Number of Digital Inputs
Argument 2:Action
Type:Unsigned 8-bit
Max:255
Min:0
Default:0 =No actions
Where:
cc =Input channel 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
9:Soft STO
mm=mot1*16+mot2*32+mot3*48
Example:
^DINA 133:Input 1 as safety stop for Motor 1.I.e.33=1(safety stop)+32 (Motor1)
DINL -Digital Input Active Level
HexCode:10
Description:
This parameter is used to set the active level for each Digital input.An input can be made to be active high or active low.Active high means that pulling it to a voltage will trigger an action.Active low means pulling it to ground will trigger an action.This parameter is a single number for all inputs.
Syntax Serial:^DINL cc aa
~DINL [cc]
Syntax Scripting:setconfigLDINL,cc,aa)
Commands | Reference | RoboteQ | |
DOA | 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 21:Sets digital input 2 to active low -Digital Output Action HexCode:11 Description: This configuration parameter will set what will tngger a given output pin.The parameter is a number in a list of possible triggers:when one or several motors are on,when one or several motors are reversed,when an Overvoltage condition is detected or when an Over- temperature condition is detected.Embedded in the parameter is the motor channel(s)to which the action should apply. Syntax Serial:^DOA cc aa ~DOA [ccl |
||
Syntax Scripting:setconfigLDOA,cc,aa)
Number of Arguments:2 Argument 1:OutputNbr Type:Unsigned 32-bit Min:1 Argument 2:Action Min:0 Default:See Note Where: cc =Output channel aa = 0:Never 1:Motor on 2:Motor reversed 3:Overvoltage 4:Overtemperature 5:Mirror status LED 6:No MOSFET failure |
Max:Total Number of Digital Outputs |
322 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
Example:
^DOA 13: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.
To activate an output via serial command or from a Microbasic script,set that output to Never
DOL -Digital Outputs Active Level
HexCode:12
Description:
This parameter configures whether an output should be set to ON or to OFF when it is activated.
Syntax Serial:^DOL cc aa
~DOL
Syntax Scripting:setconfigLDOL,cc,aa)
Number of Arguments:1
Argument 1:ActiveLevels
Type:Unsigned 32-bit
Min:0 Max:2 ^Total Number of Digital Outputs Default:0 =All active high
Where:
cc =Digital input number
aa=
0:On when active
1:Off when active
PCTR -Pulse Input Center
HexCode:20
Description:
This defines the raw value of the measured pulse that would be considered as the 0 value inside the controller.The default value is 1500 which is the center position of the pulse in the RC radio mode.
Syntax Serial:^PCTR cc nn
~PCTR [cc]
Syntax Scrnipting:setconfigLPCTR,cc,nn)
Number of Arguments:2
Commands Reference | RoboteQ | |
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs |
||
Argument 2:Center
Type:Unsigned 16-bit Min:0 Default:1500us Where: |
Max:65536 | |
cc =Pulse input number
nn =0 to 65536us PDB -Pulse Input Deadband HexCode:21 Description: This sets the deadband value for the pulse capture.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. Syntax Serial:^PDB cc nn ~PDB [cc] Syntax Scripting:setconfigLPDB,cc,nn) Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Pulse Inputs Argument 2:Deadband Type:Unsigned 8-bit Min:0 Max:50 Default:5=5% Where cc =Pulse input number nn =Deadband in % Note: Deadband is not used when input is used as feedback PINA -Pulse Input Use HexCode:23 Description: This parameterselects whether an input should be used as a command feedback,posi- tion feedback or left unused.Embedded in the parameter is the motor channel that this command or feedback should act on.Feedback can be position feedback if potentiometer is used or speed feedback if tachometer is used. Syntax Serial:^PINA cc(nn +mm) ~PINA [cc] |
324 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
Syntax Scripting:setconfigLPINA,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs
Argument 2:Use
Type:Unsigned 8-bit
Max:255
Min:0
Default:See note
Where:
cc =Pulse input number
nn =
0:No action
1:Command
2:Feedback
mm =
mot1*16+mot2*32+mot3*48
Example:
^AINA 117:Sets Pulse input 1 as command for motor 1.L.e.17 =1 (command)+16(mo- tor 1)
PLIN -Pulse Input Linearity
HexCode:22
Description:
This parameter is used for applying an exponential or a logarithmic transformation on a
pulse 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.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.
Syntax Serial:^PLIN cc nn
~PLIN [cc]
Syntax Scripting:setconfigLPLIN,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs
Argument 2:Linearity
Type:Unsigned 8-bit
Min:0 Max:6
Default:0 =Linear
Commands Reference | RoboteQ | ||
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 Input Max 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. Syntax Serial:^PMAX cc nn ~PMAX [cc] Syntax Scripting:setconfigLPMAX,cc,nn) Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Puse Inputs |
|||
Argument 2:Max
Where: |
Type:Unsigned 16-bit Min:0
Default:2000 |
Max:65536 | |
cc =Pulse input number
nn =0 to 65536us PMAXA -Pulse Input Action at Max HexCode:25 Description: This parameter configures the action to take when the max value that is defined in PMAX is reached.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. Syntax Serial:^PMAXA cc(aa +mm) ~PMAXA [cc] Syntax Scripting:setconfigLPMAXA,cc,aa) Number of Arguments:2 |
326 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs
Argument 2:Action
Type:Unsigned 8-bit
Max:255
Min:0
Default:0 =No action
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 Input Min
HexCode:1E
Description:
This sets the raw value of the pulse capture that would be considered as the -1000 in- ternal value to the controller.The value is in number of microseconds (1000 =1ms).The default value is 1000 microseconds which is the typical minimum value on an RC radio pulse.
Syntax Serial:^PMIN cc nn
~PMIN [cc]
Syntax Scripting:setconfigLPMIN,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs
Argument 2:Min
Where:
Type:Unsigned 16-bit
Min:0
Default:1000
Max:65536
cc =Pulse input number
nn =0 to 65536us
Commands Reference | lRoboteQ | |||
PMINA -Pulse Input Action at Min
HexCode:24 Description: This parameter selects what action should betaken 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 ac- tions.Embedded in the parameter is the motor channells)to which the action should apply. Syntax Serial:^PMINA cc (aa +mm) ~PMINA [ccl Syntax Scripting:setconfig(_PMINA,cc,aa) Number of Arguments:2 Argument 1:InputNbr Min:1 Max:Total Number of Pulse Inputs |
||||
Argument 2:Action
Where: |
Type:Unsigned Min:0
Default:0 =No |
8-bit
action |
Max:255 | |
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 PMOD-Pulse Input Capture Type HexCode:1D Description: This parameter is used to enable/disable the pulse input and select its operating mode, which can be:pulse with measurement,frequency or duty cycle.Inputs can be measured with a high precision over a large range of time or frequency.An input will be processed and converted to a command or a feedback value in the range of -1000 to +1000 for use by the controller intemally. Syntax Serial:^PMOD cc nn ~PMOD [cc] |
328 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Analog,Digital,Pulse IO Configurations
Syntax Scripting:setconfigLPMOD,cc,nn)
Number of Arguments:2
Argument 1:InputNbr
Min:1 Maxx Total Number of Pulse Inputs
Argument 2:Mode
Type:Unsigned 8-bit
Max:4
Min:0
Default:See note
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 44:Sets Pulse input 4 in Multi-PWM for Robteq’s MGS1600 magnetic guide sensor
Note:
Pulse width is designed for capturing RC radio commands.Pulse width must be beween 500us and 3000us,and repeat rate 50Hz or higher
On some products,enabling a pulse input will cause a an offset voltage to be present when that same input is read as analog
PPOL-Pulse Input Capture Polarity
HexCode:26
Description:
Inverts the pulse capture value after conversion.When this configuration bit is cleared,the pulse capture is converted into a-1000 to+1000 command or feedback value.When set, the converted range is inverted to +1000 to-1000.Center value must always be a number greater of equal to Min,and smaller or equal to Max.Make the center value the same
as the min value in order to produce a converted output range that is positive only (0 to +1000)
Syntax Serial:^PPOL cc nn
~PPOL
Syntax Scripting:setconfigLPPOL,cc,nn)
Number of Arguments:2
Commands Reference
Argument 1:InputNbr
Min:1 Max:Total Number of Pulse Inputs
Argument 2:Polarity
Type:Unsigned 8-bit
Min:0 Max:1
Default:0 =Non inverted
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-32.Motor Configurations
Command | Arguments | Description |
ALIM | Channel Limit | Amps Limit |
ATGA | Channel Action | Amps Trigger Action |
ATGD | Channel Delay | Amps Trigger Delay |
ATRIG | Channel Level | Amps Trigger Level |
BKD | Delay | Brake Delay |
BPR | Channel Value | Bypass Trajectory/Ramp |
BRV | Channel Voltage | Brake Release Voltage |
BHV | Channel Voltage | Brake Hold Voltage |
BDT | Channel Delay | Brake Delay Time |
BLFB | Channel Sensor | Closed Loop Feedback Sensor |
BLSTD | Channel Mode | Stall Detection |
CLERD | Channel Mode | Close Loop Error Detection |
EDEC | Channel Decelearion | Motor Fault Deceleration Rate |
EHL | Channel Value | Encoder Max Limit |
EHLA | Channel Actior | Encoder Action at Max |
EHOME | Channel Value | Encoder Home Count |
ELL | Channel Value | Encoder Min Limit |
ELLA | Channel Action | Encoder Action at Min |
EMOD | Channel Use | Fncoder Usage |
EPPR | Channel Value | Encoder Pulse/Rev Value |
ICAP | Channel Cap | PID Integrator Limit |
KDG | PID Channel Gain | PID Differential Gain |
KIG | PID Channel Gain | PID Integral Gain |
KPG | PID Channel Gain | PID Proportional Gain |
330 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
TABLE 15-34.Motor Configurations
Command | Arguments | Description |
MAC | Channel Acceleration | Motor Acceleration Rate |
MDEC | Channel Deceleration | Motor Deceleration Rate |
MLX | InputNbr Value | Molex Input |
MMOD | Channel Mode | Operating Mode |
MNRPM | Channel RPM | Min Speed RPM Value |
MVEL | Channel Velocity | Position Mode Velocity |
MXMD | Mode | Mixed Mode |
MXPF | Channel MaxPower | Motor Max Power Forward |
MXPR | Channel MaxPower | Motor Max Power Reverse |
MXRPM | Channel RPM | Max Speed RPM |
MXTRN | Channel Tums | Position Turns Min to Max |
OVH | Voltage | Overvoltage hysteresis |
OVL | Voltage | Overvoltage Limit |
OTL | Temperature | Over Temperature Limit |
SCPR | Channel Value | SSI Sensor Resolution |
SED | Channel Value | Sensor Error Detection |
SHL | Channel Value | SSI Sensor Max Limit |
SHLA | Channel Action | SSI Sensor Action at Max |
SHOME | Channel Value | SSI Sensor Home Count |
SLL | Channel Value | SSI Sensor Min Limit |
SLLA | Channel Action | SSI Sensor Action at Min |
SMOD | Chanpel Use | SSI Sensor Usage |
TNM | Channel Constant | Motor Torque Constant |
UVL | Voltage | Undervoltage Limit |
ALIM -Amps Limit
HexCode:2A
Description:
This is the maximum Amps that the controller will be allowed to deliver to a motor regard- less the load of that motor.The value is entered in Amps multiplied by 10.The value is the Amps that are measured at the motor and not the Amps measured from a battery.When the motor draws current that is above that limit,the controller will automatically reduce
the output power until the current drops below that limit.For brushless controllers this value is considered to be in RMS.
Syntax Serial:^ALIM cc nn
~ALIM [cc]
Syntax Scripting:setconfigLALIM,cc,nn)
Commands Reference | RoboteQ |
Number of Arguments:2
Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Limit Type:Unsigned 16-bit Min:10 Max:Max Amps in datasheet Default:See note Where: cc =Motor channel nn =Amps*10 Example: ^ALIM1455: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 data- sheet 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.Typical use for that feature is as a limit switch when,for example,a motor reaches an end and enters stall condition,the current will rise,and that current increase can be detected and the motor be made to stop until the direction is reversed.Embedded in the parameter is the motor channel(s)to which the action should apply. Syntax Serial:^ATGA cc (aa +mm) ~ATGA [cc] Syntax Scripting:setconfigLATGA,cc,aa) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Action Type:Unsigned 8-bit Min:10 Max:255 Default:0 =No action Where: cc =Motor channel aas |
332 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
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
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 parame- ter is used to prevent Amps Trigger Actions to betaken in case of short duration spikes.
Syntax Serial:^ATGD cc nn
~ATGD [cc]
Syntax Scripting:setconfigLATGD,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:Delay
Type:Unsigned 16-bit Min:0
Default:500ms
Where:
Max:Total Number of Motors
Max:10000
cc =Motor channel
nn =Delay in ms
Example:
^ATGD 11000:Action will be triggered if motor Amps exceeds the value set with ATGL for more than 1000ms
ATRIG -Amps Trigger Level
HexCode:2B
Description:
This parameter lets you select Amps threshold value that will trigger an action.This
threshold must be set to be below the ALIM Amps limit.When that threshold is reached, then list of action can be selected using the ATGA parameter.
Syntax Serial:^ATRIG cc nn
~ATRIG [cc]
Commands Reference | RoboteQ |
Syntax Scripting:setconfigLATRIG,cc,nn)
Number of Arguments:2 Argument 1:Channel Max:Total Number of Motors Min:1 Type:Unsigned 16-bit Min:10 Argument 2:Level Max:Max Amps in datasheet Default.Max Amps rating in datasheet Where: cc=Motor channel nn =Amps*10 Example: ^ATRIG2550:Set Amps Trigger to 55.0A BKD -Brake Delay HexCode:01 Description: Set the delay in miliseconds from the time a motor stops and the time an output connect- ed 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. Syntax Serial:^BKD nn ~BKD Syntax Scripting:setconfigLBKD,nn) Number of Arguments:1 Argument 1:Delay Type:Unsigned 16-bit Max:65536 Min:0 Default:250=250ms Where: nn =Delay in milliseconds Example: ^BKD 11000:Causes the digital output to go off,and therefore activate the brake,1.0s after motor stops being energized BPR -Bypass Trajectory/Ramp HexCode:F3 Description: This parameter is configured in order to be able to bypass the ramp of the command or the trajectory in case of position mode.It is applicable mainly in torque mode (in case it requires high transitions)or in DS402 cyclic sync modes. |
334 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Syntax Serial: ^BPR cc nn
~BPR [cc]
Syntax Scripting:setconfigLBPR,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Bypass Status
Type:Unsigned 8-bit
Min:0 Max:1
Default:0
Where:
cc =Channel
nn =Bypass Status
0:Disabled
1:Enabled
BRV-Brake Release Voltage
HexCode:E6
Description:
This parameter is used to select the Voltage level with which the brake solenoid connect- ed will be released.It is applicable only on products that support PWM brake connection. For more details see product’s datasheet.This voltage level is translated in PWM duty
cycle applied on Battery volts.If the value is higher than the battery volts,then the value of the battery volts is applied.
Syntax Serial:^BRV cc nn
~BRV
Syntax Scripting:setconfigLBRV,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Voltage
Type:Unsigned 16-bit
Min:0 Max:1000
Commands Reference | RoboteQ |
Default:120 =12Volts
Where: cc =Motor channel nn =Volts*10 Example: ^BRV 1200:Sets the Release voltage level of the brake of motor channel 1 to 20Volts. BHV-Brake Hold Voltage HexCode:E7 Description: This parameter is used to select the Voltage level with which the brake solenoid connect- ed will behold released.It is applicable only on products that support PWM brake con- nection.For more details see product’s datasheet.This voltage level is translated in PWM duty cycle applied on Battery volts.If the value is higher than the battery volts,then the half value of the battery volts is applied. Syntax Serial:^BHV cc nn ~BHV Syntax Scripting:setconfigLBHV,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Voltage Type:Unsigned 16-bit Min:0 Max:1000 Default:80 =8Volts Where: cc =Motor channel nn =Volts*10 Example: ^BHV 250:Sets the Hold Voltage level of the brake of motor channel 2 to 5Volts. |
336 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
BDT-Brake Delay Time
HexCode:E8
Description:
This parameter is used to select the time period for which the Brake Release Voltage is
applied.After this time expires then the Brake Hold Voltage will be applied in order to con- sume less power.It is applicable only on products that support PWM brake connection. For more details see product’s datasheet.If the value is set to O then only the Brake Hold
Voltage will be applied.
Syntax Serial:^BDT cc nn
~BDT
Syntax Scripting:setconfigLBDT,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Delay
Type:Unsigned 16-bit
Min:0 Max:1000
Default:500 =500ms
Where:
cc =Motor channel
nn =Delay in miliseconds
Example:
^BDT 1200:Sets the Delay Time of the brake of motor channel 1 to 200ms.
BLFB-Closed loop Feedback Sensor
HexCode:3B
Description:
This parameter is used to select which feedback sensor will be used to measure speed or position.On brushless motors system equipped with optical encoders and/or SSl sensors, this parameter lets you select either of these two sensors or the brushless sensors (ie.
Hall,Sin/Cos,or Resolver),as the source of speed or position feedback.Encoders provide higher precision capture and should be preferred whenever possible.SSl sensors provide absolute feedback and are preferred in position modes (e.g.steering).The choice “Other” is also used to select pulse or analog feedback in some position modes.
Commands Reference | RoboteQ | |
Syntax Serial:^BLFB cc nn
~BLFB Syntax Scripting:setconfigLBLFB,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Sensor Type:Unsigned 8-bit Min:0 Max:1 Default:0 =Other Sensor Where: cc =Motor channel nn = 0:Other feedback (Encoders,SSl 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 in closed loop speed mode.If no motion is sensed (i.e.counter remains unchanged)for a preset amount of time while the power applied is above a given threshold,astall con- ditionis detected and the power to the motor is cut until the command is returned to idle.This parameter allows three combinations of time &power sensitivities.The setting also applies when encoders are used in closed loop speed or closed loop speed position modes on brushed or brushless motors Syntax Serial:^BLSTD cc nn ~BLSTD [cc] |
||
Syntax Scripting:setconfigLBLSTD,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 |
Max:Total Number of Motors | |
Argument 2:Mode
Type:Unsigned 8-bit Min:0 Max:3 Default:2=500ms at 25%Power Where cc =Motor channel nn = 0:Disabled |
338 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
1:250ms at 10%Power
2:500ms at 25%Power
3:1000ms at 50%Power
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 shutdown 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.This parameter allows three combinations of time &error level.This parameter is not compatible with Closed Loop Speed Position mode.
Syntax Serial:^CLERD cc nn
~CLERS
Syntax Scripting:setconfigLCLERD,cc,nn)
Number of Arguments:2
Argument 1:Channel
Channels
Min:1
Max:Total Number of Motor
Argument 2:Mode
Type:Unsigned 8-bit
Min:0 Max:3
Default:2=500ms at Error>250
Where:
cc =Motor channel
nn =
0:Detection disabled
1:250ms at Error>100
2:500ms at Error>250
3:1000ms at Error>500
Example:
^CLERD 2:Motor will stop if command -feedback is greater than 100 for more than 250ms
Note:
Disabling the loop error can lead to runaway or other dangerous conditions in case of sen- sor failure
Commands Reference | lRoboteQ | |
EDEC-Motor Fault Deceleration Rate
HexCode:E9 Descrijption: 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 con- trollers fitted with encoder,the speed and deceleration value are actual RPMs.Brushless motor controllers use the hall sensor for measuring actual speed and acceleration will also be in actual RPM/s. Syntax Serial:^EDEC cc nn~EDEC [cc] Syntax Scripting:setconfigLEDEC,cc,nn) Number of Arguments:2 Argument 1:Channel Type:Unsigned 8-bit Min:1 Max:Total Number of Motor Channels Argument 2:Deceleration Type:Signed 32-bit Min:0 Max:500000 Default:10000=1000.0 RPM/s Where: cc =Motor channel nn =Deceleration time in 0.1 RPM per second EHL -Encoder Max Limit HexCode:4C Description: Defines a maximum count value at which the controller will trigger an action when the counter goes above that number.This feature is useful for setting up virtual or soft limit switches.This value,together with the Low Count Limit,are also used in the position mode to determine the travel range when commanding the controller with a relative position command.In this case,the High Limit Count is the desired position when a com- mand of 1000 is received. Syntax Serial: ^EHL cc nn ~EHL [cc] |
||
Syntax Scripting:setconfigLEHL,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Value Type:Signed 32-bit Min:-2147M Default:+20000 |
Max:Total Number of Encoders
Max:2147M |
340 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Where:
cc =Encoder channel
nn =Counter value
EHLA -Encoder Action at Max
HexCode:4E
Description:
This parameter lets you select what kind of action should betaken 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.
Syntax Serial:^EHLA cc nn
~EHLA [cc]
Syntax Scripting:setconfig(LEHLA,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Encoders
Argument 2:Action
Type:Unsigned 8-bit
Min:0 Max:255
Default:0 =No action
Where:
cc =Encoder channel
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
EHOME-Encoder Home Count
HexCode:4F
Description:
Contains a value that will be loaded in the selected encoder counter when a home switch is detected,or when a Home command is received from the serial/USB,or issued from a MicroBasic script.
Commands Reference | RoboteQ | |
Syntax Serial:^EHOME cc nn
~EHOME [cc] |
||
Syntax Scripting:setconfigLEHOME,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Value Type:Signed 32-bit Min:-2147M Default:0 Where: |
Max:Total Number of Encoders
Max:2147M |
|
cc =Encoder channel
nn =Counter value to be loaded ELL -Encoder Min Limit HexCode:4B Description: Defines a minimum count value at which the controller will trigger an action when the counter dips below that number.This feature is useful for setting up virtual or soft limit switches.This value,together with the High Count Limit,are also used in the position mode to determine the travel range when commanding the controller with a relative posi- tion command.In this case,the Low Limit Count is the desired position when a command of -1000 is received. Syntax Serial:^ELL cc nn ~ELL [cc] |
||
Syntax Scripting:setconfigLELL,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Value Type:Signed 32-bit Min:-2147M Default:-20000 Where |
Max:Total Number of Encoders
Max:2147M |
|
cc =Encoder channel
nn =Counter value Example: ^ELL 1-100000:Set encoder 1 low limit to minus 100000 |
342 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
ELLA -Encoder Action at Min
HexCode:4D
Description:
This parameter lets you select what kind of action should betaken 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.
Syntax Serial:^ELLA cc (aa +mm)
~ELLA [ccl
Syntax Scripting:setconfig(LELLA,cc,aa)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Encoders
Argument 2:Action
Type:Unsigned 8-bit
Min:0 Max:255
Default:0 =No action
Where:
cc =Encoder channel
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
EMOD -Encoder Usage
HexCode:49
Description:
This parameter defines what use the encoder is for.The encoder can be used to set com- mand or to provide feedback (speed or position feedback).The use of encoder as feedback devices is the most common.Embedded in the parameter is the motor to which the en- coder is associated.
Syntax Serial:^EMOD cc (aa+mm)
~EMOD [ccl
Commands Reference | RoboteQ | ||
Syntax Scripting:setconfigLEMOD,cc,aa)
Number of Arguments:2 Argument 1:Channel Min:1 |
Max:Total Number of Encoders | ||
Argument 2:Use
Where: |
Type:Unsigned 8-bit Min:0
Default:0 =Unused |
Max:255 | |
cc =Encoder channel
aa = 0:Unused 1:Command 2:Feedback mm = mot1*16+mot2*32+mot3*48 Example: ^EMOD 118 =Encoder used as feedback for channel 1 EPPR -Encoder Pulse/Rev Value HexCode:4A Description: This parameter will set the pulse per revolution of the encoder that is attached to the con- troller.The PPR is the number of pulses that is issued by the encoder when making a full turn.For each pulse there will be 4 counts which means that the total number of a count- er increments inside the controller will be 4x the PPR value.Make sure not to confuse the Pulse Per Revolution and the Count Per Revolution when setting up this parameter.Enter- ing a negative number will invert the counter and the measured speed polarity Syntax Serial:^EPPR cc nn ~EPPR |cc] |
|||
Syntax Scripting:setconfig(_EPPR,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Value Type:Signed 16-bit Min:-32768 Default:100 |
Max:Total Number of Encoders
Max:32767 |
344 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Where:
cc =Encoder channel
nn =PPR value
Example:
^EPPR 2200:Sets PPR for encoder 2 to 200
ICAP-PID Integrator Limit
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 particularty useful in position systems with long travel movement,and where the integral factor would otherwise become very large be- cause of the extended time the integral would allow to accumulate.This parameter can be used to dampen the effect of the integral parameter without reducing the gain.This parameter may adversely affect system performance in closed loop speed mode as the Integrator must be allowed to reach high values in order for good speed control.
Syntax Serial:^ICAP cc nn
~ICAP [cc]
Syntax Scripting:setconfigLICAPcc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:Cap
Type:Unsigned 8-bit Min:1
Default:100%
Where:
cc =Motor channel
nn =Integral cap in %
KDG-PID Differential Gain
Max:Total Number of Motors
Max:100
HexCode:F2
Description:
Sets the PID’s Differential Gain.The value is set as the gain multiplied by 10^6.This value is used for both speed and position differential gains.
Syntax Serial:^KDG cc nn
~KDG [cc]
Syntax Scripting:setconfigLKDG,cc,nn)
Commands Reference | RoboteQ | |
Number of Arguments:2
Argument 1:Channel 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:Speed Differential Gain 2:Position Differential Gain cc(dual channel)= 1:Speed Differential Gain for motor 1 2:Speed Differential Gain for motor 2 3:Position Differential Gain for motor 1 4:Position Differential Gain for motor 2 nn=Differential Gain*1,000,000 Example: ^KDG 11500000:Set motor channel 1 Speed Differential Gain to 1.5. KIG -PID Integral Gain HexCode:F1 Description: Sets the PID’s Integral Gain.The value is set as the gain multiplied by 10^6.This value is used for both speed and position differential gains. Syntax Serial:^KIG cc nn ~KIG Syntax Scripting:setconfigLKIG,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:2*Total Number of Motors Argument 2: Gain Type:Unsigned 32-bit |
||
Min:0
Where: cc (single channel)= cc(dual channel)= |
Max:2,000,000,000 Default:0
1:Speed Integral Gain 2:Position Integral Gain 1:Speed Integral Gain for motor 1 |
346 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
2:Speed Integral Gain for motor 2
3:Position Integral Gain for motor 1
4:Position Integral Gain for motor 2
nn =Integral Gain*1,000,000
Example:
^KIG 11500000:Set motor channel 1 Speed Integral Gain to 1.5.
KPG-PID Proportional Gain
HexCode:F0
Description:
Sets the PID’s Proportional Gain.The value is set as the gain multiplied by 10^6.This value is used for both speed and position differential gains.
Syntax Serial:^KPG cc nn
~KPG
Syntax Scripting:setconfigLKPG,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:Gain
Min:0
Where:
cc(single channel)=
Max:2*Total Number of Motors
Type:Unsigned 32-bit
Max:2,000,000,000 Default:0
1:Speed Proportional Gain
2:Position Proportional Gain
cc(dual channel)
1:Speed Proportional Gain for motor 1
2:Speed Proportional Gain for motor 2
3:Position Proportional Gain for motor 1
4:Position Proportional Gain for motor 2
nn =Proportional Gain *1,000,000
Example:
^KPG 11500000:Set motor channel 1 Speed Proportional Gain to 1.5.
Commands Reference | IRoboteQ |
MAC -Motor Acceleration Rate
HexCode:33 Description: Set the rate of speed change during acceleration for a motor channel.This command is identical to the AC realtime command.Acceleration value is in 0.1*RPM per second. When using controllers fitted with encoder,the speed and acceleration value are actual RPMs.Brushless motor controllers use the intermal sensor (Hall,Sin/Cos or Resolvery for measuring actual speed and acceleration will also be in actual RPM/s.When using the controller without speed sensor,the acceleration value is relative to the Max RPM configuration parameter,which itself is a userprovide number for the speed normally expected speed at full power.Assuming that the Max RPM parameter is set to 1000,and acceleration value of 10000 means that the motor will go from 0 to full speed in exacthy 1 second,regardless of the actual motor speed.If value is set to O then the command ramp is by-passed. 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.1 RPM per seconds Note:In Closed Loop Torque Mode the value is translated in miliAmps/sec MDEC -Motor Deceleration Rate HexCode:34 Description: Set the rate of speed change during deceleration for a motor channel.This command is identical to the DC realtime command.Acceleration value is in 0.1*RPM per second. When using controllers fitted with encoder,the speed and deceleration value are actual RPMs.Brushless motor controllers use the internal sensor(Hall,Sin/Cos or Resolver)for measuring actual speed and acceleration will also be in actual RPM/s.When using the controller without speed sensor,the deceleration value is relative to the Max RPM config- uration parameter,which itself is a userprovide number for the speed normally expected speed at full power.Assuming that the Max RPM parameter is set to 1000,and deceler- ation value of 10000 means that the motor will go from full speed to 01 second,regard- less of the actual motor speed.If value is set to O then the command ramp is by-passed. |
348 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Syntax Serial:^MDEC cc nn
~MDEC [cc]
Syntax Scripting:setconfigLMDEC,cc,nn)
Number of Arguments:2
Argument 1:Channel
Type:Unsigned 8-bit
Min:1 Max:Total Number of Motor Channels
Argument 2:Deceleration
Type:Signed 32-bit
Min:0 Max:500000
Default:10000 =1000.0 RPM/s
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.In order to have these pins functional as hall inputs pull-up resistors should be added exter nally.In brushed controllers if SSl sensors are used then encoder inputs are re-mapped to the DB16 or DB25 pins as per datasheet.
Syntax Serial:
AMLX cc nn
~MLX [cc]
Syntax Scripting:setconfigLMLX,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Molex Input
Type:Unsigned 8-bit
Min:0 Max:2
Default:0
Where:
cc =Motor channel
nn =Hall Input
Commands Reference | RoboteQ | |
0:Hall Sensors (not for Brushed Controllers).
1:Encoders (not for Brushless controllers). 2:SSl Encoders Example: ^MLX 2:Configure Molex to have SSl sensors connected. MDIR -Motor Direction HexCode:77 Description: This parameter lets you set the motor direction to inverted or direct. Syntax Serial:^MDIR cc nn Where: cc =Motor Channel nn =0:Not inverted 1:Inverted Syntax Scripting:setconfigLMDIR,cc,nn) MMOD -Operating Mode HexCode:27 Description: This parameter lets you select the operating mode for that channel.See manual for de- scription of each mode. Syntax Serial:^MMOD cc nn ~MMOD [cc] |
||
Syntax Scripting:setconfigLMMOD,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Mode Type:Unsigned 8-bit Min:0 Default:0 =Open loop Where |
Max:Total Number of Motors
Max:6 |
|
cc =Motor channel
nn = |
350 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
0:Open-oop
1:Closed-oop speed
2:Closed4oop position relative
3:Closed4oop count position
4:Closed-loop position tracking
5:Closed-oop torque
6:Closed-loop speed position
Example:
^MMOD 2:Select Closed loop position relative
MNRPM -Min Speed RPM
HexCode:CB
Description:
This parameter contains the minimum speed that can be commanded for a motor in
closed loop speed or closed loop speed position modes.See Figure 15-2 for a more de- tailed description.
Syntax Serial: AMNRPM cc nn
~MNRPM [cc]
Syntax Scripting:setconfigLMNRPM,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Speed (RPM)
Type:Unsigned 16-bit
Min:0 Max:65535
Default:0
Where:
cc =Channel
nn =Min Speed RPM
MVEL-Position Mode Velocity
HexCode:35
Description:
This parameter is the speed at which the motor moves while in position mode.Values are in RPMs.To change velocity while the controller is in operation,use the !S runtime com- mand.
Commands Reference | RoboteQ | |
Syntax Serial:^MVEL cc nn
~MVEL [cc] |
||
Syntax Scripting:setconfig(MVEL,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Velocity Type:Signed 32-bit Min:0 Default:1000 RPM Where: |
Max:Total Number of Motors
Max:30000 |
|
cc =Motor channel
nn =Velocity value in RPM MXMD -Mixed Mode HexCode:05 Description: Selects the mixed mode operation.It is applicable to dual channel controllers and serves to operate the two channels in mixed mode for tank-like steering.There are 3 possible values for this parameter for selecting separate or one of the two possible mixed mode algorithms.Details of each mixed mode is described in Section 7,chapter “Mixed Mode Select. Syntax Serial:^MXMD nn ~MXMD Syntax Scripting:setconfigLMXMD,nn) Number of Arguments:1 Argument 1:Mode Type:Unsigned 8-bit Min:0 Max:2 Default:0 =Separate Where: nn = 0:Separate 1:Mode 1 2:Mode 2 Example: ^MXMD 0:Set mode to separate |
352 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
MXPF-Motor Max Power Forward
HexCode:28
Description:
This parameter lets you select the scaling factor for the PWM output,in the forward direc- tion,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 con- nect 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.
Syntax Serial:^MXPF cc nn
~MXPF [ccl
Syntax Scripting:setconfig(MXPF,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:MaxPower
Type:Unsigned 8-bit Min:25
Default:100%
Where:
Max:Total Number of Motors
Max:100
cc=Motor channel
nn =Max Power
MXPR -Motor Max Power Reverse
HexCode:29
Description:
This parameter lets you select the scaling factor for the PWM output,in the reverse direc- tion,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 con- nect 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.
Syntax Serial:^MXPR cc nn
~MXPR [cc]
Syntax Scripting:setconfigLMXPR,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Max:Total Number of Motors
Commands Reference | RoboteQ | |
Argument 2:MaxPower
Type:Unsigned 8-bit Min:25 Default:100% Where: |
Max:100 | |
cc =Motor channel
nn =Max Power MXRPM-Max Speed RPM 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 con- sidered the speed to reach when a+1000 command is sent.In open loop,this parameter is used together with the acceleration and deceleration settings in order to figure the ramping time from 0 to full power. Syntax Serial:^MXRPM cc nn ~MXRPM cc |
||
Syntax Scripting:setconfigLMXRPM,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Speed (RPM) Type:Unsigned 16-bit Min:10 Default:1000 RPM Where |
Max:Total Number of Motors
Max:65535 |
|
cc =Motor channel
nn =Max Speed RPM MXTRN -Position Turns Min to Max HexCode:37 Description: This parameter is used in position mode to measure the speed when an analog or pulse feedback sensor is used.The value is the number of motor tums between the feedback value of -1000 and +1000.When encoders are used for feedback,this parameter is auto- matically computed from the encoder configuration,and can thus be omitted.See Section “Closed Loop Relative and Tracking Position Modes”for a detailed discussion. Syntax Serial:^MXTRN cc nn ~MXTRN [cc] |
354 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Syntax Scripting:setconfigLMXTRN,cc,nn)
Number of Arguments:2
Argument 1:Channel
Argument 2:Turns
Min:1 Max:Total Number of Motors
Type:Signed 32-bit
Min:10 Max:100000
Default:10000 =1000.0 turns
Where:
cc =Motor channel
nn =Number of turns*10
Example:
^MXTRN 12000:Set max turns for motor 1 to 200.0 tums
OVH -Overvoltage hysteresis
HexCode:42
Description:
This voltage gets subtracted to the overvoltage limit to set the voltage at which the over- voltage condition will be cleared.For instance,if the overvoltage limit is set to 500 (50.0) and the hysteresis is set to 50 (5.0V),the MOSFETs will turn off when the voltage reach- es 50V and will remain off until the voltage drops under 45V
Syntax Serial:^OVH nn
~OVH
Syntax Scripting:setconfigLOVH,nn)
Number of Arguments:1
Argument 1:Voltage
Type:Unsigned 8-bit Min:0
Default:50 =5.0V
Max:255 =25.5V
Where:
nn =Volts*10
Example:
^OVH 45:Sets hysteresis at 4.5V
Note:
Make sure that overvoltage limit minus hysteresis is above the supply voltage.
Commands Reference | IRoboteQ |
OVL -Overvoltage Limit
HexCode:02 Description: Sets the voltage level at which the controller must turm offits 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. Syntax Serial:^OVL nn ~OVL Syntax Scripting:setconfigLOVL,nn) Number of Arguments:1 Argument 1:Voltage Type:Unsigned 16-bit Min:100=10.0V Max:See Product Datasheet Default:See Product Datasheet Where: nn =Volts *10 Example: ^OVL 400:Set Overvoltage limit to 40.0V Note: On firmware versions 1.5 and earlier,no hysteresis exists and the overvoltage condition is cleared as soon as the voltage dips below the overvoltage limit. OTL -Over Temperature Limit HexCode:D1 Description: Sets the Heatsink Temperature level at which the controller must turn off its power stage and signal an OverHeat condition.Value is in Celsius degrees.When temperature reaches 10 degrees below the limit,the controller starts to decrease the maximum applied power (duty cycle),by 10%for each additional degree.The power stage will turn back on gradu- ally when heat sink temperature dips below the above limit.See Section 7,chapter “Tem- perature-Based Protection”for more details. Syntax Scripting:setconfig(OTL,nn) Number of Arguments:1 Argument 1:Temperature Type:Unsigned 16-bit Min:0 Max:85 Where: nn =Temperature in Celsius degrees |
356 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Example:
^OTL 75:Set Over temperature limit to 75 Celsius degrees.
SED -Sensor Error Detection
HexCode:E4
Description:
This parameter sets the sensor error detection level.There are three levels of the sensitiv-
ity,Disabled,Tolerant and Strict.If it is configured as disabled then the function is inactive.
when the selected value is Tolerant then the fault will be activated after 5 detected sensor
errors (it is reseted when motor command is zero or the direction is reversed).If it is con-
figured as Strict then the fault will be generated after the first sensor error.
Syntax Serial: ^SED cc nn
~SED [cc]
Syntax Scripting:setconfigLSED,cc,nn)
Number of Arguments:2
Argument 1:Channel
Type:Unsigned 8-bit
Min:1 Max:Total Number of Brush-less Motor
Argument 2:Mode
Default:2 =Strict
Where
cc=Number of brush-less motor
nn=
0:Disable
1:Tolerant
2:Strict
SCPR -SSI Sensor Resolution
HexCode:CE
Description:
This parameter will set the counts per revolution of the SSI Sensor that is attached to the controller.The CPR is the number of counts that is issued by the SSI Sensor when making a full turn.Entering a negative number will invert the counter and the measured speed
polarity.
Commands | Reference | RoboteQ |
SHL | Syntax Serial: ^SCPR cc nn
~SCPR [cc] Syntax Scripting:setconfigLSCPR,cc,nn) Number of Arguments:2 Argument 1: Channel Min:1 Max:Total Number of SSl Sensors Argument 2:Value Type:Signed 32-bit Min:-65535 Max:65535 Default:4096 Where: nn= 4096 for 12 bit sensor 8192 for 13 bit sensor 16387 for 14 bit sensor 32768 for 15 bit sensor 65535 for 16 bit sensor Example: ^SCPR 216384:Sets CPR for SSI Sensor 2 to 16384 (14 bits). -SSI Sensor Max 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.This feature is useful for setting up virtual or soft limit switches.This value,together with the SSl Sensor Low Count Limit,are also used in the position mode to determine the travel range when commanding the controller with a relative position command.In this case,the SSI Sensor High Limit Count is the desired position when a command of 1000 is received. Syntax Serial: ^SHL cc nn ~SHL [cc] Syntax Scripting:setconfig(_SHL,cc,nn) Number of Arguments:2 Argument 1: Channel Min:1 Max:Total Number of SSl Sensors Argument 2:Value Type:Signed 32-bit |
358 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor
Configurations
Min:-2147M Max:2147M
Default:+20000
Where:
cc =SSl Sensor channel
nn =Counter value
SHLA -SSI Sensor Action at Max
HexCode:DA
Description:
This parameter lets you select what kind of action should betaken 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.
Syntax Serial: ASHLA cc nn
~SHLA [cc]
Syntax Scripting:setconfigLSHLA,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of SSl Sensors
Argument 2:Action
Type:Unsigned 8-bit
Min:0 Max:255
Default:0 =No action
Where:
cc=SSl Sensor channel
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
Commands Reference | lRoboteQ | |
SHOME-SSI Sensor Home Count
HexCode:DB Description: Contains a value that will be loaded in the selected SSl counter when a home switch is detected,or when a Home command is received from the serial/USB,or issued from a MicroBasic script.When the SSI sensor is used as absolute sensor (Absolute feedback), this value will hold an offset with which the SSl sensor counter is subtracted. Syntax Serial:^SHOME cc nn ~SHOME [ccl Syntax Scripting:setconfigLSHOME,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of SSl Sensors Argument 2:Value Type:Signed 32-bit Min:-2147M Max:2147M Default:0 Where: cc=SSl Sensor channel nn =Counter value to be loaded,or Counter offset. SLL -SSI Sensor Min Limit HexCode:D7 Description: Defines a minimum count value at which the controller will trigger an action when the counter dips below that number.This feature is useful for setting up virtual or soft limit switches.This value,together with the SSI Sensor High Count Limit,are also used in the position mode to determine the travel range when commanding the controller with a rel- ative position command.In this case,the SSI Sensor Low Limit Count is the desired posi- tion when a command of -1000 is received. Syntax Serial:^SELL cc nn |
||
~SLL [cc]
Syntax Scripting:setconfigLSLL,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Argument 2:Value |
Max:Total Number of Encoders |
360 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
Type:Signed 32-bit
Min:-2147M Max:2147M
Default:-20000
Where:
cc =SSl Sensor channel
nn =SSl Counter value
Example:
^SLL 1-100000:Set SSI Sensor 1 low limit to minus 100000
SLLA -SSI Sensor Action at Min
HexCode:D9
Description:
This parameter lets you select what kind of action should betaken 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.
Syntax Serial:^SLLA cc (aa +mm)
~SLLA [ccl
Syntax Scripting:setconfigLSLLA,cc,aa)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of SSl Sensors
Argument 2:Action
Type:Unsigned 8-bit
Min:0 Max:255
Default:0 =No action
Where:
cc =SSl Sensorchannel
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
Commands Reference | lRoboteQ |
SMOD -SSI Sensor Usage
HexCode:D6 Description: This parameter defines what use the SSI Sensor is for.The encoder can be used to set command or to provide feedback (speed or position feedback).The use of SSl Sensor as feedback devices is the most common.If absolute Feedback option is set then the feedback will back the absolute value of the SSI Sensor,which is useful for Closed Loop Position Modes.Embedded in the parameter is the motor to which the SSI Sensor is as- sociated. Syntax Serial:^SMOD cc (aa +mm) ^SMOD [cc] Syntax Scripting:setconfigLSMOD,cc,aa) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of SSl Sensors Argument 2:Use Type:Unsigned 8-bit Min:0 Max:255 Default:0 =Unused Where: cc =SSl Sensor channel aa = 0:Unused 1:Command 2:Feedback 3:Absolute Feedback mm=mot1*16+mot2*32+mot3*48 Example: ^SMOD 119=Encoder used as absolute feedback for channel 1 TNM -MotorTorque Constant HexCode:DF Description: This configuration parameter sets the motor torque constant.It is a value with which we can convert the peak motor current (A)to torque (NM)and vice versa.This value is in mil- iNm/Amps and is usually referred in the motor datasheets.The conversion is used by the TC and TSL commands and TRQ query. Note:In the motor torque constant,the peak amplitude of motor current is considered, not the RMS motor current value. Syntax Serial:^TNM cc nn |
362 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Motor Configurations
~TNM cc
Syntax Scripting:setconfigLTNM,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Torque Constant Type:Signed 32-bit
Min:0 Default:1000 =1Nm/Amps
Where:
cc =Motor channel
nn =Motor Torque Constant (miliNm/Amps)
Example:
ATNM 11523:Set torque constant for motor 1 to 1.523 Nm/Amps.
UVL-Undervoltage Limit
HexCode:03
Description:
Sets the voltage below which the controller will turn off its power stage.The voltage is entered as a desired voltage value multiplied by 10.Undervoltage condition is cleared as soon as voltage rises above the limit.
Syntax Serial:^UVL nn
~UVL
Syntax Scripting:setconfigLUVL,nn)
Number of Arguments:1
Argument 1:Voltage
Datasheet
Type:Unsigned 16-bit
Min:50 =5.0V
Max:Max Voltage in Product
Default:50 =5.0V
Where:
nn =Volts*10
Example:
^UVL 100:Set undervoltage limit to 10.0V
Commands Reference
Brushless Specific Commands
TABLE 15-33.Brushless Specific Commands
Command | Arguments | Description |
BADJ | Channel Angle | Brushless Angle Zero Adjust |
BADV | Chanpel Value | Brushless timing angle adjust |
BECC | Channel Value | BEMF Coupling Constant |
BFBK | Channel Sensor | Brushless Sinusoidal Angle Sensor |
BHL | Channel Value | Brushless Internal Sensor Max Limit |
BHLA | Channel Action | Brushless Internal Sensor Action at Max |
BHOME | Channel Value | Brushless Internal Sensor Home Count |
BLL | Channel Value | Brushless Internal Sensor Min Limit |
BLLA | Channel Actior | Brushless Internal Sensor Action at Min |
BMOD | Channel Mode | Brushless Switching Mode |
BPOL | Channel NbrPoles | Number of pole pairs |
BZPW | Channel Amps | Brushless Reference Seek Power |
HPO | InputNbr Value | Hall Sensor Position Type |
HSAT | InputNbr Value | Hall Sensor Angle Table |
HSM | InputNbr Value | Hall Sensor Ma |
KIF | PID Channel Gain | Current PID Integral Gain |
KPF | PID Channel Gain | Current PID Proportional Gain |
LD | Channel Value | D-axis motor Inductance |
LQ | Channel Value | Q-axis motor Inductance |
PSA | Channel Angle | Phase Shift Angle |
RS | Channel Value | Motor Stator Resistance |
SPOL | Channel Poles | SinCos/SSI Sensor Poles |
SSF | Channel Frequency | Sensorless Start-Up Frequency |
SVT | Channel Value | BEMF Integrator Limit |
SWD | InputNbr Value | Swap Windings |
TID | Channel Amps | FOC Target Id |
VK | Channel Value | Motor Voltage constant |
ZSMA | Channel Value | Cos Amplitude |
ZSMC | InputNbr Value | SinCos Calibration |
BADJ-Brushless Angle Zero Adjust
HexCode:60
Description:
When being in sinusoidal mode and Sin/Cos,Resolver or SSl feedback sensors are used or in Hall+Encoder Trapezoidal mode,this configuration command stores results of auto- matic 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 elec- trical turn.The value can then be fine tuned manually.
364 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Serial:^BADJ cc nn
~BADJ [cc]
Syntax Scripting:setconfigLBADJ,cc,nn)
Number of Arguments:
Argument 1:Channel
Min:1
Argument 2:Angle
Type:Signed 16-bit
Min:-511
Default:0
Where:
cc =Motor channel
nn =Angle
Example:
^BADJ 1220:Manually set the zero to 220 degrees
Max:Total Number of Motors
Max:511
BADV -Brushless timing angle adjust
HexCode:61
Description:
When operating in sinusoidal mode,this parameter shifts by number of degrees to the 3 phases rotating magnetic field.This value works symetrically to produce the same results in both rotation direction.The value is in electrical degrees ranging from 0 to 511 for a full electrical turn.
Syntax Serial:^BADV cc nn
~BADV Icc]
Syntax Scripting:setconfigLBADV,cc,nn)
Number of Arguments:2
Argument 1:Channel
Argument 2:Value
Min:-511
Default:0
Where:
cc =Motor channel nn =Angle
Max:Total Number of Motors
Min:1
Type:Signed 16-bit
Max:511
Commands Reference | lRoboteQ | |
Example:
^BADV 120:Advance motor 1 timing by 20 degrees BECC-BEMF Coupling Constant HexCode:BD Descrijption: 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 cou- pling due to other two phases.This number is filled after the automatic motor tuning Syntax Serial:^BECC cc nn ~BECC cc Syntax Scripting:setconfigLBECC,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Coupling Constant Type:Signed 32-bit Min:0 Default:0 Where: cc =Motor channel nn =Coupling Constant Example: ^BECC 145000:Set the coupling constant for motor 1 to 45,000. BFBK -Brushless Sinusoidal Angle Sensor HexCode:63 Description: Selects the type of rotor angle sensor to be used for brushless motors when operated in sinusoidal mode. Syntax Serial:^BFBK cc nn ~BFBK [cc] |
||
Syntax Scripting:setconfigLBFBK,cc)
Number of Arguments: Argument 1:Channel Min:1 Argument 2:Sensor |
Max:Total Number of Motors |
366 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Type:Unsigned 8-bit
Max:4
Min:0
Default:0 =Encoder
Where:
cc=Motor channel
nn =
0:Encoder
1:Hall
2:Hall +Encoder
3:SPI/SSI sensor
4:Sin/Cos sensor
5:Resolver
BHL-Brushless Internal Sensor Max Limit
HexCode:3E
Description:
This parameter allows you to define a minimum Internal Sensor count value at which the controller will trigger an action when the counter rises above that number.This feature is useful for setting up virtual or soft limitswitches.This value,together with the respective Min Limit,are also used in the position mode to determine the travel range when com- manding the controller with a relative position command.In this case,the Max Limit is the desired position when a command of 1000 is received
Syntax Serial:^BHL cc nn
~BHL [cc]
Syntax Scripting:setconfigLBHL,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Max:Total Number of Motors
Argument 2:Value
Type:Signed 32-bit Min:-2147M
Default:20000
Where:
Max:+2147M
cc =Motor channel
nn =Counter value
Example:
^BHL 10000:Set brushless Intemal Sensor Max Limit to 10000 counts
Note:
Counter is not an absolute position.A homing sequence is necessary to set a reference position.
Commands Reference | RoboteQ | |
BHLA -Brushless Internal Sensor Action at Max
HexCode:40 Description: This parameter lets you select what kind of action should betaken when the max limit is reached on the Internal Sensor counter.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. Syntax Serial:^BHLA cc nn ~BHLA [ccl |
||
Syntax Scripting:setconfig(_BHLA,cc,nn)
Number of Arguments:2 Argument 1:Channel Min:1 |
Max:Total Number of Motor | |
Argument 2:Action
Type:Unsigned 8-bit Min:0 Default:0 =No action Where: cc =Motor channel |
Max:255 | |
aa =
0:No action 1:Safety stop 2:Emergency stop 3:Motor stop 4:Forward limit switch 5:Reverse limit switch 6:Inyert direction 7:Run MicroBasic script 8:Load counter with home value mm =mot1*16+mot2*32+mot3*48 Example: ^BHLA 136:Forward limit switch for motor 2 (4 +32) BHOME-Brushless Internal Sensor Home Count HexCode:3C Description: This parameter contains a value that will be loaded in the internal sensor counter when a home switch is detected,or when a Home command is received from the seriaV USB,or issued from a MicroBasic script. |
368 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Serial:^BHOME cc nn
~BHOME [cc]
Syntax Scripting:setconfigLBHOME,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Max:Total Number of Motors
Argument 2:Value
Type:Signed 32-bit Min:-2147M
Default:0
Max:+2147M
Where:
cc =Motor channel
nn =Counter value to be loaded
Example:
^BHOME 110000:load Internal Sensor counter with 10000 when Home command is received
Note:
Change counter only while in open loop if brushless counter is used for speed or position feedback
BLL -Brushless Internal Sensor Min Limit
HexCode:3D
Description:
This parameter defines a minimum Internal Sensor count value at which the controller
will trigger an action when the counter dips below that number.This feature is useful for setting up virtual or soft limitswitches.This value,together with the respective Max Limit, are also used in the position mode to determine the travel range when commanding the controller with a relative position command.In this case,the Min Limit is the desired posi- tion when a command of -1000 is received
Syntax Serial:^BLL cc nn
~BLL [cc]
Syntax Scrnipting:setconfigLBLL,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Max:Total Number of Motors
Argument 2:Value
Type:Signed 32-bit Min:-2147M
Default:-20000
Max:+2147M
Commands Reference | RoboteQ |
Where:
cc =Motor channel nn =Counter value Example: ^BLL 1-10000:Set motor 1 Internal Sensor min limit to -10000 counts Note: Counter is not an absolute position.A homing sequence is necessary to set a reference position. BLLA -Brushless Internal Sensor Action at Min HexCode:3F Description: This parameter lets you select what kind of action should betaken when the min limit is reached on the Internal Sensor counter.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. Syntax Serial:^BLLA cc aa ~BLLA [cc] Syntax Scripting:setconfigLBLLA,cc,aa) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Action Type:Unsigned 8-bit Min:0 Max:255 Default:0 =No action Where: cc =Motor channel aa s 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 Example: ^BLLA 137:Reverse limit switch for motor 2 (5+32) |
370 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
BMOD -Brushless Switching Mode
HexCode:5F
Description:
Selects the switching mode when controlling brushless motors.Additional settings apply for each mode.
Syntax Serial:^BMOD cc nn
~BMOD [cc]
Syntax Scripting:setconfigLBMOD,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:Mode
Type:Unsigned 8-bit Min:0
Default:0 =Trapezoidal
Where:
cc =Motor channel
Max:Total Number of Motors
Max:2
nn =
0:Trapezoidal
1:Sinusoidal
2:Sensorless
3:AC Induction
Note:
After changing this setting,the motor will perform a reference searched when selecting sinusoidal mode with encoder feedback.
BPOL-Number of Pole Pairs
HexCode:39
Description:
This parameter is used to define the number of pole pairs of the brushless motor con-
nected 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 count-
er and the measured speed polarity.
Syntax Serial:^BPOL cc nn
~BPOL
Syntax Scripting:setconfigLBPOL,cc,nn)
Number of Arguments:2
Commands Reference | RoboteQ | |
Argument 1:Channel
Min:1 Argument 2:Number of Pole Pairs Type:Signed 8-bit Min:-127 Default:2 Where: cc =Motor channel nn =Number of pole pairs BZPW-Brushless Reference Seek Power |
Max:Total Number of Motors
Max:+127 |
|
HexCode:62
Description: Sets the level of Amps to be applied to the motor coils during Motor/Sensor Setup.Mo- tor/Sensor Setup is automatically initiated every time the controller is powered up when sinusoidal with encoder feedback is selected.Motor/Sensor Setup in necessary to be per formed only once in the other cases. Syntax Serial:^BZPW cc nn ~BZPW [cc] Syntax Scripting:setconfig(_BZPW,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Amps Type:Unsigned 16-bit Min:0 Default:50=5.0A Where cc =Motor channel nn =Ampsx 10 HPO -Hall Sensor Position Type HexCode:A5 Description: This parameterselects the Hall sensor spacing in the motor.Practically all brushless mo- tors 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- |
372 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Serial:^HPO cc nn
~HPO [cc]
Syntax Scripting:setconfigLHPO,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Hall Position
Type:Unsigned 8-bit
Min:0 Max:1
Default:0
Where:
cc =Motor channel
nn =Hall Sensor Position
0:120degree
1:60degree
Example:
^HPO 11:Configure that the Hall Sensor of motor 1 are spaced by 60 degrees.
HSAT -Hall Sensor Angle Table
HexCode:C2
Description:
This parameter is calculated automatically during the motor sensor setup when Hall Sinu- soidal or Hall+Encoder Sinusoidal is configured.It represents the electrical angle range 0-512)at each hall transition at each direction.
Syntax Serial: NHSAT cc nn
~HSAT [cc]
Syntax Scripting:setconfigLHSAT,cc,nn)
Number of Arguments:2
Argument 1:Input Value
Min:1 Max:Total Number of Motors*12
Argument 2:Electrical Angle
Commands Reference | RoboteQ |
Type:Unsigned 16-bit
Min:0 Max:511 Where: cc =Input Value 1:Hall Transition 5-1 for motor channel 1 2:Hall Transition 3-2 for motor channel 1 3:Hall Transition 1-3 for motor channel 1 4:Hall Transition 6-4 for motor channel 1 5:Hall Transition 4-5 for motor channel 1 6:Hall Transition 2-6 for motor channel 1 7:Hall Transition 3-1 for motor channel 1 8:Hall Transition 6-2 for motor channel 1 9:Hall Transition 2-3 for motor channel 1 10:Hall Transition 5-4 for motor channel 1 11:Hall Transition 1-5 for motor channel 1 12:Hall Transition 4-6 for motor channel 1 13:Hall Transition 5-1 for motor channel 2 24:Hall Transition 4-6 for motor channel 2 nn =Electrical Angle Example: ^HSAT 1452:Set the electrical angle 452 for the hall ransition 5-1 for motor channel 1. HSM -Hall Sensor Map HexCode:A3 Description: Configure this parameter to match the ABC hall sensor cable pattern with the UVW mo- tor 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 efficienttly in both directions.Try each of the 6 available values of HSM (0- 5)and retain the one that will make the motor spin in both directions while drawing the same low current.Applicable only in Hall Trapezoidal mode. Syntax Serial:^HSM cc nn ~HSM [cc] Syntax Scripting:setconfig(_HSM,cc,nn) |
374 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Hall Sensor Map
Type:Unsigned 8-bit
Min:0 Max:5
Default:0
Where:
cc=Motor channel
nn =Motor’s Hall Sensor Map
Example:
^HSM 11:Set Hall Sensor Map for motor 1 to value 1.
KIF -Current PID Integral Gain
HexCode:8E
Description:
Sets the Current PID’s Integral Gain.The value is set as the gain multiplied by 10^6.On brushless motor controller operating in sinusoidal mode or ACIM motor controllers,two gains can be set for each motor channel,in order to control the Flux and Torque current. On DC brushed controllers or in brushless motor controllers when operating in trapezoidal mode the gains for the Torque current are used only.
Syntax Serial:^KIF cc nn
~KIF [cc]
Syntax Scripting:setconfigLKIF,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 Integral Gain
2:Torque Integral Gain
cc(dual channel)=
1:Flux Integral Gain for motor 1
Commands Reference | RoboteQ | |
2:Flux Integral Gain for motor 2
3:Torque Integral Gain for motor 1 4:Torque Integral Gain for motor 2 nn=Gain*1,000,000 Example: ^KIF 1230000:Set motor channel 1 Flux Integral Gain to 0.23. KPF -Current PID Proportional Gain HexCode:8D Descrijption: Sets the Current PID’s Proportional Gain.The value is set as the gain multiplied by 10^6. On brushless motor controller operating in sinusoidal mode,two gains can be set for each motor channel,in order to control the Flux and Torque current.On DC brushed controllers or in brushless motor controllers when operating in trapezoidal mode the gains for the Torque current are used only. Syntax Serial:^KPF cc nn ~KPF Icc] Syntax Scripting:setconfigLKPF,cc) Number of Arguments: |
||
Argument 1:AmpsChannel
Min:1 Argument 2:Gain Type:Unsigned 32-bit Min:0 |
Max:2*Total Number of Motors
Max:2,000,000,000 Default:0 |
|
Where:
cc (single channel)= 1:Flux Proportional Gain 2:Torque Proportional Gain cc(dual channell = 1:Flux Proportional Gain for motor 1 2:Flux Proportional Gain for motor 2 3:Torque Proportional Gain for motor 1 4:Torque Proportional Gain for motor 2 nn =Gain*1,000,000 Example: ^KPF 4230000:Set motor channel 2 Torque Proportional Gain to 0.23. LD -Motor d-axis Inductance HexCode:EC Description: Set the d-axis motor inductance.This configuration command is necessary for IPM motor operation.If value is set to O then the motor operates as brushless dc motor with ld refer ence command set,by default,to 0. |
376 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Serial:^LD cc nn
~LD [cc]
Syntax Scripting:setconfigLLD,cc,nn)
Number of Arguments:2
Argument 1:Channel Min:1 Max:Total Number of Motors
Argument 2:D-axis Motor Inductance
Type:Unsigned 16-bit
Min:0 Max:65535
Default:0
Where:
cc =Motor channel
nn =D-axis motor inductance in Henry*1,000,000
Example:
^LD 1750:Set the d-axis motor inductance to 0,000750 H =750 uH
LQ-Motor q-axis Inductance
HexCode:ED
Description:
Set the q-axis motor inductance.This configuration command is necessary for IPM motor operation.If value is set to O then the motor operates as brushless dc motor with ld refer- ence command set,by default,to 0.
Syntax Serial:^LQ cc nn
~LQ [ccl
Syntax Scripting:setconfigLLQ,cc,nn)
Number of Arguments:2
Argument 1:Channel Min:1 Max:Total Number of Motors
Argument 2:Q-axis Motor Inductance
Type:Unsigned 16-bit
Commands Reference | RoboteQ |
Min:0 Max:65535
Default:0 Where: cc =Motor channel nn =Q-axis motor inductance in Henry*1,000,000 Example: ^LQ 1950:Set the q-axis motor inductance to 0,000950 H =950 uH 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 sig- nals.The value is in degrees ranging from 0 to 511.If the sensor is a regular Sin/Cos or Resolver Sin/Cos sensor,the phase shift angle is 90°degrees,so we need to configure 90*512/360=128.If not then the sensor manufacturer should inform about the phase shift angle. Syntax Serial:^PSA cc nn ~PSA [cc] Syntax Scripting:setconfigLPSA,cc,nn) Number of Arguments: Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Angle Type:Signed 16-bit Min:-511 Max 511 Default:128 Where: cc =Motor channel nn =Angle Example: ^PSA 1171:Set the phase shift angle to 171*360/512 =120°degrees. |
378 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
RS -Motor Stator Resistance
HexCode:EB
Description:
Set the motor phase resistance.This value is used only in motor characterization Robo- run+utility tool for FOC gains calculation.
Syntax Serial:^RS cc nn
~RS [cc]
Syntax Scrnipting:setconfigLRS,cc,nn)
Number of Arguments:2
Argument 1:Channel Min:1 Max:Total Number of Motors
Argument 2:Motor phase resistance
Type:Unsigned 16-bit
Min:0 Max:65535
Default:0
Where:
cc =Motor channel
nn =Motor phase resistance in Ohm*1,000
Example:
^RS 1500:Set the motor phase resistance to 0,5 Ohm =500 mOhm
SPOL-SinCos/SSI Sensor Poles
HexCode:41
Description:
Number of poles of the Sin/Cos,Resolver or SSl angle sensor used in sinusoidal mode with brushless motors
Syntax Serial:^SPOL cc nn
~SPOL [cc]
Syntax Scripting:setconfigLSPOL,cc,nn)
Number of Arguments:2
Commands Reference | RoboteQ |
Argument 1:Channel
Min:1 Max:Total Number of Motors Argument 2:Number Type:Unsigned 8-bit Min:1 Max:255 Default:1 Where: cc =Motor channel nn =Number of poles SSF-Sensorless Start-Up Frequency HexCode:CO Description: This configuration parameter is applicable only for sensorless motor controllers.This is the minimum frequency (electrical Hz)at which the motor will always try to commutate if slowed down. Syntax Serial:^SSF cc nn ~SSF [cc] Syntax Scripting:setconfigLSSF,cc,nn) Number of Arguments: Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Frequency Type:Unsigned 16-bit Min:1 Max:35000 Default:100 Where: cc =Motor channel nn =Frequency (Hz*10) Example: ^SSF 1150: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 commu- |
380 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
tate.It is representation of maximum flux linkage of the rotor.This number is filled after the automatic motor tuning.
Syntax Serial:^SVT cc nn
~SVT [cc]
Syntax Scripting:setconfigLSVT,cc,nn)
Number of Arguments:
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Integrator Limit
Type:Unsigned 32-bit
Min:0 Default:1000
Where:
cc=Motor channel
nn =Flux Linkage (miliWebber)
Example:
^SVT 11500:Set the BEMF Integrator Limit motor 1 at 1,500 miliWebber.
SWD -Swap Windings
HexCode:A4
Description:
The concept of swap windings (can also be termed as sensor polaritylis a relative rela- tionship between sensor direction and stator magnetic field rotational direction.During calibration if angle,reported by the sensor,is changing in same direction as angle com- manded to the stator then Swap Windings should be “None,else “Swapped”
In case of Hall +Encoder,two different Swap Windings are needed,one for hall and one for encoder.So,instead we use 2 bits of same variable Bit 1 for Hall and Bit 0 for Encoder.
The following table shows the truth table for swap windings
TABLE 15-34.SWD values
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 |
Commands Reference | RoboteQ | ||
TID | -FOC | 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 Windings 0:None,Angle up-counting for clockwise direction 1:Swapped,Angle down-counting for clockwise direction 2:Hall only Swapped,Angle up-counting for clockwise direction for encoder and Angle down-counting for clockwise direction for Hall sensor. 3:Hall+Encoder Swapped,Angle down-counting for clockwise direction for encoder and Angle down-counting for clockwise direction for Hall sensor. Example: ^SWD 11:Set angle down-counting for clockwise direction for motor 1. Target Id HexCode:8F Description: In brunshless motors operating in sinusoidal mode,this command sets the desired Flux lalso known as Direct Current Id)for Field Oriented Control.This value must be O in typical application.A non-zero value creates field weakening and can be used to achieve higher rotation speed Syntax Serial:^TID cc nn ~TID [ccl |
382 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Scripting:setconfigLTID,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1
Argument 2:Amps
Type:Signed 32-bit Min:0
Default:0
Where:
cc =Motor Channel
nn=Amps*10
VK-Motor Voltage constant
HexCode:EE
Description:
Max:Total Number of Motors
Set the motor voltage constant.This parameter is necessary for IPM motor operation.This constant considers the peak amplitude of induced phase to phase motor back-emf per
1000 rpm mechanical speed.It is typically included in motor manufacturer’s datasheet.
Syntax Serial:^VK cc nn
~VK [ccl
Syntax Scripting:setconfigLVK,cc,nn)
Number of Arguments:2
Argument 1:Channel Min:1 Max:Total Number of Motors
Argument 2:Motor voltage constant
Type:Unsigned 32-bit
Min:0 Max:2000000
Default:0
Where:
cc =Motor channel
nn =Motor voltage constant in V/krpm*1000
Commands Reference | lRoboteQ | |
Example:
AVK 114000:Set the motor voltage constant to 14 V/krpm ZSMA-Cos Amplitude HexCode:E5 Descrijption: This parameter contains the amplitude of the Cosine signal (SinCos sensor,which along with the values of ZSMC is used in order to calculate the signal quality (see SEC-Read Sensor Errors). Syntax Serial: ^ZSMA cc nn ~ZSMA [ccl Syntax Scripting:setconfigLZSMA,cc,nn) Number of Arguments:2 |
||
Argument 1:Channel Min:1 | Max:Total Number of Motors | |
Argument 2:Value
Type:Signed 16-bit Where cc=Channel nn =Calibration Value Example: ^ZSMA21800:Set the amplitude of the Cos signal of the SinCos sensor of motor 2 to 1800. ZSMC-SinCos Calibration HexCode:46 Description: This parameter contains Sin/Cos calibration values that are captured after the execution of the Motor/Sensor Setup.Values are not to be altered manually.When non-zero values are returned after querying ZSMC,this indicates that the setup has been successfuly com- pleted at one time or another. Syntax Serial: ^ZSMC cc nn ~ZSMC [ccl |
384 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Syntax Scripting:setconfigLZSMC,cc)
Number of Arguments:
Argument 1:InputNbr
Min:1
Max:6
Argument 2:Value
Type:Signed 16-bit
Where:
CC =
1:Sin Zero Point for motor 1
2:Cos Zero Point for motor 1
3:SinCos Ratio for motor 1
4:Sin Zero Point for motor 2
5:Cos Zero Point for motor 2
6:SinCos Ratio for motor 2
nn =Calibration value
AC Induction Specific Commands
TABLE 15-35.AC Induction Specific Commands
Command | Arguments | Description |
BFBK | Channel Mode | AC Induction Operating Mode |
ILM | Inductance | Mutual Inductance |
ILLR | Inductance | Rotor Leakage Inductance |
IRR | Resistance | Rotor Resistance |
MPW | MotorPower | Minimum Power |
MXS | SlipFrequency | Ootimal Slip Frequency |
RFC | Channel Amps | Rotor Flux Current |
VPH | Channel Ratio | AC Induction Volts per Hertz |
BFBK -AC Induction Operating Mode
HexCode:63
Description:
For AC Induction motors this parameter selects the operating mode.
Syntax Serial: ABFBK cc nn
~BFBK [cc]
Syntax Scripting:setconfigL_BFBK,cc)
Commands Reference | lRoboteQ |
Number of Arguments:
Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Sensor Type:Unsigned 8-bit Min:0 Max:4 Default:0 =Volts Per Hertz Where: cc =Motor channel nn = 0:Volts Per Hertz 1:Constant Slip Speed 2:FOC Torque 3:FOC Speed 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). Syntax Serial:^ILM cc nn ~ILM [cc] Syntax Scripting:setconfig(_ILM,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Mutual Inductance Type:Unsigned 32-bit Min:0 Max:10000 Default:10 |
386 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Where:
cc =Motor channel
nn =Motor’s Mutual Inductance in μH.
Example:
^RFC 1961:Set Mutual Inductance of motor 1 to value 961μH.
ILLR -Rotor Leakage Inductance
HexCode:9A
Description:
This parameter is only used for AC Induction controllers when operating in FOC mode
and contains the rotor’s per phase leakage inductance of the motor.This value can be ob- tained from the motor supplier.
Syntax Serial:: NLLR cc nn
~ILLR [cc]
Syntax Scripting:setconfigLILLR,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 167:Set Rotor Leakage Inductance of motor 1 to value 67μH.
Commands Reference | IRoboteQ |
IRR -Rotor Resistance
HexCode:99 Description: This parameter is only used for AC Induction controller when operating in FOC mode and contains the resistance per phase of the rotor.This value can be obtained from the motor supplier. Syntax Serial:^IRR cc nn ~IRR [cc] Syntax Scripting:setconfigLIRR,cc,nn) Number of Arguments:2 Argument 1:Channel Min:1 Max:Total Number of Motors Argument 2:Rotor Resistance Type:Unsigned 32-bit Min:1 Max:500000 Default:20000 Where: cc =Motor channel nn =Motor’s Rotor Resistance in micro-ohm. Example: ^IRR 124500:Set Rotor Resistance of motor 1 to value 24500μ2. 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. Syntax Serial:^MPW cc nn ~MPW [cc] Syntax Scripting:setconfigLMPW,cc,nn) |
388 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
Brushless Specific Commands
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Minimum Power
Type:Unsigned 16-bit
Min:0 Max:1000
Default:100
Where:
cc =Motor channel
nn =Motor’s Minimum Power in %of PWM Level
Example:
^MPW 1200:Set Minimum Power for motor 1 to value 20.0%PWM Level.
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.
Syntax Serial:^MXS cc nn
~MXS [cc]
Syntax Scripting:setconfigLMXS,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:Optimal Slip Frequency
Type:Unsigned 16-bit
Min:0 Max:65535
Default:50
Commands Reference | RoboteQ |
Where:
cc =Motor channel nn =Motor’s Optimal Slip Frequency in Hertz*10 Example: ^MXS 160:Set Optimal Slip for motor 1 to value 6.0Hz RFC-Rotor Flux Current HexCode:98 Description: This parameter is only used for AC Induction controller.This value is the stator current component (ld)for rotor flux production when FOC modes are selected. Syntax Serial:^RFC cc nn ~RFC [cc] Syntax Scripting:setconfig(_RFC,cc,nn) Number of Arguments:2 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 150:Set Rotor Flux Current for motor 1 to value 5A. VPH-AC Induction Volts per Hertz HexCode:95 Description: This parameter is only used for AC Induction controllers.Each motor has as specification a Volts per Hertz value with which the frequency can be determined when specific voltage is applied. |
390 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
CAN Communication Commands
Syntax Serial: ^VPH cc nn
~VPH [cc]
Syntax Scripting:setconfigLVPH,cc,nn)
Number of Arguments:2
Argument 1:Channel
Min:1 Max:Total Number of Motors
Argument 2:VoltsPerHz
Type:Unsigned 16-bit
Min:0 Max:65535
Default:20000
Where:
cc=Motor channel
nn =Motor’s Volts per Hertz*1000
Example:
AVPH 1200:Set Volts per Hertx to value 0.200
CAN Communication Commands
This section describes all the configuration parameters uses for CANbus operation.
TABLE 15-36.CANbus Commands
Command | Arguments | Description |
CAS | Rate | CANOpen Auto start |
CBR | RitRate | CAN Bit Rate |
CEN | Mode | CAN Mode |
CHB | HeartBeat | CAN Heartbeat |
CHLA | Action | CAN Consumer Heartbeat Lost Action |
CLSN | Address | CAN Listen Node ID |
CNOD | Address | CAN Node ID |
CSRT | Rate | MiniCAN SendRate |
CTPS | TPDOnbr Rate | CANOpen TPDO SendRate |
CTT | None | CANOpen Transmission Type |
FSA | None | DS402 FSA |
Commands Reference | RoboteQ | |
CAS -CANOpen Auto start
HexCode:5A Description: Determines if device is an active CANOpen node at power up.When set,node is in oper- ational state at power up without the need to receive a start command. Syntax Serial:^CAS nn ~CAS Syntax Scripting:setconfigLCAS,nn) Number of Arguments:1 Argument 1:Rate Type:Unsigned 8-bit Min:0 Max:1 Default:0 =Of Where: nn = 0:Device is is in pre-operational state at power-up. 1:Device is is in operational state at power up. CBR -CAN Bit Rate HexCode:58 Description: Sets the CAN bus bit rate Syntax Serial:^CBR nn ~CBR Syntax Scripting:setconfig(_CBR,nn) |
||
Number of Arguments:1
Argument 1:BitRate Type:Unsigned 8-bit Min:0 Default:3 =250K |
Max:5 | |
Where:
nn = 0:1000K 1:800K 2:500K 3:250K 4:125K |
392 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
CAN Communication Commands
CEN -CAN Mode
HexCode:56
Description:
Enables CAN and selects the CAN protocol
Syntax Serial: ^CEN nn
~CEN
Syntax Scripting:setconfig(_CEN,nn)
Number of Arguments:1
Argument 1:Mode
Type:Unsigned 8-bit
Max:5
Min:0
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-useralterable Heartbeat frame is sent when RoboCAN is selected.
Syntax Serial:^CHB nn
Syntax Scripting:setconfigLCHB,nn)
Number of Arguments:1
Argument 1:HeartBeat
Type:Unsigned 16-bit
Max:65536
Min:0
Default:100ms
Where:
nn =Heartbeat rate in ms
Commands Reference | IRoboteQ |
CHLA-CAN Consumer Heartbeat Lost Action
HexCode:EF Descrijption: This configuration is used in order to configure the action to be applied on motors once the consumer heartbeat gets lost.If this happens then the command watchdog will ex- pire.Apart from that it can be configured whether safety stop or emergency will be ap- plied additionally to the motor. Syntax Serial:^CHLA nn ~CHLA Syntax Scripting:setconfig(_CHLA,nn) Number of Arguments:1 Argument 1:Action Type:Unsigned 8-bit Min:0 Max:2 Default:0 =No Action Where: nn = 0:No Action 1:Safety Stop 2:Emergency Stop CLSN -CAN Listen Node ID HexCode:5B Description: In RawCAN and MiniCAN mode,this parameter filters the incoming frames in order to capture only these originating from a given node address.In RawCAN,entering 0 disables the filter and will cause all incoming frames to be captured Syntax Serial:^CLSN nn ~CSLN Syntax Scripting:setconfigLCLSN,nn) Number of Arguments:1 Argument 1:Address Type:Unsigned 8-bit Min:0 Max:127 Default:Product dependent |
394 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
CAN Communication Commands
Where:
nn =
0:Listent to all nodes (RawCAN only)
1-127:Capture frames from specific node id only
CNOD-CAN Node ID
HexCode:57
Description:
Stores the product’s ID on the CAN bus
Syntax Serial:^CNOD nn
~CNOD
Syntax Scripting:setconfigLCNOD,nn)
Number of Arguments:1
Argument 1:Address
Type:Unsigned 8-bit
Max:127
Min:0
Default:See datasheet
Where:
nn =Node address
CSRT-MiniCAN SendRate
HexCode:5C
Description:
Rate,in ms,at which MiniCAN frames are sent.
Syntax Serial:^CSRT nn
~CSRT
Syntax Scripting:setconfigLCSRT,nn)
Number of Arguments:1
Argument 1:Rate
Type:Unsigned 8-bit
Max:65536
Min:0
Default:100ms
Where:
nn =Rate in ms.No frames sent.if value is 0
Commands Reference | RoboteQ |
CTPS -CANOpen TPDO SendRate
HexCode:5D Descrijption: Sets the send rate for each of the 4TPDOs when CANOpen is enabled. Syntax Serial:^CTPS nn mm Syntax Scripting:setconfig(_CTPS,nn,mm) Number of Arguments:2 Argument 1:TPDOnbr Min:1 Max:4 Argument 2:Rate Type:Unsingned 16-bit Min:0 Max:65536 Default:0 =Off Where: nn =TPDO number,1 to 4 mm =Rate in ms Note: If mm =0,the TPDO is not transmitted CTT-CANOpen Transmission Type HexCode:70 Description: Sets the transmission type of the respective TPDOs. Syntax Serial:^CTT nn mm Syntax Scripting:setconfigLCTT,nn,mm) Number of Arguments:2 Argument 1:TPDOnbr Min:1 Max:4 Argument 2:Type Min:0 Max:255 Where: nn =TPDO number,1 to 4 mm =Transmission Type |
396 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
TCP Communication Commands
FSA-DS402 PDS Finite State Automation Enable
HexCode:CC
Description:
Enables or disables the PDS Finite State Automation (FSA),as dictated in DS402 specifi- cation.
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.
TABLE 15-37.TCP Commands
Command | Arguments | Description |
DHCP | Enable | Enable DHCP |
GWA | IP Octet | Gateway Address |
IPA | IP Octet | IP Address |
IPP | None | IP Port |
PDNS | IP Octet | Primary DNS |
SBM | IP Octet | Subnet Mask |
SDNS | IP Octet | Secondary DNS |
WMOD | Mode | TCP Mode |
DHCP -Enable DHCP
HexCode:6F
Description:
Configure this parameter in order to enable the DHCP The default value for DHCP service is disabled.When DHCP is Disabled the user configured IP address is used by the control
Commands Reference | RoboteQ |
ler to access the network.By enabling DHCP service,the controller uses the IP address provided by the DHCP server.
Syntax Serial:^DHCP nn ~DHCP Syntax Scripting:setconfigLDHCP nn) Number of Arguments:1 Argument 1:Enable DHCP Type:Unsigned B-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 net- work.Gateway Address option includes 4 values representing each octet in the IP ad- dress v4 format.The default Gateway Address value is 192.168.1.1. Syntax Serial:^GWA cc nn ~GWA Syntax Scripting:setconfigLGWA,cc,nn) Number of Arguments:2 Argument 1:IP Octet Type:Unsigned &-bit Min:1 Max:4 Argument 2:Gateway Address Type:Unsigned 8-bit Min:0 Max:255 Default: |
398 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
TCP Communication Commands
TABLE 15-38.GWA default values
Octet | Value |
1 | 192 |
2 | 168 |
3 | |
4 | 1 |
Where:
cc =octet
nn =octet value
Example:
^GWA 1192_^GWA 2168_^GWA 32_^GWA 41: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 val- ues representing each octet in the IP address v4 format.The default IP address,if DHCP is disabled,is 192.168.1.20.
Syntax Serial:^IPA cc nn
~IPA
Syntax Scripting:setconfigLIPA,cc,nn)
Number of Arguments:2
Argument 1:IP Octet
Type:Unsigned 8-bit
Min:1 Max:4
Argument 2:IP Address
Type:Unsigned 8-bit
Min:0 Max:255
Default:
TABLE 15-39.IPA default values
Octet | Value |
1 | 192 |
2 | 168 |
3 | 1 |
4 | 20 |
Commands Reference | lRoboteQ |
Where:
cc =octet nn =octet value Example: ^IPA 1192_^IPA 2168_^IPA 31_NIPA 4100:Set IP Address 192.168.1.100. 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: NIPP 1300:Set IP Port 1300. PDNS -Primary DNS HexCode:6D Description: Configure this parameter in order to set the address of the primary DNS server.Primary DNS option includes 4 values representing each octet in the IP address v4 format.Prima- ry DNS server default address is 192.168.1.1. Syntax Serial:^PDNS cc nn ~PDNS Syntax Scripting:setconfigLPDNS,cc,nn) Number of Arguments:2 Argument 1:IP Octet |
400 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
TCP Communication Commands
Type:Unsigned 8-bit
Min:1 Max:4
Argument 2:Primary DNS
Type:Unsigned 8-bit
Min:0 Max:255
Default:
TABLE 15-40.PDNS default values
Octet | Value |
1 | 192 |
2 | 168 |
3 | |
4 | 1 |
Where:
cc =octet
nn =octet value
Example:
APDNS 1192_^PDNS 2168_^PDNS 32_^PDNS 41: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 ad-
dresses that can be used in your network.Subnet Mask option includes 4 values repre- senting each octet in the IP address v4 format.Devices within the same sub-network can communicate directly.Using the default subnet mask,all devices with the first 3 bytes
identical are located in the same sub-network and almost 256(not all 256 values may be used as a host IP)unique host devices may be used in the network.Subnet Mask option includes 4 values representing each octet in the IP address.The default Subnet Mask val- ue is 255.255.255.0.
Syntax Serial:^SBM cc nn
~SBM
Syntax Scrnipting:setconfigLSBM,cc,nn)
Number of Arguments:2
Argument 1:IP Octet
Type:Unsigned 8-bit
Min:1 Max:4
Argument 2:Subnet Mask
Type:Unsigned 8-bit
Min:0 Max:255
Commands Reference
Default:
TABLE 15-41.SBM default values
Octet | Value |
1 | 255 |
2 | 255 |
3 | 255 |
4 | 0 |
Where:
cc =octet
nn =octet value
Example:
^SBM 1255_^SBM 2255_^SBM 3254_^SBM 40: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.Sec- ondary 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.0 then automatically a secondary DNS server address is assigned.Since the sec- ondary server address is a backup,there is no need to be configured,unless necessary.
Syntax Serial:^SDNS cc nn
~SDNS
Syntax Scripting:setconfigLSDNS,cc,nn)
Number of Arguments:2
Argument 1:IP Octet
Type:Unsigned B-bit
Min:1 Max:4
Argument 2:Primary DNS
Type:Unsigned 8-bit
Min:0 Max:255
Default:
TABLE 15-42.SDNS default values
Octet | Value |
1 | 192 |
2 | 168 |
3 | 1 |
4 | 1 |
402 Advanced Digital Motor Controller User Manual V2.1,December 3,2020
TCP Communication Commands
Where:
cc =octet
nn =octet value
Example:
^SDNS 1192_^SDNS 2168_^SDNS 32_^SDNS 41:Set Secondary DNS 192.168.2.1.
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 viaTCP/IP this parameter must be set to Enabled.For commu- nicating via Modbus TCP or Modbus TCP over RTU,TCP Mode must be set to Enabled.
Syntax Serial:^WMOD nn
~WMOD
Syntax Scripting:setconfigLWMOD,nn)
Number of Arguments:1
Argument 1:TCP Mode
Type:Unsigned 8-bit
Min:0 Max:1
Default:0
Where:
nn=TCP Mode
0:Disabled.
1:Enabled.
Example:
AWMOD 1:Enable TCP functionality.
评论0