SimplIQ Software Manual May 2011 – Version 1.4 www.elmomc.
Important Notice This guide is delivered subject to the following conditions and restrictions: This guide contains proprietary information belonging to Elmo Motion Control Ltd. Such information is supplied solely for the purpose of assisting users of the SimplIQ line of servo drives. The text and graphics included in this manual are for the purpose of illustration and reference only. The specifications on which they are based are subject to change without notice.
Elmo Worldwide Head Office Elmo Motion Control Ltd. 64 Gisin St., P.O. Box 463, Petach Tikva 49103 Israel Tel: +972 (3) 929-2300 • Fax: +972 (3) 929-2322 • info-il@elmomc.com North America Elmo Motion Control Inc. 42 Technology Way, Nashua, NH 03060 USA Tel: +1 (603) 821-9979 • Fax: +1 (603) 821-9943 • info-us@elmomc.com Europe Elmo Motion Control GmbH Steinkirchring 1, D-78056, Villingen-Schwenningen Germany Tel: +49 (0) 7720-85 77 60 • Fax: +49 (0) 7720-85 77 70 • info-de@elmomc.
SimplIQ Software Manual Introduction MAN-SIMSW (Ver. 1.4) Contents Chapter 1: Introduction ........................................................................................ 1-1 1.1 Scope ............................................................................................................... 1-1 1.2 Abbreviations ................................................................................................. 1-2 Chapter 2: SimplIQ Drive Description ..........................................
SimplIQ Software Manual Contents MAN-SIMSW (Ver. 1.4) 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 5.4.7 5.4.8 5.5 Comments .................................................................................................... 5-11 5.5.1 5.5.2 5.5.3 5.6 Unexpected Fault ............................................................................................ 5-12 Expected Fault ................................................................................................. 5-12 Program Flow Commands ............
SimplIQ Software Manual Contents MAN-SIMSW (Ver. 1.4) 6.6.1 6.6.2 6.6.3 6.6.4 6.7 Initiating a Program ........................................................................................ 6-25 Halting and Resuming a Program ................................................................. 6-25 Automatic Program Execution with Power Up ........................................... 6-26 Save to Flash ....................................................................................................
SimplIQ Software Manual Contents MAN-SIMSW (Ver. 1.4) 8.4 Auto-phasing and Commutation Search .................................................... 8-8 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.5 Continuous vs. Six-step Commutation ..................................................... 8-10 8.5.1 8.5.2 8.6 Selecting Parameters ......................................................................................... 8-8 Method Limitation ...........................................................................
SimplIQ Software Manual Contents MAN-SIMSW (Ver. 1.4) 12.4.2 Periodic Query ................................................................................................ 12-4 12.4.3 Automatic Routines ........................................................................................ 12-4 12.4.4 Real Time: Motion Management, Homing, Capture and Flag .................. 12-4 12.5 Homing and Capture .................................................................................. 12-5 12.5.1 12.5.
SimplIQ Software Manual Introduction MAN-SIMSW (Ver. 1.4) Chapter 1: Introduction 1.1 Scope This manual describes, in detail, the software used with the SimplIQ line of digital servo drives. It is an integral part of the SimplIQ documentation set, which includes: SimplIQ product line Installation Guides, which provide full instructions for installing a SimplIQ drive.
SimplIQ Software Manual Introduction MAN-SIMSW (Ver. 1.4) 1.2 Abbreviations The following abbreviations are used in this document: Download Transfer of data from the host to the drive. DSP Digital signal processor. EDS Electronic data sheet. The list of CAN objects supported by a device, in a form suitable for standard configuration software. IDE Integrated development environment. PDO Process data object.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) Operational software (firmware), which may be updated at the user site if upgrades or modifications are required. . A supportive database that is loaded to the serial flash memory. This database serves as a filing system for personality descriptions, storage of the application database and storage of factory- or user-provided programs. . 2.1.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) 2.3.2 Speed and Acceleration Speed is measured in counts/second and acceleration is measured in counts/second2. The speed units may be related to physical units by converting the counts to revolutions, meters or other, as explained in section 2.3.1. 2.3.3 Current and Torque Currents are measured in amperes, although there is no single accepted method for specifying the current of three-phased motors.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) 2.5 2.5.1 SimplIQ Drive Peripherals Position Decoders The SimplIQ drive includes two position decoders — main and auxiliary — which are similar to each other. Both decoders are timed (through timer sets A and B) for accurate speed information. A position decoder measures quadrature or pulse/direction. The maximum counting rate of a decoder is 20 MHz, without an input filter.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) 2.5.4 Digital Outputs The SimplIQ drive’s two digital output connector pins can be used for non-committed digital outputs, or they can be programmed by the OL command for special functions, such as activated external brakes.
SimplIQ Software Manual 3-1 MAN-SIMSW (Ver. 1.4) Chapter 3: Communication with the Host The SimplIQ drive can operate with RS-232 communication or CANopen communication. This chapter discusses RS-232 communication. Refer to the Elmo CANopen Implementation Manual for detailed information about SimplIQ drive operation with CANopen networking. The SimplIQ drive can communicate by RS-232 with baud rates of up to 57,600 baud/ second, depending on the sampling time.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) Typical examples of assignments are: MO Asks the drive to report the value of the variable MO. MO=1 Sets the value of 1 to the MO variable. CA[2]=1; Sets the value of the CA[2] variable. CA[N] denotes a vector of parameters that can be accessed by their index. An example of a free evaluation is: (5+sin(PX) * sqrt(abs(VX)) Returns a numerical value to the terminal.
SimplIQ Software Manual Communication with the Host MAN-SIMSW (Ver. 1.4) 3.4 Errors and Exceptions in RS-232 If an error is intercepted (over-run, noise, parity or framing), the entire message, including the error, is discarded and a “communication error” code response is transmitted. The communication is defined as 8 bits per character. The SimplIQ drive will normally only transmit characters in the range [0…127] with the exception of error codes (refer to section 3.1).
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Chapter 4: The Interpreter Language SimplIQ servo drives use a communication language that enables the user to: Set up the drive Send commands to the drive indicating what functions to perform Inquire as to the drive status Two methods can be used to communicate with the drive: Using a communication interface — either RS-232 or CANopen — to transfer commands to the drive and receive an immediate response from the drive.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Example: Command Line Results 3+4; 7 PX=7; PX-3; 4 (3.2+4)/2; 3.6 4.2 Remarks PX is set to 7 and 3 is then subtracted. Expressions and Operators The drive language supports operators, which specify a mathematical, logical or conditional operation/relation between two or more operands. Operands (or parameters) and operators may be combined in almost any way to create an expression.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) SimplIQ drives cannot evaluate numbers with an absolute value greater than 1020. For example, if you enter =12.3e+20 or -13.56e-20, the SimplIQ drive will respond with a Badly Formatted Number error. Logical operators yield 0 or 1 as a result. The results of logical operators are integers. 4.2.2 Mathematical and Logical Operators Expressions may contain any combination of arithmetic, relational and logical operators.
SimplIQ Software Manual The Interpreter Language 4-4 MAN-SIMSW (Ver. 1.4) The default precedence can be overridden using parentheses, as in the following examples: A = 3; B = 2; C = A/B/2; C = 0.75 C = A/(B/2) C = 3 4.2.3 General Rules for Operators Most arithmetic operators work on both integers and floats. An arithmetic operation between integers yields integers. An operation between floating-point numbers, or between an integer and a floating-point number, yields a floating-point result.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) 4.2.4 Operator Details The following table describes the operators in detail. Operator / Description Notation No. of Output Arguments Type Arithmetic addition + 2 See section 4.2.3 4+5=9 3.45+2.78=6.23 Arithmetic subtraction - 2 See section 4.2.3 4-5=-1 3.45=2.78=0.67 Arithmetic multiplication * 2 See section 4.2.3 PA=PA*2 doubles PA 5*4=20 1.5*2=3.0 Arithmetic division / 2 See section 4.2.3 20/4=5 3/1.5=2.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Operator / Description Notation No. of Output Arguments Type Logical OR: Result is 1 if any argument is nonzero, 0 if both are zero * || 2 0 or 1 1||0 yields 1 0||0 yields 0 Logical NOT: Result is 1 if argument is zero; otherwise it is 0* ! 1 0 or 1 !4 yields 0 !0 yields 1 !0.0004 yields 1 Unary minus: Result is negative if argument is positive, and vice versa* - 1 Same as argument -4.5 yields -4.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Operator Description Returns fix Truncate to integer: fix(3.8) is 3 fix (-3.8) is -3 Note: If an input argument exceeds the long value range, it will be limited to the maximum long value (for positive numbers) or the minimum long value (for negative numbers). Integer rnd Truncate to nearest integer: rnd(3.8) is 4 rnd(-3.8) is -4 rnd(3.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Examples: Command Line Results Remarks SP*2/5+AC 101,000 The order is ((SP*2)/5) + AC OR operation on IP IP|5 2+3 5 1,400,000 1,400,000 4.2.6.2 Assignment Expressions Assignment expressions are used to assign a value to a variable or to a command.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Example: A floating point variable “temp” is defined in a user program. Expression Sent Response Received TC=1 – Assign integer value to floating point command TC. TC 1.0 Assigned integer value is converted to float. temp=12,345,678 – Assign integer value to floating point variable. temp 1.234568e+7 Assigned value is truncated to 12,345,680.0. Remarks 4.2.6.
SimplIQ Software Manual The Interpreter Language MAN-SIMSW (Ver. 1.4) Operator Description Returns emcy(n) Issues an emergency message from a user program, where n is error code (32-bit long integer) defined by a user. Nothing PrgErr(N) Returns the last program error of machine N, where N is a value between -1 and 2. This operator can be used in an AUTO_PERR routine to query about the recent failure.
SimplIQ Software Manual The Interpreter Language 4-11 MAN-SIMSW (Ver. 1.4) 4.2.6.5 Time Functions The TM command is used to read the system 32-bit microsecond counter. The time difference from the present time to an older sampling of TM can be determined using two methods, as in the following examples: QP[1] = TM ; ** QP[1] is used just as storage ….** Do something QP[2] = TM -QP[1]; ** QP[2] is time difference in microseconds QP[1] = TM ; ** QP[1] is used just as storage ….
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-1 MAN-SIMSW (Ver. 1.4) Chapter 5: The SimplIQ User Programming Language SimplIQ servo drives read a user program in Elmo High-level language (EHL) 1 after it has been translated by the compiler into a sequence of virtual assembly commands (described in Chapter 6:). The Compiler, part of the Elmo Studio IDE, is integrated into the Composer. The compilation process can run off line inside the PC. It is not part of the SimplIQ firmware.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-3 MAN-SIMSW (Ver. 1.4) 5.2 Single and Multiple Command Execution A single line in a SimplIQ program is executed as a single unit, preventing intervention by the Interpreter or by a CAN command. For example, in the sequence: UM=5; MO=1; an Interpreter command could be executed between the execution of the two program statements.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-4 MAN-SIMSW (Ver. 1.4) 5.3.2 Line Continuation A user program may contain a line that is too long, and whose representation on the screen is not easily readable because not all its symbols are shown on the screen. In order to improve program readability, the expression can be continued on the next line by using an ellipsis (three periods) to indicate that the line continues. Example: c = 12 * a + sqrt(2) - sin(3.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.4) 5.4.2 Mathematical and Logical Operators The description and syntax is the same as for the Interpreter language (refer to section 4.2.2). 5.4.3 General Operator Rules The description and syntax is the same as for the Interpreter language (refer to section 4.2.3). 5.4.4 Operator Details The description and syntax is the same as for the Interpreter language (refer to section 4.2.4). 5.4.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-6 MAN-SIMSW (Ver. 1.4) Any floating-point type operand is converted to an integer. 5.4.7 CAN Object Emission 5.4.7.1 The Emit Function The emit(n) function emits the n TPDO (Can Transmit Process Data Object) subject to the following restrictions: The drive supports CAN communication. The CAN communication state is operational. n equals 1, 3 or 4. The corresponding TPDO has its transmission type set to 254.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-8 MAN-SIMSW (Ver. 1.4) 5.4.8.1 Simple Expressions The description and syntax of simple expressions is the same as for the Interpreter language (refer to section 4.2.6.1). 5.4.8.2 Constant Expressions A constant expression is a simple expression that contains only operations with immediate numbers as operands.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-9 MAN-SIMSW (Ver. 1.4) Example: function func (int a) Function definition int b ; Local variable definition b = a ; Executable code float c : Local variable definition return The definition of the variable c is illegal because it comes after executable code. The names of variables may include ASCII letters, digits (not leading) and underscores (not leading) only. Variable names are case sensitive.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-10 MAN-SIMSW (Ver. 1.4) Examples: a = AC This expression assigns a value of the system command AC to the variable a. It is valid if the AC command is allowed to “get a value”; that is, it has a PreProcess flag. AC = a This expression assigns a value of the variable a to the system command AC. It is valid if the AC command is allowed to “set a value”; that is, it has a PostProcess flag. BG This is an executable command.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-11 MAN-SIMSW (Ver. 1.4) 5.5 Comments Comments are texts that are written into the code to enhance its readability. They can be written in three ways, as indicated in the following sections. 5.5.1 Double Asterisk A comment starts with a double asterisk (**) marker and terminates at the next end of line. The drive ignores the comments when running a program or evaluating an expression.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-12 MAN-SIMSW (Ver. 1.4) 5.6 5.6.1 Fault Handling Unexpected Fault In order to receive more information about the reasons for run-time errors, the Elmo Studio IDE must be used. This enables the SimplIQ drive to inform the virtual assembly that a failure has occurred, and to then have the Elmo Studio interpret this to a user program command and error reason.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-13 MAN-SIMSW (Ver. 1.4) if - elseif - else - end Conditional expression. switch-case-otherwise-end Case selection. goto Go to a certain point in the program. reset Kill the state of the executing program and jump to a certain point in the program. function-return Declare a function and its return point. ## Declare a label or an auto-routine. #@ Declare a label or an auto-routine.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.4) Example 1: ##START; ##LOOP1; … Goto##LOOP1; ##LOOP2; … ##LOOP3; … Start program. Label Body code A Body code B According to this example, if the program runs from label ##START, body code A will be performed forever. ##LOOP2 will never be reached.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-15 MAN-SIMSW (Ver. 1.4) The iteration variable k must be declared as a variable. The iteration variable must be scalar, not an array member. For example, the expression: for k[10]=1:10 is illegal because k is an array. Example: … float ra[20]; int ia[20]; int k; … for k=1:10 ia[k]=100; ra[k]=55.55; … end … 5.7.3 Start user program or function. Float array declaration. Integer array declaration. Variable declaration.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-16 MAN-SIMSW (Ver. 1.4) 5.7.4 Until Iteration Syntax: until (expression) ; The until keyword suspends execution of the program until expression becomes true (nonzero). The expression can be logical and/or numerical. Example: … until ((PX>=20,000)&IB[1]); Suspend the program until the variable PX exceeds 20,000 and digital input 1 is ON.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-17 MAN-SIMSW (Ver. 1.4) This sequence initiates a motion using the until (MS == 0) to wait until the motor is stabilized at a new position. The wait (20) allows an additional 20 milliseconds for final stabilization. Notes: The wait argument range is [0…32,000] milliseconds. This limitation stems from the implementation of the tick and tock system functions, used in the wait statement algorithm.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-18 MAN-SIMSW (Ver. 1.4) 5.7.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.4) Example: The following example selects the size of a point-to-point motion according to the value of variable k. int k Variable declaration … switch (k) For example, k=2 case 1 PA=1000; case2 PA=2000; This statement will be performed. otherwise PA=500; If k does not equal 1 or 2, PA=500. end 5.7.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-20 MAN-SIMSW (Ver. 1.4) Example 2: while 1 ... try ... for k=0:5 if IB[16+k] == 1 break end if MS ! = 0 continue end MO=1;PA=0;BG end catch ... end end If the condition MS ! = 0 is true, the program jumps to the beginning of the for loop and the statements MO=1;PA=0;BG are not executed. 5.7.9 Break Syntax: break The break statement terminates the execution of the nearest enclosing for, switch or while statement in which it appears.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-21 MAN-SIMSW (Ver. 1.4) Global variables can still be used and monitored by the user with external terminals, such as the Composer Smart Terminal. 5.7.11 Try-Catch A try-catch block is used to react to an expected fault. Syntax: try statement, …, statement, catch statement, …, statement end The SimplIQ drive stores the status (stack and base pointers) and executes the statements between the try and the catch.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-22 MAN-SIMSW (Ver. 1.4) 5.8 Functions Functions are program sections that can be defined by parameters and called from anywhere in the program. 5.8.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-23 MAN-SIMSW (Ver. 1.4) Example 6: function [float y1] = func4 () ; A prototype of function func4 that has no input argument and returns only the output argument. Example 7: function float y1 = func4 ; Same as example 6. Example 8: function float = func4 ; Same as examples 6 and 7. The name of input or output argument of the function prototype may be omitted, but during function definition, it will be an error.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-24 MAN-SIMSW (Ver. 1.4) y2 = y1 + y2 ; Return Executable code Function end Before a function call, the function must be declared, either as a function prototype or a function definition. Example 13: function [int y1, int y2] = func (float x1, int x2;) … function main () int a, b; [a,b] = func (2.3, -9.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-25 MAN-SIMSW (Ver. 1.4) If a function does not return any output by definition, a zero output value will be inserted to the stack. For example, if the function func is declared with no output arguments, the expression func( ) + 3 is legal because func returns zero by default. Example: float vec[11], RA[100]; Declare the global variables. float value; Declare the global variable.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-26 MAN-SIMSW (Ver. 1.4) 5.8.4 Automatic Variables A variable declared within a function is automatic; it is generated when the function is called and ceases to exist when the function exits. At the time of the function call, all of its automatic variables are set to zero. When the function exits, the value of the automatic variables is not saved. Automatic variables cannot be vectors.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-27 MAN-SIMSW (Ver. 1.4) global int vec[] 5.8.6 Redeclare global variable vec. Notice that its dimension is omitted during redeclaration and that its actual dimension is 10, as defined above. Jumps Syntax: goto ##LABEL1 The goto command instructs the program to continue its execution at the label specified by the jump command.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-28 MAN-SIMSW (Ver. 1.4) This code executes the sequence: JV=1000;IA[1]=1;BG; After executing JV=1000, the program jumps to the subroutine JustSo. Before doing so, it stores its return address, which is the place in the code at which execution should resume after the routine is complete. In this example, the return address is the line number of instruction BG, which is just after the subroutine call.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-29 MAN-SIMSW (Ver. 1.4) 5.8.8 Killing the Call Stack In rare situations, it may be desirable to exit a function without returning to its return address. The reset instruction solves this problem by emptying the call stack before making a jump.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-30 MAN-SIMSW (Ver. 1.4) 5.8.9 Automatic Subroutines 5.8.9.1 List of Automatic Routines An automatic routine (auto-routine) is a special type of routine that is executed automatically according to system events. These routines are executed only when their invocation condition is satisfied. Auto-routines have no output and input arguments.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-31 MAN-SIMSW (Ver. 1.4) Routine Name Priority Activated by Mask (MI) AUTO_I2 9 Called when a digital input #2 configured to the “GPI” (General Purpose Input) function is activated.* 256 (0x100) AUTO_I3 10 Called when a digital input #3 configured to the “GPI” (General Purpose Input) function is activated.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language 5-32 MAN-SIMSW (Ver. 1.4) 5.8.9.2 Automatic Routine Arbitration Each automatic routine has an assigned priority, according to Table 5-1. When the conditions for activating two automatic subroutines occur simultaneously, the automatic subroutine with the higher priority is called.
SimplIQ Software Manual 4BThe SimplIQ User Programming Language MAN-SIMSW (Ver. 1.4) The mask may also be used to prevent switch bouncing from generating spurious routine calls. Example: A machine performs a periodic task. Digital input #1 is connected to a sensor to which the drive should react. The following code limits the automatic response to digital input #1 during execution of the #@AUTO_I1 routine code, even though digital input #1 may bounce. ##LOOP; Repetitive task.
SimplIQ Software Manual Program Development and Execution 6-1 MAN-SIMSW (Ver. 1.4) Chapter 6: Program Development and Execution The process of SimplIQ drive program development includes the following steps: Program editing: Write and/or edit the program. Compilation: Use the Compiler to process the program and find errors. Program loading: Load the program to the +flash memory of the drive. Debugging: Observe the behavior of the program and correct it where necessary.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) The following table enumerates the list of compilation errors. Error Code Error String Meaning Example 0 No errors Successful compilation without errors. 1 Bad format General error for bad syntax in right- or left-hand expression. for k = 1::10 Double colon between 1 and 10. b = a + () Empty expression in parentheses. k = 1:2:20 Colon expression used out of for statement.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 8 Operator is expected During right-hand expression evaluation, there is no operator or terminator of a simple expression after successful value evaluation. b = a c ; After successful evaluation of a, an operator or expression terminator is expected, but c is not recognized as either an operator or terminator.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning 16 Out of memory Compilation process ran out of memory. This error may occur if the user program is too large or too complex and there is not enough space in the code segment or in the Symbol table. 17 Too many arguments The number of input or output arguments exceeds the maximum admissible number of input or output arguments (16).
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code 24 25 Error String Meaning Example Name is keyword A variable or function has the same name as a keyword. This error may occur if a variable name is identical to an auto-routine name. int switch; Name is not distinct A variable of function name is not unique. int func ; function func (int a) The function and the variable have the same name. switch is a keyword, so its use as a variable name is illegal.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Meaning Error String The global keyword was used outside the function. A variable declared as global inside a function is not defined previously. The type of variable declared at definition outside the function differs from the type of the declaration inside the function. Example 29 Bad variable definition All local variables must be defined at the beginning of the function.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code 33 34 Error String Meaning Example Bad function format Appears at function definition when: function func (int a); function func (float a) Type of input argument in function definition does not match type in prototype.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 41 Case must follow switch After a switch statement, the only legal statement is case; otherwise, this error occurs. switch a b = 0; case 1, b = 1; end The expression b=0 is illegal because switch must be followed by case. 42 Illegal case after otherwise The otherwise statement must be the last statement of a switch block. Any case after otherwise is illegal.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 49 Misplaced break Break is legal only inside a switch, for or while block; otherwise, this error occurs. If a < 0 break ; end break in an if statement is illegal. 50 Too many outputs The number of actual output arguments during a function call exceeds the number of output arguments during function definition.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 58 Variable is not array An attempt has been made to assign a scalar variable according to an index, as an array. int a1; (scalar) ##START a1[1] = 0; The last expression is illegal because it tries to assign a scalar variable according to an index.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning 65 Compiled code is too long The compiled code exceeds the maximum space for the Code Segment in the SimplIQ drive’s serial flash memory. 66 Corrupted the SimplIQ drive setup files The file containing the SimplIQ drive setup parameters is not in the defined format.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Meaning Error String A global label from within a global space at a goto statement A non-label at a goto label A local label at a reset statement 75 Illegal nargout The nargout keyword is used outside a function. 76 Function without body An attempt has been made to call a function that has been defined but does not have a body.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 81 System function tdif is not supported by the SimplIQ drive During evaluation of the wait flow control, the tdif system function must be defined inside the SimplIQ drive; otherwise, this error occurs. 82 Command has “not assign” flag The program has assigned a value to a command with a “not assign” flag.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) Error Code Error String Meaning Example 90 Condition is missing The condition is missing in an #if or #elseif directive. #if A condition must follow the #if directive. 91 Misplaced continue The continue keyword is used outside a for or while loop, or inside an unclosed try-catch block.
SimplIQ Software Manual Program Development and Execution 6-15 MAN-SIMSW (Ver. 1.4) Checks the conditions of #if, #elseif, #else, #ifdef and #ifndef directives and – depending on the results – removes or retains the corresponding processing statements in the code. 6.4 6.4.1 Compiler Pragmas Compiler Directives 6.4.1.1 #define The #define directive may be used to assign a name to a literal string, in a manner similar to that of the C language.
SimplIQ Software Manual Program Development and Execution 6-16 MAN-SIMSW (Ver. 1.4) Example 1: #define DEBUG_FLAG Defines the identifier DEBUG_FLAG. Example 2: #define ARR_LEN 10 Defines the identifier ARR_LEN as the integer constant 10. Each occurrence of ARR_LEN will be replaced by 10. Example 3: #define ARR_LEN num+10 Defines the identifier ARR_LEN as the string num+10. The precompiler cannot evaluate token_string because num is not a constant expression.
SimplIQ Software Manual Program Development and Execution 6-17 MAN-SIMSW (Ver. 1.4) 6.4.1.2 #if The #if directive checks the conditional expression, as it does in the C language. If the specified constant expression following the #if has a non-zero value, it directs the Compiler to continue processing statements up to the next #endif, #else or #elseif. Afterwards, it skips to the statement following the #endif directive.
SimplIQ Software Manual Program Development and Execution 6-18 MAN-SIMSW (Ver. 1.4) 6.4.1.4 #elseif The #elseif directive marks an optional clause of a conditional-compilation block defined by an #ifdef or #if directive. Syntax: #elseif constant-expression The directive controls conditional compilation by checking the specified constant expression.
SimplIQ Software Manual Program Development and Execution 6-19 MAN-SIMSW (Ver. 1.4) Example: #define DEBUG_FLAG ... #ifdef DEBUG_FLAG MO=0 UM=5 MO=1 #endif In this example, the text between the #ifdef and #endif directives is compiled as DEBUG_FLAG was defined previously. 6.4.1.7 #ifndef The #ifndef directive, as in C, checks for the absence of identifiers defined with #define. Syntax: #ifndef identifier The #ifndef directive checks for the opposite of the condition checked by #ifdef.
SimplIQ Software Manual Program Development and Execution 6-20 MAN-SIMSW (Ver. 1.4) 6.4.2 Evaluating Expressions Used in Compiler Directives The #define, #if and #elseif directives may contain constant expressions for evaluation. Such expressions – which may be either simple (a single number) or complex (a combination of operations) – must be evaluated to a single number. A valid expression can operate only with: Numbers Values of the #define directive.
SimplIQ Software Manual Program Development and Execution 6-21 MAN-SIMSW (Ver. 1.4) After a successful download, global variables can be used — for monitoring and modifications — from an external terminal such as the Composer Smart Terminal. 6.5.1 Binary Data The SimplIQ drive flash memory is interfaced with binary data. Sending the binary data on the RS-232 lines is problematic, because they do not differentiate between data and delimiters.
SimplIQ Software Manual Program Development and Execution 6-22 MAN-SIMSW (Ver. 1.4) 6.5.2 Auxiliary Upload/Download Commands 6.5.2.1 The LP[N] Command This command sets the properties of the serial flash data upload and download; it is used together with the DL and LS commands (sections 6.5.3.1 and 6.5.4.1). LP[1] defines the byte (out of 128K bytes in the flash) at which the next action should start. LP[2] defines how many byte to send (LS command).
SimplIQ Software Manual Program Development and Execution 6-23 MAN-SIMSW (Ver. 1.4) 6.5.3 Downloading a Program 6.5.3.1 The DL Command The DL command downloads data to the serial flash memory of the drive. The command is used primarily to download compiled user programs to the drive. When downloading to a non-protected area in the flash, the process is as follows: LP[1]=start; DL##xxxxxxxxxCS; where: xxxxxxxxx denotes the escape-sequenced data payload.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) 5. Use the CC=checksum command to declare the end of loading and to verify the entire download process. 6.5.4 Uploading a Program 6.5.4.1 The LS Command The LS command is used to upload a program that resides in the drive flash, for backup or for further editing. This option is disabled when a program is running. After program upload, the user can modify it and then return to the compilation step.
SimplIQ Software Manual Program Development and Execution 6-25 MAN-SIMSW (Ver. 1.4) 6.6.1 Initiating a Program A program is initiated by the XQ command, which indicates at which label execution should begin. The XQ command does not reset program variables; initial values for all variables must be set by the user. The XQ command clears the call stack, kills any pending automatic routines and clears the interrupt mask. For a description of the XQ command, refer to section 6.7.1. 6.6.
SimplIQ Software Manual Program Development and Execution 6-26 MAN-SIMSW (Ver. 1.4) The first task is invoked by XQ##TASK1. In order to switch to the second task, the first task must be killed before: HP; XQ##TASK2; 6.6.3 Automatic Program Execution with Power Up If the autoexec function is included in the user program, the program line following function declaration will be performed at power up. 6.6.4 Save to Flash Because a program is downloaded to a non-volatile memory, it is always saved.
SimplIQ Software Manual Program Development and Execution 6-27 MAN-SIMSW (Ver. 1.4) KL=0 kills all virtual machines, if any are running. KL stops the motor. HP halts all virtual machines; they can be continued later by the XC command. If HP halts inside a wait statement, the wait time stops running while the program is halted. XC continues all virtual machines. 6.7.2 The Elmo Studio The Elmo Studio IDE provides the environment for debugging a user program.
SimplIQ Software Manual Program Development and Execution 6-28 MAN-SIMSW (Ver. 1.4) 6.7.4 Machine Status The DB##MS command returns the status of all existing VAC machines. Syntax: DB##MS This command returns a string in hexadecimal binary format containing a 16-bit number. Every 4 bits characterize the status of the VAC machine; therefore, the command can give the status of a maximum of four VAC machines. The most significant bit (bit 4) is dedicated to run-time errors.
SimplIQ Software Manual Program Development and Execution 6-29 MAN-SIMSW (Ver. 1.4) When an error occurs inside a specified VAC machine, it returns an error to the main loop responsible for running the entire set of VAC machines. This manager stops all other VAC machines with a “Program Aborted by another thread” error. The VAC machine in which the error occurred is designed by the error code that is different from the “Program Aborted by another thread” error.
SimplIQ Software Manual Program Development and Execution MAN-SIMSW (Ver. 1.4) 6.7.7 Setting and Clearing Breakpoints The SimplIQ drive supports up to six breakpoints simultaneously: five user-defined breakpoints and one for internal IDE use. Breakpoints can be set any time and any place, regardless of if the program is running or not.
SimplIQ Software Manual Program Development and Execution 6-31 MAN-SIMSW (Ver. 1.4) 6.7.9.2 Step Over The DB##SO command executes a step over by running to the nearest end of line. Syntax: DB##SO[N] where N is a handle of the specified VAC machine. This command is implemented inside the SimplIQ drive, using the following process: Save the current base pointer. Start the loop. Run to the nearest end of line. Compare the current base pointer with the saved base pointer.
SimplIQ Software Manual Program Development and Execution 6-32 MAN-SIMSW (Ver. 1.4) Run to the nearest end of line. Compare the current base pointer with the saved base pointer. If the current base pointer is less than the saved base pointer, the step is out: jump to the end of the loop. Otherwise, go to the start of the loop. End of loop. When the nearest end of line is reached and the current base pointer is less than the saved base pointer, the VAC machine enters a halt state.
SimplIQ Software Manual Program Development and Execution 6-33 MAN-SIMSW (Ver. 1.4) 6.7.12 Retrieving the Call Stack There is no direct command for retrieving a call stack. The IDE manager executes all debug analysis. Example (more details provided in section 8.
SimplIQ Software Manual Program Development and Execution 6-34 MAN-SIMSW (Ver. 1.4) 6.7.14 Viewing Local Variables Local variables cannot be accessed through the Interpreter, and there is no special debug command for this. The IDE manager can access local variables by using existing debug commands and analyzing their results as when retrieving a call stack. The procedure for doing this is as follows: Get current status DB##PS[N]; Check current status: If it is not halted, return an error.
SimplIQ Software Manual 7-1 MAN-SIMSW (Ver. 1.4) Chapter 7: Development Aids SimplIQ hardware and software include a number of features that facilitate application development: The SimplIQ drive’s built-in simulation capability enables the user to develop large parts of the application from the desktop, without even connecting the SimplIQ drive to a motor. Controller sampling time can be optimized for best performance.
SimplIQ Software Manual Development Aids 7-2 MAN-SIMSW (Ver. 1.4) Once you have entered the password, you enter MO=1 to initiate “motor on” state, in which you can run controller reference commands. If no motor is connected to the SimplIQ drive, the drive may refuse to accept MO=1, claiming that all Hall sensors read the same. In such a case, you may use one of the following remedies: Set CA[28]=1 to define a DC motor that does not require Hall sensors.
SimplIQ Software Manual Development Aids 7-3 MAN-SIMSW (Ver. 1.4) The auxiliary encoder will read a simulated encoder signal with a speed of n counts/second. The desired speed n may be positive or negative. The auxiliary encoder readout will connect to the hardware again at the next power on or when you enter TW[35]=0. Do not use TW[35]=n when the auxiliary encoder serves for feedback (UM=4) because this result in control instability. 7.2.
SimplIQ Software Manual Development Aids 7-4 MAN-SIMSW (Ver. 1.4) 7.3 Optimizing the Controller Sampling Time Selecting a controller sampling time is a compromise between the following: Possible control bandwidth Maximum rate of CAN message acceptance Maximum communication baud rate Minimum latency for interpreter response Maximum user program speed The smaller the sampling time, the better the control performance.
SimplIQ Software Manual Development Aids 7-5 MAN-SIMSW (Ver. 1.4) 7.4 The Recorder The SimplIQ drive recorder mechanism enables the user to record up to eight signals simultaneously. The recorded signals can be uploaded to the host through the communication connection, for presentation and analysis. SimplIQ drives operating with CAN have two communication lines: CAN and RS-232.
SimplIQ Software Manual Development Aids 7-6 MAN-SIMSW (Ver. 1.4) 7.4.1 Recorder Sequencing: Programming, Launching and Uploading Data In order to activate the recorder, it must first be programmed to indicate which signals should be recorded, at what resolution and what will trigger the recording event. A number of limitations apply to programming the recorder: The recorder cannot be programmed while it is armed or recording. It must first be stopped, or “killed” (RR=-0).
SimplIQ Software Manual Development Aids MAN-SIMSW (Ver. 1.4) Signal ID Signal Name (Command) Length; Type Description 9 Auxiliary Speed (VY) Long Float Speed of auxiliary feedback sensor, in counts/second. 10 Active current command (IQ) Short Float Active part of vectored current reference, in amperes. 11 Reactive current command (ID) Short Float Reactive part of vectored current reference, in amperes.
SimplIQ Software Manual Development Aids 7-8 MAN-SIMSW (Ver. 1.4) Prior to being recorded, the signals listed in Table 7-3 must be mapped to the recorder. Up to sixteen signals may be mapped to the recorder at any time. Up to eight signals can be recorded simultaneously. The RV[N]=x command maps a signal with the ID of x to the logical ID of N, N=1…16. RC is a bit-field parameter (bit 0 to 15) that sends the actual required signal to the recorder. In this case, bit N-1 of RC points to signal x.
SimplIQ Software Manual Development Aids 7-9 MAN-SIMSW (Ver. 1.4) Note that RG specifies only the recorder sampling rate, not the trigger sampling rate. A trigger event will cause the recorder to start within one time quantum (TS). RL defines the maximum number of data items to collect. For example, if RL=11, TS=70, RG=1 and RP[0]=0, then the 11 samples will be taken at the rate of 280 microseconds, lasting (11-1) x 280 microseconds = 2,800 microseconds.
SimplIQ Software Manual Development Aids 7-10 MAN-SIMSW (Ver. 1.4) The trigger defines when the recorder is to start. The recorder can be programmed to start before the trigger event, so that the trigger event can occur “in the middle of the action.” This is possible because the recorder begins to record at the instant it is launched by the RR command, so that when the trigger event occurs, the pre-trigger information is already recorded.
SimplIQ Software Manual Development Aids 7-11 MAN-SIMSW (Ver. 1.4) RP[N] Description Definition RP[3] Trigger type 0: Immediate 1: BG 2: Positive slope 3: Negative slope 4: Window 5: Trigger on digital input RP[4] Level 1 Level of positive slope trigger, or high side of window trigger. RP[5] Level 2 Level of negative slope trigger, or low side of window trigger. RP[6] Digital input trigger polarity.
SimplIQ Software Manual Development Aids 7-12 MAN-SIMSW (Ver. 1.4) The SR (status register) command details the status of the recorder. SR returns a bit field, in which bits 16 and 17 may have the following values: Bit 16 Bit 17 Recorder Status 0 0 Recorder inactive, no valid recorded data 0 1 Recorder armed, waiting for trigger event 1 0 Recorder finished, valid data ready for use 1 1 Recording now Table 7-5: SR Recorder Status Reports 7.4.
SimplIQ Software Manual Development Aids 7-13 MAN-SIMSW (Ver. 1.4) The data is uploaded in hexadecimal form in order to minimize transmission time (relative to ASCII formatted text), while adhering to the ASCII nature of transmissions. Each data byte is parsed into two nibbles, and the ASCII code of the nibbles is sent from the controller to the host. For example, the short integer number 43794 has the hexadecimal representation AB12.
SimplIQ Software Manual Development Aids 7-14 MAN-SIMSW (Ver. 1.4) BH record transmission time can be quite long. A record of 2000 long numbers is approximately 8000 bytes, which take at least 4 second to transmit over RS-232 at a baud rate of 19,200. During this time: The user program continues to run normally. CAN commands are accepted and processed normally.
SimplIQ Software Manual 8-1 MAN-SIMSW (Ver. 1.4) Chapter 8: Commutation 8.1 General Description The SimplIQ drives’ fixed magnet motors, in which a winding creates a magnetic field. If the fixed magnet is directed along the field lines of the winding, it is in its steady state, and the winding exerts no force on the magnet. If the magnet is not aligned along the winding field lines, it will attempt to align with them.
SimplIQ Software Manual Commutation 8-2 MAN-SIMSW (Ver. 1.4) CA[25], motor direction is set to 0 or 1 so that the motor will rotate in the desired direction for positive torque commands. The values of CA[16] and CA[25] must be coordinated; otherwise, the feedback direction will be incorrect and the encoder will count negative displacement for positive torques. In addition, the motor will immediately “run away” as soon as speed or position control is attempted.
SimplIQ Software Manual Commutation MAN-SIMSW (Ver. 1.4) You can read the electrical and mechanical angle of the motor using the following commands: Command Description WS[20] Stator field angle, in 1024 counts/revolution units. Stator field angle (degrees) = WS[20] x (360/1024). WS[21] Commutation counter. WS[21] counts the main high-resolution position sensor, modulo CA[18]. 8.3 Commutation Sensors For BLDC commutation, rotor position sensors are required.
SimplIQ Software Manual Commutation 8-4 MAN-SIMSW (Ver. 1.4) The following table describes the digital Hall sensor reading. The BLDC field angle is the angle that produces maximum torque for this Hall sensor reading.
SimplIQ Software Manual Commutation 8-5 MAN-SIMSW (Ver. 1.4) 8.3.3 Combining Sensor Types 8.3.3.1 Initializing Encoder-based Commutation When starting a motor, the electrical angle can be roughly estimated from the digital Hall sensors, which usually read the electrical angle to +30 electrical degrees. The exception is that instant at which the Hall sensor reading switches; at this point, the Hall sensors read the electrical angle accurately.
SimplIQ Software Manual Commutation 8-6 MAN-SIMSW (Ver. 1.4) As shown in the table, change CA[25] switches the B and C phases. Actually, changing CA[25] will reverse the direction in which the motor moves for a given torque command. 8.3.4.2 Hall Sensor Parameterization Figure 8-1 presents an idealized picture of the digital Hall sensor reading. All waveforms are in the precise phase and polarity.
SimplIQ Software Manual Commutation 8-7 MAN-SIMSW (Ver. 1.4) 8.3.4.3 Encoder Parameterization Accurate commutation requires a high-resolution sensor. Many types of high-resolution sensors exist. For the SimplIQ drive, the following selections are available: Parameter Description CA[17] Commutation sensor type: 1 for Main encoder. CA[21] Position sensor present: 0: No high-resolution commutation sensor. Commutation will be based on digital Hall sensors only.
SimplIQ Software Manual Commutation MAN-SIMSW (Ver. 1.4) 8.4 Auto-phasing and Commutation Search When starting the motor, the rotor can be located anywhere. The torque of a brushless DC motor is given by the equation: T= K T ⋅ I ⋅ sin(θ) (1) θ = θs − θ r (2) where: T is the motor torque. KT is the motor constant. I is the motor current. θ is the electrical angle between the rotor and the field at the stator. θs is the electrical angle of the stator field. θr is the electrical angle of the rotor.
SimplIQ Software Manual Commutation 8-9 MAN-SIMSW (Ver. 1.4) The selection rules for parameters I and f are as follows: The torque I must be as large as possible so as to reduce the relative effect of disturbance torques (such as cogging and friction) on the resulting waveform. Normally, I is taken as about 50% of the continuous motor current. The frequency f must be selected so that the amplitude of the position sine is 6 to 8 bits.
SimplIQ Software Manual Commutation MAN-SIMSW (Ver. 1.4) 8.4.3 Protections The method described here can work reliably in many practical situations, although it does not match every application. If the parameters of the method are not tuned properly, or if the method does not match the application, the motor starting process will fail. After setting MO=1, the algorithm will attempt to rotate the motor back and forth and find the commutation angle.
SimplIQ Software Manual Commutation 8-11 MAN-SIMSW (Ver. 1.4) To optimize the torque, it is necessary to maintain θ F − θ r ≈ 90 . o The commutation error can be defined as follows: ε θ = 90 o − (θ F − θ r ) . Ideally, ε θ = 0. The torque production is not very sensitive to εθ. Writing equation (1) as: T = KT * I cos (εθ), it can be seen that a discrepancy of 5° can result in a loss of about 0.4% of the torque. With a miss of 30°, 13.
SimplIQ Software Manual Commutation 8-12 MAN-SIMSW (Ver. 1.4) Digital Hall sensors have evolved to support six-step commutation. The crude six steps produce an approximately 13% ripple torque when used with sinusoidal motors, and must less ripple torque when used with trapezoidal motors (refer to section 8.6). The main drawback of six-step commutation is the need to abruptly switch phase currents, which imposes an extreme bandwidth demand on the current controller.
SimplIQ Software Manual Commutation 8-13 MAN-SIMSW (Ver. 1.4) Most motors are wound to sinusoidal or trapezoidal winding forms, but no motor can be exactly sinusoidal or trapezoidal. Trapezoidal motors are normally chosen for six-step commutation, whereas sinusoidal motors are normally chosen for continuous commutation. 0.4 0.3 0.2 h(theta) 0.1 0 -0.1 -0.2 -0.3 -0.4 0 50 100 150 200 250 Theta (degrees ) 300 350 400 300 350 400 Figure 8-3: Winding Shape Function for Trapezoidal Motor 0.8 0.
SimplIQ Software Manual MAN-SIMSW (Ver. 1.4) Chapter 9: The Current Controller This chapter describes the current controller and its parameterization. Also included are a description of the current limiting process and the drive protections.
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) Peak/Continuous lim it saturation PW M output Torque com m and Σ Pre-filter Q P+I controller Σ 0 D P+I controller - Va VQ Output Coordinate transform - Power bridge & m otor VD Com m utation angle θ Ia IQ ID Vb Vc Input Coordinate transform Ib Ic Current sensors Figure 9-1: Current Controller Structure The input coordinate transform retrieves the IQ and ID (active and reactive) components of the motor current.
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) Do not specify PL[1] > VB RM where: VB is the DC motor supply voltage. RM is the motor resistance. You should define a PL[1] small enough so that at peak current there is enough voltage to drive current changes. Otherwise, at large currents, the drive speed of response will be limited by voltage saturation. The continuous current limit for your application is programmed by CL[1].
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) Slower time constants in the low-pass filter permit a peak current demand for longer times, but also take more time to recover from a limitation to CL[1].
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) 9.
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) The DC power voltage varies significantly: It decreases at high current due to the power supply output impedance and increases when, upon braking, the motor acts as a generator. The division of the bus voltage makes the output of the controller proportional to the physical motor voltage, eliminating the uncertainty. The bus voltage is filtered to avoid too rapid changes in current loop PI parameters.
SimplIQ Software Manual The Current Controller MAN-SIMSW (Ver. 1.4) The protections that are provided are: Protection MF Reports Over-voltage 0x5000 Voltage of the power supply is too high, or the servo drive failed to absorb kinetic energy while braking a load. A shunt resistor may be required. The over-voltage threshold differs with the power stage model (refer to product user manual).
SimplIQ Software Manual 10-1 MAN-SIMSW (Ver. 1.4) Chapter 10: Unit Modes The SimplIQ drive’s feedback can be structured in a number of different ways. These options are called “unit modes” and are programmed by the UM parameter. The unit mode can be switched only with the motor turned off, because the feedback structure must be rearranged for each different mode.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) The AS[1] parameter compensates for possible offsets in the driving equipment and internally in the SimplIQ drive. If you do not use the analog input for the torque command, set AG[1] = 0 or RM = 0 in order to avoid the noises and offset that affect the drive torque command. The combined (software and analog input) current demand is reported by DV[1].
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) If you do not use the analog input for the torque command, set RM = 0, in order to avoid noises and offset that affect the drive speed command. The DV[2] command reports the combined (software and analog input) speed demand, after being further processed for acceleration and speed limiting, and for the switch actions RLS, FLS and STOP. DV[4] and DV[5] retrieve the external and software components of DV[2], respectively. 10.2.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) 1. Has any new BG command been accepted by the software or hardware? If yes, update the speed target to the value of JV, and also update the permitted acceleration and deceleration to the values of AC and DC. 2. If the speed target and speed command are positive, and the speed target is greater than the speed command, select AC for the acceleration limit.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) Example 2: This example demonstrates the smoothing filter and the smoothing factor SF: MO=1; JV=4000; AC=100,000; DC=100,000; SD=1000000; PM=1; RM=0;BG SF has three different values: The SF=0 graph displays sharp corners, because smoothing is ignored, thereby allowing non-continuity of acceleration. The SF=10 graph takes 10 milliseconds more to stabilize the speed software command; however, the speed reference profile is much smoother.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) Analog input-) 1 10 to 10 Volts( Auxiliary speed command AG[2] Count/sec/ Volt Σ - Σ AS[1] Auxiliary input Speed estimator FR[2] Figure 10-5: Auxiliary Speed Command Generation The analog input is most useful when the SimplIQ drive serves as an inner controller, embedded in an external control loop. The auxiliary encoder speed input enables the drive to issue speed commands relative to a conveyor or other moving object.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) Parameters Description switches (RLS or FLS) Table 10-4: Stop Manager Parameters Stop condition (Stop, RLS, FLS) - SD Acceleration/Deceleration Lim iter LV[2],HV[2] speed lim iter Reference generator output (software + auxiliary) Com m and to Speed Controller 0 Figure 10-6: Speed Mode Stop Manager The stop manager prevents the speed controller command from changing abruptly by limiting the rate of reference change to SD counts/second2.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) 5000 4500 Com m and generator output 4000 3500 3000 Com m and to the speed controller 2500 2000 1500 1000 S top switc h active 500 0 0 0.2 0.4 0.6 0.8 1 Figure 10-7: Results of Sample Stop Switch Activation When the stop switch is applied, the speed command is brought to a complete stop, decelerating at 100,000 counts/second2.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.4) Enable if RM==1 Auxiliary position com m and Σ Stop m anager Stepper angle com m and W S[20] Current controller 1024 count per electrical rev.
SimplIQ Software Manual Unit Modes MAN-SIMSW (Ver. 1.
SimplIQ Software Manual Unit Modes 10-11 MAN-SIMSW (Ver. 1.4) 10.5 Unit Mode 5: Single Feedback Mode Single feedback mode is used when the same sensor is used for speed, commutation and position. This situation is common with sensors that contain a single position sensor.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Chapter 11: The Position Reference Generator The position reference signal is generated by the following components Software reference generator External position reference generator Stop manager 11.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Command Mode ST Idle: ST stops any motion. PA PTP: PA=n specifies a PTP motion, to absolute position n counts. JV Jog: JV=n specifies a jog motion, at speed n counts/second. PT PT: PT=n specifies a PT motion, beginning from the nth item in the PT data table. PV PVT: PV=n specifies a PVT motion, beginning from the nth item in the PVT data table. Table 11-1: Software Motion Mode Commands 11.1.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Feature PT PVT Cyclical motion support Yes Yes On-the-fly motion programming with handshake host protocol Yes Yes Table 11-2: Tabulated Motion Differences Feature Preferred Long preprogrammed motions PT Ease of use PT Variable command sampling time PVT Motion design independent of controller sampling time PVT Synchronized, multiple-axis motions PVT Table 11-3: Tabulated Feature Preferences 11.1.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Example: The concepts of target time and target radius are demonstrated in the following figure. 1400 1200 1000 Target 800 600 400 200 Time 0 0.011 0.012 0.046 0.050 0.074 Figure 11-1: Target Time and Target Radius In this figure, the motor position settles after overshooting the target of 1000 counts. The target radius is 20. The motor position is within the target radius in the range of [980…1020] counts.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The parameters of PTP motion are summarized in the following table: Parameter Action AC Acceleration, in counts/second2 DC Deceleration, in counts/second2 SP Maximum speed, in counts/second SF Smooth factor, in milliseconds PR Relative position, in counts PA Specifies that the next motion will be PTP, and the absolute target position Table 11-5: PTP Motion Parameters The PA command plays more than one role.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 2000 C onstant speed (S P ) S peed 1000 A cceleration (A C ) D eceleration (D C ) 0 0 0.01 0.02 0.03 0.04 0.05 0.06 0.02 0.03 0.04 0.05 0.06 100 P osition 50 0 0 0.01 With shorter movement, the deceleration begins before the speed limit is reached, so that the SP speed limit is not effective. This situation is depicted in the following figure: 1000 S peed DC 500 AC 0 Time (sec) -500 0 0.01 0.02 0.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.1.5 Jog In a jogging motion, the motor receives a command to move at a fixed speed. The AC and DC parameters indicate the acceleration or deceleration to the desire speed. Jog motions may be initiated any time by using the JV command, and not necessarily from a stationary state. The jog mode decisions, made every position control cycle, are given in the following flowchart.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Example of simple jogging: Begin with the command sequence JV=3000; BG The position reference starts to accelerate until the jog speed reaches 3000. Later, the command sequence JV=1500; BG changes the speed of the position reference to 1500 counts/second. 3000 JV =3000 2000 C ounts/sec DC AC JV =1500 1000 Time (sec) 0 0 0.02 0.04 0.06 0.08 0.06 0.08 150 100 P osition reference 50 Time (sec) 0 0 0.02 0.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.1.6 Position - Velocity - Time (PVT) In a PVT motion the user provides the desired position and speed at selected time instances. Between these specified times, the motion controller interpolates to obtain smooth motion. The position and speed specifications are absolute, while the time specification is relative. A PVT motion can be referenced in absolute time by requiring it to start at a specified time.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The four parameters a, b, c and d are unknown and can be solved using the following four linear equations: P(t 0) = P0, namely, d = P0 V(t 0) = V0, namely, c = V0 P(t 0 + T) = PT, namely, PT = aT3 + bT2 + cT + d V(t 0 + T) = VT, namely, VT = 3aT2 + 2bT + c Example 2: This example demonstrates how very few points can accurately describe a smooth and long motion path. Two drives, driven synchronously, draw an ellipse.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 8 7 6 5 D ifference (counts) 4 3 2 1 msec 0 0 500 1000 1500 2000 2500 It can be seen that with only 23 PVT points, the interpolated path never differs from the original ellipse by more than 8 counts (remember that the ellipse axes are 100,000 and 50,000 counts respectively)! At the PVT points, the interpolation error is zero.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 2 x 10 4 C ounts 1 Rectangle 0 -1 C ounts -2 -3 2 1 x 10 -2 -1 0 1 2 3 5 x 10 4 C ounts/sec 0 x speed y speed -1 P VT points -2 0 5 10 15 20 25 For the corner points both the x and y speeds are specified to zero. The interpolation error for the entire rectangle is zero.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 1200 1180 1160 1140 Position 1120 1100 1080 1060 1040 1020 1000 Time 0 1 2 3 4 5 6 11.1.6.1 The PVT Table A three-column table is used to define PVT motion. Each row of the table defines the position and speed at a single time instance.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.1.6.2 Motion Management In PVT mode, the drive manages a “read pointer” for the PVT table. When the read pointer is N, the present motion segment starts at the coordinates written on the Nth row of the table, and ends at the coordinates of the (N+1) row 2.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) An unused part of the PVT table may be programmed for the next motion while the present motion is executing. An attempt to modify the data of an executing motion segment generates an error. 11.1.6.3 Mode Termination PVT motion terminates upon of the following events: The motor is shut down, either by programming MO=0 or by an exception. Another mode of motion is set active; by programming PA=xxx; BG, for example.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The PDO does not specify the PVT table row to be programmed; instead, a write pointer specifies the row. The parameter MP[6] initially sets the write pointer. A new PVT CANopen message (object 0x2001) write the data to the table row indicated by MP[6] and then automatically increments MP[6].
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) This flow differs from the basic mode because: The motion queue underflow is diagnosed by the read pointer reaching the write pointer. Emergency objects are issued for the queue low and queue underflow events. Programming Sequence for Auto-increment PVT Mode PVT motion must begin with the initial programming of the PVT arrays.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) MP[5] (number of rows remaining for “Queue low” emergency) should not be set to too high a value. For example, consider a slow-responding host that manages a 64-row PVT queue in the drive. Suppose that the PVT row times are 10 milliseconds each and that MP[5] = 55. The host receives a “Queue low” emergency object notifying it that there are 64 - 55+1 = 8 free programmable rows in the PVT table.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The following CAN emergencies are supported: Error Code (Hex) Error Code (Dec) 0x56 Reason Data Field 86 Queue is low. Number of yet unexecuted PVT table rows has dropped below the value stated in MP[4]. Field 1: Write pointer Field 2: Read pointer 0x5b 91 Write pointer is out of physical range ([1…64]) of PVT table. Reason may be an improper setting of MP[6]. Value of MP[6] 0x5c 92 PDO 0x3xx is not mapped.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.1.7.1 Interpolation Mathematics PT implements a third-order interpolation between the position data points provided by the user. Let T = m * Ts where: Ts is the sampling time of the position controller. The parameter WS[28] reads Ts. T is the sampling time of the PT trajectory. m (system parameter MP[4]) is the integer parameter that relates Ts and T. For m = 1, no interpolation is required.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 1000 Interpolated path PvtPlan output 800 600 400 200 0 Motion path in counts -200 -400 -600 -800 Time (seconds) -1000 0 0.02 0.04 0.06 0.08 0.1 11.1.7.2 The PT Table The vector QP[N] defines the position points for PT motion. Each element of the vector defines the position at a given time.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The parameters of a PT motion are summarized in the following table: Parameter Use Comment MP[1] Lowest valid element of QP vector. MP[2] Highest valid row of QP vector. MP[3] 0: Motion stops if read pointer reaches MP[2]. 1: Motion continues when read pointer reaches MP[2]. The next row of the table is MP[1]. MP[4] Number of controller sampling times in each PT motion segment. Cyclical behavior definition.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) A PT motion is initiated by stating: PT=N with 1 < N < 1024, and BG. The PT=N command sets the read pointer of the QP vector to N. BG starts the motion. The QP vector may be written online during a PT motion, as long as no presentlyexecuting PT elements are programmed. a. Mode Termination The PT motion terminates when one of the following occurs: The motor is shut down, either by programming MO=0 or by an exception.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) The PDO does not specify the QP vector elements to be programmed; instead, a write pointer specifies them. The parameter MP[6] sets the value of the write pointer, which may be set once for the entire motion. The write pointer is incremented automatically by two each time the drive receives a new PT motion-programming message.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) d. Programming Sequence for Auto-increment PVT Mode PT motion must begin with the initial programming of the PT arrays. To do so, set: MP[1] = First valid line in PT table. MP[2] = Last valid array in PT table. MP[3] = 1 for cyclical mode. MP[4] = The ratio between the length of the PT time interval and the sampling time of the position controller.
SimplIQ Software Manual The Position Reference Generator 11-28 MAN-SIMSW (Ver. 1.4) 11.1.7.4 PT Motion Mode Parameters The following parameters apply to PT motion: Parameter Use UM (Unit Mode) Units modes 3, 4 and 5 select the position mode. SD (Stop Deceleration) Rate of deceleration when motion is killed by queue underflow or exception. SD is also the acceleration to catch up with a PT motion started with improper initial connections. PV (Position/Time) Set a PT motion command.
SimplIQ Software Manual The Position Reference Generator 11-29 MAN-SIMSW (Ver. 1.4) The following CAN emergencies are supported: Error Code (Hex) Error Code (Dec) 0x56 Reason Data Field1 86 The time for the entire remaining valid PT program has dropped below the value stated in MP[4]. Time (milliseconds) remaining with valid motion program. 0x5b 91 Write pointer is out of physical range ([1…1024]) of QP vector. Reason may be an improper setting of MP[6].
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Synchronizing several drives, which may be driven by an auxiliary encoder signal. Each of the drives uses its ECAM table to derive its own motion path from the auxiliary signal.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 1800 PY - Auxiliary Position DV[6] - External Position Reference 1600 1400 FR[3] changes 1200 1000 FR[3]=1 800 FR[3]=2 600 400 200 0 0 0.005 0.01 0.015 Time 0.02 0.025 0.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Suppose that the resolution of the conveyor encoder is similar to the resolution of the x-axis encoder. To draw an exact circle on the moving cake, the motion 10,000 * cos(2πt) is programmed as PVT and RM=1, FR[3]=1. x 10 4 4 x motor motion command 3 C onveyer position, as measured by the auxiliary encoder input 2 1 x motion relative to cake 0 Time (sec) -1 0 11.2.2 0.2 0.4 0.6 0.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Commands Action EM[5] First valid index of ECAM table. The EM[2] setting goes into effect at next setting of EM[5] or next MO=1. EM[6] Write pointer for fast loading of ECAM table via CAN bus (see section 11.2.4). EM[7] Last interval shortening. EM[7] allows the ECAM table length (ECAM cycle in the EM[1]=2 cyclical mode) not to be an integer multiple of EM[4] (see sections 11.2.2.1 and 11.2.2.2).
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) External position com m and Example 1: The following figure illustrates the behavior of linear ECAM for EM[5]=1 and EM[2]=4. ET[3] ET[4] ET[2] EM[4]-EM[7] EM[4] ET[1] EM[4] IETmax 0 ECAM table input Figure 11-15: Linear ECAM Example 2: Consider an application in which a two-axis x-y servo system is used to plot chocolate bears on birthday cakes: Eyes Head contour Cake moves The cakes come from the oven on a conveyor.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) One of the drives uses a digital output to control the flow of the chocolate out of the drawing nozzle. The drive program is: IL[1]=7 EM[1]=1 EM[2]=200 EM[3]=0 EM[4]=100 Program DIN#1 as general-purpose input. Enable ECAM. Length of ECAM vector. Starting position. Conveyor encoder counts between two consecutive ECAM table entries. ET[1]=…;ET[2]=…;ET[100]…; Program numeric data of ECAM table.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) External position com m and ET[EM[2]]-ET[EM[5]] ET[3] ET[4] ET[2] EM[4]-EM[7] EM[4] ET[1] EM[4] 0 IETm ax 2 IETm ax ECAM table input Figure 11-16: Cyclical ECAM Note that the external position command is summed from the ECAM table outcome and a cumulative offset, which is n x (ET[EM[2]] = ET[EM[5]]) with n being an integer.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Example: In the previous example of the chocolate bear, it was assumed that the bear drawing could be programmed one time only. In many food applications, however, the products to be worked on (the cake in the example) are not placed exactly on the conveyor or their shapes may be irregular. A camera images the next coming product and the image is analyzed to form the next motion path.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.2.4 Fast ECAM Programming Using CAN ECAM table points can be programmed via a fast, auto-increment PDO service. Two positions of the ET table can be programmed in the eight bytes of PDO 0x300+ID, where ID is the node ID of the drive.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) 11.2.5.1 Jump-free Motor Starting Policy Upon starting a motor using the MO=1 command, the motor should never jump. The first and most important reason is safety. The other reason is to avoid an excessive position error fault immediately after the motor is started.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Example: Consider a manipulator that works a conveyor. Whenever a box arrives, the roller prints a label on the box. The roller turns continuously at the following line speed: FR[3] = (counts per roller revolution) / (conveyor encoder counts/mm*2*π*r(mm)). In order to print the label in the correct place, the roller position must be zero at the point in which the sensor senses the next box.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Limits the magnitude of the controller command to the maximum allowed range. This is necessary because even if the software command is generated within the permitted limits and the external command is also within the permitted limits, their total value may exceed the permitted limits. The stop manager prevents the position reference generator from driving the motor to undesired positions.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) Position Command Clipping (No.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) x 10 4 8 6 4 Counts 2 0 -2 -4 -6 -8 0 0.5 1 1.5 S ec 2 2.5 3 Figure 11-19: Position Output of the Stop Manager The input of the stop manager (the output of the position reference generator) is the red solid line, and the output of the stop manager is the green dashed line. At the time of 0, the PVT starts at position 17,000. The stop manager catches up with the sinusoidal command, with an acceleration limit of SD.
SimplIQ Software Manual The Position Reference Generator MAN-SIMSW (Ver. 1.4) x 10 7 2 1.5 Counts/s ec 1 0.5 0 -0.5 -1 -1.5 -2 0 0.5 1 1.5 S ec 2 Figure 11-20: Speed Output of the Stop Manager 2.
SimplIQ Software Manual MAN-SIMSW (Ver. 1.4) Chapter 12: Sensors, I/O and Events SimplIQ drives have two encoder inputs for feedback, commutation and auxiliary reference generation. It also includes an analog input, Hall sensor inputs and digital I/O. The digital inputs and encoder index signals can generate events that register motor position, reload the position counter, flag a digital output or call a special user program.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) The axis will travel 100,000 * (75 * 10-6 * 4) = 30 counts per one controller sampling time. If the position is PX=975 at a certain sampling time, the position should be PX=1005 at the next sampling time. PX=1005 is beyond XM[2]; therefore, the cyclical counting makes PX=5. The condition PX > HL[3] is missed, although it did exist.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) 12.4 Events and Response Methods SimplIQ drives identify the following events 5: Change in a GPI (general-purpose digital input) Change in a limit switch Change in a Home switch Change in an Enable switch Change in a Stop switch Change in a Begin switch Encoder Index pulse In order to identify an event, the event must be defined. From the events in the previous list, only the Index is defined permanently.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) 12.4.2 Periodic Query This is possible only in CAN networks. The user can map the digital input word to a synchronous PDO. The host can collect the input state of multiple slaves as a response to a single sync. The following table summarizes some of the periodical query properties. Topic Comment Capture probability Low. An input pulse may slip away unnoticed between consecutive syncs. Deterministic delay Yes. 0.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) The following table summarizes some of the real-time properties: Topic Comment Capture probability High. An input pulse may slip away unnoticed only if the user program is not running , the input is masked or the pulse is so short that it does not pass through the input filters. Deterministic delay Yes. Position logging and value setting are immediate and yield accurate results regardless of speed.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) Example: TS = 80 IF[1] = 2 VX = 20,000 Torque controller sampling time, in microseconds Input filter width for digital input #1, in milliseconds Motor main speed, in counts/second When homing on digital input #1, the expected misses are calculated as: miss = VX ⋅ (0.004 ⋅ TS + IF [1]) 20000 ⋅ (0.004 ⋅ 80 + 2) = = 46count 1000 1000 An event to be captured must first be defined by a proper IL[N] setting.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) In jog motions, the position command is jumped according to the position feedback, so that the motion is unaffected by the position counter update. If the software position reference generator stops or has already stopped, the software position command is corrected according to the position feedback. The motion is unaffected by the position counter update.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) The following user program performs the algorithm: function [int status] = homing1(int TimeOut) /* Homing routine. Input: TimeOut: Timeout for failure Output: status=1 if o.k.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.4) return function [int status]=WaitHome(int TimeOut) /* Wait until HM=0, or until too much time elapses */ int StartTime ; status = -1; StartTime = TM; while (HM) if ( tdif(handle) >= TimeOut) return ; end end status = 1 ; return ##ErrorOut /* Error handler – just exit*/ return 12.5.5 Example: Double Homing Corrects Backlash Offsets This example demonstrates homing on the Home switch without using the Index.
SimplIQ Software Manual Sensors, I/O and Events MAN-SIMSW (Ver. 1.
SimplIQ Software Manual MAN-SIMSW (Ver. 1.4) Chapter 13: Limits, Protections, Faults and Diagnosis This chapter describes the limits and protections implemented by SimplIQ drives. Limits are software restrictions that prevent SimplIQ drives from running into dangerous situations. For example: Limits set for the torque command prevent the motor or SimplIQ drive from burning. Reaction to limit switches stops the motor before it accidentally hits something out of its expected motion range.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) Command Description ER[N] Tracking error exception limits for speed and position. HL[N] Protection high limits for position and speed feedback. IL[N] Input logic. Defines digital inputs as stop and limit switches. LC Limit current indication that indicates whether peak limit is active. LL[N] Protection low limits for position and speed feedback. MF States reason for a motor automatic shutdown.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) The maximum time for which the peak current can be maintained after the current demand has been zero for a long time is: ⎡ CL[1] ⎤ log ⎢1 − ⎥ ⋅ τ seconds. ⎣ PL[1] ⎦ If PL[1] = MC, the maximum time allowed for peak current is PL[2]. Otherwise, the servo drive can provide the peak current for a longer time.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) 13.2 Speed Protection The reference to the speed controller is limited to the range [VL[2]…VH[2]]. The limiting (applied on the total of the software reference and external reference) is made by the stop manager.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) In order to avoid spurious motor shutdowns, always: Specify the largest ER[2] that can be tolerated. Leave large enough space between VH[2] and HL[2], and between VL[2] and LL[2], to allow for speed overshoots. 13.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) 13.5 Limit Switches SimplIQ drives have six digital input pins, each of which may be associated with a different function. A pin may function as a general-purpose input or it can function as a motion limiter. As a motion limiter, a digital input can stop the motion via the stop manager, stop the reference generator or limit the motion to a single direction.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) The normal waveforms for brake activation are as follows: Figure 13-5: Normal Brake Activation Timing At the brake activation times (BP[2] milliseconds to disengage and BP[1] milliseconds to engage), the motor is controlled to a complete stop. If MO=0 is set automatically by an exception, the brake is activated immediately, without any delay. 13.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) The motor will not start if the voltage of the power supply is not within range, if the servo drive temperature is too high, or if an active switch prevents motor on. The MO command returns error code 65 or 66. The failure reason may be read through the status (SR command) report. If the voltage is in range and the temperature is not excessive, the drive will attempt to start the motor. 13.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) 13.9 13.9.1 Diagnosis Monitoring Motion Faults Motion faults can be monitored by: Continuously polling the drive status Observing “AOK” digital outputs Trapping CAN emergency objects 13.9.1.1 Polling the Drive Status The drive can be polled using the SR command, which reports a bit-field that fully describes the drive activity.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) Before enabling the motor, the drive tests all parameters to ensure that they are sensible. For example, the variables CA[4], CA[5] and CA[6] define how the Hall sensors are ordered. If CA[4] equals CA[5], two Hall sensors are assigned to the same position, which is illogical. If CA[4] = CA[5], the command MO=1 will fail and will return the error code 54 to indicate a bad database.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) 13.10 Sensor Faults 13.10.1 Motor Cannot Move When the motor is unable to complete a command to move, the reasons may be: The motion sensor is faulty: The motor moves but motion is not detected. In this case, AC motors will generally stop, because the stator field will remain stationary. The motor is faulty or another mechanical failure is preventing the motor from moving.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) 13.11 Commutation is Lost The drive uses the feedback (encoder) counts to calculate the electric angle of the rotor. This calculation is used to set the currents at the stator so that the magnetic field of the stator points 90º away from the rotor. The angle between the magnetic field in the stator and rotor is called the “commutation angle”.
SimplIQ Software Manual Limits, Protections, Faults and Diagnosis MAN-SIMSW (Ver. 1.4) The commutation is drifting (that is, Δθ changes in time) drift can occur in two forms: Slow drift, caused by excessive noise on the encoder lines, a damaged or dirty encoder or a wrong encoder resolution setting. Usually, Δθ drifts slowly and, when the motor stops, it does not drift at all. Slow drifting causes the motor to lose torque gradually until fully stopped at the static setting of Δθ = +90º.
SimplIQ Software Manual 14-1 MAN-SIMSW (Ver. 1.4) Chapter 14: Filters The filter serves as a basic building block for the SimplIQ drive algorithms.
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.4) Parameter Description KV[65]…KV[69] Parameters of fourth link KV[70]…KV[74] Parameters of fifth link Value Range Table 14-3: Position Controller High-order Filter Parameters The sensor filter parameters are: Parameter Description Value Range KV[75] Is filter active? 0: Filter not active and bypassed. All other filter parameters are ignored. 100: Filter is active.
SimplIQ Software Manual 13BFilters 14-4 MAN-SIMSW (Ver. 1.4) 14.1 Internal Structure of a Filter Link There are two types of filter links: Type 16, a fixed link for which the next four link parameters are the filter coefficients. Type 26, a scheduled link, for which the next four link parameters are not used. The four filter coefficients are selected at run-time from the filter bank.
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.4) 14.1.2 Scheduled Link (Type 26) Only one block of this type can be used. The basic continuous-time second-order element is the unity DC gain filter: D(k ) E (k ) s 2 + A(k ) s + B(k ) ⋅ B(k ) E (k ) s 2 + C (k ) s + D(k ) The index k is the gain scheduler selector: It selects one set of (A, B, C, D, E) from the 63 possible selections [A(1), B(1), C(1), D(1), E(1)…A(63), B(63), C(63), D(63), E(63)].
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.4) 14.2.1 Low-pass (Complex Pole) Element (Represented by Second-order Block) The basic continuous-time complex pole element is: ω2 s 2 + 2 ⋅ d ⋅ω ⋅ s + ω 2 where: ω = 2π ⋅ f is the angular frequency. f [Hz] is the pole frequency. The discrete equivalent form is: b0 z z + a1 z + a 2 2 where: 2ω 2 − 8 T2 a1 = 4 dω 4 +ω2 − 2 T a2 = T 4 dω 4 + 2 +ω2 T T b0 = a1 + a 2 + 1 = 4 dω 4 + 2 +ω2 T T 4ω 2 4dω 4 + 2 +ω2 T T 14.2.
SimplIQ Software Manual 13BFilters 14-7 MAN-SIMSW (Ver. 1.4) The discrete equivalent form is: b0 z 2 + b1 z + b2 z 2 + a1 z + a 2 where: p1 + c1 + 1 2(1 − p1 ) p − c1 + 1 p − c2 + 1 , b1 = , b2 = 1 , a2 = 2 q q q q b0 = a1 = b0 + b1 + b2 − a 2 − 1 = 2(1 − p 2 ) q assuming: 2d k 1 , pk = , ( k = 1,2 ) 2 ⎛ ω kT ⎞ ω T ⎛ ⎞ tan⎜ ⎟ tan⎜ k ⎟ ⎝ 2 ⎠ ⎝ 2 ⎠ ck = q = p2 + c2 + 1 14.2.
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.4) 14.2.4 First-order Element (Represented by Second-order Block) The basic continuous-time single lead-lag element is: b s+a ⋅ a s+b The discrete equivalent form is: ⎛1 − β ⎜ ⎝1−α ⎞ ⎛ z −α ⎟ ⋅ ⎜⎜ ⎠ ⎝z−β ⎞ ⎟⎟ ⎠ Order Parameter 1 k1 = 1 - β 2 ⎛1− β ⎞ k2 = ⎜ ⎟α ⎝1−α ⎠ 3 k3 = 0 4 k4 = 0 For a single pole, ⋅ s − pT parameters are α = 0, β = e . s+ p Example: A filter consist of one second-order block and one first-order block.
SimplIQ Software Manual 13BFilters MAN-SIMSW (Ver. 1.4) The value of KV[N] parameters for N = 12…47 is not important. Float2Par indicates the following function: Function y = Float2Par(x) A = x * 1024 S1 = floor(A); S2 = 32768 * (A - 21) Y = S1 * 65536 + S2 Be aware that the KV[N] manual programming is not required because the Composer program performs it manually.
SimplIQ Software Manual 15-1 MAN-SIMSW (Ver. 1.4) Chapter 15: The Controller This chapter, which provides details about the speed and position control algorithms, is written for the advanced user who wants to tune the SimplIQ servo drive manually, rather than using the Composer application. It also explains what processes occur when the Composer tunes the servo drive. Familiarity with basic digital control theory is mandatory. Not covered in this chapter is the digital control loop.
SimplIQ Software Manual The Controller 15-2 MAN-SIMSW (Ver. 1.4) The following table lists the parameters of the algorithms referred to in this chapter. Details are available in the SimplIQ Command Reference Manual. Parameter Description UM Unit mode. Determines the type of control algorithm used: speed, dual position or open loop. KP[N] N=2: Inner speed loop proportional gain N=3: Outer loop gain (UM=4 and UM=5) KI[N] N=2: Inner speed loop integral gain, I.
SimplIQ Software Manual The Controller MAN-SIMSW (Ver. 1.4) FF[1] Autom atic Controller Selector d/dt Fixed if GS[2]=0 0 DV[2] Speed controller: KP,KI Σ Speed com m and High order filter Σ Torquecom m and (DV[1], Am p) Speed feedback Position sensor Speed Estim ator Encoder pulse tim er Figure 15-1: Speed Controller Block Diagram 15.1.2 Speed Controller Parameters The basic continuous-time PI controller is: KI + KPs s where: KI is the integral parameter.
SimplIQ Software Manual The Controller 15-4 MAN-SIMSW (Ver. 1.4) KSPEED is the conversion factor from the D/A scale to current in amperes: MC , MC _ VALUE _ BITS = 14000 MC _ VALUE _ BITS 1 ⎧0 if no encoder counts for GS[0] samples and eSPEED dt < GS[14]count p(t ) = ⎨ 32768 ∫ ⎩1 otherwise K Speed = For a non-schedule case: KP = KP[2] KI = KI[2] The scheduled case is explained in section 15.4. The GS[0] parameter is used to stabilize the motion at very low speeds.
SimplIQ Software Manual The Controller 15-5 MAN-SIMSW (Ver. 1.4) 15.2 15.2.1 The Position Controller Block Diagram The position controller comprises a proportional gain, cascaded over the speed controller. The block diagram is given in the following figure.
SimplIQ Software Manual The Controller 15-6 MAN-SIMSW (Ver. 1.4) 15.2.2 Position Controller Parameters The position controller is implemented as a cascaded loop: The inner loop is a speed controller and the outer loop is a simple gain.
SimplIQ Software Manual The Controller 15-7 MAN-SIMSW (Ver. 1.4) 15.3 The Gain Scheduling Algorithm Gain scheduling (GS) is implemented for speed and position controllers, so that the controller parameters — speed controller KI and KP, position controller gain, and highorder filter links — are changed automatically with the working point of the servo drive.
SimplIQ Software Manual The Controller 15-8 MAN-SIMSW (Ver. 1.4) Only a subset of the controller parameters can be scheduled. The KG[N] parameters can program sets of KP, KI gains, as well as one scheduled double-lead block at the high-order filter. The other elements of the high-order filter cannot be gain scheduled. The scheduling is automatic for GS[2]=64. GS[2]=0 selects the controller parameters of KP[2], KI[2] and KP[3].