background image

Developer’s 
Guide

Class 5 & Later SmartMotor
Technology with

TM

Summary of Contents for SmartMotor

Page 1: ...Developer s Guide Class 5 Later SmartMotor Technology with TM ...

Page 2: ...his 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 tradema...

Page 3: ... 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 Commen...

Page 4: ...inal 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 SmartMo...

Page 5: ...sing 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 1...

Page 6: ...ference 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 Comma...

Page 7: ...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 formu...

Page 8: ...tory 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 CA...

Page 9: ...chronized 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 E...

Page 10: ...7 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 Po...

Page 11: ...put 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 F...

Page 12: ...t 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 formu...

Page 13: ...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 ...

Page 14: ... 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 ...

Page 15: ...L 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 ...

Page 16: ...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 ...

Page 17: ...FABS 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 ...

Page 18: ... 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 ...

Page 19: ...tance 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 ...

Page 20: ...mula 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 ...

Page 21: ...67 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 ...

Page 22: ...K 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 ...

Page 23: ...8 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 ...

Page 24: ...e 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 Dec...

Page 25: ... 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 Exp...

Page 26: ...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 ...

Page 27: ...er s Guide Rev L Page 27 of 909 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 Introduction ...

Page 28: ...d 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 ap...

Page 29: ...ommands 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 Introduction Combitronic Support ...

Page 30: ...nline 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 failu...

Page 31: ... approval of the system designer and may require another Risk Assessment Environmental Considerations It is the responsibility of the machine system designer to evaluate the intended operating environment for dust high humidity or presence of water for example a food processing environment that requires water or steam wash down of equipment corrosives or chemicals that may come in contact with the...

Page 32: ...pment l Prevent contact with any electrical hydraulic pneumatic thermal chemical or other hazards that may be present at the machine l Prevent unauthorized access to wiring and power supply cabinets electrical boxes etc l Provide a proper control system program logic and error checking to ensure the safety of all personnel and equipment for example to prevent a run away condition The control syste...

Page 33: ...stations etc l There are no modifications made to the machine or system without proper engineering evaluation for design safety reliability etc and a Risk Assessment Safety Information Resources Additional SmartMotor safety information can be found on the Moog Animatics website open the file 109_Controls Warnings and Cautions pdf located at http www animatics com support moog animatics catalog htm...

Page 34: ...ur SmartMotor and fieldbus protocol http www animatics com fieldbus manuals Other Documents l SmartMotor Product Certificate of Conformance http www animatics com download Declaration of Conformity pdf l SmartMotor UL Certification http www animatics com download MA_UL_online_listing pdf l SmartMotor Developer s Worksheet interactive tools to assist developer Scale Factor Calculator Status Words C...

Page 35: ...wing addresses l General company information http www animatics com l Product information http www animatics com products html l Product support Downloads How To videos Forums Knowledge Base and FAQs http www animatics com support html l Sales and distributor information http www animatics com sales offices html l Application ideas including videos and sample programs http www animatics com applic...

Page 36: ...am 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 Using the Program Download Window 55 Using the...

Page 37: ... 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 SLEEP SLEEP1 99 WAKE WAKE1 99 ECHO ECHO1 100 ECHO_OFF ECHO_OFF1 100 Serial Commands 101 OCHN type channel parity bit ra...

Page 38: ... 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...

Page 39: ... 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 OSH formula 130 OFF 130 Part 1 Progr...

Page 40: ...ion 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 MFM...

Page 41: ...8 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 ...

Page 42: ...ajectory 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 ...

Page 43: ... 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...

Page 44: ...m 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 S...

Page 45: ...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 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...

Page 46: ... Moog Animatics SmartMotor Developer s Guide Rev L Page 46 of 909 Other PID Tuning Parameters 235 KG formula 235 KV formula 235 KA formula 236 Current Limit Control 237 AMPS formula 237 Part 1 Programming the SmartMotor ...

Page 47: ... 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 Addi...

Page 48: ...y download incompatible code to the SmartMotor This procedure assumes that l The SmartMotor is connected to the computer For details see Connecting the System in the SmartMotor Installation Startup Guide for your motor l The SmartMotor is connected to a power source Certain models of SmartMotors require separate control and drive power For details see Understanding the Power Requirements in the Sm...

Page 49: ...oftware information in this section there is context sensitive help available within the SMI software interface which is accessed by pressing the F1 key or selecting Help from the SMI software main menu In addition to taking commands over the serial interface the SmartMotor can run programs The SMI window is used to write and edit user programs for the SmartMotor s After the program has been writt...

Page 50: ...mmands and the comment text NOTE When copying and pasting code from another text editor make sure that your text editor is not inserting smart quotes angled single or double quotation marks These are not the same as ASCII characters 39 and 34 and the SMI program editor doesn t recognize them l Each program must contain at least one occurrence of the END statement l Each subroutine call must have a...

Page 51: ...rtMotor power is turned on as shown in the Hello World example For details see Creating a Hello World Program on page 51 l The SmartMotor will not execute any code past the RUN line until it receives a RUN command through the serial port l Using the serial port the motor can be commanded to run subroutines even if the stored program is not running Creating a Hello World Program This procedure desc...

Page 52: ...rogram After entering the program you can save it as follows 1 From the main menu select File Save As or click the Save button on the toolbar The Save As window opens 2 Select a drive folder on your PC or use the default location 3 Assign a name such as HelloWorld sms 4 Click Save to write the program to the specified location and close the window If you attempt to syntax check or compile and down...

Page 53: ...owing items in mind regarding programs that have been downloaded to the SmartMotor l After the program has been downloaded into the SmartMotor it remains there until replaced l The downloaded program executes every time power is applied to the motor l There is a 500 ms timeout before the motor will accept commands on the serial port Any commands sent during that time are buffered and then accepted...

Page 54: ...cting Help from the SMI software main menu After the program has downloaded to the SmartMotor the Program Download window opens which contains options relating to running the program Program Download Window Run will run the program immediately Reset will clear all user variables and run the program as if it were power cycled Close will close the window without running the newly downloaded program ...

Page 55: ...e Run Program button 1 Use the motor selector in the Terminal window see the following figure to select the motor it must be the same motor that received the program 2 Click the Run Program in Selected Motor button to run the program in the selected motor Selected Motor and Run Program Button Using the RUN Command in the Terminal Window To run the program using commands in the Terminal window do o...

Page 56: ...nd for information only That said it is always good programming practice to create well commented code Nothing is more frustrating than trying to debug or decipher code that is sparsely commented NOTE Comments do not get sent to the SmartMotor EIGN 2 Disable left limit EIGN 3 Disable right limit ZS Reset errors ADT 100 Set target accel decel VT 1000000 Set target velocity PT 100000 Set target posi...

Page 57: ...minal 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 SmartM...

Page 58: ...or Installation Startup Guide for your motor Menu bar Toolbar Configuration window Terminal window Information window Program editor Main Features of the SMI Software NOTE Depending on your version of SMI software your screens may look slightly different than those shown The primary software features are briefly described in the following sections In addition to this information there are detailed...

Page 59: ...adable SMX file Compile and Transmit SMX file Compile Project etc Tools Access SmartMotor tools monitoring features and options Macro Tuner Motor View Monitor View Options etc Window Control the appearance of the SMI software windows Cascade Tile Hori zontally Vertically Arrange Icons etc Help Access online help features of the SMI software Contents Index SmartMotor Programmer s Guide etc Each men...

Page 60: ...otors Detect motors connected to the currently selected port in the Ter minal window Compile and Download Pro ject Compile and download all user programs defined in the project to their associated motors Compile and Transmit SMX File Compile and download the program in the active view to its asso ciated motor Scan for errors Scan the program in the active view Upload Pro gram Upload the program in...

Page 61: ...ation window is essential to keeping multiple SmartMotor systems organized especially in the context of developing multiple programs and debugging their operation The Configuration window is typically visible when the SMI software opens If the window has been closed you can open it from the SMI software main menu by selecting View Configuration NOTE When the window is visible the menu item will ha...

Page 62: ... You can double click on any port to view its properties as shown in the following figure Port Properties Window l You can also double click on any motor to open the Motor View tool for that motor as shown in the following figure Motor View Window Part 1 Programming Configuration Window ...

Page 63: ...or selecting Help from the SMI software main menu The Terminal window acts as a real time portal between you and the SmartMotor By typing commands in the Terminal window you can set up and execute trajectories execute subroutines of downloaded programs and report data and status information to the window The Terminal window is typically shown default setting when the SMI software is opened However...

Page 64: ...ou can double click a previous command to resend the command see the following figure However l If that command has a motor address in it for example 1RPA where 1 serial bus Motor 1 the command will resend to that motor l If that command does not have an address the command will be sent to the last addressed motor For example if you previously sent the command 2RPA which addresses serial bus Motor...

Page 65: ...enter the comments which are the right hand portion of each line MP Initialize Position mode ADT 100 Set target accel decel VT 1000000 Set target velocity PT 300000 Set target position G Go starts the move NOTE Acceleration velocity and position fully describe a trapezoidal motion profile After the final G command has been entered the SmartMotor accelerates to speed slows and then decelerates to a...

Page 66: ... Error Correct the error and scan the program again After all errors are corrected the program can be downloaded to the SmartMotor l Warnings may appear in the Information window to alert you to potential problems However warnings will not prevent the program from being downloaded to the SmartMotor It is the programmer s responsibility to determine the importance of addressing the warnings Program...

Page 67: ...rogram Requirements on page 50 l The first time you write a program you must save it before you can download it to the motor l Every time a program is downloaded it is automatically saved to that file name This point is important to note as most Windows applications require a save action If you want to set aside a certain revision of the program it should be copied and renamed or you should simply...

Page 68: ...re version select the desired version For more details see Setting the Motor Firmware Version on page 48 Motor View NOTE In addition to the software information in this section there is context sensitive help available within the SMI software interface which is accessed by pressing the F1 key or selecting Help from the SMI software main menu The SMI Motor View window allows you to view multiple pa...

Page 69: ... display For example in the previous figure Voltage and Current are being polled This information can be useful when setting up a system for the first time or debugging a system in the field Temperature is also useful to monitor in applications with demanding loads l All seven of the user configurable onboard I O points are shown Any onboard I O that is configured as an output can be toggled by cl...

Page 70: ...Page 70 of 909 SMI Trace Functions The Trace tab provides a set of functions that are useful for debugging a SmartMotor program To access Trace functions open the Motor View window and click the Trace tab Motor View Trace Functions Part 1 Programming SMI Trace Functions ...

Page 71: ...lick the SmartMotor in the Configuration window and select Upload Program The program is uploaded to the SMI Editor 3 Double click anywhere in the program to load it into the Trace window 4 Select the desired Mode 5 Double click on desired line in the Editor window if needed 6 Press the desired button in the Trace Step box The program must run before anything will happen Part 1 Programming SMI Tra...

Page 72: ...rom Beginning Issues a RUN command Run Continue Release firmware from the current breakpoint Only available when at a breakpoint Mode group For any trace information to be retrieved from the motor a mode must be selected and the program must run Current Captures the first 20 points encountered About Before After Requires the user to select a line from the program in the Editor window by double cli...

Page 73: ...ext command If the program is at a breakpoint the motor executes the next command and then stops Trace Step group Options for Break when Break at command mode is selected l Set Breakpoint and Run from Beginning button Sets the breakpoint and runs the program from the beginning l Set Breakpoint button Sets a breakpoint in the motor l Set Breakpoint and Run from Current button If at a breakpoint thi...

Page 74: ... Monitor Item window opens and provides tools for setting up the monitoring function as shown in the following figure Add New Monitor Item Window l Custom items which do not have explicit report commands can be added by entering the specific commands appropriate to getting the data reported for example make a variable equal to the desired parameter and then report that variable Part 1 Programming ...

Page 75: ... main menu select View Serial Data Analyzer Or press the Serial Data Analyzer button on the toolbar The Serial Data Analyzer window opens as shown in the following figure Serial Data Analyzer The Serial Data Analyzer window can display serial data in a variety of formats and it can be a useful tool for debugging communications For example you can l View data transfer between computer and SmartMoto...

Page 76: ...ly The SMI Chart View provides graphical access to any readable SmartMotor parameter To open the Chart View window from the SMI software main menu select Tools Chart View The Chart View window opens as shown in the following figure Chart View Window To use the Chart View tool l Polling items are added or removed by pressing the and buttons l The fields and options are identical to those in the Mon...

Page 77: ... application Chart View Example The SMI Chart View provides graphical access to any readable SmartMotor parameter The following example shows how to use the Chart View tool to graphically track torque changes on the SmartMotor This procedure assumes that l The SmartMotor is connected to the computer For details see Connecting the System in the SmartMotor Installation Startup Guide for your motor l...

Page 78: ...ck Custom Parameter to enter a nonstandard parameter for charting 3 Fill in the text boxes as shown in the following figure Custom Parameter Button and Related Entries NOTE Be sure the Maximum and Minimum values are set to 10000 and 10000 respectively as shown in the previous figure They default to ten times more than those values Part 1 Programming Chart View Example ...

Page 79: ...er will be added to the Chart View window 5 Click the green Play icon the chart recorder plots the RTRQ value 6 In the SMI software Terminal window enter the following commands MT T 0 G T 8000 G T 0 G T 8000 G T 0 G The Chart View tool plots a line similar to the one shown in the following figure Plotted RTRQ Values Part 1 Programming Chart View Example ...

Page 80: ...nsitive help available within the SMI software interface which is accessed by pressing the F1 key or selecting Help from the SMI software main menu The SMI software contains a macro tool which is useful for creating keyboard shortcuts for one command or a series of commands The Macros window allows you to associate a command or series of commands with the Ctrl number keys e g Ctrl 1 With this util...

Page 81: ...t the selected macro l When you have finished use the Close button to close the Macros window To create a macro In this example you will create a macro for clearing the status bits For details on clearing the status bits see Checking and Clearing Status Bits in the SmartMotor Installation Startup Guide for your motor 1 Open the Macros window 2 Click Add to open the Add New Macro window see the nex...

Page 82: ... than tuning traditional servos However it can be even easier when using the SMI Tuner tool to see the results of different tuning parameters For most applications the default SmartMotor tuning parameters are sufficient Viewing the position error on the Motor View tool and feeling the stiffness of the motor shaft will determine if the motor requires additional tuning Position Error There is a rela...

Page 83: ...in zero time The magnitude of the step response shows how well tuned the motor is The Tuner downloads a program that uses variables a b p t w and z The program that was in the motor before tuning and the user variables will be restored after tuning Before running the Tuner l Be sure the motor and anything it is connected to are free to move about 1000 encoder counts or more which is about one quar...

Page 84: ...create less overshoot For details see Tuning and PID Control on page 231 In a real world application there will be an acceleration profile not a demand for instantaneous displacement so significant overshoot will not exist Nevertheless it is useful to look at the worst case scenario of a step response To try a different set of tuning parameters select the Tuning Values tab to the left of the graph...

Page 85: ...the step response will overwrite the previous graph Normally this process involves repeated trials following the procedure outlined in the section on the PID Filter For details see Tuning the PID Control on page 233 When you are satisfied with the results the parameters producing the best results can be added to the top of your program in the SmartMotor or in applications where there are no progra...

Page 86: ... the Scanner Editor Terminal and more To open the Options window select Tools Options The Options window opens as shown in the following figure Options Window To use the Options window l Click a tab to select the options you wish to edit l Consider the default firmware version Because different SmartMotor firmware versions have subtle differences the program scanner needs to know which firmware is...

Page 87: ...ws a full description of the selected keyword Context Sensitive Help Using the Mouse There is a context help button on the tool bar When you click the button or press Shift F1 on keyboard the program enters the Help Mode and the cursor shape changes to context sensitive help cursor In Help Mode you can use the mouse or keyboard to select a menu command a toolbar button an error message in the Info...

Page 88: ...m the SMI software main menu In applications with more than one SmartMotor and possibly more than one program or communications port it is helpful to organize all of the elements as a Project rather than deal with individual files NOTE When working with multiple motors programs or ports a Project provides a convenient way of organizing and using all of the individual elements To create a project f...

Page 89: ...or editing in the SMI Editor l After the project is set up select File Save Project to save it Projects are saved as SPJ files l To open a project select File Open Project and then select the desired project SPJ file When a project file is opened all motor communication information program editor windows and other elements are restored l Use the File Recent Projects menu to view and select from th...

Page 90: ...e interface l From the Windows Start menu as a stand alone application To access the SmartMotor Playground from the SMI software in the Configuration window right click the motor you want to move and select SmartMotor Playground from the menu SmartMotor Playground Not Connected Click Connect upper left area of the window to connect to the SmartMotor Part 1 Programming Opening the SmartMotor Playgr...

Page 91: ...ling the SMI Software in the SmartMotor Installation Startup Guide for your motor l The SmartMotor has been detected and addressed For details see Detecting and Addressing the SmartMotors in the SmartMotor Installation Startup Guide for your motor In addition to the above items l Verify that all status bits are off except for the Drive ready bit as shown in the previous figure If needed use the Cl...

Page 92: ...e locations of these items l Click the left and right Jog controls and watch the motor follow l Move the position bar to the left or right and watch the motor follow l Enter a value negative counterclockwise positive clockwise in the Destination box and click Go Watch the motor shaft move until the position counter yellow box reaches that destination While the SmartMotor Playground is useful for m...

Page 93: ...HO1 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 v...

Page 94: ...mbitronic 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 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 Part 1 Programming Communication Details ...

Page 95: ... 232 or RS 485 ports of any of the motors on the chain The SmartMotor s CAN based Combitronic communications unifies all SmartMotor data and functions in a group which makes any single motor look like a multi axis controller from the perspective of the RS 232 or RS 485 ports Additionally this allows all the motors to share resources as though they were a large multi axis controller Moog Animatics ...

Page 96: ... down with approximately 1 millisecond propagation delay There is no signal integrity loss from one motor to the next which results in highly reliable communications NOTE To maximize the flexibility of the SmartMotor all serial ports are fully programmable with regard to bit rate and protocol There is a 31 byte input buffer for the RS 232 port and another for the RS 485 port These buffers ensure t...

Page 97: ...less time than it takes to receive the next one Therefore be careful to allow processes time to complete particularly for slower processes like printing to an LCD display or executing a full subroutine Daisy Chaining Multiple D Style SmartMotors over RS 232 This section describes how to daisy chain multiple D style SmartMotors to a single RS 232 port as shown in the following figure Other SmartMot...

Page 98: ...om Moog Animatics Fully molded Add A Motor cables make quick work of daisy chaining multiple motors over an RS 232 network CAUTION Large size 23 or size 34 SmartMotors draw so much power that reliable communications often require isolated communications For such applications consider using the Moog Animatics DIN Rail RS 232 fanout The following are related commands For more details on these comman...

Page 99: ...rs Unlike the RS 485 star topology the consecutive nature of the RS 232 daisy chain creates the opportunity for the chain to be independently addressed entirely from the host rather than by having a uniquely addressed program in each motor Setting up a system this way adds simplicity because the program in each motor can be exactly the same If the RUN command is the first in each of the motor s pr...

Page 100: ...as been powered off and back on the following commands can be entered into the SmartMotor Interface to address the motors 0 equals 128 1 equals 129 etc Some delay should be inserted between commands when sending them from a host computer 0SADDR1 1ECHO 1SLEEP 0SADDR2 2ECHO 2SLEEP 0SADDR3 3ECHO 0WAKE Commanded by a user program in the first motor instead of a host the same daisy chain could be addre...

Page 101: ...ee the documentation for the specified protocol NOTE Changing the default value of any parameter other than baud rate will prevent proper command data from being received by the SmartMotor 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 Communication menu For details see the SMI softwa...

Page 102: ...annel l BAUD channel formula sets the baud rate of the specified serial channel where rate and formula are the desired baud rate and channel is 0 or 1 for channel 0 or channel 1 respectively Valid values for rate and formula are 2400 4800 9600 19200 38400 57600 or 115200 For additional motor specific details see Product Specific Table on page 298 PRINT PRINT1 Print to RS 232 or AniLink channel A v...

Page 103: ... CHN channel Communication Error Flags Where channel can be 0 or 1 for COM Channel 0 or 1 It holds binary coded information about historical errors on the two communications channels The command gives the 5 bit status of either serial port channel 0 or 1 The information is as follows Bit Value Meaning 0 1 Buffer overflow 1 2 Framing error 2 4 N A 3 8 Parity error 4 16 Timeout occurred The followin...

Page 104: ...5 ports have many configuration possibilities To set the configuration options use the OCHN command which is described in the following section Using Data Mode Data mode is used to retrieve data from the RS 232 RS 485 port If a communications port is in Command mode then the motor responds to arriving commands it recognizes However if the port is opened in Data mode then incoming data fills the 16...

Page 105: ... l Terminals l Printers The following is an example program that repeatedly transmits a message to an external device in this case another SmartMotor and then takes a number back from the device as a series of ASCII letter digits each ranging from 0 to 9 A carriage return character marks the end of the received data The program uses that data as a move position AT 500 Preset acceleration VT 100000...

Page 106: ...n the middle SmartMotor Command with Response The SMI host software uses these commands to implement the Motor View window and Monitor View tools Data that does not have direct report commands can be retrieved either of two ways by embedding the variable in a PRINT command or by setting a variable equal to the parameter and then reporting the variable For more details see Part 2 SmartMotor Command...

Page 107: ...st cycle power to the motor CBAUD formula Set CAN baud rate Where formula may be one of the following 1000000 800000 500000 250000 125000 100000 50000 20000 The setting is stored in the EEPROM However for it to take effect the user must cycle power to the motor CAN CAN arg Get CAN error The CAN command is used to get read an error or other status information about the CAN bus For example RCAN 0 x ...

Page 108: ...010 sub index 0 e CAN 4 Get any error information y SDORD 1 24608 0 2 Read 2 bytes from address 1 object 0x6020 sub index 0 ee CAN 4 Get any error information IF e ee 0 Confirm the status of both SDO operations Success b x Set some example variable according c y to the data received GOSUB 3 Some routine to take action when this data is valid ELSE GOSUB 8 Go do something to deal with error when rea...

Page 109: ...r to each command s description in Part 2 of this guide l No monitoring the heartbeat of other network nodes l No special commands for sending or receiving PDOs PDOs must be mapped to existing objects to send or receive data as a slave device Even the SmartMotor designated as a master must configure its own PDO mappings NOTE SmartMotors currently have 5 transmit and 5 receive PDOs l No capability ...

Page 110: ...other device s PDOs start the NMT state l A SmartMotor can send receive up to 5 PDOs each or Rx receive and Tx transmit l Read write SDOs in expedited mode only which works for up to 32 bit data Multiple SmartMotors and multiple I O devices may be on the same CAN bus This combined with Combitronic motor to motor communications allows for complex multi axis multi I O device network control Refer to...

Page 111: ...er belongs to that SmartMotor For example imagine you have three SmartMotors linked together and set with addresses 1 2 and 3 These examples show how Combitronic communications works l This typical line of code written in SmartMotor number 2 sets a target position in that same SmartMotor PT 4000 Set Target Position in local motor l The following line of code written in SmartMotor number 2 or any o...

Page 112: ...complexity and costs of separate servo controllers servo amplifiers and PLCs Program Loops with Combitronic Keep in mind that while Combitronic communications are very fast program execution is also very fast Therefore if a tight loop is written with a Combitronic transaction inside you will flood the CAN bus with data which can slow the operations of all SmartMotors on the chain CAUTION Tight loo...

Page 113: ...the portion of the master program that pertains to that motor address This makes supporting a large network much easier because there is only one program Make sure global variables as created in the previous example are all unique Simplify Machine Support Combitronic features can also be used to simplify the support of a SmartMotor based machine To do this 1 Allocate a small group of I O or the an...

Page 114: ...or 2 Motor 2 Motor 3 Motor 3 Motor 3 Motor 3 TX RX TX RX TX RX TX RX RS 232 and Combitronic Networks Example SMI software commands from the host PC RS 232 port for the system layout in the previous figure 2PT 3 1234 Motor 2 sets target position of Motor 3 in its group to 1234 3PT 0 0 Motor 3 sets target position of all motors in its group to zero 4PT 345 Motor 4 only gets its own target position s...

Page 115: ...ss 6 SmartMotor DeviceNet is an industrial CAN bus protocol supported in the SmartMotor with optional firmware The protocol supports the Common Industrial Protocol CIP profile for a position controller The hosting controller can use an Electronic Data Sheet EDS file supplied by Moog Animatics that allows the SmartMotor to be controlled through DeviceNet I C Communications D Style Motors The D styl...

Page 116: ... 2 ab 1 ab 0 IIP PRINT Load bytes ab 3 ab 2 ab 1 ab 0 13 PRINT 13 RETURN C200 Read into variable a at pointer p al 1 p PRINT1 IIS 160 ab 5 ab 4 IIP Write memory pointer WAIT 1 Must have small wait to give the write time it needs PRINT1 IIS 161 IIG4 IIP Setup to read four bytes WAIT 1 Must have small wait to give the write time it needs ab 3 GETCHR1 ab 2 GETCHR1 ab 1 GETCHR1 ab 0 GETCHR1 a al 0 PRI...

Page 117: ...ommand For IIC devices that require a restart simply call the IIS command a second time within a print IIP Stop an IIC command IIGn Get n bytes from the IIC channel requires the previous commands to have provided whatever addressing or command is required for the device to start sending The G argument provides the right number of clock intervals to acquire the data from the IIC device RGETCHR1 Var...

Page 118: ...e Commands 128 Other Motion Commands 129 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 Velocity Mode 134 Absolute Position Mode 135 Relative Position Mode 136 Follow Mode with Ratio Electronic Gearing 137 Cam Mode Electronic Camming 153 Mode Switch Example 168 Position Counters 170 Modulo Position 171 Modulo Position Commands...

Page 119: ... Programming Moog Animatics SmartMotor Developer s Guide Rev L Page 119 of 909 Synchronized Motion 175 Synchronized Target Commands 175 Other Synchronized Motion Commands 178 Part 1 Programming Motion Details ...

Page 120: ...e optional m s argument in the command MFSLEW distance m s Enter the following commands in the Terminal window to move the SmartMotor EIGN 2 Disable left limit EIGN 3 Disable right limit ZS Reset errors ADT 100 Set target accel decel VT 100000 Set target velocity PT 300000 Set target position G Go starts the move NOTE A complete move requires a position a velocity and an acceleration followed by a...

Page 121: ...n its attempt to reach the target For example in terms of the position commands l Position Target PT The desired target position you are shooting for what you have specified as a target position value l Position Actual PA The current position in real time right now regardless of target or where it is being told to go l Position Commanded PC The position the controller processor is actually command...

Page 122: ... PT command sets an absolute end position to move to when the motor is in Position mode The units are encoder counts and can be positive or negative in the range 2147483648 to 2147483647 It is not advisable to attempt to use absolute moves that would cross the rollover point of the most positive and most negative values Also absolute moves should not attempt to specify a move with a relative dista...

Page 123: ...rate for Class 5 is 8 0 kHz the default sample rate for Class 6 is 16 0 kHz AT formula Set Target Acceleration Only DT formula Set Target Deceleration Only The AT and DT commands allow setting different values for the acceleration and deceleration of the motion profile respectively Standard practice should be to use the ADT command instead unless separate values are needed There is an override tha...

Page 124: ...ion of the motor shaft In Velocity mode the programmed position using the PT or the PRT commands is ignored Acceleration and velocity need to be specified using the ADT and the VT commands After a G command is issued the motor accelerates up to the programmed velocity and continues at that velocity indefinitely Similar to Position mode in Velocity mode velocity and acceleration are changeable on t...

Page 125: ...o 32767 In Torque mode activated by the MT command the drive duty cycle can be set with the T command The following number or variable must fall in the range from 32767 to 32767 The full scale value relates to full scale or maximum duty cycle At a given speed there will be reasonable correlation between drive duty cycle and torque With nothing loading the shaft the T command will dictate open loop...

Page 126: ...motor is off and the brake holds it in position rather than the motor servoing when it is at rest As soon as another trajectory is started the brake releases The time it takes for the brake to engage and release is only a few milliseconds The brakes used in the SmartMotor are zero backlash devices with extremely long life spans It is well within their capabilities to operate interactively within a...

Page 127: ...ssued and the motor IS moving the brake will engage causing the motor to mechanically be loaded to the point of stopping and faulting out EOBK IO Reroute Brake Signal to I O When the automated brake functions are desired for an external brake this command can be used to choose a specified I O port This corresponds to the same I O pin numbering used by other I O commands These commands re route the...

Page 128: ...rnal and external encoders can be triggered by certain events to capture their positions For a capture to occur one of the arming commands must be issued see the following list These commands allow you to select a rising or falling edge of the source event and specify the encoder to be armed Ai arg Arm the rising edge only encoder selected by arg Aj arg Arm the falling edge only encoder selected b...

Page 129: ...the 12 pin I O connector Other Motion Commands The following commands are used to start stop or decelerate motion reset or shift the origin and turn the motor servo off For more details on these commands see Part 2 SmartMotor Command Reference on page 238 G Go Start Motion The G command does more than just start motion It can be used dynamically during motion to create elaborate profiles Because t...

Page 130: ...ollover Position mode problems If the SmartMotor runs in one direction for a very long time it will reach position 2147483648 or 2147483647 which causes the position counter to change sign While that is not an issue with Velocity mode it can create problems in absolute position moves or create confusing results when reading position OSH formula Shift the Origin by Any Distance The OSH command shif...

Page 131: ... the SmartMotor will operate in default MDT MDT Mode Drive Trapezoidal Trapezoidal commutation uses only the Hall sensors default It is the most simple commutation method and it is always ready on boot up MDT is effective despite the minor inaccuracies typically found in the mechanical placement of the sensors NOTE M style motors boot up in MDC mode see MDC on page 132 MDE Mode Drive Enhanced This...

Page 132: ... not take effect until the motor rotates past the index mark of the internal encoder The following status bits can be used to test for this Status Word 6 l Bit 0 Trap Hall mode l Bit 1 Trap Encoder enhanced mode l Bit 2 Sine Voltage mode l Bit 3 Sine Current vector mode MDB Trajectory Overshoot Braking TOB Option This command should be used after entering MDT or MDE to enable TOB action This optio...

Page 133: ...tor To specify the value of the torque move use the T command followed by a number between 32767 and 32767 Keep in mind l Positive numbers apply a clockwise torque l Negative numbers apply a counter clockwise torque l The default value for T is zero l Speed is proportional to counter torque or load on the shaft when in torque mode l The larger the load the slower the motor turns for a given torque...

Page 134: ...leration ADT set accel decel equal to Go command to initiate move G start move immediately Constant Velocity Example The following example shows a basic constant velocity move In the example the motor starts moving when the G command is issued It accelerates up to a velocity of 100000 at a rate or 1000 samples sec sec It then remains at that speed until told to do otherwise MV set motor to Velocit...

Page 135: ...tarts moving when the G Go command is received and stops at an absolute position of 20000 encoder counts MP set to position mode required if currently in another mode VT 100000 set velocity to 100000 ADT 1000 set accel decel to 1000 PT 20000 set commanded absolute position to 20000 G Go Start moving Two Moves with Delay Example The following example shows two position moves with a delay in between...

Page 136: ...ion to 2000 G Go Start moving TWAIT wait until move is complete OSH 2000 shift current position back 2000 counts WAIT 8000 wait 8 seconds PT 2000 set commanded absolute position to 2000 G Go Start moving TWAIT wait until move is complete NOTE The motor moved a total of 4000 counts but its current position is only 2000 because it was reset to zero between moves Relative Position Mode In Relative Po...

Page 137: ...ffect until after the next G command The following list details the minimum requirements for a move to occur in Follow mode Set Incoming counts multiplier MFMUL may be negative or positive Set Incoming counts divisor MFDIV may be negative or positive Calculate above ratio and mode MFR Go command to initiate the move G start following the encoder NOTE If the external encoder is not moving no motion...

Page 138: ...drature inputs and puts the SmartMotor in Follow mode MSR Configure A B inputs to Step Direction mode and select Follow mode The Mode Step Ratio MSR command configures the A and B inputs of the motor to be read as standard Step and Direction inputs and puts the SmartMotor in Follow mode MF0 Reset external quadrature encoder MS0 Exit Step Direction Follow mode When using the ENC1 command be careful...

Page 139: ...m 1 to 2147483647 Set to 1 default to disable When dis abled Follow mode runs at ratio continuously m s Is optional and specifies the meaning of distance Values of m s 0 for designating input units master units and 1 for designating distance traveled slave units CAUTION The following gearing examples are relative to the motor shaft position at the time the G command is issued All distances are rel...

Page 140: ...ay cause motor harmonic distortion or following errors SRC 2 Set signal source to internal 8K counts sec MFMUL 100 Default is 1 MFDIV 100 Default is 1 MFR Calculate ratio set mode G Follow Incoming Encoder Signal With Ramps Example This example shows a profile driven by an incoming encoder signal In addition to following the incoming encoder the SmartMotor performs an acceleration ascend or ramp u...

Page 141: ... along the vertical axis of the graph This demonstrates that area under the curve is the slave position The second graphs shows the slave position as a function of master encoder source counts to intermediate counts the TMP output In this example MFA MFD and MFSLEW are commanded in master units source counts These three commands can accept either master source counts or slave units intermediate co...

Page 142: ... presses where everything must run at proportional speeds to the main master axis Electronic Line Shaft Diagram On the M style SmartMotors there is a bidirectional Encoder Bus port Using this port along with Moog Animatics encoder bus cables you can daisy chain a series of M style motors l One motor will have ENCD 1 issued this will be the master l All other motors will have ENCD 0 default issued ...

Page 143: ...spool is often based on precise patterns and proper tension control throughout the winding process The following figure provides examples of common spool winding patterns There are various problems associated with winding and spooling applications such as material tension control setting proper dwell points over under travel which results in a dog bone shape and tapered patterns with low friction ...

Page 144: ...re For example a setting of 0 for mode is typical for feeding labels in label applications a setting of 1 is typical for traverse and takeup spool winding applications dist mode Motion Repeat Run state Initiated by 1 0 relative one cycle no repeat once a G or G 2 command x 0 relative repeat one direction continuous after initial G or G 2 x 1 relative traverse back forth continuous after initial G ...

Page 145: ...is 1 which means slew forever and prevents the repeating cycles shown above Therefore to disable any of these modes and go back to forev er run at slew set MFSLEW 1 0 to get one of the cycles above ensure that MFSLEW x y where x 0 No MFSDC command G issued slew forever unless ascend MFSLEW MFA 0 MFD 0 descend MFR X issued or no MFD with OFF for abrupt Stop G issued slew forever unless step change ...

Page 146: ...SLEW 8000 1 stay at slew ratio for 8000 counts of the slave MFSDC 100 1 Dwell for 100 counts auto repeat in reverse direction G 2 Begin to follow master signal in SECOND trajectory MP 1 Set FIRST TRAJECTORY mode to Position mode VT 100000 Set velocity to run over top of gearing ADT 100 Set accel decel to run over gearing PRT 1000 Set relative move G 1 Shift all motion 1000 counts in positive direc...

Page 147: ...se mode for input distance distance Length of the dwell at both ends of the move in master units Use 1 to disable range of distance is 0 to 2147483647 2 Activates the absolute traverse mode of operation MFLTP formula Mode follow lower traverse point formula Specifies the lower traverse point Range is any 32 bit signed value It must be less than or equal to MFHTP MFHTP MFLTP must be less than 231 M...

Page 148: ...lower end of the traverse Distance range 0 to 2147483647 m s 0 master 1 slave distance range 0 to 2147483647 MFH distance m s Ramp at the higher end of traverse designate master or slave distance Specifies the ramp distance at the higher end of the traverse Distance range 0 to 2147483647 m s 0 master 1 slave distance range 0 to 2147483647 ECS counts Encoder count shift immediately compensates for ...

Page 149: ...eeds to remain fixed but changes in demand for correction may need to be adjusted over time For example assuming you have a program with normal gearing MFMUL 1 Ratio default is 1 MFDIV 1 Ratio default is 1 MFR Enable follow mode G Begin move In this case the motor begins spinning at a 1 1 ratio of external encoder input Then you issue ECS 10 Encoder count shift of 10 counts The motor will lunge fo...

Page 150: ...al direction Activate update of RCP 2 when servo is off MFL 1000 1 Lower end ramp MFH 1000 1 Higher end ramp MFLTP 1000 Lower traverse point MFHTP 1000 Higher traverse point MFMUL 1 Ratio default is 1 MFDIV 1 Ratio default is 1 MFSDC 4000 2 Dwell for 4000 counts 2 is active traverse mode MFR Enable follow mode G Begin move Chevron Wrap Example This example uses a more complex winding method where ...

Page 151: ...wing figures To create this solution the SmartMotor requires only four parameters System parameters c 8000 Master External Encoder resolution counts per 360 deg turn of spool w 10000 Spool width distance in encoder counts of traversing slave motor Chevron shape parameters n 1000 Slave counts per full 360 deg turn of master spool pitch nn 1000 Slave counts per half 180 deg turn of master spool ampl...

Page 152: ... for setting RPC 2 with the O 2 command or shifting with the OSH 2 command to establish the desired frame of reference CAUTION Do not issue a change to RPC 2 during a traverse move using either the O 2 or OSH 2 command This will produce unpredictable behavior that is undefined at this time Those commands should be issued before issuing a G or G 2 when in dual trajectory mode l MFMUL and MFDIV dete...

Page 153: ...e forward direction This is the power up default state 1 Motion profile is set to moving in the reverse direction The use of status word 7 bit 13 is undefined in other modes of operation with trajectory 2 7 14 Dwell In Traverse mode this indicates the lower dwell state in progress Cam Mode Electronic Camming Electronic camming is similar to mechanical cams for a given master rotating device a slav...

Page 154: ...r l Import function allows for optimizing data points for cubic spline interpolation The motor position is interpolated between each data point This interpolation can be specified as linear spline that is not periodic and spline that is periodic Spline mode allows motion paths to be created from a reduced number of points For example the following figure shows an X Y plot of Cam tables running on ...

Page 155: ...speed of the virtual encoder is equivalent to the PID rate In other words for a Class 5 motor at its default PID rate of 8000 Hz the virtual encoder sees 8000 encoder counts per second One example of this is a complex chevron pattern winding application where camming high frequency oscillation occurs on top of gearing low frequency traverse This is used to spool material in a way that prevents it ...

Page 156: ...ber of cam cycles desired For example you can use it to determine the settings if the application intends to perform a single shot of the whole cam refer to Camming Demo XY Circle on page 836 for a single shot program example NOTE The Fixed Segment Cam Simulator is intended as a gearing camming training aid only It is not designed as an all inclusive means for creating camming applications Refer t...

Page 157: ...me additional calculations will be needed in the program based on the examples given Refer to the figureSource Counts into Cam versus Intermediate Counts into Cam on page 158 Should I choose Variable or Fixed cam The choice of fixed length segments vs variable length segments in a cam is another choice to make Generally speaking fixed length segments are simpler and allow more overall points becau...

Page 158: ...000 6000 7200 Intermediate Counts into Cam Diagram MFA MFD MFSLEW use command x 1 Ratio Input counts TMP output Input counts a b c MFA 1000 1 MFSLEW 5000 1 MFD 1200 1 Slope is the ratio MFMUL MFDIV regardless of input or output distance 1000 5000 1200 1000 6000 When MFA x 1 MFD x 1 MFSLEW x 1 the firmware back figures which input values are needed to achive this a 2 1000 7 3 b 5000 7 3 c 2 1200 7 ...

Page 159: ...is Output Input MFMUL MFDIV l As shown in the previous two bullets MFMUL and MFDIV are imposed on command x 0 values However note that MFMUL and MFDIV still have an effect in both modes i e the ratio of input to output counts is still MFMUL MFDIV The difference is the final output value used as the trigger to go to the next phase is not affected in x 1 mode l MFSDC takes two arguments To disable a...

Page 160: ... can burn bits and corrupt data There are various ways to achieve this refer to the following code snippet for one example C123 Example of using EEPROM to flag code that has been run EPTR 100 set pointer to EEPROM VLD a 1 load value IF a 123 if value does not equal 123 do something here that you want to do only once such as write a cam table to nonvolatile memory EPTR 100 set EEPROM pointer a 123 ...

Page 161: ... MFD d 1 a s d 8000 4 32000 counts Variable cam example with both master or slave counts as inputs to the cam CTE 1 CTA 5 0 CTW 0 0 CP 0 cam pointer or cam index pointer CTW 500 8000 CP 1 CTW 4000 16000 CP 2 CTW 500 24000 Will turn off at this point CTW 0 32000 MFMUL 1 MFDIV 2 MCMUL 3 MCDIV 4 Cam input values in terms of master encoder input to ramp counts MFA a 0 MFSLEW s 0 MFD d 0 a 2 s d 2 MFMU...

Page 162: ... the table seglen Specifies the master encoder distance between each point If seglen is set to 0 then the distance is specified per data record through the CTW command location Is optional and specifies if this is a table in user variables or EEPROM By default if location is omitted then EEPROM is chosen If location is 0 then the user array location is chosen al 0 through al 50 Only one table can ...

Page 163: ...inear interpolation Bit 7 has no effect when MCE has chosen linear mode When loading Cam tables it is important to be aware of the table capacity As mentioned previously l When a Cam table is stored in user array memory al 0 al 50 52 points can be stored as fixed length segments 35 points are possible when variable length segments are used l When Cam tables are written to EEPROM memory significant...

Page 164: ...ormula Cam table value divisor This value is divided into the Cam table value and fed as a commanded value to the trajectory of the camming motor O arg formula Set move generator origin to value The O command sets the move generator origin based on the following arguments 0 Set the origin of the global move generator sets value of PA 1 Set the origin of move generator 1 sets value of PC 1 2 Set th...

Page 165: ... The MFMUL and MFDIV commands do not have an effect on dwell time or distance Dwell is strictly based on raw master encoder counts selected by the SRC command specifying internal virtual or external master count source l Changes to MCMUL and MCDIV affect the amplitude of the wave form l In all cases updates automatically take effect when passing from the last point of the Cam table into the first ...

Page 166: ... RETURN ENDIF CTE 1 CTA 15 8000 CTW 0 CP 0 cam pointer or cam index pointer CTW 500 CP 1 CTW 4000 CP 2 CTW 20000 CTW 45000 CTW 50000 CTW 60000 CTW 65000 CTW 55000 0 1 Turn on Bit 0 Status Word 8 CTW 46000 Will turn off at this point CTW 45000 0 2 Turn on Bit 1 Status Word 8 CTW 8000 Will turn off at this point CTW 4000 CTW 500 CTW 0 CP 14 q 123 RETURN C41 Run cam operation MP PT 0 G TWAIT SRC 2 MC...

Page 167: ...OP Loop while position error within limit PRINT HIT HARD STOP 13 G WAIT 50 Wait 50 milliseconds O hh rr Set origin to home offset PRINT MOVING TO ZERO 13 MP PT 0 G TWAIT Set motor to zero RETURN CAUTION When writing a cam table to EEPROM structure the program so that the cam table is not frequently rewritten or written from a loop Repeated erasing and rewriting can burn bits and corrupt data For d...

Page 168: ...ur motor l The SmartMotor is connected to a power source Certain models of SmartMotors require separate control and drive power For details see Understanding the Power Requirements in the SmartMotor Installation Startup Guide for your motor l The SMI software has been installed and is running on the computer For details see Installing the SMI Software in the SmartMotor Installation Startup Guide f...

Page 169: ... of 909 Commands for Velocity Mode 3 In the SMI software Terminal window enter the following commands T TRQ MT G The motor switches to Torque mode The change is visible in the Mode box of the Motor View window Motor Switched to Torque Mode Part 1 Programming Mode Switch Example ...

Page 170: ...mit PC RPC Trajectory into PID EA RPC RPA O 0 Always updates to RPA when drive is off Position Commanded by the PID trajectory PC 0 RPC 0 Identical to PC RPC O 0 Same as above PC PC 1 RPC 1 Relative position of trajectory 1 O 1 0 O 1 value OSH 1 relative value Accumulates delta position from RPA but may have a constant offset from RPA PC 1 PC 0 when in Single Trajectory mode PC 2 RPC 2 Relative po...

Page 171: ...lance systems can pass subject tracking from one pan tilt to the next Modulo Position Example For the previous figure l PML 360 Position Modulo Limit maintains counts between 0 and 359 degrees l PMT 270 Position Modulo Target takes the shortest path to the specified target position 270 degrees Modulo Position Commands The following commands are used to set and read the modulo position For more det...

Page 172: ...owing figure shows a flow diagram for a dual trajectory generator MP 1 Position Mode MV 1 Velocity Mode RPC 1 Reports Commanded Position Trajectory Generator 1 Trajectory Generator 2 Input Sources SRC 1 External Enc SRC 2 Internal Clock PID Trajectory Summing Motor Shaft MFR 2 MC 2 CAM Mode RPC 2 Reports Commanded Positon RPA Reports Motor Position Dual Trajectory Generator ECS value Gearing is no...

Page 173: ...which trajectory they can act on For more details see Part 2 SmartMotor Command Reference on page 238 MP trj trj 1 only MV trj trj 1 only MFR trj trj 2 only MSR trj trj 2 only MC trj trj 2 only G trj trj 1 or 2 X trj trj 1 or 2 S trj trj 1 or 2 TWAIT trj trj 1 or 2 PC trj trj 1 or 2 RPC trj trj 1 or 2 O trj trj 1 or 2 OSH trj trj 1 or 2 RMODE trj trj 1 or 2 Part 1 Programming Dual Trajectories ...

Page 174: ... the commanded position in trajectory generator 2 s frame of reference VC Real time commanded velocity from all trajectory generators AC Real time commanded acceleration from all trajectory generators negative indicates deceleration VA Report the velocity of the motor shaft The units are encoder counts per PID sample times 65536 The factor of 65536 allows for finer res olution of slower speeds Thi...

Page 175: ...on mode frame of reference G 1 S Stop all moves follow and position MP Position mode exclusively Note there is no parentheses to make only position mode PT 0 G Motor returns to position 0 in terms of actual position because this is only position mode Synchronized Motion All SmartMotors equipped with the CAN port option come with Combitronic capability which is basically the unification of all Smar...

Page 176: ...e The following is the full syntax for the PTS command which shows additional optional parameters enclosed in braces for support of two motors operating the same axis The optional parameter contains the motor address for the second motor of the axis For the PRTS command replace PTS with PRTS PTS pos1 addr1 addr1 pos2 addr2 addr2 pos3 addr3 axis3 This is illustrated in the following examples If you...

Page 177: ...ty will execute a triangular rather than trapezoidal profile but the moves will still be synchronized The difference between a PTSS move and a PTS member is that the supplemental axis moves do not reduce the primary profile velocity in an effort to hold the total motion to a total combined velocity set by VTS The same applies for acceleration The combined motion of the PTS move will be controlled ...

Page 178: ...DIF RETURN It is also important to avoid commanding a distance of 0 in 2D or 3D space In other words a PTS command should not be issued with a target positions identical to the current target position Refer to the IF PTSD 0 code in the previous example Finally do not issue the PTS command unless the motors are stopped and have no motion faults Otherwise if the motors are in motion or faulted it co...

Page 179: ...complete The previous example is a synchronized move in its simplest form The code could be written in either motor 1 or 2 and it would work the same The TSWAIT command merely pauses program execution except for interrupt routines It may be desirable to continue running the program while waiting In that event the program can loop around the Synchronized Move Status Bit which is status word 7 bit 1...

Page 180: ...op all and end program IF B 0 0 1 0 MTB 0 ENDIF note IF B 0 0 2 0 MTB 0 ENDIF note IF B 0 0 3 0 MTB 0 ENDIF note LOOP Loop back GS Go starts the synchronized move RETURN Return to call note Managing faults is better done by using interrupts in other motors taught later in this guide There is a note in the preceding example program stating that a better job can be done of detecting and reacting to ...

Page 181: ...3 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 GOTO GOSUB Examples 190 SWITCH CASE BREAK ENDS Examples 191 Interrupt Programming 192 ITR ITRE ITRD EITR DITR RETURNI 192 TMR timer time 19...

Page 182: ...ails see Opening the SMI Window Program Editor on page 49 The following program example shows an infinite loop It causes the motor to move back and forth forever Simple Move Program Example NOTE Programs execute at rates of thousands of lines per second Flow Commands After a program starts there are a variety of commands that can redirect program flow and most of those can do so based on certain c...

Page 183: ... a RUN command is received over the serial line During development the RUN command placed at the top of your program can protect you from accidentally locking up your SmartMotor with a bad program GOTO GOTO label C Redirect Program Flow Place a Label The most basic command for redirecting program flow without inherent conditions is GOTO or GOTO label used in conjunction with the label C A label co...

Page 184: ...e many sections of a program that need to perform the same basic group of commands By encapsulating these commands between a C label and a RETURN they become a subroutine that can be called any time from anywhere with a GOSUB or GOSUB label rather than being repeated There can be as many as one thousand 0 999 different subroutines and they can be accessed as many times as the application requires ...

Page 185: ...et c to two ELSE If not 0 or 1 d 1 Set d to one ENDIF End IF There can be many ELSEIF statements but only one ELSE If ELSE is used it needs to be the last statement in the structure before the ENDIF There can also be IF structures inside IF structures that s called nesting and there is no practical limit to the number of IF structures that can nest within one another The commands that can conditio...

Page 186: ... within the WHILE loop executes as long as the loop condition remains true The BREAK command can be used to break out of a WHILE loop although that somewhat compromises the elegance of a WHILE statement s single test point and makes the code harder to follow The BREAK command should be used sparingly or preferably not at all in the context of a WHILE loop If it s necessary for a portion of code to...

Page 187: ...ircumstances where the program execution needs to be paused for a specific period of time The WAIT command pauses the program for the specified number of milliseconds WAIT 1000 for example would wait one second The following code would be the same as WAIT 1000 only it would allow code to execute during the wait if it were placed between the WHILE and the LOOP CLK 0 Reset CLK to 0 WHILE CLK 1000 CL...

Page 188: ...e END statement has to be outside the main loop If it is necessary to stop a program issue an END command and execution stops at that point An END command can also be sent by the host to intervene and stop a program running within the motor WARNING An END command will not stop motion of a motor The SmartMotor program is never erased until a new program is downloaded To erase the program in a Smart...

Page 189: ...s on the IF ELSE and ENDIF commands see IF ENDIF on page 184 Find shortest dist to Top Dead Center Shaft position from present position IF PA RES RES 2 Check shortest distance using Modulo Math function PRT RES PA RES Set Relative Position to Modulo Remainder ELSE PRT PA RES Otherwise Set to RES Modulo remainder ENDIF The following example uses define to associate values and I O points for use in ...

Page 190: ...UB label RETURN on page 184 There are two theories on writing code One says uses all GOTO commands the other says use all GOSUB commands There are pros and cons to both methods l GOTO is good for conditional code bypassing l GOSUB ensures a return to where you came from Pay attention to either command when you run into a RETURN that gets ignored by a GOTO or when you never reach a RETURN for a pre...

Page 191: ...EAK ENDS Examples The following code shows the proper use of the SWITCH CASE BREAK and ENDS commands For more details on these commands see SWITCH CASE DEFAULT BREAK ENDS on page 186 C500 define FiveValues INA V1 3 1000 define CheckPot 501 WHILE 1 IF x FiveValues GOSUB CheckPot ENDIF LOOP RETURN C501 CheckPot Check Potentiometer y FiveValues SWITCH FiveValues CASE 0 PRINT Value y 13 BREAK Note Def...

Page 192: ...rogramming The following are interrupt commands that can be used in your SmartMotor programs For more details see Part 2 SmartMotor Command Reference on page 238 ITR ITRE ITRD EITR DITR RETURNI Interrupt Commands The interrupt ITR function can be used to configure a SmartMotor to execute a routine based on the change of a status bit There are dozens of different bits of information available in th...

Page 193: ...ds on page 182 In the following program example interrupt number zero is set to look at Status Word 3 Bit 15 which is Velocity Target Reached When this status bit switches to 1 subroutine 20 executes which issues an X command and stops the motor Every time the motor reaches its target velocity it immediately decelerates to a stop causing it to forever accelerate and decelerate without ever spendin...

Page 194: ... ITR function EIGN 2 Disable left limit EIGN 3 Disable right limit ZS Clear faults MP Set Position mode VT 500000 Set target velocity AT 300 Set target acceleration DT 100 Set target deceleration TMR 0 1000 Set Timer 0 to 1s ITR 0 4 0 0 20 Set interrupt EITR 0 Enable interrupt ITRE Enable all interrupts p 0 Initialize variable p O 0 Set commanded and actual pos to zero C10 Place a label IF PA 4700...

Page 195: ...tions with the SmartMotor 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 Part 1 Programming Variables and Math ...

Page 196: ...l value a formula Set variable a to value of a variable or formula For more details on array variables see Array Variables on page 198 Variable Commands The following commands are used to load and store variables For more details see Part 2 SmartMotor Command Reference on page 238 EPTR formula Set EEPROM Pointer in Bytes 0 32767 To read or write into this memory space it is necessary to properly l...

Page 197: ...ll variables can be used in mathematical expressions assuming standard hierarchical rules and using any of the mathematical operations Addition Subtraction Multiplication Division Logical Operations The previous mathematical operations can be combined with the following logical operations Less than Greater than Equal to Not equal to Less than or equal to Greater than or equal to Integer Operations...

Page 198: ...t number is truncated toward zero Although the floating point variables and their standard binary operations conform to IEEE 754 double precision results the floating point square root and trigonometric functions only produce IEEE 754 single precision results The following are some examples a b c d e Standard hierarchical rules apply a 2 3 a 8 c 123 12 Modulo c 3 remainder of 123 12 b 10 a a 10 b ...

Page 199: ... the SmartMotor to process it To set up a buffer the programmer allocates a block of memory to it assigns one variable to an input pointer and another variable to an output pointer Both pointers start out as zero and increment as follows l Every time data goes into the buffer the input pointer increments l Every time data is used the output buffer likewise increments l Every time a pointer increme...

Page 200: ...to the SmartMotor 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 Part 1 Programming Error an...

Page 201: ... depends on motor model b B 6 13 Low bus voltage Voltage depends on motor model 2 B 0 5 Excessive Temperature Historical indication 85 C NOTE The only fault bit with hysteresis 80 C prior to clearing 3 B 0 6 Excessive Following Error Historical indication a EA Actual Following Error exceeded EL Error Limit b EL 1000 encoder counts by default 4 B 0 7 Velocity Limit Historical indication VL sets Vel...

Page 202: ...e is a fault in one axis it is desirable to stop all motion in the machine An effective way to accomplish this is to place the following example code into every motor When any axis experiences a drive disable condition interrupt routine C0 executes The C0 routine immediately broadcasts a global Mode Torque Brake MTB to stop all axes After that the motor calling for the shutdown places its address ...

Page 203: ... the Interrupt Handler is enabled it will still be enabled after a PAUSE and its execution has no affect on the interrupt subroutine stack NOTE There is a separate stack for PAUSE that can go up to ten resumes deep It allows for PAUSES over communications and within user program interrupt routines RESUME Resume from a PAUSE The RESUME command restarts program execution from the location following ...

Page 204: ...ck the actual rate of change of the PID position error This value is averaged over four consecutive PID cycles It is in units of position error per PID cycle 65 536 DEL formula Set position error rate limit This is useful for detecting obstructions to the motor s path and faulting the motor sooner than the position error limit alone would This is in the same units as the DEA command DEL Read back ...

Page 205: ... fault if motion is commanded further in the direction of a limit once that limit has been exceeded SLE Software limits enable SLD Software limits disable SLN formula Sets left negative limit SLP formula Sets right positive limit SLM mode Software limit mode Determines if software limits result in a fault or not 0 no fault 1 causes fault when soft limit history asserted Fault Handling When a limit...

Page 206: ... or selecting Help from the SMI software main menu The Motor View tool is used to monitor the status of the SmartMotor To see the status of the connected motor select Tools Motor View double click the desired motor Selecting a Motor After the Motor View window appears click Poll The status of the selected motor is updated in the window as shown in the following figure NOTE The Motor View window pr...

Page 207: ...u see limit errors and want to move the motor without wiring the limits or disabling them in the SmartMotor Playground you can issue terminal commands to disable the limits and reset the errors To do this issue the following commands in the Terminal window be sure to use all caps and don t enter the comments to the right For more details on using the Terminal window see Terminal Window on page 63 ...

Page 208: ...duction 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 Part 1 Programming System Status ...

Page 209: ...et which is available at http www animatics com tools Retrieving and Manipulating Status Words Bits The following commands are used in retrieving and manipulating status words and bits W word Gets the 16 bit status word B word bit Gets status bit word Word bit Bit Z word bit Clears status bit word Word bit Bit B Gets a status bit through direct addressing where is replaced with a lower case alpha ...

Page 210: ... limit Bp Real time positive hardware limit right limit Bl Historical negative hardware limit left limit Br Historical positive hardware limit right limit Motor Software Limits Directly Addressed Status Bits Bms Real time negative hardware limit left limit Bps Real time positive hardware limit right limit Bls Historical negative software limit CCW limit Brs Historical positive software limit CW li...

Page 211: ...nerator is still active with the previously calculated trajectory the ZS command may not clear the Be bit If you are unable to reset Be with the ZS command issue an OFF command before issuing the ZS command which clears the current commanded trajectory and allows the reset to complete For more details see Part 2 SmartMotor Command Reference on page 238 System Status Examples An example of where yo...

Page 212: ...0 Sets Timer Status bit 0 true for 1 second TMR 3 Gets the value of Timer 3 For more details see Part 2 SmartMotor Command Reference on page 238 Interrupt Status Bits Interrupt Status Bits are true if an interrupt is enabled It is important to note the interrupts need to be configured before being enabled for proper operation For details on configuring interrupts refer to Interrupt Programming on ...

Page 213: ...ased Likewise the user bits words are addressed starting at 0 zero based A powerful feature of user bits is their ability to be addressed over networks such as Combitronic or CANopen This feature allows a hosting application to cause a SmartMotor to run an interrupt routine For details see Interrupt Programming on page 192 The user bits can also be addressed as words with or without a mask to defi...

Page 214: ... use of the trajectory generators from an application program or over a network The following example exercises the trajectory status bits of Status Word 7 in a standard Class 5 SmartMotor EIGN W 0 ZS MFA 1000 Set up Gearing Profile MFR 2 Gearing profile for Trajectory Generator TG 2 O 0 Establish actual position to zero PT 0 Set target position to zero VT 1000 Set target velocity ADT 100 Set acce...

Page 215: ... The following example exercises each Cam User Bit during the programmed cam profile EIGN W 0 ZS CTA 7 0 0 Add table into RAM al 0 al 8 CTW 0 0 1 Add 1st point Cam User Bit 0 ON CTW 1000 4000 1 Add 2nd point Cam User Bit 0 ON CTW 3000 8000 2 Add 3rd point Cam User Bit 1 ON CTW 4000 12000 132 Add 4th Spline Mode Cam Bit 2 ON CTW 1000 16000 136 Add 5th Spline Mode Cam Bit 3 ON CTW 2000 20000 16 Add ...

Page 216: ...see this address http www animatics com products smartmotor animatics cnc software smnc html Motion Mode Status The Class 5 SmartMotor supports many different motion modes Keeping them straight can present a challenge The RMODE command provides a tool for reporting the motion mode RMODE RMODE arg Report Motion Mode The RMODE command will report the current active motion mode Insert an argument to ...

Page 217: ...ault 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 o...

Page 218: ... state of the I O pin On board I O in any standard Class 5 motor is in the first I O Status Word 0 The I O can be addressed through commands and it is zero based the first I O number is 0 zero There can be as many as 17 on board I O ports NOTE Individual motor specifications must be reviewed to determine the number and physical nature of the I O The physical nature of the I O will address the volt...

Page 219: ... RS 485 A Optical Encoder Momentary Switch Common I O Signals and Connections NOTE Class 5 D style SmartMotor I O is Sinking type NPN Class 5 D style AD1 Class 5 M style and Class 6 SmartMotor I O are Sourcing type PNP For additional connector pinout and cabling information refer to the SmartMotor Installation Startup Guide for your motor I O Voltage Spikes This section provides information on how...

Page 220: ...5V is OFF and 0V is ON This will prevent external equipment from being turned on immediately after power up and before the user program has a chance to take control Discrete Input and Output Commands This section describes the discrete input and output commands available for the SmartMotor NOTE For the 5V I O in the Class 5 motor s D Sub connector the value can be 0 6 for I Os 0 6 For the 24V I O ...

Page 221: ...the value is ever greater than zero then the I O fault status flag Controller Status Word 3 is set OF L word Returns the bit mask of latched faulted I O points Where word is the 16 bit word number a read of a 16 bit word will attempt to clear the I O words latch OF D word Returns an error code from the controller associated with this I O word For more details see Part 2 SmartMotor Command Referenc...

Page 222: ... 0 WHILE a 4 OS a 4 turn ON I O Ports 4 through 7 a a 1 LOOP a 1 OUT W 1 aw 0 set expansion I 0 to value in aw 0 OR W 1 a reset only I O 16 END EIGN W 0 remove default on board I O functions ab 10 W 16 read the status of on board I O via controllers status word ab 11 IN W 0 same as above so ab 10 ab 11 assuming I O states didn t change a 0 WHILE a 4 ab a IN a get first 4 I O states into ab 0 throu...

Page 223: ...ss 5 motor s D Sub connector the value can be 0 6 for I Os 0 6 For the 24V I O the value can be 16 25 for the ten I Os 16 25 24 Volt I O Analog Functions D Style AD1 Option Motors M Style Motors INA A IO Raw analog read 10 Bit res 0 38130 0 41 25 VDC INA V IO Scaled read 0 24000 where 15500 is 15 5 Volts INA V1 IO Scaled read 0 5100 where 550 is 0 55 Volts INA V2 IO Scaled read 0 610 where 60 is 0...

Page 224: ... chapter provides information on the special functions of I O ports for Class 5 and Class 6 motors Class 5 D Style Motors Special Functions of I O Ports 225 Class 5 M Style Motors Special Functions of I O Ports 227 Class 6 M Style Motors Special Functions of I O Ports 229 Part 1 Programming Special Functions of I O Ports ...

Page 225: ... mode default count mode I O Ports 2 and 3 Travel Limit Inputs Ports 2 and 3 are defaulted to travel limit inputs They can be changed to a general purpose I O points by using the EIGN commands and then returned to the travel limit function with the following commands EILN Set I O 3 as negative overtravel limit EILP Set I O 2 as positive overtravel limit I O Ports 4 and 5 Communications Ports 4 and...

Page 226: ...Encoder Index Capture Input The following commands are used to issue a G Go command and capture input from internal or external encoders EISM 6 Issues G when specified I O goes low EIRE Index registration input capture of the external encoder count default setting EIRI Index registration input capture of the internal motor encoder count The following table provides a matrix of the index capture fu...

Page 227: ...hey can also be used for step and direction mode Below are the supporting configuration commands MF0 Set encoder counter to zero put it in Quadrature Count mode MS0 Set encoder counter to zero put it in Step and Direction Count mode default count mode I O Ports 2 and 3 Travel Limit Inputs Ports 2 and 3 are defaulted to travel limit inputs They can be changed to general purpose I O points by using ...

Page 228: ...and Not supported External encoder Not supported EIRE command default at startup EIRI command a From the internal encoder b I O port 5 single ended 24 volts c Disables capture on indicated encoder For additional information on index capture see Index Capture Commands on page 128 For more details see Part 2 SmartMotor Command Reference on page 238 I O Port 6 Go Command The following command is used...

Page 229: ...er A B inputs or outputs They can also be used for step and direction mode Below are the supporting configuration commands MF0 Set encoder counter to zero put it in Quadrature Count mode MS0 Set encoder counter to zero put it in Step and Direction Count mode default count mode I O Ports 2 and 3 Travel Limit Inputs Ports 2 and 3 are defaulted to travel limit inputs They can be changed to general pu...

Page 230: ...en specified I O goes low I O Brake Output Commands The brake output function can be configured to any I O port including the expanded I O ports where IO is the bit number The following commands are used to configure the brake output EOBK IO Configure a given output to control an external brake EOBK 1 Remove the brake function from the I O port For more details see Part 2 SmartMotor Command Refere...

Page 231: ...ity that has been designed into the SmartMotor 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 1 Programming Tuning and PID Control ...

Page 232: ...o a shock absorber is added to dampen the vibrations which is the equivalent of what the Derivative parameter KD does For example when you sit on the fender of a car it dips down because of the additional weight based on the constant of the car s spring It gives you no indication if the shock absorbers are good or bad However if you jump up and down on the bumper you would quickly see if the shock...

Page 233: ...between the tuning parameters When tuning the motor it is useful to have the Motor View tool running which will monitor various bits of information that describe the motor s performance For details on the Motor View tool see Motor View on page 68 NOTE In most cases it is unnecessary to tune a SmartMotor They are factory tuned and stable in virtually any application The following are the tuner para...

Page 234: ...otor is not only stable but reasonably quiet The level of noise immunity in the KD term is controlled by KS velocity filter option for KD The derivative term KD requires estimating the derivative of the position error The simplest method is a backward difference KS 0 which is no velocity filtering and can result in excessive noise The choices of KS 1 2 and 3 provide increasing levels of noise immu...

Page 235: ... eliminate is gravity When power is off if motion would occur due to gravity a constant offset can be incorporated into the PID control to balance the system The KG gravitational offset provides this offset The value for KG can range from 16777216 to 16777215 To set KG use the RKG report KG command to view the current value and then make changes to KG Remember to use the F command to update the ne...

Page 236: ...down with the following values PID1 Set highest PID update rate 16 kHz PID2 Default Divide highest PID update rate by 2 8 kHz PID4 Divide highest PID update rate by 4 4 kHz PID8 Divide highest PID update rate by 8 2 kHz NOTE A reduction in the PID rate can result in an increase in the SmartMotor application program execution rate The trajectory and PID control calculations occur within the SmartMo...

Page 237: ... formula Set Current Limit 0 to 1023 The AMPS PWM limit command is used to set the current limit Use the AMPS command with a number variable or formula within the range of 0 to 1023 where the value 1023 corresponds to the maximum commanded torque to the motor Current is controlled by limiting the maximum PWM duty cycle which will reduce the maximum speed of the motor as well NOTE The AMPS command ...

Page 238: ...mmary list of information about the command It includes the following categories Application Description Execution Conditional To Limitations Read Report Write Language Access Units Range Of Values Typical values Default Value Firmware Version and Combitronic Support NOTE If an item does not apply to the particular command it is marked with N A l Detailed Description This section provides details ...

Page 239: ... pasted code will have line indents removed However the code will still work properly l All programs must include an END statement For details see END on page 431 l Related Commands This section lists commands that are functionally related to the current command NOTE A superscript R character preceding the command indicates there is a corresponding report version of that command Part 2 SmartMotor ...

Page 240: ...A DETAILED DESCRIPTION A single space character may be placed between a series of user commands in a single ASCII string as delimiter If it is sent from a PLC or PC the same space character can be used as a string terminating character NOTE When sending commands through the serial port from a PC PLC or other controller a space character can be used as both a delimiter and a string terminator It ca...

Page 241: ...a 3 aa 3 1 or Raa 3 or a aa 3 aaa 3 1 or Raaa 3 or a aaa 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The SmartMotor has three groups of predefined user variables l The first group consists of the variables a through z l The second group consists of the variables aa through zz l The third group consists of the variables aaa through zzz They are general p...

Page 242: ...e value 2 9 becomes 2 If you assign or perform an operation that normally results in a value outside this range the Bs bit indicates an overflow and the operation aborts before assigning the value to the left of the equal sign For modulo behavior the operation must be promoted to a float and use the modulo operator EXAMPLE c 123 Sets initial value of c to 123 Rc Reports 123 initial value of c RBs ...

Page 243: ...able and the right hand side contains 16 bit variables the 16 bit variables will be upgraded to 32 bits The sign is preserved when casting to a longer format For example in the equation cc ab 4 aw 7 both ab 4 and aw 7 are converted into 32 bit numbers before the subtraction occurs In the SmartMotor language all user variables are written as lowercase letters while functions and commands have at le...

Page 244: ...art 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 244 of 909 R al index formula Array Long index see page 272 R aw index formula Array Word index see page 288 Part 2 Commands aaa zzz ...

Page 245: ...LT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC ab 0 3 34 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The SmartMotor has 8 16 and 32 bit arrays The 8 bit array takes the form of the variables ab index These are general purpose 8 bit signed integer variables that can be reported used on either side of an equation and mixed in an expression with varia...

Page 246: ...rt and an error flag is set l If a ab 1 exceeds 32 signed bits the operation c a ab 1 will abort and an error flag is set l If a ab 1 exceeds 32 signed bits the operation c a ab 1 will abort and an error flag is set The system flag Bs is set Note that many different types of command errors will also set the Bs bit The RERRC command can be used to retrieve the last command error For a math overflow...

Page 247: ...ssuing the Z system reset command NOTE To understand the relationship between user assigned letter variables a z aa zz and aaa zzz and variable arrays ab al and aw see Array Variable Memory Map on page 858 The arrays and the letter variables do not overlap in the Class 5 motor RELATED COMMANDS R a z 32 Bit Variables see page 241 R aa zz 32 Bit Variables see page 241 R aaa zzz 32 Bit Variables see ...

Page 248: ...nteger value of the specified variable or number For example x ABS value sets the variable x to the absolute integer value of the variable or number specified in value The ABS command cannot have math arguments and cannot be a variable or value from another motor For example x ABS PA is allowed but x ABS PA 3 is not allowed There is a special case when using this function the input value of 214748...

Page 249: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 249 of 909 RELATED COMMANDS R FABS value Floating Point Absolute Value of see page 448 Part 2 Commands ABS value ...

Page 250: ...me commanded acceleration from trajectory generator 1 MV or MP modes only When a velocity or position profile move is commanded the velocity is ramped up and down according to the settings of ADT AT or DT At any instant the calculated acceleration or deceleration of the motion profile can be reported The sign positive or negative of this reported acceleration depends on the direction of travel and...

Page 251: ...us units of acceleration These equations force floating point calculations to avoid overflow and maintain resolution They can be placed in a user program or they can be precalculated if the values of SAMP and RES are known SAMP and RES can be reported from the terminal using the RSAMP and RRES commands respectively SAMP can change if the PID command is used The value of RES can differ between moto...

Page 252: ...artMotor Developer s Guide Rev L Page 252 of 909 RELATED COMMANDS R AT formula Acceleration Target see page 280 ADT formula Acceleration Deceleration Target see page 257 R DT formula Deceleration Target see page 390 Part 2 Commands AC ...

Page 253: ...in the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The result of this function is a floating point type If used in an equation the operations in the equation that are processed after this function are automatically promoted to a float This is dependent on the mathematical order ...

Page 254: ...t ACOS 5 af 1 0 4332 af 0 ACOS af 1 Variables may be put in the parenthesis Raf 0 Output in degrees END Program output is 60 000000000 60 000000000 64 329193115 RELATED COMMANDS R ASIN value Arcsine see page 278 R ATAN value Arctangent see page 282 R COS value Cosine see page 366 R SIN value Sine see page 700 R TAN value Tangent see page 736 Part 2 Commands ACOS value ...

Page 255: ...rent motors to differentiate between motors and provide individual runtime controls For example ADDR 5 sets the motor s address to 5 ADDR is a read write function so it can also be used to access the address of the current SmartMotor For example to read the motor address use the following ADDR command var ADDR where var is any variable Then you can use the PRINT var command to print the motor s se...

Page 256: ... 1 assigns motor 1 s ADDR with the value from the right side of the equation For example b 2 a a 3 a 4 where assuming the motor processing the command is motor 1 1 Motor 1 parses the text b 2 a a 3 a 4 2 Motor 1 retrieves variable a from motors 3 and 4 3 Motor 1 completes the right side of the equation including in this case its own variable a 4 Motor 1 sends result of the right side of the equati...

Page 257: ...RSION 5 x and later COMBITRONIC ADT 3 1234 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The ADT command sets the AT and DT parameters of the motion profile Those values are individually accessible with the AT AT DT and AT commands ADT is provided as a convenience when those values do not need to be different from each other See the respective commands for ...

Page 258: ...stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS R AT formula Acceleration Target see page 280 R DT formula Deceleration Target see page 390 R EL formula Error Limit see page 419 G Start Motion GO see page 45...

Page 259: ...ntax it does use Combitronic communication to pass information between other motors The ADTS value determines the synchronized path acceleration deceleration that will be used by subsequent position or velocity moves to calculate the required trajectory Changing ADTS during a move will not alter the current trajectory unless a new G command is issued Acceleration is pre scaled by 65536 and may ran...

Page 260: ... supplemental synchronized relative target GS Start synchronized motion TSWAIT Wait for synchronized motions to complete RELATED COMMANDS PID Proportional Integral Differential Filter Rate see page 623 PRTS Position Relative Target Synchronized see page 654 PRTSS Position Relative Target Synchronized Supplemental see page 656 PTS Position Target Synchronized see page 660 PTSS Position Target Synch...

Page 261: ...ariable a Use of full range is not recommended because precision of the number is lost At this extreme range precision is worse than a whole number b Entering and reporting values through user commands is limited to the range 2147483648 0 to 2147483647 0 DETAILED DESCRIPTION The floating point array variables meet IEEE 754 specifications Therefore they are true floating point variables the locatio...

Page 262: ...o 2147483647 before the decimal point When assigning a floating point variable to an integer the integer cannot accept a value outside of the range 2147483648 to 2147483647 This will result in a command error Code 23 Math Overflow and the integer will remain at its previous value A floating point number can be assigned to an integer but it will round toward 0 For example the value 1 9 becomes 1 th...

Page 263: ... Bit Variables see page 241 R ab index formula Array Byte index see page 245 R al index formula Array Long index see page 272 R aw index formula Array Word index see page 288 R DFS value Dump Float Single see page 387 R LFS value Load Float Single see page 516 VLD variable number Variable Load see page 780 VST variable number Variable Save see page 784 Part 2 Commands af index formula ...

Page 264: ...t 0 or 1 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC Ai 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The Ai value command arms the index register for capturing the rising edge of the encoder To capture the falling edge see Aj arg on page 268 NOTE The rising and falling edges are stored to different index registers The value parameter s...

Page 265: ...I 0 Report rising edge OFF END SUB 1 Increment a every 1 second C1 IF B 4 0 0 Check Timer 0 status a a 1 Updating a every second TMR 0 1000 Set Timer 0 counting ENDIF RETURN RELATED COMMANDS Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 R Bi enc Bit Index Capture Rising see page 3...

Page 266: ...LT VALUE Input 0 or 1 FIRMWARE VERSION 5 x and later COMBITRONIC Aij 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The Aij arg command arms the index registers for capturing the rising edge and then the falling edge of the encoder To first capture the falling edge and then the rising edge see Aji arg on page 270 NOTE The rising and falling edges are sto...

Page 267: ...iting for falling edge LOOP Loop back RJ 0 Report falling edge OFF END RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 R Bi enc Bit Index Capture Rising see page 304 R Bj enc Bit Index Capture Falling see page 307 EIRE Enable Index Register External Input Capture see page 412 EIRI Ena...

Page 268: ... Input 0 or 1 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC Aj 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The Aj arg command arms the index register for capturing the falling edge of the encoder To capture the falling edge see Ai arg on page 264 NOTE The rising and falling edges are stored to different index registers The argument spec...

Page 269: ... RJ 0 Report falling edge OFF END SUB 1 Increment a every 1 second C1 IF B 4 0 0 Check Timer 0 status a a 1 Updating a every second TMR 0 1000 Set Timer 0 counting ENDIF RETURN RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 R Bj enc Bit Index Capture Falling see pag...

Page 270: ...AULT VALUE Input 0 or 1 FIRMWARE VERSION 5 x and later COMBITRONIC Aji 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The Aji arg command arms the index registers for capturing the falling edge and then the rising edge of the encoder To first capture the rising edge and then falling edge see Aij arg on page 266 NOTE The rising and falling edges are store...

Page 271: ...waiting for rising edge LOOP Loop back RI 0 Report rising edge OFF END RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 R Bi enc Bit Index Capture Rising see page 304 R Bj enc Bit Index Capture Falling see page 307 EIRE Enable Index Register External Input Capture see page 412 EIRI Ena...

Page 272: ... DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC al 0 3 1234 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The SmartMotor has 8 16 and 32 bit arrays The 32 bit array takes the form of the variables al index These are general purpose 32 bit signed integer variables that can be reported used on either side of an equation and can be mixed in an expr...

Page 273: ...ned bits the operation c al 1 a aborts and an error flag is set l If a al 1 exceeds 32 signed bits the operation c a al 1 aborts and an error flag is set l If a al 1 exceeds 32 signed bits the operation c a al 1 aborts and an error flag is set The system flag Bs is set Note that many different types of command errors will also set the Bs bit The RERRC command can be used to retrieve the last comma...

Page 274: ...m whether it is auto execution or not by power cycling the SmartMotor or issuing the Z system reset command NOTE To understand the relationship between user assigned letter variables a z aa zz and aaa zzz and variable arrays ab al and aw see Array Variable Memory Map on page 858 The arrays and the letter variables do not overlap in the Class 5 motor RELATED COMMANDS R a z 32 Bit Variables see page...

Page 275: ... maximum PWM permitted RANGE OF VALUES 0 to 1023 TYPICAL VALUES 0 to 1023 DEFAULT VALUE 1023 FIRMWARE VERSION 5 x and later COMBITRONIC AMPS 3 100 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The AMPS command limits both the continuous torque and speed of the SmartMotor To set the SmartMotor to use maximum available PWM issue the command AMPS 1023 Setting ...

Page 276: ...anded torque of the motor without limitation by AMPS EXAMPLE Routine homes motor against a hard stop MDS Using Sine mode commutation KP 3200 Increase stiffness from default KD 10200 Increase damping from default F Activate new tuning parameters AMPS 100 Lower current limit to 10 VT 10000 Set maximum velocity ADT 100 Set maximum accel decel MV Set Velocity mode G Start motion WHILE EA 100 Loop whil...

Page 277: ...t 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 277 of 909 RELATED COMMANDS MT Mode Torque see page 589 R T formula Torque Open Loop Commanded see page 730 Part 2 Commands AMPS formula ...

Page 278: ...the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The result of this function is a floating point type If used in an equation the operations in the equation that are processed after this function are automatically promoted to a float This is dependent on the mathematical order of ...

Page 279: ... ASIN 5 af 1 0 4332 af 0 ASIN af 1 Variables may be put in the parenthesis Raf 0 Output in degrees END Program output is 30 000000000 30 000000000 25 670810699 RELATED COMMANDS R ACOS value Arccosine see page 253 R ATAN value Arctangent see page 282 R COS value Cosine see page 366 R SIN value Sine see page 700 R TAN value Tangent see page 736 Part 2 Commands ASIN value ...

Page 280: ...current trajectory unless a new G command is issued Acceleration is pre scaled by 65536 and may range from 2 to 2147483647 A value of 0 is not valid Due to internal calculations odd values for this command are rounded up to an even value If the value for DT has not been set since powering up the motor the value of AT will be automatically applied to DT However this should be avoided Instead always...

Page 281: ... AT 100 Set buffered acceleration VT 750 Set buffered velocity MV Set buffered velocity mode G Start motion RELATED COMMANDS ADT formula Acceleration Deceleration Target see page 257 ADTS formula Acceleration Deceleration Target Synchronized see page 259 ATS formula Acceleration Target Synchronized see page 286 R DT formula Deceleration Target see page 390 DTS formula Deceleration Target Synchroni...

Page 282: ...hin the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The result of this function is a floating point type If used in an equation the operations in the equation that are processed after this function are automatically promoted to a float This is dependent on the mathematical order...

Page 283: ... 5 Report ATAN 50 5 af 1 0 4332 af 0 ATAN af 1 Variables may be put in the parenthesis Raf 0 Output in degrees END Program output is 88 865577697 88 865577697 23 422260284 RELATED COMMANDS R ACOS value Arccosine see page 253 R ASIN value Arcsine see page 278 R COS value Cosine see page 366 R SIN value Sine see page 700 R TAN value Tangent see page 736 Part 2 Commands ATAN value ...

Page 284: ...8 000000000 to 2147483647 000000000 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The ATOF command is used to read an ASCII string containing a number in the format 123456789 123456789 The string is stored in the ab index array The argument in the ATOF index function is the index of ab where the string begins The parsing ends when a character other than a di...

Page 285: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 285 of 909 RELATED COMMANDS R HEX index Decimal Value of a Hex String see page 469 Part 2 Commands ATOF index ...

Page 286: ...S value determines the acceleration that will be used by subsequent position or velocity moves to calculate the required trajectory Changing ATS during a move will not alter the current trajectory unless a new G command is issued Acceleration is pre scaled by 65536 and may range from 2 to 2147483647 A value of 0 is not valid Due to internal calculations odd values for this command are rounded up t...

Page 287: ...ation target VTS 100000000 Set synchronized target velocity PTS 500 1 1000 2 10000 3 Set synchronized target position on motor 1 2 and 3 GS Initiate synchronized move TSWAIT Wait until synchronized move ends END Required END RELATED COMMANDS ADTS formula Acceleration Deceleration Target Synchronized see page 259 DTS formula Deceleration Target Synchronized see page 392 PID Proportional Integral Di...

Page 288: ...ULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC aw 0 3 1234 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The SmartMotor has 8 16 and 32 bit arrays The 16 bit array takes the form of the variables aw index These are general purpose 16 bit signed integer variables that can be reported used on either side of an equation and can be mixed in an expressio...

Page 289: ... restrictions l If aw 1 a exceeds 32 signed bits the operation c aw 1 a will abort and an error flag is set l If a aw 1 exceeds 32 signed bits the operation c a aw 1 will abort and an error flag is set l If a aw 1 exceeds 32 signed bits the operation c a aw 1 will abort and an error flag is set The system flag Bs is set Note that many different types of command errors will also set the Bs bit The ...

Page 290: ...m whether it is auto execution or not by power cycling the SmartMotor or issuing the Z system reset command NOTE To understand the relationship between user assigned letter variables a z aa zz and aaa zzz and variable arrays ab al and aw see Array Variable Memory Map on page 858 The arrays and the letter variables do not overlap in the Class 5 motor RELATED COMMANDS R a z 32 Bit Variables see page...

Page 291: ...GE OF VALUES Input word argument range 0 17 bit argument range 0 15 Output 0 or 1 TYPICAL VALUES N A DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC RB 2 4 3 x B 2 4 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The B command reads the status from the specified status word and bit number B word bit where word is the word number and bit is the...

Page 292: ...a Be etc where available IF B 0 0 1 Read Status Word 0 bit 0 for Drive Enable fault This section looks at low voltage and drive enable input state which can prevent drive ready state regardless of any faults Z 6 13 WAIT 10 Clear drive voltage low flag to check true state IF B 6 13 1 Not a fault but will prevent drive ready PRINT Bus voltage is too low 13 ENDIF IF FW 2 24 6 For Class 6 motors IF IN...

Page 293: ...re limit fault PRINT Historical Positive H W limit 13 ENDIF IF Bl 1 Look for historical negative hardware limit fault PRINT Historical Negative H W limit 13 ENDIF IF B 1 10 1 B 1 11 1 Software limits enabled with mode to cause faults IF Brs 1 Look for historical positive software limit fault PRINT Historical Positive S W limit 13 ENDIF IF Bls 1 Look for historical negative software limit fault PRI...

Page 294: ...B 6 7 1 Look for drive enable fault PRINT Drive Enable Fault 13 ENDIF IF B 6 12 1 Look for absolute encoder battery fault NOTE This will print even if configured to not fault motor PRINT ABS Battery Fault 13 ENDIF ELSE The drive is ready for motion PRINT Drive is ready 13 ENDIF RELATED COMMANDS R W word Report Specified Status Word see page 793 Part 2 Commands B word bit ...

Page 295: ...he setpoint is reached the system flag Ba is to 1 For a Class 5 D style motor When an overcurrent condition is detected the SmartMotor will turn off the amplifier for several servo samples to reduce the peak load and then turn on the amplifier to complete the commanded motion During the off state if the position error exceeds the allowable following error EL the servo will indicate a following err...

Page 296: ...r the application For details on motor sizing see the Moog Animatics Product Catalog EXAMPLE Subcomponent of system check routine IF Ba If Peak overcurrent is detected PRINT OVERCURRENT Inform host Za Clear overcurrent state latch ENDIF EXAMPLE Subroutine finds and prints errors C10 Subroutine label IF Be Check for position error PRINT Position Error 13 ENDIF IF Bh Check for overtemp error PRINT O...

Page 297: ...IC N A DETAILED DESCRIPTION The BAUD command sets the speed or baud rate of the specified serial channel To do this use BAUD channel formula where channel is 0 or 1 for channel 0 or channel 1 respectively and formula is the desired baud rate 2400 4800 9600 19200 38400 57600 or 115200 NOTE BAUD 1 and RBAUD 1 are not available on M style motors Additionally the baud rate of the primary communication...

Page 298: ...an nel N A Class 6 IE COM0 RS 485 8 pin cir cular BAUDrate BAUD channel baud RBAUD chan nel N A COM1 N A N A N A N A N A Class 6 SL17 COM0 RS 232 15 pin BAUDrate BAUD channel baud RBAUD chan nel N A COM1 N A N A N A N A N A 1 See the corresponding motor installation guide for I O and channel details 2 For details see BAUD channel formula on page 297 3 Not the same as Class 5 M style or Class 6 IE ...

Page 299: ...bit indicates the detection of a position error At each PID sample the magnitude of the measured position error is compared to the user specified following error EL value If this value is exceeded the servo will be immediately turned off The Be bit is reset by any of the following methods l Power reset l Z command total reset of software l Z 0 6 command l ZS command l Ze command NOTE In cases wher...

Page 300: ...ed EL maximum allowable position error If position errors are continuously received check for loss of drive power increased load or locked load EXAMPLE Subroutine finds and prints errors C10 Subroutine label IF Be Check for position error PRINT Position Error 13 ENDIF IF Bh Check for overtemp error PRINT Overtemp Error 13 ENDIF IF Ba Check for overcurrent error PRINT Overcurrent Error 13 ENDIF RET...

Page 301: ...average temperature exceeds 85 degrees Celsius Under continuous heavy loads all motors will generate heat If the heat sink or ventilation method is inadequate eventually the motor will overheat If this situation repeatedly occurs it may mean that the motor does not have enough power for the assigned task inadequate motor size or excessive resistance friction to motion is occurring Therefore check ...

Page 302: ...ault 85 PRINT 13 Motor Temperature TEMP PRINT 13 START MOTION ADT 222 Set accel decel VT 44444 MV Set velocity mode G Start motion TH TEMP 5 Force an overheat condition units are degrees Celsius TH maximum setting is 85 a CLK WHILE Bh 0 LOOP Loop while Bh is 0 WHILE Bt LOOP b CLK PRINT 13 Servo OFF after b a milliseconds EXAMPLE Subroutine finds and prints errors C10 Subroutine label IF Be Check f...

Page 303: ...1 R TEMP TEMP arg Temperature Motor see page 738 R TH formula Temperature High Limit see page 740 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 Zh Reset Temperature Fault see page 812 ZS Global Reset System State Flag see page 818 Part 2 Commands Bh ...

Page 304: ...AULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The Bi enc flag is set to 1 when the associated encoder Z pulse index mark is detected The value of the associated encoder capture is valid and can be read using the I enc command Before a capture can occur arming is required using the Ai enc Aij enc or Aji enc command After a capture has occurred the value stored in ...

Page 305: ...d ZS G Start slow motion profile Ai 0 Clear and arm index capture WHILE Bm 0 Travel until negative limit reached IF Bi 0 1 PT I 0 Save this target Ai 0 Clear and arm index capture i 1 Set flag to indicate index was found ENDIF LOOP X Decelerate to a stop IF i 0 Index not seen must have started close to limit VT 4000 Set low buffered maximum velocity Ai 0 Clear and arm index capture ZS G WHILE Bi 0...

Page 306: ...6 Set port 6 as input port EIRI Set port 6 to register internal encoder Set F command flags VT 100000 Set Velocity ADT 100 Set accel decel MV Set to Velocity Mode Ai 0 Arm registration G Start moving WHILE Bi 0 0 Travel until index reached LOOP X Decelerate to a stop RI 0 Report registered position END RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Fa...

Page 307: ...FAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The Bj enc flag is set to 1 when the associated encoder Z pulse index mark is detected The value of the associated encoder capture is valid and can be read using the J enc command Before a capture can occur arming is required using the Aj enc Aij enc or Aji enc command After a capture has occurred the value stored in...

Page 308: ... Bj 0 1 PT J 0 Save this target Aj 0 Clear and arm index capture i 1 Set flag to indicate index was found ENDIF LOOP X Decelerate to a stop IF i 0 Index not seen must have started close to limit VT 4000 Set low buffered maximum velocity Aj 0 Clear and arm index capture ZS G WHILE Bj 0 0 Travel positive until index reached LOOP PT J 0 Go back to index ENDIF MP ZS G Start motion TWAIT Wait till end ...

Page 309: ...MANDS Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 R B word bit Status Byte see page 291 R Bx enc Bit Index Input Real Time see page 346 EIRE Enable Index Register External Input Capture see page 412 EIRI Enable Index Register Internal Input Capture see page 414 R J enc Index Fal...

Page 310: ...n detected If Bk is 1 the user program and or program header has been corrupted You should not run the program in the SmartMotor This can occur if communications was lost or corrupted during a download of a program Bk is reset to zero by a power reset or Z command and a valid pass checksum is detected through RCKS RCKS scans the entire program including the header and returns two 6 bit checksums f...

Page 311: ...addition the motion will stop and the motor will either servo in place or turn off the amplifier depending on the value of the FSA function The historical left negative limit flag Bl provides a latched limit value in case the limit was already reached or exceeded but is not currently active The real time left negative limit flag is Bm It remains at 1 only while there is an active signal level on u...

Page 312: ...Hardware Limit Real Time see page 315 R Bp Bit Right Hardware Limit Real Time see page 320 R Br Bit Right Hardware Limit Historical see page 324 EIGN Enable as Input for General Use see page 405 EILN Enable Input as Limit Negative see page 408 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 Zl Reset Historical Lef...

Page 313: ...imit flag Bls provides a latched value in case the software limit was already reached or exceeded but is not currently active The software limits are an indication that the motor s actual position has exceeded the set range If the software left limit is found to be active during any servo sample Bls is set to 1 and remains 1 until you reset it In addition the motion will stop and the motor will ei...

Page 314: ...R Bms Bit Left Software Limit Real Time see page 317 R Bps Bit Right Software Limit Real Time see page 322 R Brs Bit Right Software Limit Historical see page 336 FSA cause action Fault Stop Action see page 450 SLD Software Limits Disable see page 702 SLE Software Limits Enable see page 704 R SLM mode Software Limit Mode see page 710 R SLN formula Software Limit Negative see page 712 R W word Repor...

Page 315: ...ot assigned as a limit switch 1 Left negative limit switch active DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Bm indicates if the left negative pin is currently active When Bm is set to 1 the historical left limit flag Bl is set to 1 The left negative software travel limit may be disabled by being assigned as a general purpose input using the EIGN 3 command ...

Page 316: ...it Right Hardware Limit Real Time see page 320 R Br Bit Right Hardware Limit Historical see page 324 EIGN Enable as Input for General Use see page 405 EILN Enable Input as Limit Negative see page 408 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS Global Reset System State Flag see page 818 Part 2 Commands Bm ...

Page 317: ...Software left negative limit switch active DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Bms indicates if the left negative software limit is currently active The software limits are an indication that the motor s actual position has exceeded the set range When Bms is set to 1 the historical left limit flag Bls is set to 1 The left negative software limit posi...

Page 318: ...Software Limit Historical see page 336 FSA cause action Fault Stop Action see page 450 SLD Software Limits Disable see page 702 SLE Software Limits Enable see page 704 R SLM mode Software Limit Mode see page 710 R SLN formula Software Limit Negative see page 712 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS G...

Page 319: ...er COMBITRONIC N A DETAILED DESCRIPTION The Bo bit represents the SmartMotor drive stage state When Bo is 0 the drive stage is on when Bo is 1 the drive stage is off Bo is set to 1 for any of the following conditions l The motor has been powered on but no command has activated the drive stage l The Z command is used to reset the motor l The OFF command is issued or triggered by a motor fault EXAMP...

Page 320: ...ssigned as a limit switch 1 Right positive limit switch is active DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Bp indicates if the right positive pin is active When Bp is set to 1 the historical right limit flag Br is set to 1 The right positive software travel limit may be disabled by being assigned as a general purpose input using the EIGN 2 command or as a...

Page 321: ...it Left Hardware Limit Real Time see page 315 R Br Bit Right Hardware Limit Historical see page 324 EIGN Enable as Input for General Use see page 405 EILP Enable Input as Limit Positive see page 410 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS Global Reset System State Flag see page 818 Part 2 Commands Bp ...

Page 322: ...t positive limit switch is active DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Bps indicates if the right positive software limit is currently active The software limits are an indication that the motor s actual position has exceeded the set range When Bps is set to 1 the historical right limit flag Brs is set to one The right positive software limit position...

Page 323: ...Software Limit Historical see page 336 FSA cause action Fault Stop Action see page 450 SLD Software Limits Disable see page 702 SLE Software Limits Enable see page 704 R SLM mode Software Limit Mode see page 710 R SLP formula Software Limit Positive see page 714 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS G...

Page 324: ...vo sample Br is set to 1 and it remains at 1 until you reset it In addition depending on the value of the F function the motion will stop and the motor will either servo or turn the amplifier OFF The historical right positive limit flag Br provides a latched limit value in case the limit was already reached or exceeded but is not currently active The real time right positive limit flag is Bp it re...

Page 325: ... RELATED COMMANDS R B word bit Status Byte see page 291 R Bl Bit Left Hardware Limit Historical see page 311 R Bm Bit Left Hardware Limit Real Time see page 315 R Bp Bit Right Hardware Limit Real Time see page 320 EIGN Enable as Input for General Use see page 405 EILP Enable Input as Limit Positive see page 410 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z wor...

Page 326: ... x and later COMBITRONIC N A DETAILED DESCRIPTION BREAK is used by the WHILE LOOP and SWITCH ENDS flow control blocks loops In both structures if BREAK is encountered the program jumps out of that particular WHILE loop or SWITCH structure If the control blocks are nested BREAK only exits the WHILE loop or SWITCH structure that it is currently in The most common use of BREAK is to end each CASE of ...

Page 327: ...mmand it is only valid from within a user program If you want to be able to break out of a control block by remote terminal commands you will need to use GOTO or GOSUB with appropriate statement labels The following example illustrates this concept EXAMPLE a 1 WHILE a PRINT I am still here 13 WAIT 12000 IF a 100 BREAK a 100 could be sent through serial command ENDIF LOOP GOTO20 C10 PRINT EXITED wi...

Page 328: ... brake and overheat When the SmartMotor powers up or comes out of a soft reset the brake control is set to BRKSRV by default to automatically enforce this safety rule The SmartMotor may be purchased with optional internal zero backlash brakes which are used to hold a load for safety purposes They are fail safe magnetic clutch disk brakes The default power on state is to disengage the brake when th...

Page 329: ...it for zero velocity LOOP before BRKENG applying the brake shaft locked RELATED COMMANDS BRKRLS Brake Release see page 330 BRKSRV Brake Servo Engage When Not Servoing see page 332 BRKTRJ Brake Trajectory Engage When No Active Trajectory see page 334 EOBK IO Enable Output Brake Control see page 437 Part 2 Commands BRKENG ...

Page 330: ...se the motor could drive against the brake and overheat When the SmartMotor powers up or comes out of a soft reset the brake control is set to BRKSRV by default to automatically enforce this safety rule The SmartMotor may be purchased with optional internal zero backlash brakes which are used to hold a load for safety purposes They are fail safe magnetic clutch disk brakes The default power on sta...

Page 331: ...fered accel decel MP Set buffered mode PT PA Set Target position to current position G Begin servo at current position BRKRLS Release disengage brake RELATED COMMANDS BRKENG Brake Engage see page 328 BRKSRV Brake Servo Engage When Not Servoing see page 332 BRKTRJ Brake Trajectory Engage When No Active Trajectory see page 334 EOBK IO Enable Output Brake Control see page 437 Part 2 Commands BRKRLS ...

Page 332: ...It is important to turn the servo off when the brake is engaged Otherwise the motor could drive against the brake and overheat When the SmartMotor powers up or comes out of a soft reset the brake control is set to BRKSRV by default to automatically enforce this safety rule The SmartMotor may be purchased with optional internal zero backlash brakes which are used to hold a load for safety purposes ...

Page 333: ...ADT 100 Set buffered accel decel VT 100000 Set buffered maximum velocity PT 1000 Set target G Servo on brake release go to target RELATED COMMANDS BRKENG Brake Engage see page 328 BRKRLS Brake Release see page 330 BRKTRJ Brake Trajectory Engage When No Active Trajectory see page 334 EOBK IO Enable Output Brake Control see page 437 Part 2 Commands BRKSRV ...

Page 334: ... to actuate or release BRKTRJ automatically coordinates movement and brake application When a trajectory is started by a G command the brake is released When the trajectory completes the brake is engaged and the servo is simultaneously turned off In this mode and whenever the motor is not performing a trajectory the brake is automatically engaged and the servo is turned off for any reason that cle...

Page 335: ...IT 1000 Brake on for one second PT 0 Set new buffered target position G Servo on brake off trajectory WAIT 1000 GOTO1 Effective loop forever NOTE A position error will terminate the trajectory in progress state In this case the brake would then be asserted When in BRKTRJ mode the brake will click on at the beginning of each move and click off at the end of each move The clicking sound is normal an...

Page 336: ...g Brs provides a latched value in case the software limit was already reached or exceeded but is not currently active The software limits are an indication that the motor s actual position has exceeded the set range If the software right limit is found to be active during any servo sample Brs is set to 1 and remains 1 until you reset it In addition the motion will stop and the motor will either se...

Page 337: ...1 R Bls Bit Left Software Limit Historical see page 313 R Bms Bit Left Software Limit Real Time see page 317 R Bps Bit Right Software Limit Real Time see page 322 FSA cause action Fault Stop Action see page 450 SLD Software Limits Disable see page 702 SLE Software Limits Enable see page 704 R SLM mode Software Limit Mode see page 710 R SLP formula Software Limit Positive see page 714 R W word Repo...

Page 338: ...er COMBITRONIC N A DETAILED DESCRIPTION If a syntax error is encountered in either a serial command or user program the Bs flag is set to 1 This flag only indicates that a syntax error was encountered The most common syntax errors are misspellings of commands but the improper use of variables is also flagged For example trying to access the array element aw 20000 will produce a syntax error The co...

Page 339: ...matics SmartMotor Developer s Guide Rev L Page 339 of 909 IF Bs PRINT Syntax Error 13 ENDIF RELATED COMMANDS Z word bit Reset Specified Status Bit see page 808 ZS Global Reset System State Flag see page 818 Part 2 Commands Bs ...

Page 340: ...quested the final target position the Bt flag is reset to zero At this point the PID positioning control takes over the motion this means the motor shaft may still be moving due to mechanical settling Mode Torque MT will set the Bt bit to 1 only when the torque slope TS is active When the torque reaches a constant value the Bt will be 0 Mode Velocity MV will maintain the Bt bit to 1 regardless of ...

Page 341: ...XAMPLE Routine changes speed on digital input EIGN W 0 Disable hardware limit IO KD 10010 Changing KD value in tuning F Accept new KD value O 0 Reset origin ADT 100 Set maximum accel decel VT 10000 Set maximum velocity PT 40000 Set final position MP Set Position mode G Start motion WHILE Bt Loop while motion continues IF IN 0 0 If input is low IF VT 10000 Check VT so change happens once VT 12000 S...

Page 342: ...COMBITRONIC N A DETAILED DESCRIPTION Bv reports the status of the velocity limit fault It returns a 1 if the velocity limit was reached or a 0 if not It is reported by the RBv command The equivalent reporting PRINT command is PRINT Bv 13 When this bit is indicated the motor has exceeded the speed set in the VL command The motor will stop according to the fault action This bit must be cleared to re...

Page 343: ...it Status Byte see page 291 R VL formula Velocity Limit see page 778 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS Global Reset System State Flag see page 818 Zv Reset Velocity Limit Fault see page 821 Part 2 Commands Bv ...

Page 344: ...position mode move DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION If Bw is 1 it indicates that the encoder position has exceeded or wrapped beyond the maximum value for the 32 bit position register Specifically the position has gone outside of the range 2147483648 to 2147483647 This does not mean that the SmartMotor has lost its position information it is still...

Page 345: ... PRINT Wraparound Occurred Zw Reset flag ENDIF RELATED COMMANDS R B word bit Status Byte see page 291 R W word Report Specified Status Word see page 793 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS Global Reset System State Flag see page 818 Zw Reset Encoder Wrap Status Flag see page 822 Part 2 Commands Bw ...

Page 346: ...OF VALUES 0 or 1 TYPICAL VALUES 0 Index capture input is not in contact low 1 Index capture input is in contact high DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Bx enc indicates the real time state of the index input level The Bx bit is set to 1 only while the motor is sitting on the index marker Note that the index marker is only one encoder count wide Ther...

Page 347: ... distance just beyond one shaft turn Ai 0 Clear and arm index capture O 0 Force change to position register G Start fast move TWAIT Wait till end of trajectory PT I 0 Go back to index G Start motion TWAIT Wait until end of trajectory O 0 Set origin at index IF Bx 0 PRINT On Index Pulse 13 ENDIF RELATED COMMANDS R Bi enc Bit Index Capture Rising see page 304 R I enc Index Rising Edge Position see p...

Page 348: ... at label C37 You can also use labels to simply enhance program clarity Statement labels may be placed anywhere within a program except in the middle of an expression NOTE Program labels work by using a jump table in the header of the compiled program The header contains the location of every label from 0 up to the highest label value used EXAMPLE consider these two programs C0 END and C999 END Bo...

Page 349: ... host issues GOTO2 the motor runs routine 2 You can use a similar technique to allow the host to control where the program starts Using GOTOnnn to jump to a location within a SWITCH block may be syntactically valid However it can yield unexpected runtime program execution when a CASE number is encountered RELATED COMMANDS GOSUB label Subroutine Call see page 463 GOTO label Branch Program Flow to a...

Page 350: ...IPTION The CADDR command is used to set and read the CAN address of the motor The CAN address can be different from the serial address The PROFIBUS firmware will also use this to set read the PROFIBUS address The SmartMotor supports different protocols over the optional CAN port CANopen and DeviceNet are popular industrial networks that use CAN If a master is communicating to a group of SmartMotor...

Page 351: ...ned by a master RCADDR reports the address that the motor was assigned i e 1 2 3 etc To set the CAN address to the serial address on all motors use the following CADDR command SerialMotorNumber CADDR address For example 3CADDR 10 sets serial motor 3 s CAN address to 10 0CADDR ADDR would globally set every serial motor s CAN address to its serial address NOTE SmartMotor commands like 0CADDR or 0ADD...

Page 352: ...t assume an error is indicated simply because a value greater than 0 is reported Several of the bits are for information only and do not indicate an error If an error condition exists then status word 2 bit 4 will indicate so A user program or a manual report using RCAN provides further detail about the error condition after the CAN error status bit is indicated in status word 2 bit 4 The SmartMot...

Page 353: ...be one of the following 1000000 800000 500000 250000 125000 50000 or 20000 Specific features are based on the fieldbus network being used See the corresponding SmartMotor fieldbus guide for more details EXAMPLE C1 Subroutine C1 IF CAN 16 Test CAN word at value 16 position 5 PRINT USER TRIED COMBITRONIC READ FROM BROADCAST ADDRESS 13 ENDIF RETURN RELATED COMMANDS R CADDR formula CAN Address see pag...

Page 354: ...mand is used to control CAN network features Commands execute based on the function argument to control CAN functions For example l function 1 Reset the CAN MAC and all errors Resets the CANopen stack PROFIBUS stack or DeviceNet stack depending on firmware type Value is ignored l function 5 Set timeout for Combitronic Value is in milliseconds the default is 30 Specific features are based on the fi...

Page 355: ...tion time the program interpreter evaluates the SWITCH formula value and then tests the CASE numbers for an equal value in the programmed order l If the SWITCH formula value does equal the CASE number then program execution continues with the command immediately after l If the SWITCH formula value does not equal the CASE number then the next CASE statement is evaluated l If the SWITCH formula valu...

Page 356: ...R 23 13 BREAK ENDS The first line SWITCH v lets the SmartMotor know that it is checking the value of the variable v Each following CASE begins the section of code that tells the SmartMotor what to do if v is equal to that case EXAMPLE a 3 Assign a value WHILE a 4 PRINT 13 a a SWITCH a Test the value CASE 3 PRINT MAX VALUE 13 BREAK CASE 1 Negative test values are valid CASE 2 Note no BREAK here CAS...

Page 357: ...TIVE a 1 NEGATIVE a 0 ZERO a 1 NO MATCH VALUE a 2 NO MATCH VALUE a 3 MAX VALUE RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 DEFAULT Default Case for SWITCH Structure see page 382 ENDS End SWITCH Structure see page 435 SWITCH formula Switch Program Flow Control see page 727 Part 2 Commands CASE formula ...

Page 358: ...TAILED DESCRIPTION The CBAUD command is used to get read and set the CAN baud rate as follows l CBAUD Get CAN baud rate l CBAUD Set CAN baud rate The SmartMotor supports different protocols over the optional CAN port CANopen and DeviceNet are popular industrial networks that use CAN If a master is communicating to a group of SmartMotors as slaves under either of these standard protocols the Combit...

Page 359: ... PROFIBUS where the baud rate is auto detected EXAMPLE EIGN W 0 Make all onboard I O inputs ZS Clear errors CBAUD 1000000 Set CAN network baud rate to 1 000 000 bps END RELATED COMMANDS R CADDR formula CAN Address see page 350 R CAN CAN arg CAN Bus Status see page 352 CANCTL function value CAN Control see page 354 Part 2 Commands CBAUD formula ...

Page 360: ...he communications mode and channel is the COM port to close This command flushes the serial port buffer any characters in the buffer will be lost For a D style motor the channel 0 COM port can only be RS 232 or RS 485 while channel 1 can only be RS 485 For an M style motor only the channel 0 COM port can be opened It is only RS 485 The following are valid CCHN commands CCHN RS2 0 Close the channel...

Page 361: ...read only function CHN holds binary code historical error information for serial channels 0 or 1 on the SmartMotor which are specified as follows l CHN 0 Channel 0 communications error flag l CHN 1 Channel 1 communications error flag The command gives the 5 bit status of either serial port channels 0 or 1 broken down as follows l Bit 0 1 Receive buffer has overflowed on the specified channel l Bit...

Page 362: ...NEL parity error occurred ELSEIF CHN 0 1 PRINT HOST CHANNEL buffer overflow ENDIF EXAMPLE test all flags IF CHN 0 0 PRINT SERIAL ERROR ENDIF RELATED COMMANDS CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 OCHN Open Channel see page 601 ZS Global Reset System State Flag see page 818 Part 2 Commands CHN channel ...

Page 363: ...ariable DETAILED DESCRIPTION CLK is an independent free running read write counter It is reset to zero on a hardware or software reset and it counts once per millisecond The user may assign a value to this counter at any time The size of CLK is 32 bits signed At the value 2147483647 it will roll over to the value 2147483648 and continue counting up The time required to start from 0 and reach the r...

Page 364: ...he DMX protocol The following table provides details on the possible action settings their corresponding functions and allowed value settings function value Comm protocol Description 1 1 to 512 DMX Set base DMX slot channel default is 1 at power up 2 1 to 102 DMX Set number of DMX slots channels to accept default is 1 at power up 3 1 to 512 DMX Sync on DMX slot channel default is 512 at power up U...

Page 365: ... of 3 bytes IF b 513 n PRINT b too large 13 END ENDIF Limit b based on max data slot IF s 102 n PRINT s too large 13 END ENDIF Limit s to max array value q b n 1 Last data channel used will be trigger when data received COMCTL 1 b Set base DMX channel to value from CADDR COMCTL 2 n Accept 1 DMX channel of data COMCTL 3 q Status word 12 bit 2 will be set to 1 when channel q arrives COMCTL 4 s Set s...

Page 366: ...t cosine af 1 COS arg where arg is in degrees and may be an integer i e a aw 0 or floating point variable i e af 0 Integer or floating point constants may also be used i e 23 or 23 7 respectively This command cannot have within the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The...

Page 367: ... details see Variables and Math on page 195 EXAMPLE af 0 COS 57 3 Set array variable COS 57 3 Raf 0 Report value of af 0 variable RCOS 57 3 Report COS 57 3 af 1 42 3 42 3 degrees af 0 COS af 1 Variables may be put in the parenthesis Raf 0 END Program output is 0 540240287 0 540240287 0 739631056 RELATED COMMANDS R ACOS value Arccosine see page 253 R ASIN value Arcsine see page 278 R ATAN value Arc...

Page 368: ...nter used by the Cam table When running in Cam mode the trajectory interpolates between the points entered in the Cam table These segments in between are numbered starting from 0 For example segment 0 has point 0 at the low end of the segment and point 1 at the high end Point 1 Segment 1 Point 0 Segment 0 Slave Position Master Counts Note that CP reports the segment and not the master input value ...

Page 369: ...DIV 1 Denominator MC Mode Cam G Go WHILE CP 3 LOOP While we are below cam point 3 loop OS 4 After cam point 3 is passed turn on output 4 END RELATED COMMANDS CTA points seglen location Cam Table Attribute see page 370 CTE table Cam Table Erase see page 372 R CTT Cam Table Total in EEPROM see page 376 CTW pos seglen user Cam Table Write Data Points see page 377 MC Mode Cam Electronic Camming see pa...

Page 370: ...50 seglen 0 65535 location 0 1 DEFAULT VALUE See details Parameter 3 location is optional if omitted then location 1 is used FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION This command adds a Cam table to memory with the supplied parameters The table can use either EEPROM memory default or the data variable space After this table has been added the CTW command will write data ...

Page 371: ...am table C40 CTE 1 Erase all EEPROM tables CTA 15 8000 CTW 0 CP 0 cam pointer or cam index pointer CTW 500 CP 1 CTW 4000 CP 2 CTW 20000 CTW 45000 CTW 50000 CTW 60000 CTW 65000 CTW 55000 0 1 Turn on Bit 0 Status Word 8 CTW 46000 Will turn off at this point CTW 45000 0 2 Turn on Bit 1 Status Word 8 CTW 8000 Will turn off at this point CTW 4000 CTW 500 CTW 0 CP 14 RETURN RELATED COMMANDS R CP Cam Poi...

Page 372: ... VALUES Input table 1 10 TYPICAL VALUES 1 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION CTE is used to erase the Cam tables To erase all EEPROM tables choose CTE 1 By choosing a number higher than 1 lower table numbers can be preserved If for example there were three tables stored CTE 2 would erase tables 2 and 3 but not table 1 NOTE The feature that allows ...

Page 373: ...ord 8 CTW 46000 Will turn off at this point CTW 45000 0 2 Turn on Bit 1 Status Word 8 CTW 8000 Will turn off at this point CTW 4000 CTW 500 CTW 0 CP 14 RETURN RELATED COMMANDS R CP Cam Pointer for Cam Table see page 368 CTA points seglen location Cam Table Attribute see page 370 R CTT Cam Table Total in EEPROM see page 376 CTW pos seglen user Cam Table Write Data Points see page 377 MC Mode Cam El...

Page 374: ... The CTR enc command allows access to the internal or external encoders l The CTR 0 command will always access the internal encoder l The CTR 1 command will always access the external encoder If the ENC0 or ENC1 commands are used the CTR commands will still access the encoders as described above Note that the O or OSH commands will affect the encoder selected by the ENC0 internal encoder or ENC1 e...

Page 375: ...e Loop on Internal Encoder see page 425 ENC1 Encoder Zero Close Loop on External Encoder see page 426 MC Mode Cam Electronic Camming see page 524 MF0 Mode Follow Zero External Counter see page 548 MFR Mode Follow Ratio see page 570 MS0 Mode Step Zero External Counter see page 585 MSR Mode Step Ratio see page 587 O formula O trj formula Origin see page 597 OSH formula OSH trj formula Origin Shift s...

Page 376: ...CRIPTION The CTT command reports the number of Cam tables stored in EEPROM The table in RAM memory is not included in that number EXAMPLE C1 Cam check subroutine IF CTT 0 If no cam tables have been created GOSUB2 Go to cam creation subroutine ENDIF RETURN C2 Cam creation subroutine code here RETURN RELATED COMMANDS R CP Cam Pointer for Cam Table see page 368 CTA points seglen location Cam Table At...

Page 377: ...rs are optional if omitted then segment length must have been defined in CTA command user bits assume 0 if omitted FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The CTW command writes to the table addressed by the most recent CTA command CTW writes to either the tables stored in the EEPROM or the user array NOTE Typically the actual Cam table would not be part of the program ...

Page 378: ...re is no special override of Spline mode when set to 1 the segment between the previous point and this point are forced into linear interpolation Bit 7 has no effect when MCE has chosen linear mode When loading Cam tables it is important to note the table capacity As mentioned previously l When a Cam table is stored in user array memory al 0 al 50 52 points can be stored as fixed length segments 3...

Page 379: ... see page 368 CTA points seglen location Cam Table Attribute see page 370 CTE table Cam Table Erase see page 372 R CTT Cam Table Total in EEPROM see page 376 MC Mode Cam Electronic Camming see page 524 MCE arg Mode Cam Enable see page 528 MCW table point Mode Cam Where Start Point see page 532 Part 2 Commands CTW pos seglen user ...

Page 380: ... 65536 This measured value is used in dE dt limiting which can be set through the DEL command DEL Derivative Error Limit provides the safest and quickest method to fault a motor on sudden changes in load or detection of human interference The purpose of this limit is to act as a look ahead on following error Instead of just triggering on a raw following error based on how far behind the motor may ...

Page 381: ...all onboard I O inputs ZS Clear errors MV Mode Velocity VT 500000 Velocity target ADT 50 Accel Decel target G Go WHILE DEA 32768 Bt LOOP PRINT Possible collision 13 END RELATED COMMANDS R DEL formula Derivative Error Limit see page 384 DELM arg Derivative Error Limit Mode see page 386 Part 2 Commands DEA ...

Page 382: ...AL VALUES N A DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION DEFAULT allows controlled code execution in a SWITCH structure for results that are not evaluated by CASE There can only be one DEFAULT statement per SWITCH control block DEFAULT is not a valid terminal command It is only valid within a user program In the following example DEFAULT is used when no C...

Page 383: ...ne of the CASEs match the value of x EXAMPLE a 20 WHILE a SWITCH a 12 CASE 4 PRINT 4 BREAK CASE 3 PRINT 3 BREAK CASE 2 PRINT 2 BREAK CASE 1 PRINT 1 BREAK CASE 0 BREAK CASE 1 PRINT 1 BREAK CASE 2 PRINT 2 BREAK CASE 3 PRINT 3 BREAK CASE 4 PRINT 4 BREAK DEFAULT PRINT D ENDS a a 1 LOOP Program output is D D D D 4 3 2 1 1 2 3 4 D D D D D D D RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page...

Page 384: ...he motor will perform the fault reaction The absolute value of the actual value is used so that both positive and negative values of dE dt will be compared against the DEL setting Also the DELM command can modify the functionality to behave differently depending on direction of dE dt relative to motor direction DEL Derivative Error Limit provides the safest and quickest method to fault a motor on ...

Page 385: ...nded speed If dE dt equals commanded velocity then the motor just hit a hard stop Normally the motor would have to continue applying torque until the normal following error is exceeded However if DEL dE dt limit is set to target velocity VT then as soon as contact is made with a hard stop the controller will immediately fault without any wind up RELATED COMMANDS R DEA Derivative Error Actual see p...

Page 386: ...e of DEA is compared to DEL when determining if the dE dt limit has been exceeded This means that a disturbance to the motor in either direction can potentially lead to a fault if the disturbance is large enough This behavior can be changed by setting DELM 1 When that value is issued the DEL limit is only reactive to disturbances that block the commanded direction of motion i e something that atte...

Page 387: ...754 format This allows export of floating point values to external systems This format may be needed for interchange The 32 bit value output by this function is not the integer rounded off from the input It is an encoded number that includes the exponent of the floating point value The output of this function does not have any usefulness within the SmartMotor programming language EXAMPLE af 0 a b ...

Page 388: ...le DETAILED DESCRIPTION The DITR Disable Interrupts command is used to disable interrupts as follows l DITR interrupt Where the interrupt is used to specify an interrupt 0 7 For an interrupt to work it must be enabled at two levels first enable individual interrupts with the EITR command using the interrupt number from 0 to 7 in the parentheses second enable all interrupts with the ITRE command Si...

Page 389: ...et target position G Start motion TWAIT Wait for move to complete EITR 0 Re enable interrupt TMR 0 1000 Restart timer ENDIF GOTO10 Go back to label RELATED COMMANDS EISM 6 E Configure Input as Sync Master see page 416 EITR int Enable Interrupts see page 417 ITR Int StatusWord Bit BitState Label Interrupt Setup see page 486 ITRD Interrupt Disable Global see page 489 ITRE Enable Interrupts Global se...

Page 390: ...rajectory unless a new G or X command is issued Acceleration is pre scaled by 65536 and may range from 2 to 2147483647 A value of 0 is not valid Due to internal calculations odd values for this command are rounded up to an even value If the value for DT has not been set since powering up the motor the value of AT will be automatically applied to DT However this should be avoided Instead always use...

Page 391: ...DT 100 Set buffered deceleration VT 750 Set buffered velocity MV Set buffered velocity mode G Start motion RELATED COMMANDS ADT formula Acceleration Deceleration Target see page 257 ADTS formula Acceleration Deceleration Target Synchronized see page 259 R AT formula Acceleration Target see page 280 ATS formula Acceleration Target Synchronized see page 286 DTS formula Deceleration Target Synchroniz...

Page 392: ...mines the deceleration that will be used by subsequent position or velocity moves to calculate the required trajectory Changing DTS during a move will not alter the current trajectory unless a new G command is issued Acceleration is pre scaled by 65536 and may range from 2 to 2147483647 A value of 0 is not valid Due to internal calculations odd values for this command are rounded up to an even val...

Page 393: ...ation target VTS 100000000 Set synchronized target velocity PTS 500 1 1000 2 10000 3 Set synchronized target position on motor 1 2 and 3 GS Initiate synchronized move TSWAIT Wait until synchronized move ends END Required END RELATED COMMANDS ATS formula Acceleration Target Synchronized see page 286 ADTS formula Acceleration Deceleration Target Synchronized see page 259 PID Proportional Integral Di...

Page 394: ...or address use the actual address or a variable DETAILED DESCRIPTION The EA command provides the current position error in real time Position error is the difference in encoder counts between the desired trajectory position and the measured position If the absolute value of EA exceeds the user value EL the fault reaction is performed and Be Position Error status bits will be set to 1 within that P...

Page 395: ...0000 Set maximum velocity ADT 100 Set maximum accel decel MV Set Velocity mode G Start motion WHILE EA 100 Loop while position error is small LOOP Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore ...

Page 396: ...CHO command causes the SmartMotor to retransmit or echo out all serial bytes on the transmit line that were received on the receive line of COM port 0 This retransmission occurs when the SmartMotor reads these bytes from the buffer regardless of whether these bytes are command or individual data bytes ECHO_OFF terminates the echo capability ECHO is required to pass serial bytes though a motor to t...

Page 397: ...e PRINT 130 ECHO 13 2ECHO WAIT 10 PRINT 130 SLEEP 13 2SLEEP WAIT 10 PRINT 128 SADDR3 13 0SADDR3 WAIT 10 PRINT 131 ECHO 13 3ECHO WAIT 10 PRINT 128 WAKE 13 0WAKE WAIT 10 RELATED COMMANDS ECHO1 Echo Incoming Data on Communications Port 1 see page 399 ECHO_OFF Turn Off Echo on Communications Port 0 see page 400 ECHO_OFF1 Turn Off Echo on Communications Port 1 see page 402 Part 2 Commands ECHO ...

Page 398: ...ansmission occurs when the SmartMotor reads these bytes from the buffer regardless of whether these bytes are command or individual data bytes ECHO_OFF0 terminates the echo capability NOTE It is not recommended to use ECHO when the communications channel is an RS 485 port such as an M style motor or a D style motor with the RS485 ISO adapter This mode of communication is half duplex and is not com...

Page 399: ... were received on the receive line of COM port 1 This retransmission occurs when the SmartMotor reads these bytes from the buffer regardless of whether these bytes are command or individual data bytes ECHO_OFF1 terminates the echo capability NOTE It is not recommended to use ECHO when the communications channel is an RS 485 port such as an M style motor or a D style motor with the RS485 ISO adapte...

Page 400: ... the SmartMotor channel 0 COM port to stop echoing This is the default power up state of any SmartMotor No incoming channel 0 characters are retransmitted In order to automatically detect and differentiate between multiple motors on a serial daisy chain cable the ECHO state can be alternately turned on and off to ensure the motors are properly addressed NOTE It is not possible to maintain communic...

Page 401: ...IC N A DETAILED DESCRIPTION The ECHO_OFF0 command causes the SmartMotor channel 0 serial port to stop echoing No incoming channel 0 characters are retransmitted EXAMPLE Shows use of ECHO_OFF0 and OCHN EIGN W 0 Make all onboard I O inputs ZS Clear errors OCHN RS4 0 N 9600 1 8 C Open communications channel 0 ECHO_OFF0 Turn echo off for communications channel 0 END RELATED COMMANDS ECHO Echo Incoming...

Page 402: ... ECHO_OFF1 non echo FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The ECHO_OFF1 command causes the SmartMotor channel 1 serial port to stop echoing No incoming channel 1 characters are retransmitted EXAMPLE Shows use of ECHO_OFF1 and OCHN EIGN W 0 Make all onboard I O inputs ZS Clear errors OCHN RS4 1 N 9600 1 8 C Open aux communications channel ECHO_OFF1 Turn echo off for au...

Page 403: ...ncoming master counts so motion may result In other words ECS adds the specified value to the incoming master counts as if they actually had an instantaneous change in value NOTE When issued ECS is dynamic and immediate It is not buffered No G command is required For example if the external encoder count is 4000 and ECS 1234 is issued the count would immediately shift to 5234 It is instantaneously...

Page 404: ...s triggered ENDIF LOOP RETURN END RELATED COMMANDS R CTR enc Counter Encoder Step and Direction see page 374 MFCTP arg1 arg2 Mode Follow Control Traverse Point see page 553 MFH distance m s Mode Follow High Ascend Descend Rate see page 560 R MFHTP formula Mode Follow High Traverse Point see page 562 MFL distance m s Mode Follow Low Ascend Descend Rate see page 564 R MFLTP formula Mode Follow Low T...

Page 405: ... the actual address or a variable DETAILED DESCRIPTION The EIGN command is used to configure I O pins for general use input as follows l EIGN IO Sets the specified I O port to or back to an input with no function attached In other words to remove the travel limit function from I O port 2 execute the instruction EIGN 2 See the following table for allowed range of IO l EIGN W word Sets all I O in th...

Page 406: ... general use input EIGN W 0 Assigns all local I O in word 1 as general use inputs and disables the travel limits EIGN W 0 12 Assigns inputs 2 and 3 as general use inputs at once disabling overtravel limits EIGN W 0 m Assign a masked word sized set of local I O as general use inputs at once EXAMPLE assign inputs 2 and 3 as general use inputs at once disable overtravel limits x 12 y 0 EIGN W y x EIG...

Page 407: ...motion C10 Place a label GOTO10 Loop required for interrupt operation END End never reached C20 Interrupt subroutine code here RETURNI Return from interrupt subroutine RELATED COMMANDS EILN Enable Input as Limit Negative see page 408 EILP Enable Input as Limit Positive see page 410 EISM 6 E Configure Input as Sync Master see page 416 EOBK IO Enable Output Brake Control see page 437 R IN Specified ...

Page 408: ...e analog or digital input output or act as the negative limit input which is the default state EILN explicitly defines I O port 3 as the negative limit while the EIGN command configures it as a general purpose input which disables the limit behavior NOTE I O port 3 cannot be set as an output until the EIGN command is issued first i e the OR OS or OUT command will not change I O 3 until EIGN is iss...

Page 409: ...ral Use see page 405 EILP Enable Input as Limit Positive see page 410 EIRE Enable Index Register External Input Capture see page 412 EIRI Enable Index Register Internal Input Capture see page 414 EISM 6 E Configure Input as Sync Master see page 416 EOBK IO Enable Output Brake Control see page 437 OR value Output Reset see page 607 OS Output Set see page 609 OUT formula Output Activate Deactivate s...

Page 410: ...se analog or digital input output or act as the positive limit input which is the default state EILP explicitly defines I O port 2 as the positive limit while the EIGN command configures it as a general purpose input which disables the limit behavior NOTE I O port 2 cannot be set as an output until the EIGN command is issued first i e the OR OS or OUT command will not change I O 2 until EIGN is is...

Page 411: ...ral Use see page 405 EILN Enable Input as Limit Negative see page 408 EIRE Enable Index Register External Input Capture see page 412 EIRI Enable Index Register Internal Input Capture see page 414 EISM 6 E Configure Input as Sync Master see page 416 EOBK IO Enable Output Brake Control see page 437 OR value Output Reset see page 607 OS Output Set see page 609 OUT formula Output Activate Deactivate s...

Page 412: ...r defaults to EIRE external input captures the external encoder FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The predefined external probe input is assigned to capture the external encoder s position This is also known as index capture registration or touch probes The predefined input is as follows l Class 5 D style motors use I O logical input 6 pin 7 on the DA 15 connector...

Page 413: ...1 RJ 1 SmartMotor SmartMotor Internal Enc Capture I O Logic Input 5 I O Logic Input 4 External Enc Capture Internal Index Internal Index NOTE EIRE is the default setting NOTE EIRE is the default setting Encoder Capture Diagrams for EIRE EXAMPLE EIGN W 0 Make all onboard I O inputs ZS Clear errors EIRE Use external IO to capture external encoder position END RELATED COMMANDS Ai arg Arm Index Rising...

Page 414: ...r defaults to EIRE external input captures the external encoder FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The predefined external probe input is assigned to capture the internal encoder s position This is also known as index capture registration or touch probes The predefined input is as follows l Class 5 D style motors use I O logical input 6 pin 7 on the DA 15 connector...

Page 415: ...1 RJ 1 SmartMotor SmartMotor Internal Enc Capture I O Logic Input 5 I O Logic Input 4 External Enc Capture Internal Index Internal Index NOTE EIRE is the default setting NOTE EIRE is the default setting Encoder Capture Diagrams for EIRI EXAMPLE EIGN W 0 Make all onboard I O inputs ZS Clear errors EIRI Use external IO to capture internal encoder position END RELATED COMMANDS Ai arg Arm Index Rising...

Page 416: ...ION The EISM x command configures the specified input as the start motion input EISM 6 which is currently the only input supported issues a G command when input 6 is asserted l For D style motors the input must be driven low l For M style motors the input must be driven high Refer to Connecting the System in your motor s user guide for the location of pin I O 6 on your motor EXAMPLE EIGN W 0 Make ...

Page 417: ... a variable DETAILED DESCRIPTION The EITR Enable Interrupts command is used to enable interrupts as follows l EITR interrupt Where interrupt is used to specify an interrupt For an interrupt to work it must be enabled at two levels first enable individual interrupts with the EITR command using the interrupt number from 0 to 7 in the parentheses second enable all interrupts with the ITRE command Sim...

Page 418: ...s use of DITR EITR TMR and TWAIT C10 Place a label IF PA 47000 Just before 12 moves DITR 0 Disable interrupt TWAIT Wait till reaches 48000 p 0 Reset variable p PT p Set target position G Start motion TWAIT Wait for move to complete EITR 0 Re enable interrupt TMR 0 1000 Restart timer ENDIF GOTO10 Go back to label RELATED COMMANDS DITR int Disable Interrupts see page 388 EISM 6 E Configure Input as ...

Page 419: ...tory position PC at any instant in time and the actual position PA The SmartMotor uses the position error to generate a torque by means of the PID filter The greater the error or deflection the more torque the motor applies in attempt to correct it CAUTION An EL setting that is greater than the expected move distance may result in drive saturation and severely limit the life of the SmartMotor EL i...

Page 420: ...v L Page 420 of 909 RELATED COMMANDS R EA Error Actual see page 394 G Start Motion GO see page 456 MP Mode Position see page 582 MV Mode Velocity see page 593 R PA Position Actual see page 615 R PC PC axis Position Commanded see page 619 Part 2 Commands EL formula ...

Page 421: ...mple an IF formula can be used when you want the SmartMotor to do one thing if the variable g 43 and another if it does not equal that value EXAMPLE IF g 43 PRINT Gee 43 13 ELSE PRINT No 43 for me 13 ENDIF The first line checks to see if g is equal to 43 If so the string Gee 43 is sent out the primary serial port The ELSE in line 3 tells the SmartMotor what to do otherwise An IF control block can ...

Page 422: ...2 or 3 will GOSUB5 be executed GOSUB2 ELSEIF a 2 GOSUB3 ELSEIF a 3 GOSUB4 ELSE GOSUB5 ENDIF C2 Some subroutine code here C3 Some subroutine code here C4 Some subroutine code here C5 Some subroutine code here RELATED COMMANDS ELSEIF formula IF Structure Command Flow Element see page 423 ENDIF End IF Statement see page 433 IF formula Conditional Program Code Execution see page 475 Part 2 Commands EL...

Page 423: ...n you want the SmartMotor to do one thing if the variable g 43 another if g 43000 and another if g 2 For more detail about valid formulas that can be used see IF formula on page 475 EXAMPLE IF g 43 PRINT Gee 43 13 ELSEIF g 43000 PRINT 43 grand for me 13 ELSEIF g 2 PRINT 2 13 ENDIF The first line checks to see if g is equal to 43 If so the string Gee 43 is sent out the primary serial port and the I...

Page 424: ...that clause will be executed The ELSEIF statement is similar to the CASE number in a SWITCH control block Note the difference ELSEIF handles formulas but CASE only handles a fixed number ELSEIF is not a valid terminal command It is only valid within a user program EXAMPLE a 3 Will be found false IF a 2 PRINT 222 ELSEIF a 3 Will be found true PRINT 333 so 333 will be printed ENDIF EXAMPLE IF a 1 On...

Page 425: ...ddress or a variable DETAILED DESCRIPTION The SmartMotor can accept inputs from either the internal integrated encoder or an external source ENC0 causes the SmartMotor to read its position from the internal encoder ENC1 uses the secondary external encoder When ENC0 is active PA position actual will track the internal encoder For more details see PA on page 615 EXAMPLE ENC1 Servo from external enco...

Page 426: ...uts and physically connected to the shaft the motor will run away with full speed and torque The SmartMotor can accept position information from either the internal integrated encoder or an external source The ENC1 command will cause the SmartMotor to servo from the secondary external encoder channel instead of the internal encoder When ENC1 is active PA Position Actual will track the external enc...

Page 427: ...XAMPLE MSO Set external encoder to step direction zero external encoder ENC1 Servo from external encoder ENC0 Restore default encoder behavior RELATED COMMANDS R CTR enc Counter Encoder Step and Direction see page 374 ENC0 Encoder Zero Close Loop on Internal Encoder see page 425 ENCD in_out Set Encoder Bus Port as Input or Output see page 430 MS0 Mode Step Zero External Counter see page 585 MF0 Mo...

Page 428: ...ICAL VALUES N A DEFAULT VALUE N A FIRMWARE VERSION 5 97 4 8 5 98 4 8 or later COMBITRONIC N A DETAILED DESCRIPTION The ENCCTL function value command is used to set special configuration options for the encoder It has two input parameters l function specifies the configuration setting for the encoder l value where applicable specifies the value to apply to the selected action This command requires ...

Page 429: ...nvolatile memory Motor firmware will adjust absolute position with offset on every power up 5 N A ABS Reset error flags 6 0 1 2 ABS Report encoder firmware version to the terminal value 0 Report lowest byte minor rev value 1 Report mid byte major rev value 2 Report high byte firmware type Requires the absolute encoder option for the M style motor EXAMPLE EIGN W 0 Make all onboard I O inputs ZS Cle...

Page 430: ... slave or master respectively in an electronic line shaft configuration NOTE The D style motor does not support this command and will return an error Using the Encoder Bus port along with Moog Animatics encoder bus cables and ENCD commands you can create a daisy chained series of M style motors In this configuration l One motor will have ENCD 1 issued this will be the master l All other motors wil...

Page 431: ...ons channels or from within the user program Each program must have a minimum of at least one END statement NOTE The SMI program will not compile a source file without at least one END present END only terminates the user program and internally resets the program pointer to the beginning of the program no other state variable mode or trajectory is affected User program interrupts will stop functio...

Page 432: ...MV Set Velocity mode G Start motion WHILE EA 100 Loop while position error is small LOOP Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS ...

Page 433: ...esponding ENDIF block exit statement Regardless of the execution path through the control block at run time the program statement following ENDIF is the common exit point branched to after processing the IF ENDIF control block NOTE There can only be one ENDIF statement for each IF statement every IF structure must be terminated with an ENDIF statement The common exit point following ENDIF is branc...

Page 434: ...E a 1 PRINT FALSE is always executed IF a 2 PRINT TRUE ELSE PRINT FALSE ENDIF RELATED COMMANDS ELSE IF Structure Command Flow Element see page 421 ELSEIF formula IF Structure Command Flow Element see page 423 IF formula Conditional Program Code Execution see page 475 Part 2 Commands ENDIF ...

Page 435: ... ENDS block exit statement Regardless of the execution path through the control block at run time any program statement immediately following ENDS is the common exit point branched to when processing the SWITCH ENDS control block NOTE There can only be one ENDS statement for each SWITCH statement The common exit point following ENDS is branched to when l Encountering a BREAK l Encountering ENDS l ...

Page 436: ...Page 436 of 909 RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 CASE formula Case Label for SWITCH Block see page 355 DEFAULT Default Case for SWITCH Structure see page 382 SWITCH formula Switch Program Flow Control see page 727 Part 2 Commands ENDS ...

Page 437: ...TYPICAL VALUES See below for range of IO depends on motor series DEFAULT VALUE Class 5 motors default to disabled EOBK 1 For Class 6 motors the default is EOBK 8 FIRMWARE VERSION 5 x and later COMBITRONIC EOBK 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION If an external brake is used instead of the optional internal brake the EOBK IO command allows auto...

Page 438: ...k the motor shaft bCommanded to allow the motor to rotate cRequires firmware 5 x 3 60 or newer for M style motor EXAMPLE EIGN W 0 Make all onboard I O inputs ZS Clear errors EOBK 22 Set output 22 to brake control RELATED COMMANDS BRKENG Brake Engage see page 328 BRKRLS Brake Release see page 330 BRKSRV Brake Servo Engage When Not Servoing see page 332 BRKTRJ Brake Trajectory Engage When No Active ...

Page 439: ...D DESCRIPTION The EOIDX command is used to output the encoder s index to the output specified by the number parameter where number l 1 to disable this is the default state on power up or l a valid logical I O number is specified based on the motor style l For Class 5 D Style number 6 to use logical I O 6 pin 7 on DA 15 15 pin connector l For Class 5 M Style number 7 to use logical I O 7 pin 6 on c...

Page 440: ...eval read VLD variable number function and data storage write VST variable number function EPTR auto increments by 1 2 or 4 with each read or write access to the physical EEPROM device according to the current data type EXAMPLE EPTR 4000 Set EPTR 4000 VST hh 1 Store a 32 bit value EPTR is now 4004 VST ab 7 1 Store an 8 bit value EPTR is now 4005 VST aw 7 1 Store a 16 bit value EPTR is now 4007 VST...

Page 441: ...ror has occurred Refer to the following table Code Description Notes 0 NO_ERROR 1 BAD_LENGTH A command is too long or contains too many parameters if a variable list of parameters is allowed 2 BAD_ARGUMENT One or more of the values given to a command was out of range so the command was aborted 3 BAD_PACKET Command was not recognized Check the command name and syntax 4 BAD_OPERATION General error c...

Page 442: ...T Attempt to access an I O point that does not exist 26 NO_CROSS_AXIS_SUPPORT Attempt to use Combitronic on a command that does not support it 27 BAD_MOTOR_STATE Reserved no longer used 28 BAD_CROSS_AXIS_ID Reserved no longer used 29 BAD_COMBITRONIC_FCODE The remote Combitronic does not support the command called pos sibly due to older firmware or different motor series 30 BAD_COMBITRONIC_SFCODE T...

Page 443: ...ncapsulation such as CANopen object 2500h The command error bit status word 2 bit 14 will be indicated when a new error has occurred The ERRW command can be used to determine the source of the error Refer to the following table Code Description Notes 0 CMD_COMM0 Communications port 0 RS 232 for D style RS 485 for M style 1 CMD_COMM1 Communications port 1 RS 485 for D style only 2 CMD_PROG From use...

Page 444: ...and later COMBITRONIC N A DETAILED DESCRIPTION The ETH command is used to gather specific error or status information relating to the industrial Ethernet IE bus interface l Assign the result to a program variable x ETH arg l As a report RETH arg Specific features are based on the fieldbus network being used See the corresponding SmartMotor fieldbus guide for more details EXAMPLE x ETH 0 Get the Et...

Page 445: ...ed to control the industrial Ethernet IE network features Commands execute based on the action argument which controls Ethernet functions After issuing an ETHCTL command the Ethernet error codes will be checked to determine the state of Object 2304h sub index 3 bit 6 Ethernet error Specific features are based on the fieldbus network being used See the corresponding SmartMotor fieldbus guide for mo...

Page 446: ...ers Once requested these parameters take effect only when the F command is issued This allows several parameters to be changed simultaneously without intermediate tuning states causing disruptions Tuning parameters can be changed during a move profile although caution is urged CAUTION Use caution when changing the servo tuning parameters during a move profile Different motor sizes have different o...

Page 447: ...ptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS R KA formula Constant Acceleration Feed Forward see page 495 R KD formula Constant Derivative Coefficient see page 497 R KG formula Constant Gravitational...

Page 448: ...oint absolute value af 1 FABS arg where arg may be an integer e g a or aw 0 or floating point variable e g af 0 Integer or floating point constants may also be used e g 23 or 23 7 respectively This command cannot have within the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The re...

Page 449: ...9 of 909 EXAMPLE af 0 FABS 5 545 Set array variable FABS 5 545 PRINT af 0 13 Print value of array variable af 0 RFABS 5 545 Report FABS 5 545 END Program output is 5 545000076 5 545000076 RELATED COMMANDS R ABS value Absolute Value of see page 248 Part 2 Commands FABS value ...

Page 450: ...SA 0 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION FSA cause action is used to specify the fault type and fault mode FSA 0 0 is the default configuration which sets the fault action of all types of faults to result in Mode Torque Brake MTB FSA cause action sets the fault stop action as follows cause specifies the type of fault that will trigger the acti...

Page 451: ...o will turn off FSA 0 2 All Faults servo will decelerate to stop with X command FSA 1 0 Hardware Travel Limit Faults servo will dynamically brake to stop FSA 1 1 Hardware Travel Limit Faults servo will turn off FSA 1 2 Hardware Travel Limit Faults servo will decelerate to stop with X command RELATED COMMANDS MTB Mode Torque Brake see page 591 X Decelerate to Stop see page 804 Part 2 Commands FSA c...

Page 452: ...a or aw 0 or floating point variable e g af 0 Integer or floating point constants may also be used e g 23 or 23 7 respectively This command cannot have within the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allowed The result of this function is a floating point type If used in an equat...

Page 453: ...RT 4 RFSQRT 4 af 1 FSQRT 6 5 Set array variable af 1 FSQRT 6 5 RFSQRT 6 5 af 2 FSQRT 8 5 Set array variable af 2 FSQRT 8 5 RFSQRT 8 5 af 3 FSQRT a Set array variable af 3 FSQRT a RFSQRT a PRINT af 0 af 1 af 2 af 3 13 Print variable values END Program output is 2 000000000 2 549509763 2 915475845 3 000000000 2 000000000 2 549509763 2 915475845 3 000000000 RELATED COMMANDS R SQRT value Integer Squar...

Page 454: ...tegrity of a system For instance a program can check the firmware version and refuse to operate a machine if an improper firmware version has been loaded CAUTION If a machine has been tested and certified using a particular firmware version then older or newer firmware may produce unexpected results The encoding of this 32 bit number follows the format of firmware numbering but compresses this val...

Page 455: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 455 of 909 Program output is 83886892 83886892 RELATED COMMANDS R SP2 Bootloader Revision see page 717 Part 2 Commands FW ...

Page 456: ...r address use the actual address or a variable DETAILED DESCRIPTION The G Go command is used to start motion or update buffered values such as speed or acceleration The G command is required in each of the following cases l Initiate an Absolute Move in Mode Position MP VT 10000 ADT 100 PT 1234 MP G l Initiate a Relative Move in Mode Position MP VT 10000 ADT 100 PRT 4000 MP G l Initiate a Velocity ...

Page 457: ... the following may be the cause l EL 0 or too small l ADT 0 or 1 l VT 0 or so small that motion is not visible l Target position equals current position l PRT 0 l Bh 1 the motor is hotter than max permitted temperature TH l AMPS 0 or too small l T 0 or too small l Motor is in Torque mode l Limit input switch s asserted l External encoder signal not present or not changing in Follow modes l Motor i...

Page 458: ... Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS ADT formula Acceleration Deceleration Target see page 257 R AT formula Acceleration Targ...

Page 459: ...ssible to read an empty receive buffer Alternatively the value returned from GETCHR can be checked to see if it is 1 However do not use an ab register to store the value in this case because the value 1 will be aliased with the character 255 Instead use an aw or al register Normally the SmartMotor interprets incoming characters on communications channel 0 as commands However it is sometimes useful...

Page 460: ...ffer IF c 69 Check to see if it is an E END End the program ENDIF ENDIF GOTO20 Loop back to C20 RELATED COMMANDS R GETCHR1 Next Character from Communications Port 1 see page 461 R LEN Length of Character Count in Communications Port 0 see page 513 R LEN1 Length of Character Count in Communications Port 1 see page 514 OCHN Open Channel see page 601 Part 2 Commands GETCHR ...

Page 461: ...an empty receive buffer Alternatively the value returned from GETCHR1 can be checked to see if it is 1 However do not use an ab register to store the value in this case because the value 1 will be aliased with the character 255 Instead use an aw or al register Communications channel 1 can be used to accept special commands and or data such as those from a light curtain or a barcode reader This is ...

Page 462: ...buffer IF c 69 Check to see if it is an E END End the program ENDIF ENDIF GOTO20 Loop back to C20 RELATED COMMANDS R GETCHR Next Character from Communications Port 0 see page 459 R LEN Length of Character Count in Communications Port 0 see page 513 R LEN1 Length of Character Count in Communications Port 1 see page 514 OCHN Open Channel see page 601 Part 2 Commands GETCHR1 ...

Page 463: ...ng the corresponding GOSUB command NOTE If a GOSUB is attempted to a label that does not exist the GOSUB is ignored and the next program line is executed Subroutines may call further subroutines that is called nesting There may be as many as a thousand GOSUBs but the nesting cannot exceed nine levels deep A counter conditional test or some other method can be used to stay within the nesting limit ...

Page 464: ... Nested subroutine GOSUB30 PRINT 20 13 RETURN C21 Nested subroutine GOSUB30 PRINT 21 13 RETURN C25 Recursive subroutine PRINT 25 a a a 1 IF a 0 RETURN ENDIF GOSUB25 RETURN C30 Normal subroutine PRINT 13 Subroutine Call RETURN Program output is Subroutine Call 20 Subroutine Call 21 25 3 25 2 25 1 Referring to the previous example the GOSUB commands GOSUB20 GOSUB21 GOSUB25 or GOSUB30 can also be iss...

Page 465: ...y make your programs impossible to read or debug Learn to organize your code with one main loop using a GOTO and write the rest of the program with subroutines GOSUB For details see GOSUB label on page 463 The GOTO number command unconditionally redirects program execution control to another part of the program marked by the label C number NOTE If a GOTO jump is attempted to a label that does not ...

Page 466: ...y be used The third format allows for highly flexible programs that can jump to an array of different labels EXAMPLE C0 Place main label IF IN 0 0 PRINT Input 0 Low 13 ENDIF GOTO0 GOTO allows program to run forever END RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 C number Command Label see page 348 DEFAULT Default Case for SWITCH Structure see page 382 ELSE IF Structure Comman...

Page 467: ... The GS Go Synchronized command is used to start synchronized motion or update buffered values such as speed or acceleration Only motors that have been included in the synchronized move group will start when this is commanded Motors are included in the synchronized move group using the PTS PTSS PRTS or PRTSS command issued from a single master motor If a GS command is transmitted and no motion res...

Page 468: ...TS formula Acceleration Deceleration Target Synchronized see page 259 ATS formula Acceleration Target Synchronized see page 286 DTS formula Deceleration Target Synchronized see page 392 G Start Motion GO see page 456 PRTS Position Relative Target Synchronized see page 654 PRTSS Position Relative Target Synchronized Supplemental see page 656 PTS Position Target Synchronized see page 660 R PTSD Posi...

Page 469: ...648 to 2147483647 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The HEX command reads a hexadecimal hex string into a variable The hex string must be ASCII encoded i e the ASCII digits 0 9 and upper case characters A F NOTE For Class 5 SmartMotors lower case characters are not supported in firmware versions preceding 5 x 4 8 This command uses the input ASCII...

Page 470: ...than eight digits are found only the first eight are processed l The result is an integer EXAMPLE Value of 5862 Hex of 16E6 Decimal representation of hex 049 054 069 054 ab 10 49 ab 11 54 ab 12 69 ab 13 54 ab 14 0 Null character to end value x HEX 10 Set x to hex value Rx Report x command Program output is 5862 RELATED COMMANDS R ATOF index ASCII to Float see page 284 R DFS value Dump Float Single...

Page 471: ...rogram with a line such as a I arg The value of enc determines which encoder is being referred l I 0 reads the internal encoder captured count l I 1 reads the external encoder captured count The index capture must first be armed with the Ai Aij or Aji command before a capture occurs The Bi arg command can be used to detect the capture event due to encoder index or input signal These capture events...

Page 472: ...ng edge index pulse seen a I 0 Record rising edge index position ENDIF LOOP Loop back to wait O a Last Index is Home PT 0 Move to New Home G Start Motion AMPS 1023 Restore power RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 27...

Page 473: ...for a SmartMotor It doesn t have any effect on the motor it s just a non volatile ID that is preserved between power cycles It allows a SmartMotor s user program to self detect its designated purpose according to the programmer s setting of IDENT on that motor l x IDENT Get the IDENT value and assign it to the variable x l IDENT formula Set IDENT equal to the value of the formula The value of IDEN...

Page 474: ...per s Guide Rev L Page 474 of 909 RELATED COMMANDS R IDENT formula Set Identification Value see page 473 IF formula Conditional Program Code Execution see page 475 SWITCH formula Switch Program Flow Control see page 727 Part 2 Commands IDENT formula ...

Page 475: ... rest of the program with subroutines GOSUB For details see GOSUB label on page 463 The IF statement provides a method for an executing program to choose between alternate execution paths at runtime In its simplest form the IF control block consists of IF formula Evaluates as nonzero Run the code below the IF command ENDIF NOTE Every IF structure must be terminated with an ENDIF Formula is a test ...

Page 476: ...at comparison operators such as return 0 if false and 1 if true In a bitwise sense this is setting bit 0 when true The bitwise OR operator compares all bits However only the lowest bit becomes significant EXAMPLE If true run some code IF PA 12345 If Position is above 12345 PRINT position is greater than 12345 13 ENDIF This is the next line of code to be executed whether it is true or not EXAMPLE I...

Page 477: ...1 c 7 binary 0111 d 1 binary 0001 e 0 binary 0000 IF a 2 Compare a and 2 as binary numbers bit for it PRINT This is true because 2 is 0010 13 ENDIF IF a d Are any bits in common with a AND d PRINT This will never PRINT 13 ENDIF IF a b Are there any bits that are 1 in either number PRINT This will print 13 ENDIF IF d e Even though e is zero d is nonzero PRINT This will print 13 ENDIF IF b c PRINT T...

Page 478: ...ads one specific input or all inputs It can be used in the following ways l x IN IO where IN IO specifies the I O number that is assigned to the variable x See the following table for allowed range of IO The result is a value of 0 or 1 assigned to x l x IN W word where IN W word specifies which word of I O will be assigned to the variable x A literal W is used as the first argument See the followi...

Page 479: ...lass 5 M style motor Pin Conn Desc User Read Command 1 12 pin I O 0 RIN 0 4 5 pin I O 2 RIN 2 9 12 pin Not Fault Output RIN 11 10 12 pin Drive Enable Input RIN 12 Further other commands are available for this purpose l Bits returned by Status Word 16 RW 16 for example RW 16 2048 where RW 16 is the command typed in the Terminal Window it returns 2048 indicating bit 7 is on For more details on Statu...

Page 480: ...nd check Input 1 GOTO 10 Will loop back to C10 C20 Subroutine 20 code here RETURN C30 Subroutine 30 code here RETURN RELATED COMMANDS EIGN Enable as Input for General Use see page 405 EILN Enable Input as Limit Negative see page 408 EILP Enable Input as Limit Positive see page 410 EIRE Enable Index Register External Input Capture see page 412 EIRI Enable Index Register Internal Input Capture see p...

Page 481: ...in the following ways l x INA A IO where IN A IO specifies a raw analog reading with 10 bit resolution and spanned over a signed 16 bit range which is assigned to variable x l x INA V IO where IN V IO specifies a reading of the input voltage V in millivolts of analog input value and for a given I O defined by IO which is assigned to the variable x Only applies to inputs 16 25 on the D style motor ...

Page 482: ...25 for the Class 5 D style motor and 0 for the M style motor Only applies to inputs 16 25 on the D style motor with AD1 option or inputs 0 10 on an M style motor Motor type IO Command Nominal input voltage Nominal value reported D style 0 6 INA A IO 0 5V 0 32736 INA V1 IO 0 5000 D style with AD1 option 0 6 INA A IO 0 5V 0 32736 INA V1 IO 0 5000 16 25 INA A IO 0 24V 0 38130 INA V IO 0 24000 INA V1 ...

Page 483: ...elay between reads b 0 Seed b C10 Label to create infinite loop a INA V1 3 o Take analog 5 Volt full scale reading x a b Set x to determine change in input IF x d Check if change beyond dead band VT b m Multiplier for appropriate speed G Initiate new velocity ELSEIF x d Check if change beyond dead band VT b m Multiplier for appropriate speed G Initiate new velocity ENDIF End IF statement b a Updat...

Page 484: ...o matic FIRMWARE VERSION 6 0 and later COMBITRONIC N A DETAILED DESCRIPTION NOTE In PROFINET networks IP addresses are usually automatically configured and this command is not needed Therefore leave the address at the default 0 0 0 0 setting unless you need to set a specific static IP address The IPCTL command sets the IP address subnet mask or gateway for the industrial Ethernet network It uses t...

Page 485: ... 909 EXAMPLE Set a static IP address IPCTL 0 192 168 0 10 Set the IP address to 192 168 0 10 RELATED COMMANDS SNAME string Set PROFINET Station Name see page 716 ETHCTL function value Control Industrial Ethernet Network Features see page 445 Part 2 Commands IPCTL function string ...

Page 486: ...tor 0 17 l Bit the bit number in a status word to monitor 0 15 l BitState the transition to this state will cause the interrupt 0 or 1 l Label the label number to jump to for the interrupt routine 0 999 After this command is called the user program process will be monitoring for the specified condition The interrupts are always triggered by an edge transition of a bit in the status words Any statu...

Page 487: ...ir DITR int on page 388 and EITR int on page 417 or the command pair ITRD on page 489 and ITRE on page 491 NOTE Each instance of the ITR command must have a unique interrupt level It is not possible to configure two different events with the same priority level An interrupt will block itself but an interrupt does not automatically disable itself In other words the interrupt causing event will call...

Page 488: ...sired position to pass OUT 1 0 Set output low TMR 0 400 Use timer 0 for pulse width TWAIT WAIT 1000 Wait 1 second LOOP END Interrupt Subroutine C1 OUT 1 1 Set output high again RETURNI RELATED COMMANDS DITR int Disable Interrupts see page 388 EISM 6 E Configure Input as Sync Master see page 416 EITR int Enable Interrupts see page 417 END End Program Code Execution see page 431 ITR Int StatusWord B...

Page 489: ...D DESCRIPTION The ITRD command is used to disable the global interrupt scanner ITRD disables the interrupt handler and clears Interrupt Status Bit 15 For an interrupt to work it must be enabled at two levels first enable individual interrupts with the EITR command using the interrupt number from 0 to 7 in the parentheses second enable all interrupts with the ITRE command Similarly individual inter...

Page 490: ...Ending the program will also disable interrupts C10 Interrupt subroutine PRINT Move exceeded two seconds 13 RETURNI Program output is Move exceeded two seconds RELATED COMMANDS DITR int Disable Interrupts see page 388 EISM 6 E Configure Input as Sync Master see page 416 EITR int Enable Interrupts see page 417 END End Program Code Execution see page 431 ITR Int StatusWord Bit BitState Label Interru...

Page 491: ... where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The ITRE command is used to enable the global interrupt scanner For an interrupt to work it must be enabled at two levels first enable individual interrupts with the EITR command using the interrupt number from 0 to 7 in the parentheses second enable all interrupts with the ITRE command Similarly individual int...

Page 492: ...hile motion continues LOOP Wait for desired position to pass OUT 1 0 Set output low TMR 0 400 Use timer 0 for pulse width TWAIT WAIT 1000 Wait 1 second LOOP END Interrupt Subroutine C1 OUT 1 1 Set output high again RETURNI RELATED COMMANDS DITR int Disable Interrupts see page 388 EISM 6 E Configure Input as Sync Master see page 416 EITR int Enable Interrupts see page 417 END End Program Code Execu...

Page 493: ...ith a line such as a J arg The value of arg determines which encoder is being referred to l J 0 reads the internal encoder captured count l J 1 reads the external encoder captured count The index capture must first be armed with the Aj Aij or Aji command before a capture will occur The Bj arg command can be used to detect the capture event due to encoder index or input signal These capture events ...

Page 494: ...g edge index pulse seen a J 0 Record falling edge index position ENDIF LOOP Loop back to wait O a Last index is home PT 0 Move to new home G Start motion AMPS 1023 Restore power RELATED COMMANDS Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 27...

Page 495: ... buffered acceleration feed forward gain The acceleration feed forward term helps the PID filter cope with the predictable effects of acceleration and inertia NOTE The motion or servo modifications from this command must be applied by the F function For details see F on page 446 The KA gain factor is only applied in position MP and velocity MV moves The default value for KA is 0 and acceptable val...

Page 496: ...see page 497 R KG formula Constant Gravitational Offset see page 499 R KI formula Constant Integral Coefficient see page 501 R KL formula Constant Integral Limit see page 504 R KP formula Constant Proportional Coefficient see page 506 R KS formula Constant Velocity Filter Option for KD see page 509 R KV formula Constant Velocity Feed Forward see page 511 Part 2 Commands KA formula ...

Page 497: ...s stable performance KD is usually the vibration absorbing or damping term NOTE The motion or servo modifications from this command must be applied by the F function For details see F on page 446 For any stable KP value there is an optimum KD value and any KD value outside of that causes the motor to be unstable Therefore an effective way to tune the filter is to repetitively raise the KP value an...

Page 498: ...eclare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS R KA formula Constant Acceleration Feed Forward see page 495 R KG formula Constant Gravitational Offset see page 499 R KI formula...

Page 499: ...em An example of a constant force is that induced by gravity acting on a vertically moving axis The KG term exists to offset the PID filter output in a way that removes the effect of these constant forces To set KG set KP and KI to zero and servo in place The load will want to fall so you will need to hold it in place Increase or decrease KG until the load barely holds Record that value and then c...

Page 500: ... see page 497 R KI formula Constant Integral Coefficient see page 501 R KL formula Constant Integral Limit see page 504 R KP formula Constant Proportional Coefficient see page 506 R KS formula Constant Velocity Filter Option for KD see page 509 R KV formula Constant Velocity Feed Forward see page 511 Part 2 Commands KG formula ...

Page 501: ...mmand is designed to compensate for constant offsets such as friction in the system or other constant forces The amount of effort sent to the motor from the KP term of the PID is proportional to the distance it is from its target position Therefore as the target gets close the small position error results in a torque that is too small to allow the motor to reach the final target The KI term helps ...

Page 502: ...Feed Forward see page 495 R KD formula Constant Derivative Coefficient see page 497 R KG formula Constant Gravitational Offset see page 499 R KL formula Constant Integral Limit see page 504 R KP formula Constant Proportional Coefficient see page 506 R KS formula Constant Velocity Filter Option for KD see page 509 R KV formula Constant Velocity Feed Forward see page 511 Part 2 Commands KI formula ...

Page 503: ... KII command sets or reports the current loop integral gain when operating in field oriented current control mode i e MDC There are two PI current control loops when operating in field oriented control one loop controls the torque producing current Iq and the other loop nullifies currents that do not produce torque Id Both loops use the parameters KPI and KII to control proportional and integral r...

Page 504: ... equation To prevent this KL sets an upper limit on the KI term NOTE The motion or servo modifications from this command must be applied by the F function For details see F on page 446 The KI term will raise the power to the servo as a function of time If there is something other than friction blocking the servo and it is unable to move the amount of torque given to the motor can quickly become ex...

Page 505: ...ant Gravitational Offset see page 499 R KI formula Constant Integral Coefficient see page 501 R KP formula Constant Proportional Coefficient see page 506 R KS formula Constant Velocity Filter Option for KD see page 509 R KV formula Constant Velocity Feed Forward see page 511 Part 2 Commands KL formula ...

Page 506: ...e applied by the F function For details see F on page 446 This creates a force from the PID in direct proportion to how far the motor is pushed away from the calculated trajectory This force is like a spring that is being stretched the more it is stretched the further it resists While this gives a predictable force to maintain the desired position it has diminishing results as the error gets small...

Page 507: ...declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program RELATED COMMANDS R KA formula Constant Acceleration Feed Forward see page 495 R KD formula Constant Derivative Coefficient see page 497 R KG form...

Page 508: ...he KPI command sets or reports the current loop proportional gain when operating in field oriented current control mode i e MDC There are two PI current control loops when operating in field oriented control one loop controls the torque producing current Iq and the other loop nullifies currents that do not produce torque Id Both loops use the parameters KPI and KII to control proportional and inte...

Page 509: ...ED DESCRIPTION The PID filter s KS term is used to adjust the filtering of the KD term NOTE The motion or servo modifications from this command must be applied by the F function For details see F on page 446 The KD term requires a filter because the velocity error signal is inherently noisy and quantized This is because the measurement of velocity is based on encoder counts per PID sample It is of...

Page 510: ... the latency of the PID differential term is increased Note that this can have a negative impact on the damping ability of the KD term In other words the tuning may be less stable with larger values of KS EXAMPLE KS 3 Set buffered differential sample rate F Update PID filter RELATED COMMANDS R KA formula Constant Acceleration Feed Forward see page 495 R KD formula Constant Derivative Coefficient s...

Page 511: ...ails see F on page 446 The velocity feed forward element can be thought of as a force that the PID outputs based on the expected speed from the trajectory calculation This reduces the lag time of the PID waiting for position feedback The KV term begins the PID response as soon as the trajectory calls for more speed KP and KI are still required but the KV term will help improve responsiveness If yo...

Page 512: ... see page 497 R KG formula Constant Gravitational Offset see page 499 R KI formula Constant Integral Coefficient see page 501 R KL formula Constant Integral Limit see page 504 R KP formula Constant Proportional Coefficient see page 506 R KS formula Constant Velocity Filter Option for KD see page 509 Part 2 Commands KV formula ...

Page 513: ... DETAILED DESCRIPTION The LEN command checks the receive buffer of serial communications channel 0 and returns the number of characters that are waiting to be processed Testing the value of LEN is a good way to see if there is a character available for retrieval with the GETCHR command see the following example EXAMPLE i 0 IF LEN 0 Any data received GOSUB5 If so process data ENDIF END C5 ab i GETC...

Page 514: ...T VALUE 0 FIRMWARE VERSION 5 0 x 5 16 x or 5 32 x series only COMBITRONIC N A DETAILED DESCRIPTION The LEN1 command checks the receive buffer of serial communications channel 1 and returns the number of characters that are waiting to be processed Testing the value of LEN1 is a good way to see if there is a character waiting for retrieval with GETCHR1 command see the following example NOTE M style ...

Page 515: ... of 909 RELATED COMMANDS R GETCHR Next Character from Communications Port 0 see page 459 R GETCHR1 Next Character from Communications Port 1 see page 461 R LEN Length of Character Count in Communications Port 0 see page 513 OCHN Open Channel see page 601 Part 2 Commands LEN1 ...

Page 516: ...mmand is used to get the float value from 32 bit IEEE 754 format It allows the import of floating point values from external systems this format may be needed for interchange The 32 bit value input by this function is not a normal integer value It is an encoded number that includes the exponent of the floating point value NOTE The input of this function does not have any usefulness within the Smar...

Page 517: ...ommands Moog Animatics SmartMotor Developer s Guide Rev L Page 517 of 909 RELATED COMMANDS R af index formula Array Float index see page 261 R DFS value Dump Float Single see page 387 Part 2 Commands LFS value ...

Page 518: ...o compile the program before download LOAD terminates the current motion mode or trajectory However it does not change motion parameters such as EL ADT VT KP etc or alter the current value of the user variables If the motor does not receive the ASCII 255 byte after the LOAD command is issued it will continue to store incoming serial bytes directly to the user program EEPROM During this time the mo...

Page 519: ...tep 8 sending FF FF 20 6 Hex value 06 should be transmitted by the motor Read and verify this byte 7 Repeat step 5 using the next 32 bytes 8 When the last character is read from the file and sent to the motor then send two hex FF characters and one hex 20 character to the motor 9 Issue another RCKS command If it returns a success status with the P character at the end then the download was success...

Page 520: ...e motor 3 Write 32 bytes of the SMX file to the motor at a time 4 Read the 0x06 character back from the motor 5 Write any remaining bytes of the SMX file 32 6 Write 0xff 0xff 0x20 RELATED COMMANDS LOCKP Lock Program see page 521 RCKS Report Checksum see page 669 RUN Run Program see page 682 RUN Halt Program Execution Until RUN Received see page 684 UP Upload Compiled Program and Header see page 75...

Page 521: ...downloaded program in the motor s EEPROM to prevent it from being uploaded That is the commands UP and UPLOAD will not be able to upload the program body or contents NOTE LOCKP does not prevent the download of another program The LOCKP command should be used after program development and testing is complete LOCKP is intended as a serial command only It should l Be issued from the Terminal window l...

Page 522: ...the WHILE formula The WHILE formula LOOP control block creates a program loop that repeatedly executes for as long as the formula value is true or nonzero The formula is evaluated when WHILE is first encountered and each time program execution is sent back to the WHILE by the corresponding terminating LOOP statement If the formula value is zero or false program execution continues on the line of c...

Page 523: ... SmartMotor Developer s Guide Rev L Page 523 of 909 b 1 b 2 b 3 b 4 b 5 Exit Loop RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 WHILE formula While Condition Program Flow Control see page 801 Part 2 Commands LOOP ...

Page 524: ...he following example shows a complete command sequence NOTE Refer to the Related Commands section as there are several important commands to use when creating a Cam table and configuring the cam motion In Cam mode each value of the external encoder defines a required corresponding motor position Cams typically define a periodic motion profile or trajectory NOTE The MCW table point command is manda...

Page 525: ...1 1 ratio from virtual enc MFA 0 MFD 0 Disable virtual enc ramp up ramp down sections MFSLEW 24000 1 Table is 6 segments 4000 encoder counts each Specify 1 for the second argument which forces this number as the output total of the virtual master encoder into the cam MFSDC 1 0 Disable virtual master gearing repeat G Begin move END Required END RELATED COMMANDS R MCDIV formula Mode Cam Divisor see ...

Page 526: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 526 of 909 CTE table Cam Table Erase see page 372 SRC enc_src Source Follow and or Cam Encoder see page 720 Part 2 Commands MC ...

Page 527: ... 0 excluded DEFAULT VALUE 1 FIRMWARE VERSION 5 x and later COMBITRONIC MCDIV 3 1234 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MCDIV command provides the Cam mode ratio divisor It works in combination with the MCMUL command which provides the Cam mode ratio multiplier For usage details see MCMUL formula on page 530 NOTE MCDIV cannot be set to 0 EXAMP...

Page 528: ...LED DESCRIPTION The MCE arg command specifies the Cam mode operation type For details on Cam mode see Cam Mode Electronic Camming on page 153 The arg parameter must be one of the following values arg Description 0 Force linear interpolation This overrides any per segment linear versus spline option 1 Default Allow spline mode unless a segment has a linear specification The shape of the spline assu...

Page 529: ...h point Cam Bit 4 ON CTW 0 24000 32 Add 7th point Cam Bit 5 ON MC Select Cam Mode SRC 2 Use the virtual master encoder MCE 0 Force Linear interpolation MCW 0 0 Use table 0 in RAM from point 0 MFMUL 1 Simple 1 1 ratio from virtual enc MFDIV 1 Simple 1 1 ratio from virtual enc MFA 0 MFD 0 Disable virtual enc ramp up ramp down sections MFSLEW 24000 1 Table is 6 segments 4000 encoder counts each Speci...

Page 530: ...ficient resolution while allowing the desired range For example to allow scaling from 10 to 1000 in 0 1 increments choose MCDIV 1000 For this case a setting of MCMUL 1000 would provide a 100 1 1 scaling of the Cam table If the ratio of MCMUL MCDIV produces a negative ratio then the amplitude of the Cam table is also negative Typically the scaling should be configured before initiating cam motion w...

Page 531: ...FSLEW command specifies the length in slave units because the output slave of the follow commands is fed into the cam The MFSDC 0 0 command is also required if a repetitive cam motion is desired The input source specified by the SRC command can be any source For details see SRC enc_src on page 720 EXAMPLE Subroutine from Cam program C41 MP PT 0 G TWAIT SRC 2 MCE 1 Spline MFA 0 MFD 0 MFMUL 1 MFDIV ...

Page 532: ...TRONIC N A DETAILED DESCRIPTION The MCW command selects the Cam table and specifies the starting point used when the cam motion is initiated with a G command Typically the starting point is point 0 but values from 0 to 65535 are valid For the table input parameter valid values and their meanings are Table Selection Description 0 RAM table 1 10 Tables stored sequentially in EEPROM NOTE The MCW tabl...

Page 533: ... 0 Force Linear interpolation MCW 0 0 Use table 0 in RAM from point 0 MFMUL 1 Simple 1 1 ratio from virtual enc MFDIV 1 Simple 1 1 ratio from virtual enc MFA 0 MFD 0 Disable virtual enc ramp up ramp down sections MFSLEW 24000 1 Table is 6 segments 4000 encoder counts each Specify 1 for the second argument which forces this number as the output total of the virtual master encoder into the cam MFSDC...

Page 534: ...the motor address use the actual address or a variable DETAILED DESCRIPTION The MDB command enables the Trajectory Overshoot Braking TOB option This command should be used to enable TOB after using the MDT or MDE commands Note the following l This option reverts to off when one of these commutation mode commands are used l This option is off by default Status Word 6 Bit 9 indicates if this mode is...

Page 535: ...ced Trap Commutation Mode default is MDT MDB Turn on Trajectory Overshoot Braking MDE mode is required for MDB PT 8000 G TWAIT Move to Absolute Position 8000 PT 0 G TWAIT Move to Absolute Position 0 END RELATED COMMANDS MDC Mode Current Commutation Mode see page 536 MDE Mode Enhanced Commutation Mode see page 538 MDH Mode Hybrid Commutation Mode see page 540 MDHV Mode Hybrid Velocity Commutation M...

Page 536: ...variable DETAILED DESCRIPTION The MDC command enables the motor s sinusoidal sine commutation mode augmented with digital current control Available only in the M style SmartMotor this method offers optimum performance without sacrificing quiet operation It is the best choice for an application when this capability is available Because MDC uses the encoder it requires angle match the first sighting...

Page 537: ...ion MV Set velocity move VT 200000 Set velocity target ADT 50 Set accel decel target G Start motion RELATED COMMANDS MDB Enable TOB Feature Commutation Mode see page 534 MDE Mode Enhanced Commutation Mode see page 538 MDH Mode Hybrid Commutation Mode see page 540 MDHV Mode Hybrid Velocity Commutation Mode see page 542 MDS Mode Sine Commutation Mode see page 544 MDT Mode Trap Commutation Mode see p...

Page 538: ...ced trapezoidal commutation mode using the encoder This driving method is the same as basic trapezoidal commutation using Hall sensors However it also uses the internal encoder to add accuracy to the commutation trigger points This idealized trapezoidal commutation mode offers the greatest motor torque and speed but it can exhibit minor ticking sounds at low rates which are created as the current ...

Page 539: ... Trap Commutation Mode default is MDT MDB Turn on Trajectory Overshoot Braking MDE mode is required for MDB PT 8000 G TWAIT Move to Absolute Position 8000 PT 0 G TWAIT Move to Absolute Position 0 END RELATED COMMANDS MDB Enable TOB Feature Commutation Mode see page 534 MDC Mode Current Commutation Mode see page 536 MDH Mode Hybrid Commutation Mode see page 540 MDHV Mode Hybrid Velocity Commutation...

Page 540: ... The MDH command enables the motor s hybrid commutation mode The purpose of this mode is to overcome the lack of MDC mode support in Class 5 D style motors running specific firmware i e firmware 5 x 4 31 and later in the 5 0 x 5 16 x or 5 32 x series only For details on MDC mode see MDC on page 536 The operation of MDH mode will apply either MDS or MDE commutation mode based on an operating speed ...

Page 541: ...V Set velocity move VT 600000 Set velocity target ADT 10 Set accel decel target G Start motion END RELATED COMMANDS MDB Enable TOB Feature Commutation Mode see page 534 MDC Mode Current Commutation Mode see page 536 MDE Mode Enhanced Commutation Mode see page 538 MDHV Mode Hybrid Velocity Commutation Mode see page 542 MDS Mode Sine Commutation Mode see page 544 MDT Mode Trap Commutation Mode see p...

Page 542: ... DETAILED DESCRIPTION The MDHV command is a setting in relation to the motor s hybrid velocity commutation mode MDH for Class 5 D style motors running specific firmware i e firmware 5 x 4 31 and later in the 5 0 x 5 16 x or 5 32 x series only The command is used as follows MDHV sets the motor actual speed a positive absolute value at which the transition from MDS to MDE commutation mode occurs Ref...

Page 543: ... Developer s Guide Rev L Page 543 of 909 MDE Mode Enhanced Commutation Mode see page 538 MDH Mode Hybrid Commutation Mode see page 540 MDS Mode Sine Commutation Mode see page 544 MDT Mode Trap Commutation Mode see page 546 Part 2 Commands MDHV ...

Page 544: ...where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MDS command enables the motor s sine commutation mode voltage mode This mode offers smoother commutation when compared to trapezoidal modes It accomplishes this by shifting current more gradually from one coil to the next Whereas trapezoidal modes exhibit higher torque due to the longer application of curren...

Page 545: ...hey will take effect This means the SmartMotor s factory calibration is valid and the index mark of the internal encoder has been seen after startup The default commutation mode for D style motors is MDT see MDT on page 546 the default commutation mode for M style motors is MDC see MDC on page 536 EXAMPLE MDS Set sine mode Will remain in sine mode until commanded otherwise MV Set velocity move VT ...

Page 546: ...mmand enables the motor s trapezoidal commutation mode using Hall sensors the default mode for D style motors Despite the minor inaccuracies that are typical in the mechanical placement of the sensors this is the most simple and effective method and it is ready on boot up Use status word 6 to see the active commutation mode NOTE MDE MDS and MDC require angle match before they will take effect This...

Page 547: ...able TOB Feature Commutation Mode see page 534 MDC Mode Current Commutation Mode see page 536 MDE Mode Enhanced Commutation Mode see page 538 MDH Mode Hybrid Commutation Mode see page 540 MDHV Mode Hybrid Velocity Commutation Mode see page 542 MDS Mode Sine Commutation Mode see page 544 Part 2 Commands MDT ...

Page 548: ... use the actual address or a variable DETAILED DESCRIPTION The MF0 command zeroes the second encoder register see CTR enc on page 374 without changing the current motion mode of the SmartMotor Following MF0 the A and B pins will be interpreted as a quadrature encoder signal MS0 is the opposite input mode l On the D style motor these are inputs 0 and 1 l On the M style motor these encoder inputs ar...

Page 549: ...ZS Clear errors MF0 Reset CTR 1 MFDIV 10 Divisor 10 MFMUL 21 Multiplier 21 MFR Calculate Ratio input 10 external counts Resulting motion 21 counts G Start following external encoder END RELATED COMMANDS R CTR enc Counter Encoder Step and Direction see page 374 MS0 Mode Step Zero External Counter see page 585 MSR Mode Step Ratio see page 587 Part 2 Commands MF0 ...

Page 550: ...tely at ratio FIRMWARE VERSION 5 x and later COMBITRONIC MFA 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFA command sets the ascend ramp to the specified sync ratio from a ratio of zero It uses the format MFA exp1 exp2 where l Exp1 Specifies counts valid values are from 0 to 2147483647 Set to 0 default to disable l Exp2 Optional Specifies th...

Page 551: ...r increment CTW 0 Add 1st point CTW 1000 Add 2nd point go to point 1000 from start CTW 3000 Add 3rd point go to point 3000 from start CTW 4000 Add 4th point go to point 4000 from start CTW 1000 Add 5th point go to point 1000 from start CTW 2000 Add 6th point go to point 2000 from start CTW 0 Add 7th point return to starting point Table has now been written to EEPROM SRC 2 Use the virtual encoder M...

Page 552: ...ics SmartMotor Developer s Guide Rev L Page 552 of 909 MFSLEW distance m s Mode Follow Slew see page 575 MSR Mode Step Ratio see page 587 SRC enc_src Source Follow and or Cam Encoder see page 720 Part 2 Commands MFA distance m s ...

Page 553: ...nd later COMBITRONIC MFCTP 0 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFCTP command provides control information for traverse mode It allows a several mode selections to be made It uses the format MFCTP exp1 exp2 Refer to the following tables for exp1 and exp2 values and descriptions l Exp1 Value Description 1 When G is issued continue in the s...

Page 554: ...ction activate update of RCP 2 when servo is off MFL 1000 1 Lower end ramp MFH 1000 1 Higher end ramp MFLTP 1000 Lower traverse point MFHTP 1000 Higher traverse point MFMUL 1 Ratio default is 1 MFDIV 1 Ratio default is 1 MFSDC 4000 2 Dwell for 4000 counts 2 is active traverse mode MFR Enable follow mode G Begin move RELATED COMMANDS R MFDIV formula Mode Follow Divisor see page 558 MFH distance m s...

Page 555: ... mode immediately at ratio FIRMWARE VERSION 5 x and later COMBITRONIC MFD 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFD command specifies the descend ramp from the current ratio to a ratio of 0 It uses the format MFD exp1 exp2 where l Exp1 Specifies counts valid values from 0 to 2147483647 Set to 0 default to disable l Exp2 Optional Specifi...

Page 556: ...c ratio for 200 counts MFR G EXAMPLE Cam program example uses virtual encoder CTE 1 Erase all EEPROM tables CTA 7 4000 Create 7 point table at each 4K encoder increment CTW 0 Add 1st point CTW 1000 Add 2nd point go to point 1000 from start CTW 3000 Add 3rd point go to point 3000 from start CTW 4000 Add 4th point go to point 4000 from start CTW 1000 Add 5th point go to point 1000 from start CTW 200...

Page 557: ...nd see page 550 R MFDIV formula Mode Follow Divisor see page 558 R MFMUL formula Mode Follow Multiplier see page 568 MFR Mode Follow Ratio see page 570 MFSDC distance mode Mode Follow Stall Dwell Continue see page 573 MFSLEW distance m s Mode Follow Slew see page 575 MSR Mode Step Ratio see page 587 Part 2 Commands MFD distance m s ...

Page 558: ...tor address use the actual address or a variable DETAILED DESCRIPTION The MFDIV command specifies the divisor for use with the MFR MSR or MC command For more details about how this ratio is applied see MFR on page 570 MFMUL MFDIV specifies the ratio for the MFR or MSR mode The MC mode is also affected To use the MFR or MSR command you will need to define the specific relationship ratio of the enco...

Page 559: ...eloper s Guide Rev L Page 559 of 909 RELATED COMMANDS MC Mode Cam Electronic Camming see page 524 R MFMUL formula Mode Follow Multiplier see page 568 MFR Mode Follow Ratio see page 570 MSR Mode Step Ratio see page 587 Part 2 Commands MFDIV formula ...

Page 560: ... s 0 or 1 TYPICAL VALUES Input value 0 to 2147483647 m s 0 or 1 DEFAULT VALUE 0 no ramp follow mode immediately at ratio FIRMWARE VERSION 5 x and later COMBITRONIC MFH 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFH command sets the ramp at the high end of the traverse It uses the format MFH exp1 exp2 where l Exp1 Specifies counts valid value...

Page 561: ...is not applied in the absolute traverse mode MFD is only applied in the absolute traverse mode if an X decelerate to stop command is issued EXAMPLE Single trajectory traverse winding application User does some type of homing before this SRC 2 For demo master signal Typical applications would use SRC 1 for encoder input MFCTP 0 1 Start traverse state in normal direction activate update of RCP 2 whe...

Page 562: ...L VALUES 0 to 1000000 DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC RMFHTP 3 MFHTP 3 1000 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION When in absolute traverse mode MFHTP formula sets the high traverse point in terms of the slave motor s position The value may be anywhere in the range from 2147483648 to 2147483647 However it should be higher ...

Page 563: ...1 Ratio default is 1 MFDIV 1 Ratio default is 1 MFSDC 4000 2 Dwell for 4000 counts 2 is active traverse mode MFR Enable follow mode G Begin move RELATED COMMANDS MFCTP arg1 arg2 Mode Follow Control Traverse Point see page 553 R MFDIV formula Mode Follow Divisor see page 558 MFH distance m s Mode Follow High Ascend Descend Rate see page 560 MFL distance m s Mode Follow Low Ascend Descend Rate see p...

Page 564: ...OF VALUES Input value 0 to 2147483647 m s 0 or 1 TYPICAL VALUES Input value 0 to 2147483647 m s 0 or 1 DEFAULT VALUE 0 no ramp follow mode immediately at ratio FIRMWARE VERSION 5 x and later COMBITRONIC MFL 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFL specifies the ramp at the low end of the traverse It uses the format MFL exp1 exp2 where ...

Page 565: ...se point NOTE MFA is not applied in the absolute traverse mode MFD is only applied in the absolute traverse mode if an X decelerate to stop command is issued EXAMPLE Single trajectory traverse winding application User does some type of homing before this SRC 2 For demo master signal Typical applications would use SRC 1 for encoder input MFCTP 0 1 Start traverse state in normal direction activate u...

Page 566: ... VALUES 0 to 1000000 DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC RMFLTP 3 MFLTP 3 1000 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION When in absolute traverse mode MFLTP formula sets the lower traverse point in terms of the slave motor s position The value may be anywhere in the range from 2147483648 to 2147483647 However it should be lower t...

Page 567: ... Ratio default is 1 MFDIV 1 Ratio default is 1 MFSDC 4000 2 Dwell for 4000 counts 2 is active traverse mode MFR Enable follow mode G Begin move RELATED COMMANDS MFCTP arg1 arg2 Mode Follow Control Traverse Point see page 553 R MFDIV formula Mode Follow Divisor see page 558 MFH distance m s Mode Follow High Ascend Descend Rate see page 560 R MFHTP formula Mode Follow High Traverse Point see page 56...

Page 568: ...tual address or a variable DETAILED DESCRIPTION The MFMUL command specifies the multiplier for use with the MFR MSR or MC command For more details about how this ratio is applied see the MSR on page 587 MFMUL MFDIV specifies the ratio for the MFR or MSR mode The MC mode is also affected To use the MFR or MSR command you will need to define the specific relationship ratio of the encoder count input...

Page 569: ...veloper s Guide Rev L Page 569 of 909 RELATED COMMANDS MC Mode Cam Electronic Camming see page 524 R MFDIV formula Mode Follow Divisor see page 558 MFR Mode Follow Ratio see page 570 MSR Mode Step Ratio see page 587 Part 2 Commands MFMUL formula ...

Page 570: ...coming encoder signal The encoder input is configured as a quadrature input If a step and direction operation is desired then select MSR instead of MFR Both commands operate the same with the exception of the input signal type Either the external encoder can be selected or an internal time base can be selected For details see SRC enc_src on page 720 The motion can be gradually started and stopped ...

Page 571: ...utting a ratio to the SmartMotor is with the MFMUL and MFDIV commands which require integers within a certain range Ratios that are irrational a mathematical definition that means it cannot be represented by a ratio of integers cannot be tracked continuously This is a fundamental mathematical principal and not a limitation of the SmartMotor For example converting degrees to radians or diameter to ...

Page 572: ...ode Follow High Ascend Descend Rate see page 560 R MFHTP formula Mode Follow High Traverse Point see page 562 MFL distance m s Mode Follow Low Ascend Descend Rate see page 564 R MFLTP formula Mode Follow Low Traverse Point see page 566 R MFMUL formula Mode Follow Multiplier see page 568 MFSDC distance mode Mode Follow Stall Dwell Continue see page 573 MFSLEW distance m s Mode Follow Slew see page ...

Page 573: ...ts from encoder input RANGE OF VALUES Input value 1 to 2147483647 mode 0 1 2 TYPICAL VALUES Input value 1 to 2147483647 mode 0 1 2 DEFAULT VALUE 1 disabled FIRMWARE VERSION 5 x and later COMBITRONIC MFSDC 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFSDC command sets the follow mode stall dwell continue which is used to control the dwell and ...

Page 574: ... Add 3rd point go to point 3000 from start CTW 4000 Add 4th point go to point 4000 from start CTW 1000 Add 5th point go to point 1000 from start CTW 2000 Add 6th point go to point 2000 from start CTW 0 Add 7th point return to starting point Table has now been written to EEPROM SRC 2 Use the virtual encoder MCE 0 Force linear interpolation MCW 1 0 Use table 1 from point 0 MFMUL 1 Simple 1 1 ratio f...

Page 575: ...m s 0 or 1 DEFAULT VALUE 1 no ramp follow mode immediately at ratio FIRMWARE VERSION 5 x and later COMBITRONIC MFSLEW 1000 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MFSLEW command sets the follow mode slew at ratio for a fixed distance It uses the format MFSLEW distance m s where l distance Specifies counts valid values from 1 to 2147483647 Set ...

Page 576: ...gh the Cam table can be selected In combination with the MFSDC 0 0 command an automatic repeat is selected This allows for certain parameters like MCMUL MCDIV MFSLEW and MFMUL MFDIV to be updated synchronously with the end of the Cam table EXAMPLE profile driven by an incoming encoder signal MFMUL 300 MFDIV 100 MFA 300 1 Slave moves 300 counts over ascend MFD 600 1 Slave moves 600 counts over desc...

Page 577: ...AULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC MINV 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MINV Mode Inverse command inverts the direction convention orientation of the SmartMotor as follows l MINV 0 restores the default direction convention l MINV 1 inverts the direction convention When looking at the end of the motor shaft the defa...

Page 578: ...PA Responds with a higher count like 9936 MINV 1 Inverts the direction convention RPA Responds with same higher count like 9936 Manually rotate the motor shaft a few turns clockwise RPA Responds with a lower count like 694 MINV 0 Restores the default direction convention Manually rotate the motor shaft a few turns clockwise RPA Responds with a higher count like 8723 RELATED COMMANDS R CTR enc Coun...

Page 579: ...TS N A RANGE OF VALUES 5 to 7 TYPICAL VALUES 5 to 7 DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC RMODE 1 3 x MODE 1 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The MODE command gets reads the operating mode as follows l MODE gets the active operating mode l MODE gets the active operating mode specific trajectory For example x MODE 1 will r...

Page 580: ...e limits ZS Clear status bits MP Set position mode AT 500 Preset acceleration VT 1000000 Preset velocity PT 0 Zero out position O 0 Declare origin G Servo in place END Required END of program command At the SMI software Terminal window type the following commands NOTE Do not enter the comments those are for your information and to show what is returned by the commands RMODE Reports 1 for position ...

Page 581: ... Rev L Page 581 of 909 RELATED COMMANDS MC Mode Cam Electronic Camming see page 524 MFR Mode Follow Ratio see page 570 MP Mode Position see page 582 MSR Mode Step Ratio see page 587 MT Mode Torque see page 589 MV Mode Velocity see page 593 Part 2 Commands MODE ...

Page 582: ...deceleration ADT MP calculates the trajectory to the target position when the G command is issued The preceding PT formula or PRT formula determines if the move is to be absolute destination target set equal to buffered PT value or relative destination target set equal to current trajectory position plus the buffered PRT offset value The PID servo will be active The MP mode calculates a trapezoida...

Page 583: ... 0 the trajectory flag Bt is set to 1 The motion is restricted by the current value of EL The motion is also subject to the currently defined activity of the limit switches RMODE responds with a P EXAMPLE MV Velocity mode ADT 1000 Set accel decel VT 50000 Set velocity G Start motion WAIT 6000 Wait 6000 samples MP Position mode ADT 50 Set accel decel VT 40000 Set velocity PT 1000 Set position G Sta...

Page 584: ...a Acceleration Deceleration Target see page 257 R EL formula Error Limit see page 419 G Start Motion GO see page 456 MV Mode Velocity see page 593 R PRT formula Position Relative Target see page 652 R PT formula Position Absolute Target see page 658 R VT formula Velocity Target see page 788 Part 2 Commands MP ...

Page 585: ... register see CTR enc on page 374 without changing the current motion mode of the SmartMotor Following MS0 the A and B pins will be interpreted as a step and direction signal MF0 is the opposite input mode l On the D style motor these are inputs 0 and 1 l On the M style motor these encoder inputs are differential and are labeled separately from general I O signals If the Mode Step with Ratio MSR o...

Page 586: ...eration EXAMPLE MS0 Reset CTR to zero CTR value follows step and direction inputs RELATED COMMANDS R CTR enc Counter Encoder Step and Direction see page 374 MF0 Mode Follow Zero External Counter see page 548 R MFDIV formula Mode Follow Divisor see page 558 R MFMUL formula Mode Follow Multiplier see page 568 MFR Mode Follow Ratio see page 570 MSR Mode Step Ratio see page 587 Part 2 Commands MS0 ...

Page 587: ...ration is nearly identical to the MFR command The only difference is that the encoder input is configured as a step and direction signal For a more detailed description of how the following ratio is set and how to use the profile commands such as MFA MFSLEW etc see MFR on page 570 Those commands also apply in the MSR motion MSR is typically used in applications where the input signal is from a con...

Page 588: ... GO see page 456 MFA distance m s Mode Follow Ascend see page 550 MFCTP arg1 arg2 Mode Follow Control Traverse Point see page 553 MFD distance m s Mode Follow Descend see page 555 R MFDIV formula Mode Follow Divisor see page 558 MFH distance m s Mode Follow High Ascend Descend Rate see page 560 R MFHTP formula Mode Follow High Traverse Point see page 562 MFL distance m s Mode Follow Low Ascend Des...

Page 589: ...racks position and can still be read with the PA variable However the PID loop is off and the motor is not servoing or running a trajectory For any given torque and no applied load there will be a velocity at which the Back EMF BEMF of the motor stops acceleration and holds an almost constant velocity Therefore under the no load condition the T command will control velocity As the delivered torque...

Page 590: ... speed limit on Torque mode If the load decreases it causes the motor shaft speed to increase to a new equilibrium because power must remain constant EXAMPLE Increases torque one unit every PID sample period up to 8000 units MT Select torque mode T 8000 Final torque after the TS ramp that we want TS 65536 Increase the torque by 1 unit of T per PID sample G Begin move RELATED COMMANDS R Bt Bit Traj...

Page 591: ...a magnetic damping counterforce to any attempted motion of the shaft from an external source If MTB is issued while moving at a given speed the shaft will come to a stop at a rate proportional to the BEMF that was being generated when the MTB command was issued The shaft doesn t stop at any predetermined or commanded position and its trajectory is uncontrolled While in MTB the motor will not produ...

Page 592: ...n off with Dynamic braking tell other motors to stop US 0 0 Set User Status Bit 0 to 1 Status Word 12 bit zero US ADDR 0 Set User Status Bit address to 1 Status Word 12 Bit address RETURNI RELATED COMMANDS BRKRLS Brake Release see page 330 FSA cause action Fault Stop Action see page 450 G Start Motion GO see page 456 OFF Off Drive Stage Power see page 605 Part 2 Commands MTB ...

Page 593: ...motor shaft will decelerate at the rate set by ADT until the excess velocity is removed Conversely if the actual velocity is less than VT when the G command is entered then the motor shaft motion will accelerate at the rate set by ADT until the requested velocity is reached Similarly if the actual velocity is in the opposite direction of VT when the G command is entered then the motor shaft motion...

Page 594: ... 0 Assuming there are no faults an MV command followed by a G command immediately turns on the servo The servo off flag Bo is set to 0 the trajectory flag Bt is set to 1 The motion is restricted by the current value of EL The motion is also subject to the currently defined activity of the limit switches RMODE responds with a V EXAMPLE Routine homes motor against a hard stop MDS Using Sine mode com...

Page 595: ...essage to the network it can command a specific slave or all slaves to enter the commanded state To do this use NMT slave addr state where slave addr is a variable such as x ab x aw x al x or a constant such as 2 a motor with CAN address 2 Range is 1 to 127 use 0 for a broadcast If slave addr is to itself then internal loopback is used instead state is the desired NMT state from one of the followi...

Page 596: ...Tell everyone to go operational NMT 2 128 Tell motor 2 to go pre operational x CAN 4 IF x 0 NMT command failed ENDIF RELATED COMMANDS R CAN CAN arg CAN Bus Status see page 352 CANCTL function value CAN Control see page 354 SDORD SDO Read see page 692 SDOWR SDO Write see page 694 Part 2 Commands NMT ...

Page 597: ... also updated by the same difference However the position error remains the same before and after executing this command You may declare the current trajectory position as zero by entering O 0 the capital letter O the number zero Similarly you may declare the current position to be 1234 by entering O 1234 NOTE Using the O formula does not modify previously entered PT or PRT registers Instead the O...

Page 598: ... Set velocity target PT 5000 Set position target MP Set Position mode O 1000 Current position set to negative 10000 GOSUB5 O 12345 Current position set to 12345 GOSUB5 PRT 5000 O 3000 Current position set to 3000 GOSUB5 END C5 PRINT 13 Move origin is PA G WHILE Bt LOOP WAIT 4000 PRINT 13 Position is RPA RETURN Program output is Move origin is 1000 Position is 5000 Move origin is 12345 Position is ...

Page 599: ...IC N A DETAILED DESCRIPTION The OC command reads the specified output or a block of outputs This applies to the 24 volt sourcing I O When the output is set high 24 volts the value is represented by this command as a 1 It can be used in the following ways l OC IO Individual output status of I O number result is 1 if output is ON and 0 if it is OFF o D style IO is 16 25 o M style IO is 0 10 l OC W w...

Page 600: ...ercurrent PRINT is FAULTED overcurrent 13 ELSEIF d 2 If d represents a possible short PRINT is FAULTED short 13 ELSEIF c If c is true PRINT is HIGH 13 ELSE If c is not true PRINT is LOW 13 ENDIF a a 1 Increment loop counter LOOP Program output is Output 16 on pin 0 is HIGH Output 17 on pin 1 is HIGH Output 18 on pin 2 is LOW Output 19 on pin 3 is LOW Output 20 on pin 4 is LOW Output 21 on pin 5 is...

Page 601: ... and later COMBITRONIC N A DETAILED DESCRIPTION CAUTION The OCHN command will cause the SmartMotor to ignore incoming commands and can lock you out Therefore during development prevent this by using the RUN command at the start of each program NOTE If you get locked out and are unable to communicate with the SmartMotor you may be able to recover communications using the SMI software s Communicatio...

Page 602: ...n 6 to the RS 485 control function This is required for use with Moog Animatics RS 232 to RS 485 converters like the RS485 and RS485 ISO Allowed Values for M style Motors Type Chnl Parity Baud Stop bits Data bits Mode Timeout optional RS4 0 E O N 100 300 600 1200 2400 4800 9600 19200 38400 57600 115200 1 2 8 C D Relevant in C command mode MB4 0 E O N 100 300 600 1200 2400 4800 9600 19200 38400 576...

Page 603: ...t can be used in the following ways l OF IO Returns the current fault state for that I O number where the returned value 0 no fault 1 overcurrent 2 possible shorted o D style IO is 16 25 o M style IO is 0 10 l OF S word Returns the bit mask of current faulted I O points where word is the 16 bit word number 0 is Controller I O Status Word 16 If any of these bits are set due to a fault then the I O ...

Page 604: ...ult status PRINT Output b on pin a IF d 1 If d represents overcurrent PRINT is FAULTED overcurrent 13 ELSEIF d 2 If d represents a possible short PRINT is FAULTED short 13 ELSEIF c If c is true PRINT is HIGH 13 ELSE If c is not true PRINT is LOW 13 ENDIF a a 1 Increment loop counter LOOP Program output is Output 16 on pin 0 is HIGH Output 17 on pin 1 is HIGH Output 18 on pin 2 is LOW Output 19 on ...

Page 605: ...al address or a variable DETAILED DESCRIPTION The OFF command turns off the power to the motor coils and terminates the activity of the current motion mode The motor off system flag Bo will be set to 1 The shaft will be free to coast to a stop or rotated by other external means The trajectory in progress system flag Bt will be set to zero NOTE When commanded OFF the motor will still track any shaf...

Page 606: ... Pause program to keep interrupts running END End of program C100 Interrupt subroutine BRKRLS Turn off MTB or brake OFF Freewheel the motor Remain here while input 6 is low WHILE IN 6 0 LOOP RETURNI Return from interrupt RELATED COMMANDS R B word bit Status Byte see page 291 BRKRLS Brake Release see page 330 G Start Motion GO see page 456 MTB Mode Torque Brake see page 591 R W word Report Specifie...

Page 607: ...t and motor model see details TYPICAL VALUES Depends on command format and motor model see details DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC OR 0 3 or OR W 0 3 or OR W 0 7 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The OR Output Reset command resets turns off the output specified by value as follows l OR IO Reset a single output to l...

Page 608: ... 5 0 to 255 0 7 virtual only not connected N A N A 1 16 25 0 24 0 to 1023 M style 0 0 10 0 24 0 to 2047 EXAMPLE WHILE 1 1 is always true OS 0 Set output to 1 OR 0 Set output to 0 LOOP Will loop forever RELATED COMMANDS EIGN Enable as Input for General Use see page 405 R IN Specified Input see page 478 R OC Output Condition see page 599 R OF Output Fault see page 603 OS Output Set see page 609 OUT ...

Page 609: ...ormat and motor model see details TYPICAL VALUES Depends on command format and motor model see details DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC OS 0 3 or OS W 0 3 or OS W 0 7 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The OS Output Set command sets turns on the output specified by value as follows l OS IO Sets a single output to log...

Page 610: ...output to 1 OR 0 Set output to 0 LOOP Will loop forever EXAMPLE turn on multiple ports WHILE a 4 OS a 4 turn ON I O ports 4 thru 7 a a 1 LOOP EXAMPLE set all I O to 5V i 0 WHILE i 6 Program loops until i 6 OS i Each output is enabled set to 5V as program loops i i 1 Increment i by 1 to enable the next input on next loop LOOP Loop back to WHILE RELATED COMMANDS EIGN Enable as Input for General Use ...

Page 611: ...d trajectory position to be shifted The shift is relative which can be useful in applications where the origin needs to be shifted during motion without losing any position counts Additionally the actual position is updated by the same difference However the position error remains the same before and after executing this command Instead the OSH trj form of the command changes the virtual position ...

Page 612: ...perform a set of absolute position moves OSH 40000 Shift the origin PT 0 Move to the origin G TWAIT GOSUB 30 Run the same subroutine with shifted origin OFF Turn off motor END End of program C30 Absolute position motion profile RETURN RELATED COMMANDS R EA Error Actual see page 394 O formula O trj formula Origin see page 597 R PA Position Actual see page 615 R PC PC axis Position Commanded see pag...

Page 613: ...x and later COMBITRONIC OUT 0 3 1 or OUT W 0 3 32 or OUT W 0 7 32 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The OUT command activates turns on or deactivates turns off the output specified by IO If the formula least significant bit 1 then it s true on otherwise it s false off l OUT IO formula If bit 0 in the formula to the right of is 1 then set I O ON ...

Page 614: ...0 Set final position G Start motion WHILE PA 20000 Loop while motion continues LOOP Wait for desired position to pass OUT 1 0 Set output lo TMR 0 400 Use timer 0 for pulse width TWAIT WAIT 1000 wait 1 second LOOP EXAMPLE Set all I O to outputs and set their level to the value of x x 1 x can be 1 ON or 0 OFF i 0 WHILE i 6 Loops until i 6 OUT i x Set to output and turn on or off based on value of x ...

Page 615: ...on or actual position The main axis is assigned with the ENC0 or ENC1 command If the motor shaft moves the value of PA will be changed by the net number of encoder counts occurring during the shaft motion The primary encoder is tracked at all times it is independent of the operation mode of the SmartMotor or any error condition For details on adjusting the value of PA see the commands O formula O ...

Page 616: ...ncoder Step and Direction see page 374 ENC0 Encoder Zero Close Loop on Internal Encoder see page 425 ENC1 Encoder Zero Close Loop on External Encoder see page 426 R PC PC axis Position Commanded see page 619 R PMA Position Modulo Actual see page 626 R PT formula Position Absolute Target see page 658 Part 2 Commands PA ...

Page 617: ...d It will not affect the current state of the Interrupt Handler i e if the Interrupt Handler is enabled it will still be enabled after a PAUSE and its execution has no effect on the interrupt subroutine stack PAUSE is primarily used to put the main part of a program to sleep when a program is 100 driven by interrupt events Additionally PAUSE is very useful for debugging For instance you may wish t...

Page 618: ...E Pause to prevent END from disabling Interrupt no change to stack RESUME must be issued externally over communications it is not allowed to be compiled within a program END C0 Fault handler MTB 0 Motor will turn off with Dynamic breaking tell other motors to stop US 0 0 Set User Status Bit 0 to 1 Status Word 12 bit zero US ADDR 0 Set User Status Bit address to 1 Status Word 12 Bit address RETURNI...

Page 619: ...he PC Position Commanded command gets reads the commanded absolute position as follows l PC Commanded position of the motor shaft as a result of motion trajectory generation This may include a sum of concurrent moves such as a follow mode move combined with a position move l PC 0 Equivalent to a PC l PC 1 Reports the commanded position in the frame of reference for trajectory generator one l PC 2 ...

Page 620: ... Mode Follow active PRT 0 G 2 Set PRT 0 and start following with phase adjust active PRINT Adjust external encoder to 1000 counts 13 PRINT Then type GOSUB10 13 END C10 x CTR 1 PRINT The external encoder CTR 1 x 13 x PC 0 PRINT PC 0 x 13 x PC 1 PRINT PC 1 x 13 x PC 2 PRINT PC 2 x 13 PRINT PRA PRA 13 PRA will be zero because PRT 0 PRINT PRC PRC 13 PRC will be zero because PRT 0 Set relative distance...

Page 621: ...ype GOSUB10 GOSUB10 The external encoder CTR 1 1000 PC 0 1000 PC 1 0 PC 2 1000 PRA 0 PRC 0 After relative move the values are The external encoder CTR 1 1000 PC 0 3000 PC 1 2000 PC 2 1000 PRA 1991 PRC 2000 Position Error 9 RELATED COMMANDS R PA Position Actual see page 615 R PT formula Position Absolute Target see page 658 Part 2 Commands PC PC axis ...

Page 622: ... DESCRIPTION The PI pi constant command gets the mathematical value of pi 3 141592 The trigonometric functions SIN COS and TAN require degrees as input The functions ASIN ACOS and ATAN return values in units of degrees Therefore this constant is useful especially in cases where you need to convert radians to degrees EXAMPLE af 7 ATAN af 6 180 PI Set af 7 to arctan result converted to radians RELAT...

Page 623: ...communications ports It uses position error to perform the PID calculation to control the servo drive stage The user program code if any is executed when the microprocessor is not involved in these activities Both velocity and acceleration SRC 2 and SRC 2 are impacted by the PID setting However there are no effects from the PID setting on CLK and WAIT The values of 1 2 4 and 8 mean the PID filter ...

Page 624: ...city 1200 RPM ADT a Accel Decel 62 5 RPS 2 PID4 PID updates every 4 servo samples WAIT w Wait time 1 second VT v Velocity 600 RPM ADT a Accel Decel 15 625 RPS 2 PID8 PID updates every 8 servo samples WAIT w Wait time 1 second VT v Velocity 300 RPM ADT a Accel Decel 3 9063 RPS 2 PID2 Return to Default PID WAIT w Wait time 1 second END In the previous example although the values used for Velocity Ac...

Page 625: ...ration Target see page 257 R AT formula Acceleration Target see page 280 R DT formula Deceleration Target see page 390 RSP Report Sampling Rate and Firmware Revision see page 678 R SAMP Sampling Rate see page 690 SRC enc_src Source Follow and or Cam Encoder see page 720 R VT formula Velocity Target see page 788 Part 2 Commands PID ...

Page 626: ... or a variable DETAILED DESCRIPTION The PMA Position Modulo Actual command reads the actual motor position in modulo counts This counter is affected by the O and OSH commands NOTE The value of PMA is always positive The PML command is used to configure the modulo rollover point When the encoder travels in a positive direction the modulo count will increase When the count equals or exceeds the valu...

Page 627: ...econd GOSUB 10 Print positions PMT 3000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions PMT 1000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions END C10 Subroutine 10 PRINT Actual absolute position PA 13 PRINT Actual modulo position PMA 13 RETURN Return to command after GOSUB RELATED COMMANDS ENC0 Encoder Zero Close Loop on Internal Encoder see page 425 EN...

Page 628: ...ails TYPICAL VALUES 0 1000000 PML minimum and maximum values are speed dependent see details DEFAULT VALUE 1000 FIRMWARE VERSION 5 x and later COMBITRONIC PML 3 1234 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The PML command is used to get read or set the modulo limit The modulo counter PMA can have a range of values where the lowest value is 0 and the h...

Page 629: ...econd GOSUB 10 Print positions PMT 3000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions PMT 1000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions END C10 Subroutine 10 PRINT Actual absolute position PA 13 PRINT Actual modulo position PMA 13 RETURN Return to command after GOSUB RELATED COMMANDS ENC0 Encoder Zero Close Loop on Internal Encoder see page 425 EN...

Page 630: ...he shortest distance to get from the current position to the requested position with respect to the PML limit Therefore the motor may move in either a clockwise or counterclockwise direction based on the one that produces the shortest motion in modulo terms For example assume PML 4000 and the current commanded position PC is 0 If PMT 3000 then the motor will actually move counterclockwise by 1000 ...

Page 631: ...econd GOSUB 10 Print positions PMT 3000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions PMT 1000 G TWAIT Modulo move WAIT 1000 Wait 1 second GOSUB 10 Print positions END C10 Subroutine 10 PRINT Actual absolute position PA 13 PRINT Actual modulo position PMA 13 RETURN Return to command after GOSUB RELATED COMMANDS ENC0 Encoder Zero Close Loop on Internal Encoder see page 425 EN...

Page 632: ... 2147483648 to 2147483647 DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The PRA Position Relative Actual command is used to get read the actual position relative to the point where the move started This includes position error in addition to the commanded relative move NOTE This command is primarily for use in MP mode but will also work in MV mode Other modes ...

Page 633: ...1 x 13 x PC 2 PRINT PC 2 x 13 PRINT PRA PRA 13 PRA will be zero because PRT 0 PRINT PRC PRC 13 PRC will be zero because PRT 0 Set relative distance velocity target and Accel Decel values PRT 2000 VT 5000 ADT 100 G 1 TWAIT 1 Start Position Relative phase adjust PRINT After relative move the values are 13 x CTR 1 PRINT The external encoder CTR 1 x 13 x PC 0 PRINT PC 0 x 13 x PC 1 PRINT PC 1 x 13 x P...

Page 634: ...Animatics SmartMotor Developer s Guide Rev L Page 634 of 909 RELATED COMMANDS R PA Position Actual see page 615 R PC PC axis Position Commanded see page 619 R PRC Position Relative Commanded see page 635 Part 2 Commands PRA ...

Page 635: ...DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The PRC Position Relative Commanded command is used to get read the commanded position relative to the point where the move started This mode does not consider position error it only reports the change in the trajectory calculated position from the start of the move NOTE This is primarily for use in MP mode but wil...

Page 636: ...1 x 13 x PC 2 PRINT PC 2 x 13 PRINT PRA PRA 13 PRA will be zero because PRT 0 PRINT PRC PRC 13 PRC will be zero because PRT 0 Set relative distance velocity target and Accel Decel values PRT 2000 VT 5000 ADT 100 G 1 TWAIT 1 Start Position Relative phase adjust PRINT After relative move the values are 13 x CTR 1 PRINT The external encoder CTR 1 x 13 x PC 0 PRINT PC 0 x 13 x PC 1 PRINT PC 1 x 13 x P...

Page 637: ... Animatics SmartMotor Developer s Guide Rev L Page 637 of 909 RELATED COMMANDS R PA Position Actual see page 615 R PC PC axis Position Commanded see page 619 R PRA Position Relative Actual see page 632 Part 2 Commands PRC ...

Page 638: ...ows the value of STDOUT which is 8 USB port by default For STDOUT details see STDOUT formula on page 725 l To explicitly output to the Class 6 SmartMotor s communication port 0 use the PRINT0 command For details see PRINT0 on page 642 l To explicitly output to the Class 6 SmartMotor s USB port use the PRINT8 command For details see PRINT8 on page 649 For version 5 x firmware the PRINT command outp...

Page 639: ... to other motors Raw ASCII code values are prefixed by the sign as follows Character Format space 32 tab 9 carriage return 13 line feed 10 CAUTION Do not use a comment marker within PRINT It will cause a compiler error PRINT will wait to begin execution until previous commands have completed transmission from the transmit buffer There is a practical difference between PRINT a b c and the sequence ...

Page 640: ...outines 13 WAIT 10 PRINT 128 GOSUB5 13 tell all motors to run subroutine C5 WAIT 10 PRINT 129 GOSUB10 13 Tell Motor 1 to run subroutine C10 WAIT 10 PRINT 130 GOSUB20 13 Tell Motor 2 to run subroutine C20 WAIT 10 PRINT 131 GOSUB30 13 Tell Motor 3 to run subroutine C30 x 123 PRINT 132 GOSUB x 13 Tell Motor 4 to run subroutine C123 v 100000 a 100 p 2000 PRINT 130 ADT a VT v 13 Set speed and accel dec...

Page 641: ... ADT 100 VT 100000 MP PT 2000 G End of Demonstration RELATED COMMANDS R BAUD channel formula Set BAUD Rate RS 232 and RS 485 see page 297 CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 OCHN Open Channel see page 601 PRINT0 Print Data to Communications Port 0 see page 642 PRINT1 Print Data to Communications Port 1 see page 646 PRINT8 Print Data to USB Port see page 649...

Page 642: ...TE For firmware versions earlier than version 6 0 refer to the PRINT command For details see PRINT on page 638 One or more items see the following list may be transmitted from COM 0 using the PRINT0 command The items are separated with commas Therefore the number of arguments to the PRINT0 command is flexible l Strings of ASCII text can be specified with quotes PRINT0 Hello world l Variables may b...

Page 643: ...line feed 10 CAUTION Do not use a comment marker within PRINT0 It will cause a compiler error PRINT0 will wait to begin execution until previous commands have completed transmission from the transmit buffer There is a practical difference between PRINT0 a b c and the sequence PRINT0 a PRINT0 b PRINT0 c Executing from within a program PRINT0 a b c will output the values of a b and c without the pos...

Page 644: ...outines 13 WAIT 10 PRINT0 128 GOSUB5 13 tell all motors to run subroutine C5 WAIT 10 PRINT0 129 GOSUB10 13 Tell Motor 1 to run subroutine C10 WAIT 10 PRINT0 130 GOSUB20 13 Tell Motor 2 to run subroutine C20 WAIT 10 PRINT0 131 GOSUB30 13 Tell Motor 3 to run subroutine C30 x 123 PRINT0 132 GOSUB x 13 Tell Motor 4 to run subroutine C123 v 100000 a 100 p 2000 PRINT0 130 ADT a VT v 13 Set speed and acc...

Page 645: ...3 ADT 100 VT 100000 MP PT 2000 G End of Demonstration RELATED COMMANDS R BAUD channel formula Set BAUD Rate RS 232 and RS 485 see page 297 CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 OCHN Open Channel see page 601 PRINT Print Data to Communications Port see page 638 PRINT1 Print Data to Communications Port 1 see page 646 PRINT8 Print Data to USB Port see page 649 P...

Page 646: ...L VALUES See details DEFAULT VALUE N A FIRMWARE VERSION 5 0 x 5 16 x or 5 32 x series only Not available on 6 0 or later firmware COMBITRONIC N A DETAILED DESCRIPTION NOTE The PRINT1 command is not available for version 6 0 or later firmware The PRINT1 command is used to transmit output data to serial communications channel 1 On a D style motor I O pins 4 and 5 are used which is also known as the ...

Page 647: ...outines 13 WAIT 10 PRINT1 128 GOSUB5 13 Tell all motors to run subroutine C5 WAIT 10 PRINT1 129 GOSUB10 13 Tell Motor 1 to run subroutine C10 WAIT 10 PRINT1 130 GOSUB20 13 Tell Motor 2 to run subroutine C20 WAIT 10 PRINT1 131 GOSUB30 13 Tell Motor 3 to run subroutine C30 x 123 PRINT1 132 GOSUB x 13 Tell Motor 4 to run subroutine C123 v 100000 a 100 p 2000 PRINT1 130 ADT a VT v 13 Set speed and acc...

Page 648: ...3 ADT 100 VT 100000 MP PT 2000 G End of Demonstration RELATED COMMANDS R BAUD channel formula Set BAUD Rate RS 232 and RS 485 see page 297 CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 OCHN Open Channel see page 601 PRINT Print Data to Communications Port see page 638 PRINT0 Print Data to Communications Port 0 see page 642 PRINT8 Print Data to USB Port see page 649 P...

Page 649: ...nsmit buffer is cleared from previous PRINT8 statements READ REPORT N A WRITE N A LANGUAGE ACCESS N A UNITS N A RANGE OF VALUES See details TYPICAL VALUES See details DEFAULT VALUE N A FIRMWARE VERSION 6 0 and later COMBITRONIC N A DETAILED DESCRIPTION The PRINT8 command is used to transmit output data to the Class 6 SmartMotor s USB port The only difference between PRINT0 and PRINT8 is the destin...

Page 650: ...outines 13 WAIT 10 PRINT8 128 GOSUB5 13 Tell all motors to run subroutine C5 WAIT 10 PRINT8 129 GOSUB10 13 Tell Motor 1 to run subroutine C10 WAIT 10 PRINT8 130 GOSUB20 13 Tell Motor 2 to run subroutine C20 WAIT 10 PRINT8 131 GOSUB30 13 Tell Motor 3 to run subroutine C30 x 123 PRINT8 132 GOSUB x 13 Tell Motor 4 to run subroutine C123 v 100000 a 100 p 2000 PRINT8 130 ADT a VT v 13 Set speed and acc...

Page 651: ...00 VT 100000 MP PT 2000 G End of Demonstration RELATED COMMANDS R BAUD channel formula Set BAUD Rate RS 232 and RS 485 see page 297 CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 OCHN Open Channel see page 601 PRINT Print Data to Communications Port see page 638 PRINT0 Print Data to Communications Port 0 see page 642 PRINT1 Print Data to Communications Port 1 see page...

Page 652: ...position It allows a relative distance move to be specified when the motor is in Position mode l PRT formula Sets the relative target position l x PRT Gets the relative target position and assigns it to the variable x The target is in terms of encoder counts to travel in the range 2147483648 to 2147483647 Either during or after a move the relative distance will be added to the current trajectory p...

Page 653: ...repeat in reverse direction G 2 Begin to follow master signal in SECOND trajectory MP 1 Set FIRST TRAJECTORY mode to Position mode VT 100000 Set velocity to run over top of gearing ADT 100 Set accel decel to run over gearing PRT 1000 Set relative move G 1 Shift all motion 1000 counts in positive direction RELATED COMMANDS ADT formula Acceleration Deceleration Target see page 257 R EL formula Error...

Page 654: ... Axis 1 127 DEFAULT VALUE N A FIRMWARE VERSION 5 x series only not available in version 5 32 x x COMBITRONIC N A DETAILED DESCRIPTION NOTE This command requires a Combitronic supported motor Although this command does not support Combitronic syntax it does use Combitronic communication to pass information between other motors The PRTS command is used to set the synchronized relative target positio...

Page 655: ...Y axis PTS 2000 5 6 1000 7 500 8 Two motor X axis X X plus Y Z axes In these cases the same position velocity and acceleration data sent to motor address 5 is also sent to motor address 6 with both motors driving the gantry s X axis EXAMPLE Synchronized relative and supplemental synchronized move ADTS 100 Set target synchronized accel decel VTS 10000 Set target synchronized velocity PRTS 3000 1 40...

Page 656: ...E This command requires a Combitronic supported motor Although this command does not support Combitronic syntax it does use Combitronic communication to pass information between other motors The PRTSS command allows supplemental axis moves to be added and synchronized with the previous motion commanded by PTS or PRTS Issue the additional axis commands after a PTS or PRTS command but before the nex...

Page 657: ...nchronized accel decel VTS 10000 Set target synchronized velocity PRTS 3000 1 4000 2 1000 3 Set synchronized relative target positions PRTSS 2000 4 Set supplemental synchronized relative target GS Start synchronized motion TSWAIT Wait for synchronized motions to complete RELATED COMMANDS ADTS formula Acceleration Deceleration Target Synchronized see page 259 GS Start Synchronized Motion GO Synchro...

Page 658: ...or negative and then follow with a G command PT formula sets the target position in Position mode NOTE While PT allows a range of 2 147 483 648 to 2 147 483 647 at these extremes the relative distance from one end to the other is greater than 32 bits Therefore the calculated move within the motor will overflow and may move opposite of the expected direction To avoid this problem a best practice is...

Page 659: ...imum accel decel MV Set Velocity mode G Start motion WHILE EA 100 Loop while position error is small LOOP Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program ...

Page 660: ...UE N A FIRMWARE VERSION 5 x series only not available in version 5 32 x x COMBITRONIC N A DETAILED DESCRIPTION NOTE This command requires a Combitronic supported motor Although this command does not support Combitronic syntax it does use Combitronic communication to pass information between other motors The PTS command is used to set the synchronized target position It allows you to identify two o...

Page 661: ...1 pos2 addr2 addr2 pos3 addr3 axis3 This is illustrated in the following examples If you are using the PRTS command substitute PRTS in place of PTS below Position target X 2000 Position target Y 1000 Position target Z 500 Motor address X 5 Motor address X 6 Motor address Y 7 Motor address Z 8 PTS 2000 5 6 1000 7 Two motor X axis X X plus Y axis PTS 2000 5 6 1000 7 500 8 Two motor X axis X X plus Y...

Page 662: ...rtMotor Developer s Guide Rev L Page 662 of 909 PTSS Position Target Synchronized Supplemental see page 664 TSWAIT Trajectory Synchronized Wait see page 749 VTS formula Velocity Target Synchronized Move see page 791 Part 2 Commands PTS ...

Page 663: ...move This distance represents the vector distance of 2 or 3 dimensional moves computed by the PTS or PRTS command After a PTS or PRTS command the combined distance is stored in the PTSD variable so that it may be read by the programmer For more details see Synchronized Motion on page 175 EXAMPLE Assign a value for a frame of reference d PTSD Assign to d the vector sum distance in encoder counts of...

Page 664: ...mand requires a Combitronic supported motor Although this command does not support Combitronic syntax it does use Combitronic communication to pass information between other motors The PTSS command allows supplemental axis moves to be added and synchronized with the previous PTS or PRTS commanded motion Issue the additional axis commands after a PTS or PRTS command but before the next GS command T...

Page 665: ...rts a synchronized move ADTS 100 Set target synchronized accel decel VTS 100000 Set target synchronized velocity x 1000 y 2000 z 500 a 100 b 200 PTS x 1 y 2 z 3 Set next positions axes 1 2 3 PTSS a 4 Set supplemental position axes 4 PTSS b 5 Set supplemental position axes 5 GS Go starts the synchronized move RELATED COMMANDS ADTS formula Acceleration Deceleration Target Synchronized see page 259 G...

Page 666: ...ynchronized move to the target position After a PTS or PRTS command the combined distance is stored in the PTST variable in milliseconds so that it may be used by the programmer For more details see Synchronized Motion on page 175 EXAMPLE t PTST 2 Calculate time in milliseconds to complete half of a predefined synchronized move TMR 0 t Start timer that will timeout halfway through the move GS Star...

Page 667: ...o be assigned to seed the random number generator l RANDOM formula Sets the random seed value Any 32 bit value is accepted l x RANDOM Gets the next value from the random number generator and assigns it to the variable x The output of the random number generator is an integer whole number in the range from 0 to 2147483647 The number generated is not truly random it does follow a predictable sequenc...

Page 668: ... can be used to accomplish this For instance if you need numbers in the range from 100 to 100 then the following formula may be helpful a RANDOM 201 100 EXAMPLE x 200000 Max distance full stroke of actuator in encoder counts PT RANDOM x Use Modulo function and RANDOM function to create random position targets within max stroke RELATED COMMANDS N A Part 2 Commands RANDOM formula ...

Page 669: ...ss is interrupted and only part of the program is loaded then the RCKS value will not match the value expected by the host When the user program is erased with the Clear EEPROM feature of SMI technically a simple program with an END command is loaded then the returned value from RCKS is 000000 0000E1 P The first group of six hex digits are related to program labels For example C100 is a target for...

Page 670: ...le DETAILED DESCRIPTION The RES command is used to get the resolution of the encoder for example a RES This command is the preferred method for obtaining the encoder resolution It is simple to include it in user programs and it takes into account any special scaling or compensation NOTE Any program that requires the encoder resolution should use this command instead of placing a hard coded value i...

Page 671: ...tions per second Calculating multipliers Input Output af 2 SAMP 1 0 RES 60 65536 NatVel RPM Multiplier af 3 RES 1 0 SAMP 60 65536 RPM NatVel Multiplier af 4 SAMP 1 0 RES 65536 NatVel RPS Multiplier af 5 RES 1 0 SAMP 65536 RPS NatVel Multiplier af 6 af 5 SAMP RPS 2 NatAD Multiplier af 7 af 4 SAMP NatAD RPS 2 Multiplier Examples Suppose you wish to set a Velocity of 3000 RPM This method simply uses ...

Page 672: ...tly paused It is designed to be issued externally over communications and should not be compiled within a program NOTE RESUME is intended to manually resume a program from a command terminal for debugging purposes the program must be at a PAUSE and not executing an interrupt or subroutine The RESUME command only operates on PAUSE in the current context of the program Examples of different contexts...

Page 673: ...E Pause to prevent END from disabling Interrupt no change to stack RESUME must be issued externally over communications it is not allowed to be compiled within a program END C0 Fault handler MTB 0 Motor will turn off with Dynamic breaking tell other motors to stop US 0 0 Set User Status Bit 0 to 1 Status Word 12 bit zero US ADDR 0 Set User Status Bit address to 1 Status Word 12 Bit address RETURNI...

Page 674: ... Subroutines present a great opportunity to partition and organize your code When the RETURN command is invoked program execution continues immediately after the GOSUB that initiated the subroutine call RETURN is normally executed from within a program but with care the HOST terminal may also be used to issue a RETURN instruction In order to execute the RETURN program statement the processor needs...

Page 675: ...1 Wait for terminal commands WAIT 100 Report terminal errors IF Bs PRINT 13 SCAN ERROR 13 Zs ENDIF LOOP RETURN Return to line just below GOSUB10 command RELATED COMMANDS C number Command Label see page 348 END End Program Code Execution see page 431 GOSUB label Subroutine Call see page 463 RETURNI Return Interrupt see page 676 RUN Run Program see page 682 RUN Halt Program Execution Until RUN Recei...

Page 676: ...DETAILED DESCRIPTION The RETURNI command is used to terminate an interrupt subroutine within a user program This is different than terminating a subroutine with the RETURN command For details see RETURN on page 674 NOTE Subroutines present a great opportunity to partition and organize your code Interrupt subroutines end with the RETURNI command to distinguish them from ordinary subroutines After t...

Page 677: ...with dynamic braking tell other motors to stop US 0 0 Set User Status Bit 0 to 1 Status Word 12 bit zero US ADDR 0 Set User Status Bit address to 1 Status Word 12 Bit address RETURNI RELATED COMMANDS C number Command Label see page 348 DITR int Disable Interrupts see page 388 EITR int Enable Interrupts see page 417 END End Program Code Execution see page 431 GOSUB label Subroutine Call see page 46...

Page 678: ...rns a five digit value of the PID sample period followed by an ASCII string code representing the firmware version NOTE There is no SP or x SP form of the command as this command is not meant for use in a user program The following table shows PID rates and RSP responses Command PID Trajectory Update Rate Period µsec SAMP Report RSP Report PID1 16 kHz 62 5 16000 06250 5 PID2 8 kHz default 125 8000...

Page 679: ...e Rev L Page 679 of 909 RELATED COMMANDS PID Proportional Integral Differential Filter Rate see page 623 RSP1 Report Firmware Compile Date see page 680 RSP5 Report Network Card Firmware Version see page 681 R SAMP Sampling Rate see page 690 Part 2 Commands RSP ...

Page 680: ...IRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The RSP1 report command returns the date and time that the motor firmware was compiled NOTE There is no SP1 or x SP1 form of the command as this command is not meant for use in a user program All version 5 xx series motors respond in the form of Month Day Year HH MM SS EXAMPLE Terminal command sent to an SM23165D SmartMotor with 5 ...

Page 681: ...T VALUE N A FIRMWARE VERSION 6 0 and later COMBITRONIC N A DETAILED DESCRIPTION The RSP5 command reports the network interface card firmware version NOTE There is no SP5 or x SP5 form of the command as this command is not meant for use in a user program All version 6 x series SmartMotors respond in the form of n n n n Refer to the following example EXAMPLE Terminal command sent to a SmartMotor RSP...

Page 682: ...program with a truly fresh start use the Z command to completely reset the motor as if it were just powered up For details see Z on page 806 If a program exists within the SmartMotor user EEPROM it will automatically run every time the motor is turned on To prevent this make RUN the first command of your user program Or if you wish place a RUN command further down in your program At power up the p...

Page 683: ... 1000000 Set target velocity PT 1000000 Set target position MP Mode Position PRINT EXECUTING TRAJECTORY 13 G Begin motion END Required END Program output is Enter RUN to start LOADING TRAJECTORY EXECUTING TRAJECTORY RELATED COMMANDS END End Program Code Execution see page 431 GOSUB label Subroutine Call see page 463 GOTO label Branch Program Flow to a Label see page 465 LOAD Download Compiled User...

Page 684: ...within the SmartMotor user EEPROM it will automatically run every time the motor is turned on To prevent this make RUN the first command of your user program Or if you wish place a RUN command further down in your program At power up the program will automatically execute only down to the RUN statement The program execution will stop at that point NOTE Programs that are deliberately started with t...

Page 685: ...target position MP Mode Position PRINT EXECUTING TRAJECTORY 13 G Begin motion END Required END Program output is Enter RUN to start LOADING TRAJECTORY EXECUTING TRAJECTORY RELATED COMMANDS END End Program Code Execution see page 431 GOSUB label Subroutine Call see page 463 GOTO label Branch Program Flow to a Label see page 465 LOAD Download Compiled User Program to Motor see page 518 LOCKP Lock Pr...

Page 686: ...S 3 or S 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION CAUTION Careful use of the S command is vital It causes an emergency stop and the resulting motion is very abrupt The S command causes an emergency stop It does not turn the motor off it sets the target position to the current position The resulting commanded motion is very abrupt In some cases it w...

Page 687: ...m accel decel MV Set Velocity mode G Start motion WHILE EA 100 Loop while position error is small LOOP Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1023 Restore current limit to maximum END End program REL...

Page 688: ...l communications go over the same two parallel wires the SADDR command must be in the program Whereas in an RS 232 network where communications travel from one motor to the next addressing can be accomplished from a host or master motor The address can be from 0 to 120 Address 0 is the global address the motor has no unique address it is used to talk to all motors on a network at once EXAMPLE SADD...

Page 689: ... 1 2 second for each motor to ECHO through the same string to the next motor NOTE At this point each motor will have run the exact same code causing successive motors downstream to receive the same command string from the number of motors upstream SWITCH a Check the value of a CASE 1 SADDR1 Set address to 1 GOSUB10 BREAK CASE 2 SADDR2 Set address to 2 GOSUB20 BREAK CASE 3 SADDR3 Set address to 3 G...

Page 690: ...get read the sample rate in Hertz Hz You can issue SAMP to read sample rate at any time This represents the update rate of the motion trajectory and PID loop Therefore knowing this rate can aid the choice of PID tuning parameters or acceleration and velocity values This command is the preferred method for obtaining the sample rate It is simple to include it in user programs NOTE Instead of placing...

Page 691: ...D Native Accel decel NatVel Native Velocity RPM revolutions per minute RPS revolutions per second Calculating multipliers Input Output af 2 SAMP 1 0 RES 60 65536 NatVel RPM Multiplier af 3 RES 1 0 SAMP 60 65536 RPM NatVel Multiplier af 4 SAMP 1 0 RES 65536 NatVel RPS Multiplier af 5 RES 1 0 SAMP 65536 RPS NatVel Multiplier af 6 af 5 SAMP RPS 2 NatAD Multiplier af 7 af 4 SAMP NatAD RPS 2 Multiplier...

Page 692: ...ave addr index sub index length where slave addr is a variable such as x ab x aw x al x or a constant such as 2 a motor with CAN address 2 The valid range is from 1 to 127 SDO s cannot be broadcast If slave addr is to itself then internal loopback is used instead index is a variable such as x ab x aw x al x or a constant such as 24640 for object 6040hex sub index is a variable such as x ab x aw x ...

Page 693: ...or write or NMT the specific code returned from the device will be readable using command RCAN 4 l In the case of successful SDO read or write or NMT command then the RCAN 4 shall report 0 immediately after such command The user should always inspect for value 0 to know that an operation was successful l The user program is responsible for implementing any strategy for retry and or giving up after...

Page 694: ...ed device To do this use SDOWR slave addr index sub index length value where slave addr is a variable such as x ab x aw x al x or a constant such as 2 a motor with CAN address 2 The valid range is from 1 to 127 SDO s cannot be broadcast If slave addr is to itself then internal loopback is used instead index is a variable such as x ab x aw x al x or a constant such as 24640 for object 6040hex sub i...

Page 695: ...s l After each SDO read or write or NMT the specific code returned from the device will be readable using command RCAN 4 l In the case of successful SDO read or write or NMT command then the RCAN 4 shall report 0 immediately after such command The user should always inspect for value 0 to know that an operation was successful l The user program is responsible for implementing any strategy for retr...

Page 696: ...d if they are configured to transmit from COM channel 0 see STDOUT formula on page 725 This command is typically used when a program has PRINT statements that may be interfering with debugging efforts For instance when opening a polling window or issuing serial commands during debugging it may become necessary to suppress PRINT statements in a program The SILENT command does not prevent the SmartM...

Page 697: ...INT statements on channel 0 PRINT Position PA 13 Print the Actual Position WAIT 3000 Wait 3 seconds LOOP Loop back to WHILE 1 command END RELATED COMMANDS ECHO Echo Incoming Data on Communications Port 0 see page 396 ECHO_OFF Turn Off Echo on Communications Port 0 see page 400 PRINT Print Data to Communications Port see page 638 STDOUT formula Set Device Output see page 725 SILENT1 Silence Outgoin...

Page 698: ...from a user program are also suppressed if they are configured to transmit from COM channel 1 see STDOUT formula on page 725 This command is typically used when a program has PRINT1 statements that may be interfering with debugging efforts For instance when opening a polling window or issuing serial commands during debugging it may become necessary to suppress PRINT1 statements in a program The SI...

Page 699: ...le a is set to 0 suppress PRINT statements on channel 1 PRINT1 Position PA 13 Print the actual position WAIT 3000 Wait 3 seconds LOOP Loop back to WHILE 1 command END RELATED COMMANDS ECHO1 Echo Incoming Data on Communications Port 1 see page 399 ECHO_OFF1 Turn Off Echo on Communications Port 1 see page 402 PRINT1 Print Data to Communications Port 1 see page 646 STDOUT formula Set Device Output se...

Page 700: ...ing point sine af 1 SIN arg where arg is in degrees and may be an integer i e a aw 0 or floating point variable i e af 0 Integer or floating point constants may also be used i e 23 or 23 7 respectively This command cannot have within the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is not allow...

Page 701: ...details see Variables and Math on page 195 EXAMPLE af 0 SIN 57 3 Set array variable SIN 57 3 Raf 0 Report value of af 0 variable RSIN 57 3 Report SIN 57 3 af 1 42 3 42 3 degrees af 0 SIN af 1 Variables may be put in the parenthesis Raf 0 END Program output is 0 841510772 0 841510772 0 673012495 RELATED COMMANDS R ACOS value Arccosine see page 253 R ASIN value Arcsine see page 278 R ATAN value Arct...

Page 702: ...actual address or a variable DETAILED DESCRIPTION The SLD command is used to disable the software limits The limits are enabled using the SLE command As an alternative to hardware limits connected to the limit inputs of the SmartMotor software limits are virtual limit switches that offer distinct advantages For example in the event the actual position of the motor strays beyond the desired region ...

Page 703: ...MP Set the SmartMotor to position mode ADT 100 Set a value for accel decel VT 20000 Set a value for velocity target PT 7000 G TWAIT Move to absolute position 7000 no fault PT 7000 G TWAIT Move to absolute position 7000 no fault PT 9000 G TWAIT Move to absolute position 9000 The motor will fault at position 8000 and set the following bits Bo Motor is off in Status Word 0 Brs Historical positive S W...

Page 704: ... variable DETAILED DESCRIPTION The SLE command is used to enable the software limits The software limits are disabled using the SLD command For details see SLD on page 702 As an alternative to hardware limits connected to the limit inputs of the SmartMotor software limits are virtual limit switches that offer distinct advantages For example in the event the actual position of the motor strays beyo...

Page 705: ...MP Set the SmartMotor to position mode ADT 100 Set a value for accel decel VT 20000 Set a value for velocity target PT 7000 G TWAIT Move to absolute position 7000 no fault PT 7000 G TWAIT Move to absolute position 7000 no fault PT 9000 G TWAIT Move to absolute position 9000 The motor will fault at position 8000 and set the following bits Bo Motor is off in Status Word 0 Brs Historical positive S W...

Page 706: ...al commands While in sleep mode a SmartMotor will continue to echo if in ECHO mode all characters received over the network but it will ignore all commands other than a WAKE command The most common use of the SLEEP command is to keep daisy chained SmartMotors from responding to commands in a program that is being downloaded to another SmartMotor in the same chain If a program is running when a Sma...

Page 707: ... SLEEP1 13 Cause channel 1 RS 485 of motor 2 to SLEEP through channel 0 RS 232 PRINT 130 WAKE1 13 Cause channel 1 RS 485 of motor 2 to WAKE through channel 0 RS 232 Assuming channel 1 RS 485 is open on all motors with the OCHN command the same commands can be sent with the PRINT1 command OCHN RS4 1 N 9600 1 8 C Open ports 4 and 5 as RS 485 channel 1 PRINT1 130 SLEEP 13 Cause channel 0 RS 232 of mo...

Page 708: ... 1 serial commands While in sleep mode a SmartMotor will continue to echo if in ECHO mode all characters received over the network but it will ignore all commands other than a WAKE1 command The most common use of the SLEEP1 command is to keep daisy chained SmartMotors from responding to commands in a program that is being downloaded to another SmartMotor in the same chain If a program is running w...

Page 709: ...SLEEP1 13 Cause channel 1 RS 485 of motor 2 to SLEEP through channel 0 RS 232 PRINT 130 WAKE1 13 Cause channel 1 RS 485 of motor 2 to WAKE through channel 0 RS 232 Assuming channel 1 RS 485 is open on all motors with the OCHN command the same commands can be sent with the PRINT1 command OCHN RS4 1 N 9600 1 8 C Open ports 4 and 5 as RS 485 channel 1 PRINT1 130 SLEEP 13 Cause channel 0 RS 232 of mot...

Page 710: ... g a SLM l SLM Set soft limit mode When setting the soft limit it can be made to trigger a flag only not cause a fault or to trigger the flag and cause a fault as follows l SLM 0 Make a soft limit trigger the flag only will not cause a fault l SLM 1 Make a soft limit trigger the flag and cause a fault default mode As an alternative to hardware limits connected to the limit inputs of the SmartMotor...

Page 711: ...o position mode ADT 100 Set a value for accel decel VT 20000 Set a value for velocity target PT 7000 G TWAIT Move to absolute position 7000 no fault PT 7000 G TWAIT Move to absolute position 7000 no fault PT 9000 G TWAIT Move to absolute position 9000 The motor will fault at position 8000 and set the following bits Bo Motor is off in Status Word 0 Brs Historical positive S W limit in Status Word 1...

Page 712: ...e software limit as follows l SLN Get left negative software limit l SLN Set left negative software limit The range of allowed values is from 2147483648 to 2147483647 However this extreme range should not be used because the soft limits may not trigger at the wrap point due to the mathematical sign change Further it is not recommended to operate absolute position applications near the wrap point T...

Page 713: ...tive software limit to 8000 encoder counts SLE Enable software limits MP Set the SmartMotor to position mode ADT 100 Set a value for accel decel VT 20000 Set a value for velocity target PT 7000 G TWAIT Move to absolute position 7000 no fault PT 7000 G TWAIT Move to absolute position 7000 no fault PT 9000 G TWAIT Move to absolute position 9000 The motor will fault at position 8000 and set the follo...

Page 714: ...t positive software limit as follows l SLP Get right positive software limit l SLP Set right positive software limit The range of allowed values is 2147483648 to 2147483647 However this extreme range should not be used because the soft limits may not trigger at the wrap point due to the mathematical sign change It is not recommended to operate absolute position applications near the wrap point Thi...

Page 715: ...tive software limit to 8000 encoder counts SLE Enable software limits MP Set the SmartMotor to position mode ADT 100 Set a value for accel decel VT 20000 Set a value for velocity target PT 7000 G TWAIT Move to absolute position 7000 no fault PT 7000 G TWAIT Move to absolute position 7000 no fault PT 9000 G TWAIT Move to absolute position 9000 The motor will fault at position 8000 and set the follo...

Page 716: ...S axis1 DEFAULT VALUE smc6dev01 FIRMWARE VERSION 6 0 and later COMBITRONIC N A DETAILED DESCRIPTION The SNAME command sets a unique PROFINET station name For proper PROFINET operation each SmartMotor must have a unique station name set with the SNAME instruction The command setting is nonvolatile Therefore it will be remembered between power cycles There are specific limitations to the SNAME conve...

Page 717: ...S 1 0 127 TYPICAL VALUES N A DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The SP2 command returns a single value of the bootloader revision This number can be used in a program to inspect the firmware version For example x SP2 assigns the value of the bootloader revision to the variable x EXAMPLE RSP2 5 RELATED COMMANDS R FW Firmware Version see page 454 RS...

Page 718: ...eger 0 2147483647 Output Positive integer 0 46340 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION NOTE For a floating point version see FSQRT value on page 452 The SQRT command gets reads the integer square root of a variable or value as follows SQRT x where x any positive integer 0 The integer square root of x is the greatest integer the square root of x For ...

Page 719: ... variable r SQRT 4 RSQRT 4 s SQRT 6 Set variable s SQRT 6 RSQRT 6 t SQRT 8 Set variable t SQRT 8 RSQRT 8 u SQRT a Set variable u SQRT a RSQRT a PRINT r s t u 13 Print value of each variable END Program output is 2 2 2 3 2 2 2 3 RELATED COMMANDS R FSQRT value Floating Point Square Root see page 452 Part 2 Commands SQRT value ...

Page 720: ...is used to select the input source used in Follow and Cam modes The SRC command allows the SmartMotor to use the many advanced following and camming functions even without an external encoder input For example through the use of the SRC command either the external encoder or a fixed rate virtual encoder can be used as the input source to the cam This fixed rate encoder also works through the Follo...

Page 721: ...tten to EEPROM SRC 2 Use the virtual encoder MCE 0 Force linear interpolation MCW 1 0 Use table 1 from point 0 MFMUL 1 Simple 1 1 ratio from virtual encoder MFDIV 1 Simple 1 1 ratio from virtual encoder MFA 0 MFD 0 Disable virtual encoder ramp up ramp down sections MFSLEW 24000 1 Table is 6 segments 4000 encoder counts each Specify the second argument as a 1 to force this number as the output tota...

Page 722: ...is means that if a tenth GOSUB is called before any intervening RETURN statements the stack will overflow and the program execution may fail The stack region is managed using a pointer to the currently effective return address storage location The STACK command directly resets this pointer to its initial starting condition By doing this the STACK command clears all RETURN addresses in the stack qu...

Page 723: ...7 Seventh GOSUB without return C7 x x 1 PRINT x x 13 GOSUB8 Eighth GOSUB without return C8 x x 1 PRINT x x 13 GOSUB9 Ninth GOSUB without return C9 x x 1 PRINT x x 13 GOSUB10 if this GOSUB is called the program WILL crash STACK Reset internal stack which GOSUB10 allows this GOSUB to execute without crashing the program PRINT 13 RETURN FROM GOSUB10 OK 13 END Program output is x 1 x 2 x 3 x 4 x 5 x 6...

Page 724: ...NDS END End Program Code Execution see page 431 GOSUB label Subroutine Call see page 463 GOTO label Branch Program Flow to a Label see page 465 PAUSE Pause Program Execution see page 617 RUN Run Program see page 682 RUN Halt Program Execution Until RUN Received see page 684 Part 2 Commands STACK ...

Page 725: ...UNITS Port number RANGE OF VALUES 0 1 D style motor 0 8 Class 6 motor TYPICAL VALUES 0 1 D style motor 0 8 for Class 6 motor DEFAULT VALUE 0 D style motor 8 Class 6 motor FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The STDOUT command is used to select the motor output channel for report commands as follows For D style motors with firmware version 5 x only l STDOUT 0 Sets in...

Page 726: ...4 and 5 as RS 485 channel 1 STDOUT 0 Channel 0 is selected for output of report commands RPA The Absolute Position will be sent out channel 0 RS 232 STDOUT 1 Channel 1 is selected for output of report commands RPA The Absolute Position will be sent out channel 1 RS 485 END RELATED COMMANDS none Part 2 Commands STDOUT formula ...

Page 727: ...t execution time the program interpreter evaluates the SWITCH formula value and then tests the CASE numbers for an equal value in the programmed order l If the SWITCH formula value does equal the CASE number then program execution continues with the command immediately after l If the SWITCH formula value does not equal the CASE number then the next CASE statement is evaluated l If the SWITCH formu...

Page 728: ... 23 13 BREAK ENDS The first line SWITCH v lets the SmartMotor know that it is checking the value of the variable v Each following CASE begins the section of code that tells the SmartMotor what to do if v is equal to that case EXAMPLE a 3 Assign a value WHILE a 4 PRINT 13 a a SWITCH a Test the value CASE 3 PRINT MAX VALUE 13 BREAK CASE 1 Negative test values are valid CASE 2 Note no BREAK here CASE...

Page 729: ...TIVE a 1 NEGATIVE a 0 ZERO a 1 NO MATCH VALUE a 2 NO MATCH VALUE a 3 MAX VALUE RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 CASE formula Case Label for SWITCH Block see page 355 DEFAULT Default Case for SWITCH Structure see page 382 ENDS End SWITCH Structure see page 435 Part 2 Commands SWITCH formula ...

Page 730: ... still tracks position and can still be read with the PA variable but the PID loop is off and the motor does not servo or run a trajectory In voltage commutation modes MDT MDE and MDS MT sets the PWM signal to the drive at a fixed percentage For any given setting of T and no applied load there will be a velocity at which the Back EMF BEMF of the motor causes the acceleration to stop and the veloci...

Page 731: ...e one unit every PID sample period up to 8000 units MT Select torque mode T 8000 Final torque after the TS ramp that we want TS 65536 Increase the torque by 1 unit of T per PID sample G Begin move RELATED COMMANDS MT Mode Torque see page 589 R TS formula Torque Slope see page 747 Part 2 Commands T formula ...

Page 732: ...erial communication channel 0 if that ability was previously suppressed with the SILENT command This command is typically used following the download a user program to a SmartMotor within a daisy chain It could also be used to un silence a debug routine TALK may be issued from the terminal or within a user program However the command is typically sent from a host EXAMPLE Shows the use of SILENT an...

Page 733: ...rn Off Echo on Communications Port 0 see page 400 PRINT Print Data to Communications Port see page 638 SILENT Silence Outgoing Communications on Communications Port 0 see page 696 SILENT1 Silence Outgoing Communications on Communications Port 1 see page 698 STDOUT formula Set Device Output see page 725 TALK1 Talk on Communications Port 1 see page 734 Part 2 Commands TALK ...

Page 734: ...nnel 1 if that ability was previously suppressed with the SILENT1 command This command is typically used following the download of a user program to a SmartMotor within a daisy chain It could also be used to un silence a debug routine TALK1 may be issued from the terminal or within a user program However the command is typically sent from a host EXAMPLE Shows use of SILENT1 and TALK1 RUN Wait here...

Page 735: ...urn Off Echo on Communications Port 1 see page 402 PRINT Print Data to Communications Port see page 638 SILENT Silence Outgoing Communications on Communications Port 0 see page 696 SILENT1 Silence Outgoing Communications on Communications Port 1 see page 698 STDOUT formula Set Device Output see page 725 TALK Talk on Communications Port 0 see page 732 Part 2 Commands TALK1 ...

Page 736: ...a floating point tangent af 1 TAN arg where arg is in degrees and may be an integer i e a aw 0 or floating point variable i e af 0 Integer or floating point constants may also be used i e 23 or 23 7 respectively This command cannot have within the parenthesis math operators other parenthetical functions or a Combitronic request from another motor For example x FABS PA is allowed but x FABS PA 3 is...

Page 737: ...e details see Variables and Math on page 195 EXAMPLE af 0 TAN 45 7 Set array variable TAN 45 7 Raf 0 Report value of af 0 variable RTAN 45 7 Report TAN 45 7 af 1 78 3 78 3 degrees af 0 TAN af 1 Variables may be put in the parenthesis Raf 0 END Program output is 1 024738192 1 024738192 4 828816413 RELATED COMMANDS R ACOS value Arccosine see page 253 R ASIN value Arcsine see page 278 R ATAN value Ar...

Page 738: ...asured on the main drive board close to the motor The current temperature of the motor can be determined by assigning TEMP to a user variable The units are in degrees Celsius Some motors are equipped with thermistors inside the motor windings These additional sensors can be read using RTEMP 1 RTEMP 2 and RTEMP 3 Report Command Assignment to Integer Assignment to Floata Meaning RTEMP or RTEMP 0 t T...

Page 739: ...Torque mode at TEMP TH the motor would shut off It would not restart until both the condition TH TEMP 5 was true and the ZS command or Zh was reissued a 5 WHILE a 10 TH TEMP a WAIT 4000 G WAIT 4000 IF Bt BREAK ENDIF a a 1 LOOP PRINT MOTOR RESTARTED WHEN TH TEMP a END Program output is Restart announced at TH TEMP 6 RELATED COMMANDS R Bh Bit Overheat see page 301 R TH formula Temperature High Limit...

Page 740: ... DEFAULT VALUE 85 FIRMWARE VERSION 5 x and later COMBITRONIC TH 3 60 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION TH formula sets the maximum allowable temperature high limit at which the SmartMotor is permitted to continually servo If the temperature goes above the TH value the amplifier will turn off Bh will be set to 1 the motor off bit Bo will be set t...

Page 741: ...eat value 24 Read Bh overheat flag 1 Read the temperature 29 Read TH overheat value 25 Read Bh overheat flag 1 Read the temperature 29 Read TH overheat value 26 Read Bh overheat flag 1 Read the temperature 29 Read TH overheat value 27 Read Bh overheat flag 1 Read the temperature 29 Read TH overheat value 28 Read Bh overheat flag 1 Read the temperature 29 Read TH overheat value 29 Read Bh overheat ...

Page 742: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 742 of 909 R TEMP TEMP arg Temperature Motor see page 738 Part 2 Commands TH formula ...

Page 743: ...able DETAILED DESCRIPTION The TMR command gets reads or sets the timer as follows l TMR timer Get a specific timer value e g a TMR 0 gets the time value from timer 0 l TMR timer time as a command Set a timer ID to a specific time value e g TMR 0 1000 sets timer 0 to 1000 milliseconds The range of timer is from 0 to 3 The range of time is from 0 to 2147483647 A negative number can be set however it...

Page 744: ...000 p 0 Reset variable p PT p Set Target Position G Start motion TWAIT Wait for move to complete EITR 0 Re enable Interrupt TMR 0 1000 Re start timer ENDIF GOTO10 Go back to label END End never reached C20 Interrupt Subroutine Label TMR 0 1000 Re start timer p p 4000 Increment variable p PT p Set Target Position G Start Motion RETURNI Return to main loop EXAMPLE for pulse width WHILE 1 0 O 0 Reset...

Page 745: ...er DETAILED DESCRIPTION The TRQ command is used to get read the real time torque demand of the PID or MT mode of the motor In MT mode the value reported will reflect any applied TS ramp NOTE The value returned by TRQ and RTRQ will typically be one less than the T torque value because zero is counted as the minimum amount of commanded torque TRQ is always PWM commanded to the motor at any time and ...

Page 746: ...ev L Page 746 of 909 Now use the TRQ command to read the real time torque PRINT TRQ Program output is 2999 RELATED COMMANDS MT Mode Torque see page 589 R T formula Torque Open Loop Commanded see page 730 R TS formula Torque Slope see page 747 Part 2 Commands TRQ ...

Page 747: ...S command is used to get read or set the torque slope as follows l TS Get torque slope setting l TS formula Set torque slope In Torque mode MT the TS command allows new torque settings to be reached gradually rather than instantly Values may be from 1 to 2147483647 A value of 1 disables the slope feature and causes new torque values to be reached immediately A TS setting of 65536 will increase the...

Page 748: ...mmands Moog Animatics SmartMotor Developer s Guide Rev L Page 748 of 909 PRINT TS 65536 RELATED COMMANDS MT Mode Torque see page 589 R T formula Torque Open Loop Commanded see page 730 Part 2 Commands TS formula ...

Page 749: ...until the move has been completed Note that a standard TWAIT command would not work in cases where the motor issuing the PTS and GS commands had a zero length contribution to the total move The TSWAIT command was designed to handle this situation For more details see Synchronized Motion on page 175 EXAMPLE The following example is a synchronized move in its simplest form The code could be download...

Page 750: ...n For example if there were three consecutive motion commands they would all execute sequentially Therefore before the motor could even start to move the last motion command would dominate However using the TWAIT command allows each move command to occur and complete An alternative to TWAIT is WHILE Bt LOOP The TWAIT command and WHILE Bt construction terminate when the trajectory ends Depending on...

Page 751: ...e interrupt TWAIT Wait till reaches 48000 p 0 Reset variable p PT p Set target position G Start motion TWAIT Wait for move to complete EITR 0 Re enable interrupt TMR 0 1000 Restart timer ENDIF GOTO10 Go back to label RELATED COMMANDS R Bt Bit Trajectory In Progress see page 340 TSWAIT Trajectory Synchronized Wait see page 749 WAIT formula Wait for Specified Time see page 795 Part 2 Commands TWAIT ...

Page 752: ...A 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The UIA command gets reads the motor current applied to the windings The value is returned in milliamperes Therefore divide by 1000 to convert it to amperes The value returned is a measure of current in the motor for thermal limiting It should not be assumed it is directly related to torque This current is n...

Page 753: ...LOOP Prevent double trigger ENDIF LOOP C100 IF UIA i 2 If current is twice as much GOTO200 bypass PRINT line below ENDIF PRINT Current is above i mAmps 13 C200 PRINT Current twice as high as it should be 13 RETURN RELATED COMMANDS R Bh Bit Overheat see page 301 R TEMP TEMP arg Temperature Motor see page 738 R TH formula Temperature High Limit see page 740 R UJA Bus Voltage see page 754 Part 2 Comm...

Page 754: ...address use the actual address or a variable DETAILED DESCRIPTION The UJA command gets reads the bus voltage The value returned is in millivolts Therefore divide the value by 1000 to convert it to volts For example 24000 equals 24 volts The voltage is measured at the motor s drive bridge it is not the control power supplied for the CPU and electronics If a DE motor is used then this is an importan...

Page 755: ...tor Developer s Guide Rev L Page 755 of 909 RELATED COMMANDS R Bh Bit Overheat see page 301 R TEMP TEMP arg Temperature Motor see page 738 R TH formula Temperature High Limit see page 740 R UIA Motor Current see page 752 Part 2 Commands UJA ...

Page 756: ... values These bits are visible in motor status words 12 and 13 which means they can also be used to trigger user program interrupts The UO command sets or clears the bit specified by bit If the formula s least significant bit 1 then it s true 1 otherwise it s false 0 l UO bit formula If bit 0 in the formula to the right of is 1 then set bit to a 1 otherwise when it is even or zero clear the bit to...

Page 757: ...onic or CANopen This allows a hosting application to run an interrupt routine in the SmartMotor User bits can also be addressed as words with or without a mask to define the affected bits For more details see User Status Bits on page 213 EXAMPLE UO 0 a b Sets user bit to 1 if the bit wise operation result is odd else sets it to 0 UO W 1 7 a Sets user bits 16 17 and 18 to the value of the lower thr...

Page 758: ...contains special codes created by the compiler to handle program flow statements like GOTO or WHILE LOOP which are interspersed with the program text In contrast the UPLOAD command returns the user program in readable text For details see UPLOAD on page 760 CAUTION The UP command is not permitted within a user program Unexpected behavior may result Procedure for using this command 1 Issue the UP c...

Page 759: ...rogram Comments are removed by the SMI software compiler which is normal for any compiled computer program When uploading a program from a SmartMotor in a daisy chain use the SILENT and SLEEP commands to prevent the other SmartMotors in the chain from issuing unexpected characters After the upload is complete re enable normal communications to those motors with the WAKE and TALK commands RELATED C...

Page 760: ...th all of the binary information created by the compiler For details see UP on page 758 CAUTION The UPLOAD command is not permitted within a user program Unexpected behavior may result Procedure for using this command 1 Issue the UPLOAD command 2 IF ECHO is enabled UPLOAD and a hex 20 will be returned 3 8 bytes of program data will be returned 4 issue the hex 06 character to request more data 5 Th...

Page 761: ...puter program When uploading a program from a SmartMotor in a daisy chain use the SILENT and SLEEP commands to prevent the other SmartMotors in the chain from issuing unexpected characters After the upload is complete re enable normal communications to those motors with the WAKE and TALK commands RELATED COMMANDS SLEEP Ignore Incoming Commands on Communications Port 0 see page 706 SILENT Silence O...

Page 762: ...status bits to 0 These bits are visible in motor status words 12 and 13 which means they can also be used to trigger user program interrupts The UR command sets or clears the bit specified by bit If the expression least significant bit 1 then it s true 1 otherwise it s false 0 l UR bit Clear bit to a 0 l UR W word Clear all bits in the specified word l UR W word mask Clear all bits in the specifie...

Page 763: ...in the SmartMotor User bits can also be addressed as words with or without a mask to define the affected bits For more details see User Status Bits on page 213 EXAMPLE UR 19 RESET User Bit 3 in second User Bit Status Word UR W 0 RESET all User Bits in first User Status Word UR W 1 7 RESET User bits 16 17 and 18 RELATED COMMANDS R B word bit Status Byte see page 291 ITR Int StatusWord Bit BitState ...

Page 764: ...r status bits to 1 These bits are visible in motor status words 12 and 13 which means they can also be used to trigger user program interrupts The US command sets or clears the bit specified by bit If the expression least significant bit 1 then it s true 1 otherwise it s false 0 l US bit Set bit to a 1 l US W word Set all bits in the specified word l US W word mask Set all bits in the specified wo...

Page 765: ...ed bits For more details see User Status Bits on page 213 EXAMPLE US 0 SET User Bit 0 US W 0 a SET first three User Bits when a 7 EXAMPLE Fault handler subroutine shows use of MTB and US C0 Fault handler MTB 0 Motor will turn off with Dynamic braking tell other motors to stop US 0 0 Set User Status Bit 0 to 1 Status Word 12 bit zero US ADDR 0 Set User Status Bit address to 1 Status Word 12 Bit add...

Page 766: ...RONIC N A DETAILED DESCRIPTION The USB command is used to report the value of the specified USB status word or assign it to a variable as follows l x USB arg Assigns the value of the specified USB status word specified by arg to the variable x l RUSB arg Reports the value of the specified USB status word specified by arg RUSB and x USB are also permitted In these cases the value of arg is 0 Theref...

Page 767: ...Part 2 Commands Moog Animatics SmartMotor Developer s Guide Rev L Page 767 of 909 EXAMPLE x USB 0 Read the status of USB connection RELATED COMMANDS N A Part 2 Commands USB arg ...

Page 768: ...back driven motor when the drive is off The value reported is measured from the encoder so it is based on real world data rather than an internal calculation In order to filter the noise from this data an infinite impulse response IIR digital filter is applied An IIR filter is similar to a moving average but includes all previous data points The significance of the previous points is diminished wh...

Page 769: ...de example which also illustrates the use of af SAMP and RES is shown in RES on page 670 and SAMP on page 690 EXAMPLE monitor acceleration ramp O 0 Set up a velocity move EL 4000 ADT 10 v 1000000 VT v MV G WHILE VA v Monitor velocity while IF Be Accelerating BREAK Exit if position error ENDIF GOSUB5 Report trajectory velocity LOOP GOSUB5 Final report END C5 PRINT PRINT VC PRINT VC 13 Get print com...

Page 770: ...l Encoder see page 425 ENC1 Encoder Zero Close Loop on External Encoder see page 426 R RES Resolution see page 670 R SAMP Sampling Rate see page 690 VAC arg Velocity Actual filter Control see page 771 R VC Velocity Commanded see page 776 R VL formula Velocity Limit see page 778 R VT formula Velocity Target see page 788 Part 2 Commands VA ...

Page 771: ...lue used to set the time constant of the filter This command controls the filter used to measure the speed reported from the VA command RVA x VA A value of VAC 0 turns off this filtering so that VA reports raw data that may be highly quantized e g 0 65536 131072 Many applications require finer resolution Therefore many samples are averaged in a digital filter The maximum value of VAC is 65535 Howe...

Page 772: ...rued as the number of averaged samples it is the number of samples required for an abrupt change step function to reach 70 7 of the final value For instance refer to the second figure where a step function is approximated by setting a large value for acceleration The fourth bump has a time constant of 10922 samples However it is the same physical move as the others This means that it takes over on...

Page 773: ...o do this in a program 1 Issue a G command 2 Wait for the slew status bit to indicate the slew portion of a move 3 Wait 300 msec for the speed to settle to obtain a valid reading 4 Read VA with RVA or x VA Examples of RVA readings with different settings of VAC Part 2 Commands VAC arg ...

Page 774: ...eloper s Guide Rev L Page 774 of 909 Dramatic Example of Filter Causing Lag in Readings EXAMPLE VAC 65000 Set VAC to default value VAC 65400 Set VAC to higher value to smooth out VA readings resulting in slower update time Part 2 Commands VAC arg ...

Page 775: ...e constant to 60 milliseconds ADT 10 Set a value for accel decel VT 200000 Set a value for velocity target G Start motion WHILE B 3 15 0 LOOP Wait for velocity target reached bit to be 1 WAIT 300 Wait 300 milliseconds PRINT Velocity VA 13 Print the actual velocity END RELATED COMMANDS VA Velocity Actual see page 768 R VC Velocity Commanded see page 776 R VL formula Velocity Limit see page 778 R VT...

Page 776: ...reported velocity is dependent on the direction A velocity in the negative direction will be reported negative by this command while a positive velocity is reported as a positive value The VC command gets reads the commanded velocity as follows l VC Reads the real time commanded velocity combined from all trajectory generators NOTE It is not the actual velocity VA it is the velocity calculated by ...

Page 777: ...F Be Accelerating BREAK Exit if position error ENDIF GOSUB5 Report trajectory velocity LOOP GOSUB5 Final report END C5 PRINT PRINT VC PRINT VC 13 Get print commanded velocity PRINT RVC RVC Report commanded velocity WAIT 4000 RETURN Program output is RUN PRINT VC 565 RVC 1395 PRINT VC 322065 RVC 323155 PRINT VC 643845 RVC 644915 PRINT VC 965605 RVC 966675 PRINT VC 1000000 RVC 1000000 RELATED COMMAN...

Page 778: ...e VL command gets reads or sets the velocity limit in revolutions per minute RPM as follows l VL Read the current setting of the limit in RPM l VL formula Set the velocity fault limit in RPM NOTE If the specified VL value exceeds 32767 this command will force the value to 0 When the motor exceeds this speed traveling clockwise or counterclockwise the motor will fault and motion stops The speed det...

Page 779: ...eveloper s Guide Rev L Page 779 of 909 RELATED COMMANDS VA Velocity Actual see page 768 VAC arg Velocity Actual filter Control see page 771 R VC Velocity Commanded see page 776 R VT formula Velocity Target see page 788 Part 2 Commands VL formula ...

Page 780: ...n 0 and 32767 Then use the VST command to store the data or the VLD command to retrieve the data NOTE Regardless of the size of the variable being accessed the EPTR pointer always refers to bytes To read in a series of values and assign these values to a sequence of user variables use the VLD variable number command The first parameter variable specifies the name of the user variable as the start ...

Page 781: ...n a value to the variable a EPTR 100 Set EEPROM pointer to 100 VST a 1 Store into EEPROM EPTR incremental to 104 automatically EPTR 100 Set EEPROM to 100 again VLD b 1 Load from location 100 into the variable b Rb Report result will be 123456789 EXAMPLE Storing and retrieving a single 16 bit standard variable aw 0 32000 Assign a value to the 16 bit array word 0 EPTR 100 Set EEPROM pointer to 100 V...

Page 782: ...ll report 13 Rz Will report 14 EXAMPLE Storing seven 16 bit numbers into EEPROM i 10 Using the variable i as index to an array variable j 7 Using the variable j as the number of sequential variables you wish to store aw i 1111 aw i 1 2222 aw i 2 3333 aw i 3 4444 aw i 4 1111 aw i 5 2222 aw i 6 3333 EPTR 3200 Set EEPROM memory pointer location to 3200 VST aw i j Starting at address 3200 store j or s...

Page 783: ...10 Using the variable i as index to an array variable j 7 Using the variable j as the number of sequential Variables you wish to store VLD aw r s WHILE t 5 PRINT 13 aw t r t t 1 LOOP END Output is 111 222 333 444 1111 RELATED COMMANDS R EPTR formula EEPROM Pointer see page 440 VST variable number Variable Save see page 784 Part 2 Commands VLD variable number ...

Page 784: ... a value between 0 and 32767 Then use the VST command to store the data or the VLD command to retrieve the data NOTE Regardless of the size of the variable being accessed the EPTR pointer always refers to bytes To store a series of values into EEPROM use the VST variable number command The first parameter variable specifies the name of the first user variable of a sequence of variables containing ...

Page 785: ...n a value to the variable a EPTR 100 Set EEPROM pointer to 100 VST a 1 Store into EEPROM EPTR incremental to 104 automatically EPTR 100 Set EEPROM to 100 again VLD b 1 Load from location 100 into the variable b Rb Report result will be 123456789 EXAMPLE Storing and retrieving a single 16 bit standard variable aw 0 32000 Assign a value to the 16 bit array word 0 EPTR 100 Set EEPROM pointer to 100 V...

Page 786: ...ll report 13 Rz Will report 14 EXAMPLE Storing seven 16 bit numbers into EEPROM i 10 Using the variable i as index to an array variable j 7 Using the variable j as the number of sequential variables you wish to store aw i 1111 aw i 1 2222 aw i 2 3333 aw i 3 4444 aw i 4 1111 aw i 5 2222 aw i 6 3333 EPTR 3200 Set EEPROM memory pointer location to 3200 VST aw i j Starting at address 3200 store j or s...

Page 787: ...10 Using the variable i as index to an array variable j 7 Using the variable j as the number of sequential Variables you wish to store VLD aw r s WHILE t 5 PRINT 13 aw t r t t 1 LOOP END Output is 111 222 333 444 1111 RELATED COMMANDS R EPTR formula EEPROM Pointer see page 440 VLD variable number Variable Load see page 780 Part 2 Commands VST variable number ...

Page 788: ...ed to get read or set the velocity target as follows l VT Read the current target velocity l VT frm Set the target velocity The VT command specifies a target velocity specifies speed and direction for velocity moves or a slew speed for position moves The value must be in the range 2147483648 to 2147483647 Note that in position moves this value is the unsigned speed of the move and does not imply d...

Page 789: ...1 0 65536 RPM VT af 0 RES 60 0 SAMP 65536 A useful Scale Factor Multiplier code example which also illustrates the use of af SAMP and RES is shown in RES on page 670 and SAMP on page 690 EXAMPLE Shows use of ADT PT and VT MP Set mode position ADT 5000 Set target accel decel PT 20000 Set absolute position VT 10000 Set velocity G Start motion END End program EXAMPLE Routine homes motor against a har...

Page 790: ... Resolution see page 670 R SAMP Sampling Rate see page 690 VA Velocity Actual see page 768 VAC arg Velocity Actual filter Control see page 771 R VC Velocity Commanded see page 776 R VL formula Velocity Limit see page 778 VTS formula Velocity Target Synchronized Move see page 791 Part 2 Commands VT formula ...

Page 791: ...rted motor Although this command does not support Combitronic syntax it does use Combitronic communication to pass information between other motors The VTS command sets the maximum velocity target for synchronized moves The motion along a synchronized move is defined along the path in 2D or 3D space depending on the number of axes defined by PTS or PRTS The VTS command is specific to defining the ...

Page 792: ...chronized target position on motor 1 2 and 3 GS Initiate synchronized move TSWAIT Wait until synchronized move ends END Required END RELATED COMMANDS ADTS formula Acceleration Deceleration Target Synchronized see page 259 PID Proportional Integral Differential Filter Rate see page 623 PRTS Position Relative Target Synchronized see page 654 PRTSS Position Relative Target Synchronized Supplemental s...

Page 793: ...las and conditional testing UNITS N A RANGE OF VALUES Input 0 17 Output 0 65535 TYPICAL VALUES N A DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC RW 16 3 x W 16 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The W word command reports the specified 16 bit status word Refer to the following table Also see Status Words on page 879 and see Logic...

Page 794: ...d bits word 0 also used when DMX is active 13 User controlled bits word 1 14 15 Reserved 16 I O state word 0 17 I O state word 1 D style with AD1 option only EXAMPLE ab 10 W 16 Read the status of on board I O via controller s status word EXAMPLE IF W 0 49152 49152 Look at both limits bits 14 15 with bit mask 49152 32768 16384 GOSUB100 Execute subroutine ENDIF C100 Subroutine code here RETURN RELAT...

Page 795: ... to 4000 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION WAIT formula pauses program execution for a specified amount of time Time is measured in milliseconds e g WAIT 1000 is one second EXAMPLE Dynamically change from Velocity mode to Torque mode MV Set motor to Velocity mode VT 100000 Set velocity to 100000 ADT 1000 Set accel decel to 1000 G Go Start moving ...

Page 796: ...t velocity to 100000 ADT 1000 Set accel decel to 1000 PT 1000000 Set commanded absolute position to 1000000 G Go Start moving WAIT 8000 Wait about 8 seconds VT 800000 Set new velocity of 800000 ADT 500 Set new accel decel of 500 G Initiate change in speed and acceleration RELATED COMMANDS R CLK formula Millisecond Clock see page 363 R TMR timer time Timer see page 743 TWAIT gen Trajectory Wait see...

Page 797: ...WAKE state FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION WAKE clears the SLEEP condition of a SmartMotor Except for the WAKE command a SmartMotor that has been put to SLEEP rejects all other commands received through the primary port communications channel 0 WAKE is typically used by a host communicating over the serial channel to isolate individual motors This may be require...

Page 798: ...ause channel 0 RS 232 of motor 2 to WAKE PRINT 130 SLEEP1 13 Cause channel 1 RS 485 of motor 2 to SLEEP through channel 0 RS 232 PRINT 130 WAKE1 13 Cause channel 1 RS 485 of motor 2 to WAKE through channel 0 RS 232 Assuming channel 1 RS 485 is open on all motors with the OCHN command the same commands can be sent with the PRINT1 command OCHN RS4 1 N 9600 1 8 C Open ports 4 and 5 as RS 485 channel ...

Page 799: ...state FIRMWARE VERSION 5 0 x 5 16 x or 5 32 x series only COMBITRONIC N A DETAILED DESCRIPTION WAKE1 clears the SLEEP1 condition of a SmartMotor Except for the WAKE1 command a SmartMotor that has been put to SLEEP1 rejects all other commands received through the channel 1 serial port WAKE1 is typically used by a host communicating over the serial channel to isolate individual motors This may be re...

Page 800: ...ause channel 0 RS 232 of motor 2 to WAKE PRINT 130 SLEEP1 13 Cause channel 1 RS 485 of motor 2 to SLEEP through channel 0 RS 232 PRINT 130 WAKE1 13 Cause channel 1 RS 485 of motor 2 to WAKE through channel 0 RS 232 Assuming channel 1 RS 485 is open on all motors with the OCHN command the same commands can be sent with the PRINT1 command OCHN RS4 1 N 9600 1 8 C Open ports 4 and 5 as RS 485 channel ...

Page 801: ...erminated with a corresponding LOOP exit statement see LOOP on page 522 WHILE control blocks may be nested see the second example NOTE WHILE is not a valid terminal command it is only valid within a user program The WHILE LOOP control block looks like this WHILE formula is true execute program command here LOOP The formula is evaluated the first time WHILE is encountered l If true not zero program...

Page 802: ... equal d and a is greater than b 1 If a BREAK command is encountered while executing a WHILE control block program execution unconditionally redirects to the program code following the LOOP statement For details see BREAK on page 326 EXAMPLE Routine stops motion if voltage drops EIGN W 0 Disable hardware limits ZS Clear faults MDS Sine mode commutation ADT 100 Set maximum accel decel VT 100000 Set...

Page 803: ...origin for move PT 40000 Set final position G Start motion WHILE PA 20000 Loop while motion continues LOOP Wait for desired position to pass OUT 1 0 Set output low TMR 0 400 Use timer 0 for pulse width TWAIT WAIT 1000 Wait 1 second LOOP END Interrupt Subroutine C1 OUT 1 1 Set output high again RETURNI RELATED COMMANDS BREAK Break from CASE or WHILE Loop see page 326 IF formula Conditional Program ...

Page 804: ...x and later COMBITRONIC X 3 or X 0 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The X command immediately abandons the current trajectory mode and causes the motor to slow to a stop using the current deceleration value DT in a servo mode or TS in torque mode NOTE This is different from the S command which does not consider the DT or TS value The X comman...

Page 805: ...000000 PT 5000000 G Start motion WHILE Bt While trajectory is active IF PA 80000 Set a position to look for X Decelerate to a stop PRINT Motion Stopped ENDIF LOOP END Required END Program output is Motion Stopped RELATED COMMANDS G Start Motion GO see page 456 S as command Stop Motion see page 686 Part 2 Commands X ...

Page 806: ...nd status bits will be restored back to their defaults Subsequent to a power up or reset the SmartMotor will 1 Initialize the motion mode status bits and variables 2 Hold the serial port closed for approximately second 3 Open and initialize the serial port 4 Delay for second At the end of this time the SmartMotor will examine the communications buffer The stored program will be aborted only if the...

Page 807: ...ut the motor NOTE If you get locked out and are unable to communicate with the SmartMotor you may be able to recover communications using the SMI software s Communication Lockup Wizard For more details see Communication Lockup Wizard on page 30 EXAMPLE Z Warning issuing this command will cause CPU reset immediately RELATED COMMANDS RUN Run Program see page 682 RUN Halt Program Execution Until RUN ...

Page 808: ...e WRITE Write only LANGUAGE ACCESS N A UNITS N A RANGE OF VALUES Input word 0 8 bit 0 15 TYPICAL VALUES Input word 0 6 bit 0 15 DEFAULT VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC Z 2 4 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION The Z word bit command resets the specified status bit as follows l Z word bit Clears specific status bit in the spe...

Page 809: ... I O commands OR OS OUT EXAMPLE Subroutine prints and resets channel 0 errors C9 IF CHN 0 If CHN0 0 IF CHN 0 1 PRINT BUFFER OVERFLOW ENDIF IF CHN 0 2 PRINT FRAMING ERROR ENDIF IF CHN 0 4 PRINT COMMAND SCAN ERROR ENDIF IF CHN 0 8 PRINT PARITY ERROR ENDIF Z 2 0 Reset CHN0 errors ENDIF RETURN RELATED COMMANDS R B word bit Status Byte see page 291 Z Total CPU Reset see page 806 ZS Global Reset System ...

Page 810: ...g Ba to zero If the current violation still exists Ba will again be set to 1 If the Ba flag is repeatedly set there may be a problem such as incorrect motor size Therefore verify the correct motor has been selected for the current task For details on motor sizing see the Moog Animatics Product Catalog EXAMPLE IF Ba Test flag PRINT OVER CURRENT Za Reset flag ENDIF WAIT 4000 IF Ba Retest flag PRINT ...

Page 811: ...CESS N A UNITS N A RANGE OF VALUES N A TYPICAL VALUES N A RESET VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Ze resets the following error position error flag Be to zero EXAMPLE IF Be Test flag PRINT Following Error Ze Reset flag ENDIF RELATED COMMANDS R Be Bit Following Error Limit see page 299 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see...

Page 812: ...AULT VALUE 0 FIRMWARE VERSION N A COMBITRONIC N A DETAILED DESCRIPTION The Zh command is used to reset an excessive temperature fault The motor s present temperature must be at least 5 degrees below the fault threshold set by TH reported by RTH for this command to take effect EXAMPLE Zh Resetting Thermal Fault status bit RELATED COMMANDS R Be Bit Following Error Limit see page 299 Z Total CPU Rese...

Page 813: ... A RESET VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Zl resets the historical left limit flag Bl to zero If you use Bl to detect the activation of the left limit be sure to reset it with Zl before rescanning for the bit EXAMPLE IF Bl Test flag PRINT Left Limit Latched Zl Reset flag ENDIF RELATED COMMANDS R Bl Bit Left Hardware Limit Historical see page 311 Z Total C...

Page 814: ...UE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The Zls command resets the left negative software limit latch Bls to zero If you use Bls to detect the activation of the left software limit be sure to reset it with Zls before rescanning for the bit EXAMPLE IF Bls Test flag PRINT Left Software Limit Latched Zls Reset flag ENDIF RELATED COMMANDS R Bls Bit Left Software Limit ...

Page 815: ...A RESET VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Zr resets the historical right limit flag Br to zero If you use Br to detect the activation of the right limit be sure to reset it with Zr before rescanning for the bit EXAMPLE IF Br Test flag PRINT Right Limit Latched Zr Reset flag ENDIF RELATED COMMANDS R Br Bit Right Hardware Limit Historical see page 324 Z Tota...

Page 816: ...VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The Zrs command resets the right positive software limit latch Brs to zero If you use Brs to detect the activation of the right software limit be sure to reset it with Zrs before rescanning for the bit EXAMPLE IF Brs Test flag PRINT Right Software Limit Latched Zrs Reset flag ENDIF RELATED COMMANDS R Brs Bit Right Software...

Page 817: ... FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION Zs resets the command error latch flag Bs to zero The Zs command can be used with the RBs report command to verify that the current firmware version recognizes what appears to be a valid command and data packet EXAMPLE IF Bs Test flag PRINT Syntax Error Zs Reset flag ENDIF RELATED COMMANDS R Bs Bit Syntax Error see page 338 Z Tot...

Page 818: ...T VALUE N A FIRMWARE VERSION 5 x and later COMBITRONIC ZS 3 where 3 is the motor address use the actual address or a variable DETAILED DESCRIPTION Almost any event that occurs within a SmartMotor gets recorded in system flags These flags can be read as part of a program or a host inquiry After a flag is read it must be reset so it can record the next event ZS resets all of the latched bits in the ...

Page 819: ... encoder Word 1 bit 3 Reset falling edge capture on internal encoder Word 1 bit 6 Reset rising edge capture on external encoder Word 1 bit 7 Reset falling edge capture on external encoder Word 2 bit 0 Reset COM 0 errors and bits in RCHN 0 Word 2 bit 1 Reset COM 1 errors and bits in RCHN 1 Word 2 bit 4 Reset CAN errors and associated error bits in RCAN Word 6 bit 14 Reset high bus flag Word 6 bit 1...

Page 820: ... Error Flag see page 811 Zh Reset Temperature Fault see page 812 Zl Reset Historical Left Limit Flag see page 813 Zls Reset Left Software Limit Flag Historical see page 814 Zr Reset Right Limit Flag Historical see page 815 Zrs Reset Right Software Limit Flag Historical see page 816 Zs Reset Command Syntax Error Flag see page 817 Zv Reset Velocity Limit Fault see page 821 Zw Reset Encoder Wrap Stat...

Page 821: ... LANGUAGE ACCESS N A UNITS N A RANGE OF VALUES N A TYPICAL VALUES N A DEFAULT VALUE 0 FIRMWARE VERSION 5 x and later COMBITRONIC N A DETAILED DESCRIPTION The Zv command is used to reset a velocity error fault EXAMPLE Zv Reset Velocity Fault status bit RELATED COMMANDS R Bv Bit Velocity Limit see page 342 Z Total CPU Reset see page 806 Z word bit Reset Specified Status Bit see page 808 ZS Global Re...

Page 822: ...ta so a valid position is from 2147483648 to 2147483647 If the motor moves out of this range the position will overflow or wraparound This is provided for information purposes Applications with continuous rotation Velocity mode Torque mode Relative Position mode Cam mode Follow mode may experience wraparound The motor will continue to operate but the user application may need to know this event oc...

Page 823: ...t 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 Cammi...

Page 824: ...llowing example is identical to the previous except that instead of pausing program execution during the move with the TWAIT a subroutine is used to monitor for excessive load during the moves This is an important distinction most SmartMotor programs should have the ability to react to events during motion EIGN W 0 Disable hardware limits ZS Clear faults ADT 100 Set maximum accel decel VT 100000 S...

Page 825: ... mode G Start motion WHILE EA 100 Loop while position error is small LOOP Loop back to WHILE O 100 While pressed declare home offset S Abruptly stop trajectory MP Switch to Position mode VT 20000 Set higher maximum velocity PT 0 Set target position to be home G Start motion TWAIT Wait for motion to complete AMPS 1000 Restore current limit to maximum END End Program Home Against a Hard Stop Advance...

Page 826: ... G TWAIT Set Motor to Zero RETURN Home Against a Hard Stop Two Motors Because the SmartMotor has the capability of lowering its own power level and reading its position error it can be programmed to gently feel for the end of travel This provides a means to develop a consistent home position subsequent to each power up Machine reliability requires the elimination of potential failure sources Elimi...

Page 827: ...ee 300 Home Error Limit tt 3000 Home Torque Limit hh 8000 Home Offset ll 8000 Maximum Differential motion between motors racking limit END C7 HOME TWO PARALLEL X AXIS MOTORs FROM MOTOR 1 ALONE zzz 0 Indicator for racking limit fault O 0 0 SET ORIGIN TO ZERO TO CHECK FOR RACKING AMPS 0 ii limit AMPS VT 0 vv rr Set Home velocity ADT 0 aa Set Home accel decel MV 0 Velocity mode G 0 tell both to go e ...

Page 828: ... at the index marker EIGN W 0 12 Assign Travel Limits as General Use Inputs ZS Clear Any Status Bits END C1 Home to index Relative Position Mode Note This method will go past and move back to index MP Set to Position mode Ai 0 Arm Index Capture Register ADT 3000 Set Accel Decel VT 200000 Set Velocity PRT RES 100 Set Relative Distance to just past one rev G TWAIT Go wait until move is complete PT I...

Page 829: ...ers ADT 100 Set maximum accel decel MV Set to Velocity mode d 10 Analog dead band 5000 full scale o 2500 Offset to allow negative swings m 40 Multiplier for speed w 10 Time delay between reads b 0 Seed b C10 Label to create infinite loop a INA V1 3 o Take analog 5 Volt FS reading x a b Set x to determine change in input IF x d Check if change beyond dead band VT b m Multiplier for appropriate spee...

Page 830: ...e pre seeded with zeros NOTE This example is a subroutine It would be called with the command GOSUB10 C10 Subroutine label EPTR 100 Set EEPROM pointer in memory VLD aa 2 Load 2 long variables from EEPROM IF Br If right limit then aa aa 1 Increment variable aa Zr Reset right limit state flag ENDIF IF Bl If left limit then bb bb 1 Increment variable bb Zl Reset left limit state flag ENDIF EPTR 100 R...

Page 831: ...Set Position mode G Start motion WHILE Bt Loop while motion continues IF IN 0 0 If input is low IF VT 10000 Check VT so change happens once VT 12000 Set new velocity G Initiate new velocity ENDIF ENDIF LOOP Loop back to WHILE END Pulse Output on a Given Position It is often necessary to fire an output when a certain position is reached There are many ways to do this with a SmartMotor This example ...

Page 832: ...1 second LOOP END Interrupt Subroutine C1 OUT 1 1 Set output high again RETURNI Stop Motion if Voltage Drops The voltage current and temperature of a SmartMotor are always known These values can be used within a program to react to changes In this example the SmartMotor begins a move and then stops motion if the voltage falls below 18 5 volts EIGN W 0 Disable hardware limits ZS Clear faults MDS Si...

Page 833: ...ned variable length segments defined on a point by point basis CTW 0 0 First cam point best practice to set to 0 0 because all cam base and motor position relative to this CTW 100 8000 Motor position start 100 cam base start 8000 CTW 200 10000 Motor position start 200 100 greater than previous point cam base start 10000 relative 2000 greater than previous point CTW 300 14000 Peak motor position of...

Page 834: ...gth from what is left between the ramp up down IF k 0 PRINT Ramps too long 13 END ENDIF GOSUB1 Write cam table GOSUB2 Run cam operation END C1 Write cam table one time IF q 123 RETURN ENDIF CTE 1 Erase cam table in EEPROM CTA p ss Make sure the number of CTW commands p CTW 0 CP 0 cam pointer or cam index pointer CTW 100 CP 1 CTW 500 CP 2 CTW 2000 CP 3 CTW 2000 CP 4 CTW 5000 CP 5 CTW 1000 CP 6 CTW ...

Page 835: ...t table G RETURN CAUTION When writing a cam table to EEPROM structure the program so that the cam table is not frequently rewritten or written from a loop Repeated erasing and rewriting can burn bits and corrupt data For details and sample code refer to Electronic Camming Notes and Best Practices on page 159 Camming Fixed Cam with Input Variables ...

Page 836: ...icted to 0 32767 ddd 360 Degrees you want to run signed value where positive is counter clockwise Restricted 3239 aaa 0 Angle to start at Restricted to 0 359 END C5 GOSUB 1 Write the cam GOSUB 0 Run the cam RETURN C0 Run the cam MC Cam mode xx aaa yy aaa 90 IF yy 0 yy yy 360 Modulo sign correction ENDIF IF CADDR 1 X axis MCW 1 xx Table 1 starting point ENDIF IF CADDR 2 Y axis MCW 1 yy Table 1 star...

Page 837: ...RINT Writing Tables Please wait 13 CTE 1 erase all flash tables CTA 361 80 Table will have 361 points each is 80 ticks fixed length data iii 0 WHILE iii 361 ppp 32767 SIN iii CTW ppp Write a point into table Length of segment set by CTA command PRINT Point iii position ppp 13 iii iii 1 Update counter LOOP PRINT Done Motor ADDR 13 q 123 RETURN CAUTION When writing a cam table to EEPROM structure th...

Page 838: ...program will perform a traverse takeup operation to produce a chevron winding pattern By winding in a chevron pattern each layer crosses diagonally over the previous layer s position The purpose of this pattern is to prevent the wound material from getting caught in the cracks of the previous layer EIGN W 0 ZS System parameters NOTE w c should evenly divide with no remainder c 8000 Master External...

Page 839: ...likely never needed MCE 2 Spline cam interpolation periodic sine wave arc motion Angle of the winding pattern is determined by the cam table points not MFMUL and MFDIV MFMUL 1 MFDIV 1 MCMUL and MCDIV affect cam table Changing this will change angle of winding and chevron shape MCMUL 1 MCDIV 1 SRC 2 This is for demo Change to SRC 1 for external encoder from master spool MFA 0 1 No ascend into motio...

Page 840: ...TERRUPT for polling CAN bus device EITR 3 ENABLE INTERRUPT 3 ITRE ENABLE ALL INTERRUPTS TMR 3 30 Start timer 3 for 30 milliseconds PAUSE END C300 CAN bus device has two data packets that will be loaded into x and y x SDORD 1 24592 0 2 Read 2 bytes from address 1 object 24592 0x6179 hex object 0x6010 sub index 0 e CAN 4 Trap error codes if any y SDORD 1 24608 0 2 Read 2 bytes from address 1 object ...

Page 841: ...DDR 1 CBAUD 125000 RUN EIGN W 0 ZS SILENT Enable master CANCTL 17 3 Make sure in pre op not operational NMT 0 128 Change analog output from 10V voltage 4 to 4 20mA 5 SDOWR 15 8192 13 1 5 Disable transmit and receive PDO for master to allow changing Set bit 31 a 2147483648 0x80000000 SDOWR 1 5120 1 4 a 0x1400 rx SDOWR 1 6144 1 4 a 0x1800 tx SDOWR 1 5121 1 4 a 0x1401 rx SDOWR 1 6145 1 4 a OX1801 tx ...

Page 842: ...a 399 0x0000018f f address 15 SDOWR 1 5120 1 4 a 0x1400 rx mapped to slave tx a 527 0x0000020f f address 15 SDOWR 1 6144 1 4 a 0x1800 tx mapped to slave rx a 655 0x0000028f f address 15 SDOWR 1 5121 1 4 a 0x1401 rx mapped to slave tx a 783 0x0000030f f address 15 SDOWR 1 6145 1 4 a 0x1801 tx mapped to slave rx Tell everyone to go operational NMT 0 1 b 1 WHILE 1 IF B 10 1 1 Z 10 1 Clear event flag ...

Page 843: ...Rx PDO 5 13 ENDIF Set the User Bits in Status Word 12 to reflect the status of the 8 inputs UO W 0 ab 2 255 Turn on outputs continuous count up ab 3 ab 3 1 b Set the User Bits in Status Word 13 to reflect the status of the 8 outputs UO W 1 ab 3 254 WAIT 100 LOOP END Part 3 Examples CAN Bus I O Block with PDO Poll ...

Page 844: ...ct 1A01h Transmit PDO Mapping Parameter 2 define x2204 8708 Object 2204h Mappable Variables aaa ddd define x2207 8711 Object 2207h External encoder follow max value where encoder rolls over i e 10 bit encoder would be 1023 define x2208 8712 Object 2208h External encoder follow input value define x2209 8713 Object 2209h External encoder follow control define x220A 8714 Object 220Ah External encoder...

Page 845: ...e from encoder IF CAN 4 0 Check error for a successful read A timeout is very likely until remote device is ready IF vvv 65535 406 Check lower 16 bits for profile type of device PRINT Found encoder 13 SWITCH vvv 65536 We want to look at the upper 16 bits CASE 1 PRINT Single turn absolute rotary encoder 13 t 1 BREAK CASE 2 PRINT Multi turn absolute rotary encoder 13 t 1 BREAK CASE 3 PRINT Single tu...

Page 846: ... Remote device has booted to the point of responding ENDIF IF vvv 65535 402 Check lower 16 bits for profile type of device PRINT Motor eee acting as an encoder 13 A motor acting as an encoder t 2 BREAK ENDIF ENDIF WAIT 500 Wait 1 2 second PRINT LOOP PRINT 13 rrr 0 Resolution IF t 1 rrr SDORD eee x6002 0 4 GOSUB10 rrr rrr 1 We want the max value not the number of steps IF CAN 4 0 PRINT Failed to re...

Page 847: ...ter transmits 32 bit actual position 0x6064 and follow motor receives as 32 bit encoder data 0x2208 3 IF t 2 We need to map a motor completely to get the position data SDOWR eee x1800 1 4 1073741439 GOSUB10 set Transmit Com Parameter START xC000 0181 SDOWR eee x1800 2 1 1 GOSUB10 set Transmit Com Parameter on every Sync x000 0001 SDOWR eee x1A00 0 1 0 GOSUB10 set Transmit map number of entries x00...

Page 848: ... x220A 0 2 100 GOSUB10 set MFMUL SDOWR fff x220B 0 2 100 GOSUB10 set MFDIV SDOWR fff x220C 0 4 20000 GOSUB10 set MFA control word x2209 determines if master or slave units SDOWR fff x220D 0 4 10000 GOSUB10 set MFD control word x2209 determines if master or slave units NMT 0 1 GOSUB10 Broadcast to whole network to go to operational state SDOWR fff x6060 0 1 11 GOSUB10 set Trajectory Mode to Mixed F...

Page 849: ...ssed and failed RETURN ENDIF SWITCH e NOTE Any error number 0 is Animatics specific to the SDORD SDOWR and NMT commands CASE 1 PRINT Timeout no response from remote device BREAK CASE 2 PRINT Multiple SDO commands simultaneously BREAK CASE 3 PRINT Master mode not enabled see CANCTL command BREAK CASE 4 PRINT Protocol not supported BREAK CASE 5 PRINT Transmission failure check cable Baud rate BREAK ...

Page 850: ...BREAK CASE 84148229 PRINT Out of memory BREAK CASE 100728832 PRINT Unsupported access to an object BREAK CASE 100728833 PRINT Attempt to read a write only object BREAK CASE 100728834 PRINT Attempt to write a read only object BREAK CASE 100794368 PRINT Object does not exist in the object dictionary BREAK CASE 100925505 PRINT Object cannot be mapped to the PDO BREAK CASE 100925506 PRINT Exceeds PDO ...

Page 851: ...meter written too low BREAK CASE 101253174 PRINT Maximum value is less than minimum value BREAK CASE 134217728 PRINT General error CANopen BREAK CASE 134217760 PRINT Data can t be sent to the application BREAK CASE 134217761 PRINT Data can t be sent to the application local control BREAK CASE 134217762 PRINT Data can t be sent to the application device state BREAK CASE 134217763 PRINT Object dicti...

Page 852: ...define GoInput 1 IN 6 Invert input 6 define 4BitBinaryInputs 15 IN W 0 15 Binary mask inputs 0 through 3 define FindHome GOSUB 100 define GearOutputPosition RES 40 0 Suppose 40 1 gear reducer define NormalSpeed 500000 define JogSpeed 10000 define FollwingError B 0 3 Following Error Status Bit The following code shows examples of using the above define variables DisableTravelLimits Disable travel l...

Page 853: ...mples Moog Animatics SmartMotor Developer s Guide Rev L Page 853 of 909 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 PRINT Subroutine x called 13 RETURN Part 3 Examples Text Replacement in an SMI Program ...

Page 854: ...mmand 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 RMODE Status Decoder 876 Mode Status Example 876 Scale Factor Calculation 877 Sample Rates 8...

Page 855: ... 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 Ambien...

Page 856: ...n its attempt to reach the target For example in terms of the position commands l Position Target PT The desired target position you are shooting for what you have specified as a target position value l Position Actual PA The current position in real time right now regardless of target or where it is being told to go l Position Commanded PC The position the controller processor is actually command...

Page 857: ...port actual position of the encoder or motor shaft l x PA PC would calculate following error at that moment l REA would report actual following error at that moment l RBt would report a 1 while moving because the trajectory is active After the move has completed RBt would report a 0 to indicate the trajectory is no longer active Appendix Motion Command Quick Reference ...

Page 858: ... 11 20 21 22 23 6 12 13 24 25 26 27 7 14 15 28 29 30 31 8 16 17 32 33 34 35 9 18 19 36 37 38 39 10 20 21 40 41 42 43 11 22 23 44 45 46 47 12 24 25 48 49 50 51 13 26 27 52 53 54 55 14 28 29 56 57 58 59 15 30 31 60 61 62 63 16 32 33 64 65 66 67 17 34 35 68 69 70 71 18 36 37 72 73 74 75 19 38 39 76 77 78 79 20 40 41 80 81 82 83 21 42 43 84 85 86 87 22 44 45 88 89 90 91 23 46 47 92 93 94 95 24 48 49 9...

Page 859: ... 83 164 165 166 167 42 84 85 168 169 170 171 43 86 87 172 173 174 175 44 88 89 176 177 178 179 45 90 91 180 181 182 183 46 92 93 184 185 186 187 47 94 95 188 189 190 191 48 96 97 192 193 194 195 49 98 99 196 197 198 199 50 100 101 200 201 202 203 Overlapping is little endian for byte and word order Integer Variable Memory Non Overlapping Name Quantity Type a z 26 32 bit signed aa zz 26 32 bit sign...

Page 860: ... 03 ETX 38 26 73 49 I 108 6C l 4 04 EOT 39 27 74 4A J 109 6D m 5 05 ENQ 40 28 75 4B K 110 6E n 6 06 ACK 41 29 76 4C L 111 6F o 7 07 BEL 42 2A 77 4D M 112 70 p 8 08 BS 43 2B 78 4E N 113 71 q 9 09 HT 44 2C 79 4F O 114 72 r 10 0A LF 45 2D 80 50 P 115 73 s 11 0B VT 46 2E 81 51 Q 116 74 t 12 0C FF 47 2F 82 52 R 117 75 u 13 0D CR 48 30 0 83 53 S 118 76 v 14 0E SO 49 31 1 84 54 T 119 77 w 15 0F SI 50 32 ...

Page 861: ...ks The first step towards these higher goals is to organize these bits in such a way that they can describe things more complicated than off or on Different quantities of bits are used to make up the building blocks of data They are most commonly described as follows Four bits Nibble Eight bits Byte Sixteen bits Word Thirty two bits Long One bit has two possible states on or off Every time a bit i...

Page 862: ...rive ready 0 1 Bo Motor OFF 1 2 Bt Trajectory in progress 2 4 Bus voltage fault 3 8 Ba Over current 4 16 Bh Excessive temperature fault 5 32 Be Excessive position error fault 6 64 Bv Velocity limit fault 7 128 Real time temperature limit 8 256 Derivative of position error limit 9 512 Hardware right limit enabled 10 1024 Hardware left limit enabled 11 2048 Br Historical right limit fault 12 4096 Bl...

Page 863: ...high GOSUB100 Execute subroutine ENDIF ENDIF Example 2 IF W 0 49152 49152 Look at both limits bits 14 15 w bit mask 49152 32768 16384 GOSUB100 Execute subroutine ENDIF Both examples will execute subroutine 100 if both limit inputs are high Example 2 uses less code than Example 1 and will run faster as a part of a larger program loop The next two examples show how the use of an I O word and mask ca...

Page 864: ...thin the 64 character buffer for IF SWITCH GOTO etc should never happen 10 BAD_ARRAY_ADDR Array index outside the defined range 11 DIVIDE_BY_ZERO Attempt to divide by 0 12 STACK_OVERFLOW No room on stack for another 10 GOSUB and INTERRUPTS use the same stack 13 STACK_UNDERFLOW RETURN or RETURNI with no place to return 14 BAD_LABEL Label does not exist for GOSUB or GOTO 15 NESTED_SWITCH Too many ne...

Page 865: ...escribing the source of the error To decode the error source refer to the following table Code Description Notes 0 CMD_COMM0 RS 232 for D style RS 485 for M style 1 CMD_COMM1 RS 485 for D style only 2 CMD_PROG From downloaded program 3 CMD_CAN CAN port CANopen DeviceNet Combitronic or PROFIBUS 4 CMD_MB0 N A 5 CMD_MB1 N A Appendix Finding the Error Source ...

Page 866: ...ccuracy The measure of shaft positioning accuracy on a servo or stepping motor Back EMF BEMF The voltage generated when a permanent magnet motor is rotated This voltage is proportional to motor speed and is present regardless of whether the motor winding s are energized or unenergized Breakaway Torque The torque required to start a machine in motion Almost always greater than the running torque Br...

Page 867: ... functional block containing an amplifier power supplies and possibly position control electronics for operating a servomotor or step motor Current at Peak Torque IPK Amperes The amount of input current required to develop peak torque This is often outside the linear torque current relationship Current Rated The maximum allowable continuous current a motor can handle without exceeding motor temper...

Page 868: ...R or other switch mode type of drive Because motor heating is a function of RMS current while motor torque is a function of average current a form factor greater than 1 00 means some fraction of motor current is producing heat but not torque Four Quadrant Refers to a motion system which can operate in all four quadrants i e velocity in either direction and torque in either direction This means tha...

Page 869: ...te Inertia is dependent on the mass and shape of the object Inertial Match The reflected inertia of the load is equal to the rotor inertia of the motor For most efficient operation a system coupling ratio should be selected that provides this condition Master Slave The device that is controlling the downstream device s or slave s For example it could be a PLC controlling one or more SmartMotors an...

Page 870: ...solution of the motor driver combination in steps per revolution yields the rotational speed in revolutions per second Pulse Width Modulation PWM Describes a switch mode as opposed to linear control technique used in amplifiers and drivers to control motor voltage and current Ramp Ramp Up Ramp Down The whole or ascend descend parts respectively of the Trapezoidal Move Profile TMP which is associat...

Page 871: ...of the shaft and magnets These magnets are analogous to the field winding of a brush type DC motor Settling Time The time required for a parameter to stop oscillating or ringing and reach its final value Slave Master One or more devices that are being controlling by an upstream device or master For example it could be one or more SmartMotors and other devices being controlled by a PLC e g via fiel...

Page 872: ...ntinuous torque curves meet Torque to Inertia Ratio Defined as the motor s holding torque divided by the inertia of its rotor The higher the ratio the higher a motor s maximum acceleration capability will be Trapezoidal Move Profile TMP The motion profile defined by an ascend ramp up part a slew part and descend ramp down part which are associated with follow or cam modes Also referred to in whole...

Page 873: ...ited to 4th power and below integers only Bitwise AND Bitwise inclusive OR Bitwise exclusive OR Not equal to Modulo remainder division SQRT value Integer square root ABS value Integer absolute value Floating point functions FSQRT value Floating point square root FABS value Floating point absolute value SIN value Floating point sine COS value Floating point cosine TAN value Floating point tangent A...

Page 874: ...the load should have no more than ten times the Moment of Inertia of the motor rotor that is driving it This provides a good starting point and typically allows for safe sizing over a wide range of applications A rotating load wants to maintain the same velocity Therefore when a motor attempts to accelerate the load it must overcome the Moment of Inertia of that load by applying additional torque ...

Page 875: ... 5 Timeout Combitronics Client 64 6 Combitronics server ran out of buffer slots 128 7 Errors reached warning level 256 8 Receive Errors reached warning level 512 9 Transmit Errors reached warning level 1024 10 Receive Passive Error 2048 11 Transmit Passive Error cable issue 4096 12 Bus Off Error 8192 13 RX buffer 1 overflowed 16384 14 RX buffer 0 overflowed 32768 15 RCHN Status Decoder The followi...

Page 876: ...atus NOTE When running dual trajectory generators RMODE 1 applies to Trajectory Generator 1 and RMODE 2 applies to trajectory Generator 2 RMODE RMODE 1 and RMODE 2 all use the same values for mode descriptions where they apply Description Value Mode Mixed Mode 5 Mixed Mode Electronic Camming 4 Cam Mode Step and Direction Mode 3 STEPDIR Electronic Gearing 2 FOLLOW Future Use 1 N A N A 0 NOMODE MP c...

Page 877: ... position samples 8000 times per second The default sample rate is 8000 samples per second but it can be adjusted as described in the next section PID Sample Rate Command NOTE This feature is not available for Class 6 SmartMotors The SmartMotor controllers default to 8000 samples per second but it is adjustable by use of the PID command The command PID2 is the default However the commands PID1 PID...

Page 878: ...n Target units AT are Encoder Counts sample sample 65536 Velocity Calculations If you know the desired revolutions per second RPS and want to set Velocity Target VT use the following equation If you wish to calculate velocity in real world units from native units NOTE The system value is Actual Velocity VA You can issue RVA to report actual velocity of the system in real time but it will return na...

Page 879: ...dicator Bo 2 1 RB 0 1 B 0 1 OFF Bt Trajectory in progress indicator Bt 4 2 RB 0 2 B 0 2 G TWAIT GS TSWAIT Servo Bus Voltage Fault ZS 8 3 RB 0 3 B 0 3 Peak Over Current occurred Ba Za ZS 16 4 RB 0 4 B 0 4 Excessive Temperature Real Time Bh ZS 32 5 RB 0 5 B 0 5 TH temp in degrees C 85 Deg Default Excessive Position Error Fault Be Ze ZS 64 6 RB 0 6 B 0 6 EA REA EL EL value in encoder counts Velocity ...

Page 880: ...a RSLP Historical negative software over travel limit Bls Zls 8192 13 RB 1 13 B 1 13 SLN formula RSLN Real time positive soft limit indicator Bps 16384 14 RB 1 14 B 1 14 RBps Real time negative soft limit indicator Bms 32768 15 RB 1 15 B 1 15 RBms Status Word 2 Communications Program and Memory Description Bit To Clear Value Bit To read Assign Related Commands Error on Communications Channel 0 1 0...

Page 881: ... PMA Brake Asserted 4096 12 RB 3 12 B 3 12 BRKSRV BRKTRJ BRKENG BRKDIS EOBK Brake OK 8192 13 RB 3 13 B 3 13 External Go Enabled 16384 14 RB 3 14 B 3 14 EISM 6 Velocity Target Reached 32768 15 RB 3 15 B 3 15 VT Status Word 4 Interrupt Timers Description Bit To Clear Value Bit To read Assign Related Commands Timer 0 1 0 RB 4 0 B 4 0 TMR 0 Timer 1 2 1 RB 4 1 B 4 1 TMR 1 Timer 2 4 2 RB 4 2 B 4 2 TMR 2...

Page 882: ...RB 5 14 B 5 14 Interrupts Enabled 32768 15 RB 5 15 B 5 15 ITRE ITRD Status Word 6 Drive Modes Description Bit To Clear Value Bit To read Assign Related Commands Trap Mode 1 0 RB 6 0 B 6 0 MDT Enhanced Trap Mode 2 1 RB 6 1 B 6 1 MDE Sine Mode 4 2 RB 6 2 B 6 2 MDS Vector Control 8 3 RB 6 3 B 6 3 Reserved 4 16 4 RB 6 4 B 6 4 Feedback Fault1 32 5 RB 6 5 B 6 5 MDT MDE MDS MDC MDH mode active 64 6 RB 6 ...

Page 883: ... 64 6 RB 7 6 B 7 6 Reserved 7 128 7 RB 7 7 B 7 7 TG2 In Progress 256 8 RB 7 8 B 7 8 G 2 X 2 MFR 2 MC 2 MFSDC MFSLEW TG2 Accel Ascend 512 9 RB 7 9 B 7 9 G 2 X 2 MFR 2 MC 2 MFSDC MFSLEW TG2 Slewing 1024 10 RB 7 10 B 7 10 G 2 X 2 MFR 2 MC 2 MFSDC MFSLEW TG2 Decel Descend 2048 11 RB 7 11 B 7 11 G 2 X 2 MFR 2 MC 2 MFSDC MFSLEW TG2 Dwell or higher Dwell in pro gress 4096 12 RB 7 12 B 7 12 G 2 X 2 MFR 2 ...

Page 884: ...l Notification Description Bit To Clear Value Bit To read Assign Related Com mands Master enabled 1 0 RB 10 0 B 10 0 RxPDO 1 arrived Z 10 1 2 1 RB 10 1 B 10 1 RxPDO 2 arrived Z 10 2 4 2 RB 10 2 B 10 2 RxPDO 3 arrived Z 10 3 8 3 RB 10 3 B 10 3 RxPDO 4 arrived Z 10 4 16 4 RB 10 4 B 10 4 RxPDO 5 arrived Z 10 5 32 5 RB 10 5 B 10 5 Reserved 64 6 RB 10 6 B 10 6 Reserved 128 7 RB 10 7 B 10 7 Reserved 256...

Page 885: ...13 User Bit 14 16384 14 RB 12 14 B 12 14 US 14 UR 14 User Bit 15 32768 15 RB 12 15 B 12 15 US 15 UR 15 Status Word 13 User Bits Word 1 Description Bit To Clear Value Bit To read Assign Related Commands User Bit 16 1 0 RB 13 0 B 13 0 US 16 UR 16 User Bit 17 2 1 RB 13 1 B 13 1 US 17 UR 17 User Bit 18 4 2 RB 13 2 B 13 2 US 18 UR 18 User Bit 19 8 3 RB 13 3 B 13 3 US 19 UR 19 User Bit 20 16 4 RB 13 4 B...

Page 886: ... 14 RB 16 14 B 16 14 Reserved 15 32768 15 RB 16 15 B 16 15 Status Word 16 On Board Local I O Status M Style Motor Description Bit To Clear Value Bit To read Assign Related Commands On Board I O 0 1 0 RB 16 0 B 16 0 OS 0 OR 0 OUT 0 On Board I O 1 2 1 RB 16 1 B 16 1 OS 1 OR 1 OUT 1 On Board I O 2 4 2 RB 16 2 B 16 2 OS 2 OR 2 OUT 2 On Board I O 3 8 3 RB 16 3 B 16 3 OS 3 OR 3 OUT 3 On Board I O 4 16 4...

Page 887: ...9 Exp I O 20 16 4 RB 17 4 B 17 4 OS 20 OR 20 OUT 20 Exp I O 21 32 5 RB 17 5 B 17 5 OS 21 OR 21 OUT 21 Exp I O 22 64 6 RB 17 6 B 17 6 OS 22 OR 22 OUT 22 Exp I O 23 128 7 RB 17 7 B 17 7 OS 23 OR 23 OUT 23 Exp I O 24 256 8 RB 17 8 B 17 8 OS 24 OR 24 OUT 24 Exp I O 25 512 9 RB 17 9 B 17 9 OS 25 OR 25 OUT 25 Reserved 10 1024 10 RB 17 10 B 17 10 Reserved 11 2048 11 RB 17 11 B 17 11 Reserved 12 4096 12 R...

Page 888: ...an ambient of 25ºC to the designed thermal limit For example the motor will be placed on the dyno tester and set to operate at 1000 RPM continuously with the load slowly increased until the controller reaches its maximum sustained thermal limit This limit is either 70ºC or 85ºC depending on the model number All Class 5 SmartMotor servos are set to 85ºC Peak Torque Curve fit to curve No Load Maximu...

Page 889: ...d due to an increase in the peak torque curve This may potentially be a significant reduction of time to complete moves due to the a t2 term in kinematic equations This is useful for high speed indexing and fast start stop motion NOTE All torque curves shown in the Moog Animatics Product Catalog also show the shaft output power curves Power can be calculated with the following equation Power W Tor...

Page 890: ... any given product model number there may be variations of as much as 10 The following diagram depicts data points collected from dyno testing of a given SmartMotor model A best fit torque curve is created from these data points and is then derated to at least 5 below the worst case data points The derated curve is shown in the Moog Animatics Product Catalog This means that within any given model ...

Page 891: ...ect motor is designed into the application refer to the next section Never assume that testing of one motor means all motors of that size will work it is simply not the case You should never proceed without performing proper load calculation and motor sizing The goal is to have all motors operating below the advertised limits which will ensure reliable operation and long motor life Proper Sizing a...

Page 892: ...the motor for the intended application n Consider the thermal environment n Follow the proper mechanical and environmental implementation For more details on these items see the SmartMotor Success Checklist in the Moog Animatics Product Catalog Also refer to the following topics in this section l Understanding Torque Curves on page 888 l Dyno Test Data vs the Derated Torque Curve on page 890 Appen...

Page 893: ...59 R af index formula Array Float index see page 261 Ai arg Arm Index Rising Edge see page 264 Aij arg Arm Index Rising Edge Then Falling Edge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 R al index formula Array Long index see page 272 R AMPS formula Amps PWM Limit see page 275 R ASIN value Arcsine see page 278 R AT formula A...

Page 894: ...R CADDR formula CAN Address see page 350 R CAN CAN arg CAN Bus Status see page 352 CANCTL function value CAN Control see page 354 CASE formula Case Label for SWITCH Block see page 355 R CBAUD formula CAN Baud Rate see page 358 CCHN type channel Close Communications Channel RS 232 or RS 485 see page 360 R CHN channel Communications Error Flag see page 361 R CLK formula Millisecond Clock see page 36...

Page 895: ...Encoder see page 425 ENC1 Encoder Zero Close Loop on External Encoder see page 426 ENCCTL function value Encoder Control see page 428 ENCD in_out Set Encoder Bus Port as Input or Output see page 430 END End Program Code Execution see page 431 ENDIF End IF Statement see page 433 ENDS End SWITCH Structure see page 435 EOBK IO Enable Output Brake Control see page 437 EOIDX number Encoder Output Index...

Page 896: ...ilter Option for KD see page 509 R KV formula Constant Velocity Feed Forward see page 511 R LEN Length of Character Count in Communications Port 0 see page 513 R LEN1 Length of Character Count in Communications Port 1 see page 514 R LFS value Load Float Single see page 516 LOAD Download Compiled User Program to Motor see page 518 LOCKP Lock Program see page 521 LOOP Loop Back to WHILE Formula see ...

Page 897: ...601 R OF Output Fault see page 603 OFF Off Drive Stage Power see page 605 OR value Output Reset see page 607 OS Output Set see page 609 OSH formula OSH trj formula Origin Shift see page 611 OUT formula Output Activate Deactivate see page 613 R PA Position Actual see page 615 PAUSE Pause Program Execution see page 617 R PC PC axis Position Commanded see page 619 R PI Pi Constant see page 622 PID Pr...

Page 898: ... Port 0 see page 696 SILENT1 Silence Outgoing Communications on Communications Port 1 see page 698 R SIN value Sine see page 700 SLD Software Limits Disable see page 702 SLE Software Limits Enable see page 704 SLEEP Ignore Incoming Commands on Communications Port 0 see page 706 SLEEP1 Ignore Incoming Commands on Communications Port 1 see page 708 R SLM mode Software Limit Mode see page 710 R SLN f...

Page 899: ...ity Target see page 788 VTS formula Velocity Target Synchronized Move see page 791 R W word Report Specified Status Word see page 793 WAIT formula Wait for Specified Time see page 795 WAKE Wake Communications Port 0 see page 797 WAKE1 Wake Communications Port 1 see page 799 WHILE formula While Condition Program Flow Control see page 801 X Decelerate to Stop see page 804 Z Total CPU Reset see page ...

Page 900: ...ns NOTE A superscript R character preceding the command indicates there is a corresponding report version of that command 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 Command Lists Commands Listed by Function ...

Page 901: ...L function value Control Industrial Ethernet Network Features see page 445 R GETCHR Next Character from Communications Port 0 see page 459 R GETCHR1 Next Character from Communications Port 1 see page 461 IPCTL function string Set IP Address Subnet Mask or Gateway see page 484 R LEN Length of Character Count in Communications Port 0 see page 513 R LEN1 Length of Character Count in Communications Po...

Page 902: ...ge see page 266 Aj arg Arm Index Falling Edge see page 268 Aji arg Arm Index Falling Edge Then Rising Edge see page 270 EIGN Enable as Input for General Use see page 405 EILN Enable Input as Limit Negative see page 408 EILP Enable Input as Limit Positive see page 410 EIRE Enable Index Register External Input Capture see page 412 EIRI Enable Index Register Internal Input Capture see page 414 EISM 6...

Page 903: ...AT formula Acceleration Target see page 280 ATS formula Acceleration Target Synchronized see page 286 BRKENG Brake Engage see page 328 BRKRLS Brake Release see page 330 BRKSRV Brake Servo Engage When Not Servoing see page 332 BRKTRJ Brake Trajectory Engage When No Active Trajectory see page 334 R CP Cam Pointer for Cam Table see page 368 CTA points seglen location Cam Table Attribute see page 370 ...

Page 904: ...am Enable see page 528 R MCMUL formula Mode Cam Multiplier see page 530 MCW table point Mode Cam Where Start Point see page 532 MDB Enable TOB Feature Commutation Mode see page 534 MDC Mode Current Commutation Mode see page 536 MDE Mode Enhanced Commutation Mode see page 538 MDH Mode Hybrid Commutation Mode see page 540 MDHV Mode Hybrid Velocity Commutation Mode see page 542 MDS Mode Sine Commutat...

Page 905: ...ion Relative Target Synchronized Supplemental see page 656 R PT formula Position Absolute Target see page 658 PTS Position Target Synchronized see page 660 R PTSD Position Target Synchronized Distance see page 663 PTSS Position Target Synchronized Supplemental see page 664 R PTST Position Target Synchronized Time see page 666 S as command Stop Motion see page 686 SLD Software Limits Disable see pa...

Page 906: ...ENDIF End IF Statement see page 433 ENDS End SWITCH Structure see page 435 GOSUB label Subroutine Call see page 463 GOTO label Branch Program Flow to a Label see page 465 IF formula Conditional Program Code Execution see page 475 ITR Int StatusWord Bit BitState Label Interrupt Setup see page 486 ITRD Interrupt Disable Global see page 489 ITRE Enable Interrupts Global see page 491 LOOP Loop Back to...

Page 907: ...ing Error Limit see page 299 R Bh Bit Overheat see page 301 R Bi enc Bit Index Capture Rising see page 304 R Bj enc Bit Index Capture Falling see page 307 R Bk Bit Program EEPROM Data Status see page 310 R Bl Bit Left Hardware Limit Historical see page 311 R Bls Bit Left Software Limit Historical see page 313 R Bm Bit Left Hardware Limit Real Time see page 315 R Bms Bit Left Software Limit Real Ti...

Page 908: ...arg Temperature Motor see page 738 R TH formula Temperature High Limit see page 740 R UIA Motor Current see page 752 R UJA Bus Voltage see page 754 UO formula User Status Bits see page 756 UR User Bits Reset see page 762 US User Bits Set see page 764 R W word Report Specified Status Word see page 793 Variables R a z 32 Bit Variables see page 241 R aa zz 32 Bit Variables see page 241 R aaa zzz 32 B...

Page 909: ...PN SC80100003 002 Rev L ...

Reviews: