Moog SmartMotor Developer's Manual

Developer’s Guide
Class 5 & Later SmartMotor Technology with
TM
Copyright Notice
©2001–2018, Moog Inc., Animatics.
Moog Animatics SmartMotorDeveloper's Guide, Rev. L, PN:SC80100003-002.
Except as permitted by such license, no part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Moog Inc., Animatics.
The programs and code samples in this manual are provided for example purposes only. It is the user's responsibility to decide if a particular code sample or program applies to the application being developed and to adjust the values to fit that application.
Moog Animatics and the Moog Animatics logo, SmartMotor and the SmartMotor logo, Combitronic and the Combitronic logo, and SMI are all trademarks of Moog Inc., Animatics. Other trademarks are the property of their respective owners.
Please let us know if you find any errors or omissions in this manual so that we can improve it for future readers. Such notifications should contain the words "Developer's Guide" in the subject line and be sent by e-mail to: animatics_marcom@moog.com. Thank you in advance for your contribution.
Contact Us:
Americas - West
Moog Animatics 2581 Leghorn Street Mountain View, CA 94043 USA
Tel: 1 650-960-4215 Tel: 1 610-328-4000 x3999
Support: 1 888-356-0357
Website: www.animatics.com
Email: animatics_sales@moog.com
Americas - East
Moog Animatics 750 West Sproul Road Springfield, PA 19064 USA
Fax: 1 610-605-6216
Table Of Contents
Introduction 27
Overview 28
Combitronic Support 28
Communication Lockup Wizard 30
Safety Information 30
Safety Symbols 30
Other Safety Considerations 31
Motor Sizing 31
Environmental Considerations 31
Machine Safety 31
Documentation and Training 32
Additional Equipment and Considerations 33
Safety Information Resources 33
Additional Documents 34
Related Guides 34
Other Documents 34
Additional Resources 35
Part 1: Programming the SmartMotor 36
Beginning Programming 47
Setting the Motor Firmware Version 48
Setting the Default Firmware Version 48
Checking the Default Firmware Version 49
Opening the SMIWindow (Program Editor) 49
Understanding the Program Requirements 50
Creating a "Hello World" Program 51
Entering the Program in the SMI Editor 51
Adding Comments to the Code 52
Checking the Program Syntax 52
Saving the Program 52
Downloading a Program to the SmartMotor 52
Syntax Checking, Compiling and Downloading the Program 53
Additional Notes on Downloaded Programs 53
Running a Downloaded Program 54
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 3 of 909
Using the Program Download Window 55
Using the Terminal Window and Run Program Button 55
Using the RUN Command in the Terminal Window 55
Creating a Simple Motion Program 56
SMISoftware Features 57
Introduction 58
Menu Bar 58
Toolbar 59
Configuration Window 61
Terminal Window 63
Initiating Motion from the Terminal Window 65
Information Window 65
Program Editor 66
Motor View 68
SMI Trace Functions 70
Monitor Window 73
Serial Data Analyzer 75
Chart View 76
Chart View Example 77
Macros 80
Tuner 82
SMIOptions 86
SMIHelp 87
Context-Sensitive Help Using F1 87
Context-Sensitive Help Using the Mouse 87
Help Buttons 87
Hover Help 87
Table of Contents 87
Projects 88
SmartMotor Playground 89
Opening the SmartMotor Playground 90
Moving the Motor 91
Communication Details 93
Introduction 95
Connecting to a Host 96
Daisy Chaining Multiple D-Style SmartMotors over RS-232 97
ADDR=formula 98
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 4 of 909
SLEEP, SLEEP1 99
WAKE, WAKE1 99
ECHO, ECHO1 100
ECHO_OFF, ECHO_OFF1 100
Serial Commands 101
OCHN(type,channel,parity,bit rate,stop bits,data bits,mode,timeout) 101
CCHN(type,channel) 102
BAUDrate, BAUD(channel)=formula 102
PRINT(), PRINT1() 102
SILENT, SILENT1 103
TALK, TALK1 103
a=CHN(channel) 103
a=ADDR 104
Communicating over RS-485 104
Using Data Mode 104
CAN Communications 107
CADDR=formula 107
CBAUD=formula 107
=CAN, =CAN(arg) 107
CANCTL(function,value) 107
SDORD(...) 108
SDOWR(...) 108
NMT 109
RB(2,4), x=B(2,4) 109
Exceptions to NMT, SDORD and SDOWR Commands 109
I/O Device CAN Bus Master 110
Combitronic Communications 111
Combitronic Features 112
Other Combitronic Benefits 112
Program Loops with Combitronic 112
Global Combitronic Transmissions 113
Simplify Machine Support 113
Combitronic with RS-232 Interface 113
Other CANProtocols 115
CANopen - CAN Bus Protocol 115
DeviceNet - CAN Bus Protocol 115
I²C Communications (D-Style Motors) 115
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 5 of 909
OCHN(IIC,1,N,baud,1,8,D) 117
CCHN(IIC,1) 117
PRINT1(arg1,arg2, … ,arg_n) 117
RGETCHR1, Var=GETCHR1 117
RLEN1, Var=LEN1 117
Motion Details 118
Introduction 120
Motion Command Quick Reference 121
Basic Motion Commands 122
Target Commands 122
PT=formula 122
PRT=formula 123
ADT=formula 123
AT=formula 123
DT=formula 123
VT=formula 123
Motion Mode Commands 124
MP 124
MV 124
MT 124
Torque Commands 125
TS=formula 125
T=formula 125
Brake Commands 125
BRKRLS 125
BRKENG 125
BRKSRV 126
BRKTRJ 126
Brake Command Examples 126
EOBK(IO) 127
MTB 127
Index Capture Commands 128
Other Motion Commands 129
G 129
S 129
X 130
O=formula 130
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 6 of 909
OSH=formula 130
OFF 130
Commutation Modes 131
MDT 131
MDE 131
MDS 131
MDC 132
MDB 132
MINV(0), MINV(1) 132
Modes of Operation 133
Torque Mode 133
Torque Mode Example 133
Dynamically Change from Velocity Mode to Torque Mode 133
Velocity Mode 134
Constant Velocity Example 134
Change Commanded Speed and Acceleration 134
Absolute (Position) Mode 135
Absolute Move Example 135
Two Moves with Delay Example 135
Change Speed and Acceleration Example 135
Shift Point of Origin Example 136
Relative Position Mode 136
Relative Mode Example 136
Follow Mode with Ratio (Electronic Gearing) 137
Electronic Gearing and Camming over CANopen 137
Electronic Gearing Commands 138
SRC(enc_src) 138
MFR 138
MSR 138
MF0 138
MS0 138
MFMUL=formula, MFDIV=formula 138
MFA(distance[,m/s]) 139
MFD(distance[,m/s]) 139
MFSLEW(distance[,m/s]) 139
Follow Internal Clock Source Example 139
Follow Incoming Encoder Signal With Ramps Example 140
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 7 of 909
Electronic Line Shaft 142
ENCD(in_out) 142
Spooling and Winding Overview 143
Relative Position, Auto-Traverse Spool Winding 143
MFSDC(distance,mode) 144
Dedicated, Absolute Position, Winding Traverse Commands 146
MFSDC(distance,2) 147
MFLTP=formula 147
MFHTP=formula 147
MFCTP(arg1,arg2) 147
MFL(distance[,m/s]) 148
MFH(distance[,m/s]) 148
ECS(counts) 148
Single Trajectory Example Program 150
Chevron Wrap Example 150
Other Traverse Mode Notes 152
Traverse Mode Status Bits 153
CamMode (Electronic Camming) 153
Electronic Camming Details 156
Understanding the Inputs 156
Should I choose Source Counts or Intermediate Counts? 157
Should I choose Variable or Fixed cam? 157
Electronic Camming Notes and Best Practices 159
Examples 161
Electronic Gearing and Camming over CANopen 161
Electronic Camming Commands 162
CTE(table) 162
CTA(points,seglen[,location]) 162
CTW(pos[,seglen][,user]) 162
MCE(arg) 163
MCW(table,point) 163
RCP 164
RCTT 164
MC 164
MCMUL=formula 164
MCDIV=formula 164
O(arg)=formula 164
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 8 of 909
OSH(arg)=formula 164
Cam Example Program 165
Mode Switch Example 168
Position Counters 170
Modulo Position 171
Modulo Position Commands 171
Dual Trajectories 172
Commands That Read Trajectory Information 174
Dual Trajectory Example Program 175
Synchronized Motion 175
Synchronized-Target Commands 175
PTS(), PRTS() 175
VTS=formula 176
ADTS=formula, ATS=formula, DTS=formula 177
PTSS(), PRTSS() 177
A Note About PTS and PTSS 177
Other Synchronized-Motion Commands 178
GS 178
TSWAIT 179
Program Flow Details 181
Introduction 182
Flow Commands 182
RUN 183
RUN? 183
GOTO#, GOTO(label), C# 183
GOSUB#, GOSUB(label), RETURN 184
IF, ENDIF 184
ELSE, ELSEIF 185
WHILE, LOOP 186
SWITCH, CASE, DEFAULT, BREAK, ENDS 186
TWAIT 187
WAIT=formula 187
STACK 187
END 188
Program Flow Examples 189
IF, ELSEIF, ELSE, ENDIF Examples 189
WHILE, LOOPExamples 189
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 9 of 909
GOTO(), GOSUB() Examples 190
SWITCH, CASE, BREAK, ENDS Examples 191
Interrupt Programming 192
ITR(), ITRE, ITRD, EITR(), DITR(), RETURNI 192
TMR(timer,time) 194
Variables and Math 195
Introduction 196
Variable Commands 196
EPTR=formula 196
VST(variable,number) 196
VLD(variable,number) 197
Math Expressions 197
Math Operations 197
Logical Operations 197
Integer Operations 197
Floating Point Functions 197
Math OperationDetails and Examples 198
Array Variables 198
Array Variable Examples 199
Error and Fault Handling Details 200
Motion and Motor Faults 201
Overview 201
Drive Stage Indications and Faults 201
Fault Bits 201
Error Handling 202
Example Fault-Handler Code 202
PAUSE 203
RESUME 203
Limits and Fault Handling 204
Position Error Limits 204
dE/dt Limits 204
Velocity Limits 204
Hardware Limits 204
Software Limits 205
Fault Handling 205
Monitoring the SmartMotor Status 206
System Status 208
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 10 of 909
Introduction 209
Retrieving and Manipulating Status Words/Bits 209
System and Motor Status Bits 209
Reset Error Flags 211
System Status Examples 211
Timer Status Bits 212
Interrupt Status Bits 212
I/O Status 213
User Status Bits 213
Multiple Trajectory Support Status Bits 214
Cam Status Bits 215
Interpolation Status Bits 216
Motion Mode Status 216
RMODE, RMODE(arg) 216
I/OControl Details 217
I/O Port Hardware 218
I/O Connections Example (D-Style Motors) 219
I/O Voltage Spikes 219
Discrete Input and Output Commands 220
Discrete Input Commands 220
Discrete Output Commands 220
Output Condition and Fault Status Commands 221
Output Condition Commands 221
Output Fault Status Reports 221
General-Use Input Configuration 221
Multiple I/OFunctions Example 222
Analog Functions of I/O Ports 223
5 Volt Push-Pull I/O Analog Functions (D-Style Motors) 223
24 Volt I/O Analog Functions (D-Style AD1 Option Motors, M-Style Motors) 223
Special Functions of I/OPorts 224
Class 5 D-Style Motors: Special Functions of I/O Ports 225
I/O Ports 0 and 1 – External Encoder Function Commands 225
I/O Ports 2 and 3 – Travel Limit Inputs 225
I/O Ports 4 and 5 – Communications 225
I/O Port 6 – Go Command, Encoder Index Capture Input 226
Class 5 M-Style Motors: Special Functions of I/O Ports 227
COM Port Pins 4, 5, 6, and 8 – A-quad-B or Step-and-Direction Modes 227
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 11 of 909
I/O Ports 2 and 3 – Travel Limit Inputs 227
I/O Port 5 – Encoder Index Capture Input 227
I/O Port 6 – Go Command 228
Class 6 M-Style Motors: Special Functions of I/O Ports 229
COM Port Pins 4, 5, 6, and 8 – A-quad-B or Step-and-Direction Modes 229
I/O Ports 2 and 3 – Travel Limit Inputs 229
I/O Port 4 and 5 – Encoder Index Capture Input 229
I/O Port 6 – Go Command 230
I/O Brake Output Commands 230
I²C Expansion (D-Style Motors) 230
Tuning and PIDControl 231
Introduction 232
Understanding the PID Control 232
Tuning the PID Control 233
Using F 233
Setting KP 234
Setting KD 234
Setting KI and KL 234
Setting EL=formula 235
Other PID Tuning Parameters 235
KG=formula 235
KV=formula 235
KA=formula 236
Current Limit Control 237
AMPS=formula 237
Part 2: SmartMotor Command Reference 238
(Single Space Character) 240
a...z 241
aa...zz 241
aaa...zzz 241
Ra...Rz 241
Raa...Rzz 241
Raaa...Rzzz 241
ab[index]=formula 245
Rab[index] 245
ABS(value) 248
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 12 of 909
RABS(value) 248
AC 250
RAC 250
ACOS(value) 253
RACOS(value) 253
ADDR=formula 255
RADDR 255
ADT=formula 257
ADTS=formula 259
af[index]=formula 261
Raf[index] 261
Ai(arg) 264
Aij(arg) 266
Aj(arg) 268
Aji(arg) 270
al[index]=formula 272
Ral[index] 272
AMPS=formula 275
RAMPS 275
ASIN(value) 278
RASIN(value) 278
AT=formula 280
RAT 280
ATAN(value) 282
RATAN(value) 282
ATOF(index) 284
RATOF(index) 284
ATS=formula 286
aw[index]=formula 288
Raw[index] 288
B(word,bit) 291
RB(word,bit) 291
Ba 295
RBa 295
BAUD(channel)=formula 297
RBAUD(channel) 297
Be 299
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 13 of 909
RBe 299
Bh 301
RBh 301
Bi(enc) 304
RBi(enc) 304
Bj(enc) 307
RBj(enc) 307
Bk 310
RBk 310
Bl 311
RBl 311
Bls 313
RBls 313
Bm 315
RBm 315
Bms 317
RBms 317
Bo 319
RBo 319
Bp 320
RBp 320
Bps 322
RBps 322
Br 324
RBr 324
BREAK 326
BRKENG 328
BRKRLS 330
BRKSRV 332
BRKTRJ 334
Brs 336
RBrs 336
Bs 338
RBs 338
Bt 340
RBt 340
Bv 342
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 14 of 909
RBv 342
Bw 344
RBw 344
Bx(enc) 346
RBx(enc) 346
C{number} 348
CADDR=formula 350
RCADDR 350
CAN, CAN(arg) 352
RCAN, RCAN(arg) 352
CANCTL(function,value) 354
CASE formula 355
CBAUD=formula 358
RCBAUD 358
CCHN(type,channel) 360
CHN(channel) 361
RCHN(channel) 361
CLK=formula 363
RCLK 363
COMCTL(function,value) 364
COS(value) 366
RCOS(value) 366
CP 368
RCP 368
CTA(points,seglen[,location]) 370
CTE(table) 372
CTR(enc) 374
RCTR(enc) 374
CTT 376
RCTT 376
CTW(pos[,seglen][,user]) 377
DEA 380
RDEA 380
DEFAULT 382
DEL=formula 384
RDEL 384
DELM(arg) 386
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 15 of 909
DFS(value) 387
RDFS(value) 387
DITR(int) 388
DT=formula 390
RDT 390
DTS=formula 392
EA 394
REA 394
ECHO 396
ECHO0 398
ECHO1 399
ECHO_OFF 400
ECHO_OFF0 401
ECHO_OFF1 402
ECS(counts) 403
EIGN(...) 405
EILN 408
EILP 410
EIRE 412
EIRI 414
EISM(6) 416
EITR(int) 417
EL=formula 419
REL 419
ELSE 421
ELSEIF formula 423
ENC0 425
ENC1 426
ENCCTL(function,value) 428
ENCD(in_out) 430
END 431
ENDIF 433
ENDS 435
EOBK(IO) 437
EOIDX(number) 439
EPTR=formula 440
REPTR 440
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 16 of 909
ERRC 441
RERRC 441
ERRW 443
RERRW 443
ETH(arg) 444
RETH(arg) 444
ETHCTL(function,value) 445
F 446
FABS(value) 448
RFABS(value) 448
FSA(cause,action) 450
FSQRT(value) 452
RFSQRT(value) 452
FW 454
RFW 454
G 456
GETCHR 459
RGETCHR 459
GETCHR1 461
RGETCHR1 461
GOSUB(label) 463
GOTO(label) 465
GS 467
HEX(index) 469
RHEX(index) 469
I(enc) 471
RI(enc) 471
IDENT=formula 473
RIDENT 473
IF formula 475
IN(...) 478
RIN(...) 478
INA(...) 481
RINA(...) 481
IPCTL(function,"string") 484
ITR(Int#,StatusWord,Bit#,BitState,Label#) 486
ITRD 489
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 17 of 909
ITRE 491
J(enc) 493
RJ(enc) 493
KA=formula 495
RKA 495
KD=formula 497
RKD 497
KG=formula 499
RKG 499
KI=formula 501
RKI 501
KII=formula 503
RKII 503
KL=formula 504
RKL 504
KP=formula 506
RKP 506
KPI=formula 508
RKPI 508
KS=formula 509
RKS 509
KV=formula 511
RKV 511
LEN 513
RLEN 513
LEN1 514
RLEN1 514
LFS(value) 516
RLFS(value) 516
LOAD 518
LOCKP 521
LOOP 522
MC 524
MCDIV=formula 527
RMCDIV 527
MCE(arg) 528
MCMUL=formula 530
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 18 of 909
RMCMUL 530
MCW(table,point) 532
MDB 534
MDC 536
MDE 538
MDH 540
MDHV 542
MDS 544
MDT 546
MF0 548
MFA(distance[,m/s]) 550
MFCTP(arg1,arg2) 553
MFD(distance[,m/s]) 555
MFDIV=formula 558
MFH(distance[,m/s]) 560
MFHTP=formula 562
MFL(distance[,m/s]) 564
MFLTP=formula 566
MFMUL=formula 568
MFR 570
MFSDC(distance,mode) 573
MFSLEW(distance[,m/s]) 575
MINV(arg) 577
MODE 579
RMODE 579
MP 582
MS0 585
MSR 587
MT 589
MTB 591
MV 593
NMT 595
N/A 595
O=formula, O(trj#)=formula 597
OC(...) 599
ROC(...) 599
OCHN(...) 601
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 19 of 909
OF(...) 603
ROF(...) 603
OFF 605
OR(value) 607
OS(...) 609
OSH=formula, OSH(trj#)=formula 611
OUT(...)=formula 613
PA 615
RPA 615
PAUSE 617
PC, PC(axis) 619
RPC, RPC(axis) 619
PI 622
RPI 622
PID# 623
PMA 626
RPMA 626
PML=formula 628
RPML 628
PMT=formula 630
RPMT 630
PRA 632
RPRA 632
PRC 635
RPRC 635
PRINT(...) 638
PRINT0(...) 642
PRINT1(...) 646
PRINT8(...) 649
PRT=formula 652
RPRT 652
PRTS(...) 654
PRTSS(...) 656
PT=formula 658
RPT 658
PTS(...) 660
PTSD 663
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 20 of 909
RPTSD 663
PTSS(...) 664
PTST 666
RPTST 666
RANDOM=formula 667
RRANDOM 667
RCKS 669
RES 670
RRES 670
RESUME 672
RETURN 674
RETURNI 676
RSP 678
RSP1 680
RSP5 681
RUN 682
RUN? 684
S (as command) 686
SADDR# 688
SAMP 690
RSAMP 690
SDORD(...) 692
RSDORD 692
SDOWR(...) 694
SILENT 696
SILENT1 698
SIN(value) 700
RSIN(value) 700
SLD 702
SLE 704
SLEEP 706
SLEEP1 708
SLM(mode) 710
RSLM 710
SLN=formula 712
RSLN 712
SLP=formula 714
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 21 of 909
RSLP 714
SNAME("string") 716
SP2 717
RSP2 717
SQRT(value) 718
RSQRT(value) 718
SRC(enc_src) 720
STACK 722
STDOUT=formula 725
SWITCH formula 727
T=formula 730
Read/write 730
TALK 732
TALK1 734
TAN(value) 736
RTAN(value) 736
TEMP, TEMP(arg) 738
RTEMP, RTEMP(arg) 738
TH=formula 740
RTH 740
TMR(timer,time) 743
RTMR(timer) 743
TRQ 745
RTRQ 745
TS=formula 747
RTS 747
TSWAIT 749
TWAIT(gen#) 750
UIA 752
RUIA 752
UJA 754
RUJA 754
UO(...)=formula 756
UP 758
UPLOAD 760
UR(...) 762
US(...) 764
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 22 of 909
USB(arg) 766
RUSB 766
VA 768
RVA 768
VAC(arg) 771
VC 776
RVC 776
VL=formula 778
RVL 778
VLD(variable,number) 780
VST(variable,number) 784
VT=formula 788
RVT 788
VTS=formula 791
W(word) 793
RW(word) 793
WAIT=formula 795
WAKE 797
WAKE1 799
WHILE formula 801
X 804
Z 806
Z(word,bit) 808
Za 810
Ze 811
Zh 812
Zl 813
Zls 814
Zr 815
Zrs 816
Zs 817
ZS 818
Zv 821
Zw 822
Part 3: Example SmartMotor Programs 823
Move Back and Forth 824
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 23 of 909
Move Back and Forth with Watch 824
Home Against a Hard Stop (Basic) 825
Home Against a Hard Stop (Advanced) 825
Home Against a Hard Stop (Two Motors) 826
Home to Index Using Different Modes 828
Maintain Velocity During Analog Drift 829
Long-Term Storage of Variables 830
Find Errors and Print Them 830
Change Speed on Digital Input 831
Pulse Output on a Given Position 831
Stop Motion if Voltage Drops 832
Camming - Variable Cam Example 833
Camming - Fixed Cam with Input Variables 834
Camming - Demo XYCircle 836
Chevron Traverse & Takeup 838
CAN Bus - Timed SDOPoll 840
CAN Bus - I/OBlock with PDOPoll 841
CAN Bus - Time Sync Follow Encoder 844
Text Replacement in an SMI Program 852
Appendix 854
Motion Command Quick Reference 856
Array Variable Memory Map 858
ASCIICharacter Set 860
Binary Data 861
Command Error Codes 864
Decoding the Error 864
Finding the Error Source 865
Glossary 866
Math Operators 873
Moment of Inertia 874
Matching Motor to Load 874
Improving the Moment of Inertia Ratio 874
RCAN, RCHN and RMODEStatus 875
RCAN Status Decoder 875
RCHN Status Decoder 875
Clearing Serial Port Errors 876
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 24 of 909
RMODE Status Decoder 876
Mode Status Example 876
Scale Factor Calculation 877
Sample Rates 877
PID Sample Rate Command 877
Encoder Resolution and the RES Parameter 877
Native Velocity and Acceleration Units 878
Velocity Calculations 878
Acceleration Calculations 878
Status Words 879
Status Word: 0Primary Fault/Status Indicator 879
Status Word: 1Index Registration and Software Travel Limits 880
Status Word: 2Communications, Program and Memory 880
Status Word: 3PID State, Brake, Move Generation Indicators 881
Status Word: 4 Interrupt Timers 881
Status Word: 5 Interrupt Status Indicators 882
Status Word: 6 Drive Modes 882
Status Word 7: Multiple Trajectory Support 883
Status Word 8: Cam Support 884
Status Word 10: RxPDO Arrival Notification 884
Status Word 12: User Bits Word 0 885
Status Word 13: User Bits Word 1 885
Status Word: 16 On Board Local I/O Status: D-Style Motor 886
Status Word: 16 On Board Local I/O Status: M-Style Motor 886
Status Word: 17 Expanded I/O Status: D-Style AD1 Motor 887
Torque Curves 888
Understanding Torque Curves 888
Peak Torque 888
Continuous Torque 888
Ambient Temperature Effects on Torque Curves and Motor Response: 889
Supply Voltage Effects on Torque Curves and Motor Response: 889
Example 1: Rotary Application 890
Example 2: Linear Application 890
Dyno Test Data vs. the Derated Torque Curve 890
Proper Sizing and Loading of the SmartMotor 891
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 25 of 909
Commands Listed Alphabetically 893
Commands Listed by Function 900
Communications Control 901
Data Conversion 902
EEPROM (Nonvolatile Memory) 902
I/OControl 902
Math Function 903
Motion Control 903
Program Access 906
Program Execution and Flow Control 906
Reset Commands 907
System 907
Variables 908
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 26 of 909

Introduction

Introduction
Introduction
This chapter provides introductory reference material.
Overview 28
Combitronic Support 28
Communication Lockup Wizard 30
Safety Information 30
Additional Documents 34
Additional Resources 35
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 27 of 909
Introduction
Introduction: Overview

Overview

The SmartMotor™ Developer's Guide is designed to be used by system developers and programmers when developing applications for the SmartMotor. Before using the SmartMotor™ Developer's Guide, it is strongly recommended that you first read the SmartMotor™ Installation & Startup Guide for your SmartMotor, which describes how to install and start up the SmartMotor, and test initial communications with the motor. After that, use this guide to learn about advanced SmartMotor features, how to develop SmartMotor applications, and the details of each command.
Part One of this guide provides information on basic to advanced programming, along with related information on key SMIsoftware features, communications, motion control, program flow control, error and fault handling, and more.
Part Two of this guide lists all the SmartMotor commands in alphabetical order. Each command is described in detail. Code snippets and examples are provided where applicable. These are shown in a Courier font. Comments are included and separated with a single quotation mark as they would be in your own programs.
NOTE: The programs and code samples in this manual are provided for example purposes only. It is the user's responsibility to decide if a particular code sample or program applies to the application being developed and to adjust the values to fit that application.
Also, where appropriate, a Related Commands section is included, which is located at the end of the command page. It is designed to guide you to other commands that offer similar functionality, and ensure you are aware of every programming option the SmartMotor provides to address your specific application requirements.
Part Three of this guide provides a library of useful example SmartMotor programs. These can be used as "how to" examples for using a particular SmartMotor feature or solving a particular application problem, or as starting points for your application.
NOTE: The programs and code samples in this manual are provided for example purposes only. It is the user's responsibility to decide if a particular code sample or program applies to the application being developed and to adjust the values to fit that application.
The Appendix of this guide contains additional topics such as an array map, ASCII character set, command error codes, and other information that is useful to have handy during application development.
A quick-reference command list is also included at the end of this guide.

Combitronic Support

A large number of the commands provide Combitronic™ support. Combitronic is a protocol that operates over a standard "CAN" (Controller Area Network) interface. It may coexist with either CANopen or DeviceNet protocols at the same time. Unlike these common protocols, however, Combitronic requires no single dedicated master to operate. Each Integrated Servo connected to the same network communicates on an equal footing, sharing all information, and therefore, sharing all processing resources. For more details on Combitronic features, see Combitronic Communications on page 111, and also see the overview on the Moog Animatics website at:
http://www.animatics.com/supports/knowledge-base/smartmotorkb/130.html.
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 28 of 909
Introduction
Introduction: Combitronic Support
For applicable commands, a table row titled "COMBITRONIC:" provides the Combitronic command syntax for addressing a specific SmartMotor in the network. Those commands also display the Combitronic logo ( ) at the top of their reference pages.
Combitronic Logo Location
COMBITRONIC: Table Row
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 29 of 909
Introduction
Introduction: Communication Lockup Wizard

Communication Lockup Wizard

Improper use of some commands, like Z and OCHN, can lock you out of the motor and prevent further communication. If you are unable to communicate with the SmartMotor, you may be able to recover communications using the Communication Lockup Wizard, which is on the SMI software Communications menu (see the following figure). This tool sends an "E" character to the motor at startup, which prevents the motor from running its program. For more details on the Communication Lockup Wizard, see the SMI software online help, which is accessed by pressing the F1 key or selecting Help from the SMI software main menu.
Communication Menu - Communication Lockup Wizard

Safety Information

This section describes the safety symbols and other safety information.

Safety Symbols

The manual may use one or more of the following safety symbols:
WARNING: This symbol indicates a potentially nonlethal mechanical hazard, where failure to follow the instructions could result in serious injury to the operator or major damage to the equipment.
CAUTION: This symbol indicates a potentially minor hazard, where failure to follow the instructions could result in slight injury to the operator or minor damage to the equipment.
NOTE: Notes are used to emphasize non-safety concepts or related information.
Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 30 of 909
Loading...
+ 879 hidden pages