KOLLMORGEN www.DanaherMotion.com SERVOSTAR® MC M-SS-005-03 Revision E Firmware Version 5.0.
Record of Manual Revisions Revision Date Description of Revision 0 1 2 3 D E 3/1/1999 5/14/1999 6/5/2000 8/31/2001 5/11/2005 6/20/2005 Preliminary issue for review Initial release New PCI and stand-alone models, new firmware features New firmware features Update examples Updated firmware version and dates ©1999 – 2005 Danaher Motion. All rights reserved. Printed in the USA. DANAHER MOTION® is a registered trademark of Danaher Corporation.
Danaher Motion 06/2005 Table of Contents Table of Contents 1. OVERVIEW ................................................................................................................................ 1 1. 1 SYSTEM HARDWARE ......................................................................................................... 2 1. 2 OPERATING SYSTEM......................................................................................................... 2 1. 3 MC-BASIC LANGUAGE COMPILER.................
Table of Contents 06/2005 Danaher Motion 2. 5 C-FUNCTIONS...................................................................................................................40 2.5.1. OBJECT FILES ....................................................................................................40 2.5.2. PROTOTYPE FILE ...............................................................................................41 2.5.3. SPECIAL CONSIDERATIONS ........................................................
Danaher Motion 06/2005 Table of Contents 3.6.4. STARTING POSITION ......................................................................................... 63 3.6.5. BASIC MOVES AUTO SETUP PROGRAM.......................................................... 63 3.6.6. USER UNITS ...................................................................................................... 64 3.6.7. POSITION UNITS ...............................................................................................
Table of Contents 06/2005 Danaher Motion 4.1.8. MOVE ................................................................................................................90 4.1.9. VELOCITY OVERRIDE ........................................................................................98 4. 2 MOTION EXAMPLES ........................................................................................................98 5. 4.2.1. POSITION CAPTURE ...............................................................
Danaher Motion 06/2005 Table of Contents 6.6.3. POSITION......................................................................................................... 123 6.6.4. VELOCITY ....................................................................................................... 124 6. 7 ACCELERATION ............................................................................................................. 124 6. 8 VELOCITY, ACCELERATION, DECELERATION AND JERK RATES.........................
Table of Contents 06/2005 Danaher Motion 9.1.3. LIMITATIONS ...................................................................................................145 9.1.4. FUNCTIONS ......................................................................................................146 9. 2 WITH .................................................................................................................................148 10. INPUT/OUTPUT ...........................................................
Danaher Motion 06/2005 Table of Contents APPENDIX A ................................................................................................................................... 165 SAMPLE NESTING PROGRAM............................................................................................... 165 SUBROUTINE EXAMPLE........................................................................................................ 166 SAMPLE AUTOSETUP PROGRAM ...............................................
Table of Contents 06/2005 Danaher Motion MOVING FRAME ................................................................................................................191 TRACKING PROCESS ..........................................................................................................192 CUSTOMER SUPPORT ............................................................................................................
Danaher Motion 1. 06/2005 Overview OVERVIEW This manual describes how to use the SERVOSTAR® MC (Multi-axis Controller) product. To execute the examples described in this manual, you must at least have a SERVOSTAR MC and BASIC Moves Development Studio® installed on your host computer. Some examples further require that you have a drive installed and connected to the MC using the SERCOS TM Interface cables. The SERVOSTAR® MC Installation Manual describes the procedures for all the necessary installations.
Overview 1. 1 06/2005 Danaher Motion SYSTEM HARDWARE The MC hardware is available in two types of implementation: a plug-in circuit board for a host computer, and a stand-alone model. The PCI plug-in board hardware installs in a host computer (typically a PC), running the Windows NT 4.0, Windows 2000/XP operating systems. The MC contains a fully-independent computer system., so it does not compete with the host processor system for resources.
Danaher Motion 06/2005 Overview Camming links master and slave axes by a cam table. Camming has all the features of gearing, plus the cam table can have any number of points. The cam points are in x-y format so spacing can be provided independently. Multiple tables can be linked together, allowing you to build complex cam profiles from simpler tables. There is a cycle counter that lets you specify how many cycles to run a cam before ending.
Overview 06/2005 Danaher Motion Because SERCOS is digital, it can transmit signals such as velocity and ® position commands with high resolution. The SERVOSTAR MC and accompanying drives ( SERVOSTAR CD series), support 32-bit velocity commands. This provides a much higher resolution than can be achieved with the analog interface. The most common SERCOS functions are provided in such a way that you do not have to be an expert to gain the benefits. 1.
Danaher Motion 1.8.1. 06/2005 Overview Serial Communication The MC has two RS-232 ports, which can be used for user communication. When COM1 is used for communication with BASIC Moves over API, tasks cannot access it to eliminate interference with BMDS communications.
Overview 06/2005 Danaher Motion 1.8.1.2. OPEN SERIAL PORT Configurate the serial port with OPEN. Set the following port properties: BaudRate - baud rate of the device set to a specified value. Parity – enable/disable parity detection. When enabled, parity is odd or even. DataBits - number of data bits. StopBit - number of stop bits. Xonoff – sets raw mode or ^S/^Q flow control protocol mode (optional parameter disabled by default).
Danaher Motion 06/2005 Overview There are several ways to set the IP address of the controller. By default, the MC boots without a valid IP address. The following options are available to set the IP address of the controller: Static IP address setting Use SYS.IPADDRESSMASK in the Config.prg file to assign the IP address and Subnet mask: SYS.IPADDRESSMASK=”212.25.84.109:255.255.255.
Overview 06/2005 Danaher Motion The MC requests a connection from a remote host, according to a specific IP address and port. CONNECT blocks task execution until the connection is established or until the command fails. To unblock a task waiting in CONNECT, close the corresponding socket using CLOSE. In addition, killing a task (KILLTASK) blocked by CONNECT closes the socket to release the task. CONNECT may fail due to the following reasons: 1. Invalid socket descriptor 2.
Danaher Motion 06/2005 Overview If INPUT$ requests reading a data length larger than available data, the command returns only the available data: -->?LOC(1) 11 -->STRING_VAR = INPUT$(20, #1) -->?STRING_VAR Hello World LOC can be used within the INPUT$: STRING_VAR = INPUT$(LOC(1), #1) A partial read of the input buffer is allowed.
Overview 06/2005 Danaher Motion 1.8.3.3. SEND DATA BLOCK PRINTTOBUFF # and PRINTUSINGTOBUFF # allows buffering of data before actually being sent. This eliminates inter-character delays. printtobuff #handle,chr$(0); chr$(message_length); chr$(0);send=false printtobuff #handle,chr$(request[ii]);send=false printtobuff #handle,chr$(request[ii]);send=true 1.8.3.4.
Danaher Motion 2. 06/2005 BASIC Moves Development Studio BASIC MOVES DEVELOPMENT STUDIO BASIC Moves Development Studio (BMDS) provides Windows-based project control for each application. BASIC Moves Development Studio supports development for multi-tasking and also provides numerous tools and wizards to simplify programming the MC. BASIC Moves also provides modern debugging features such as allowing task control by visually setting breakpoints, watch variables, and single stepping.
BASIC Moves Development Studio 06/2005 Danaher Motion To develop your application on the MC, you must install BASIC Moves Development Studio. Refer to the software installation section of the SERVOSTAR® MC Installation Manual for detailed instructions. 2.2.1. Instructions Instructions are the building blocks of BASIC. Instructions set variables, call functions, control program flow, and start processes such as events and motion.
Danaher Motion 06/2005 BASIC Moves Development Studio The term, Lvalue, is a shorthand notation, which indicates the value to the left of the equals sign. Valid Lvalues are variables or writable properties, which can be assigned. Expressions can be variables, constants, properties and function calls, as well as various combinations of them in arithmetic and logical statements .
BASIC Moves Development Studio 2.2.3. 06/2005 Danaher Motion Constants and Variables All constant, variable and system element names must start with an alphabetical character (a-z, A-Z) and may be followed with up to 31 alphabetical characters, numbers (0-9) and underscores (“_”). Keywords may not be used as names. For detailed information on any of the constants and variables (including examples), refer to the SERVOSTAR® MC Reference Manual. 2.2.3.1.
Danaher Motion 06/2005 BASIC Moves Development Studio Besides these basic types, MC-BASIC also supports Structure-like variables and some MC-BASIC specific types, such as points (Joints and Locations), generic motion elements (Axes and Groups) and UEAs (user error assertions-Errors and Notes). DeleteVar deletes a global variable. Since variable name can include wildcards, a single DELETEVAR can be used to delete more than one variable.
BASIC Moves Development Studio 2.2.4. 06/2005 Danaher Motion Data Types MC-BASIC has two numeric data types: Long and Double. Long is the only integer form supported by MC-BASIC. Long and Double are MC-BASIC's primitive data types. Type Long Description 32 bit signed integer Double Double precision floating point (about 16 places of accuracy) Range -2,147,483,648 (MinInteger)to 2,147,483,647 (MaxInteger) ±1.
Danaher Motion 06/2005 BASIC Moves Development Studio MC-Basic has two UEA (user error assertion) data types (severities): Error and Note. Each UEA is defined with a string-type error message given by the user and a unique exception number, which might be determined either by the user or by the system. The SERVOSTAR® MC handles UEAs similar to internal exceptions.
BASIC Moves Development Studio 06/2005 Danaher Motion 2.2.4.1. STRUCTURES A structure is a new data type used for storing a list of variables of different type in one variable. 2.2.4.1.1 Definition Since a structure is a user-defined data type; it must first be defined. Structure type definition can be done only in the Config.
Danaher Motion 06/2005 BASIC Moves Development Studio For example: In config file -> Type X Type as Long Length as Long End Type In application file -> Dim shared s1 as X Program ?s1->Type End program Do not define the size of the structure data type. The size of the structure is constant. If you declare more structure elements than allowed, a translation error is generated. 2.2.4.1.
BASIC Moves Development Studio 06/2005 Danaher Motion Despite the syntax, properties are not data elements, since a system element and its properties are not located on a continuous block of memory. All properties return a value, so they can be printed, combined in expressions and passed by value to functions and subroutines. Many properties are also writable and can be assigned like variables. Unlike variables, properties do not have a fixed address in memory and cannot be passed by reference.
Danaher Motion 06/2005 BASIC Moves Development Studio The value of the expression (6.33 * 2.79) is converted from double to long when the value (17) is copied into I. In the conversion to long, the number is truncated to the integer portion of the floating-point value. Logical expressions are combinations of data and logical operators. For example, X1 And X2 is a logical expression. The data and results of logical elements are type Long. Double variables are not allowed in logical expressions.
BASIC Moves Development Studio Bit-Wise Logical Operator Bitwise Negation Bitwise And Bitwise Or Bitwise Xor Shift Left Shift Right 06/2005 Symbol BNot BAnd BOr BXor SHL SHR Danaher Motion Unary/Binary Unary Binary Binary Binary Binary Binary Operand Type long long long long long long Negation is simply placing a minus sign in front of a constant or variable to invert its arithmetic sign. Modulo division produces the remainder of an addition. For example, 82 Mod 5 is equal to 2 (the remainder of 82/5).
Danaher Motion 06/2005 BASIC Moves Development Studio Bit-wise expressions differ from logical expressions in that there may be many results from a single operation. Bitwise operations are frequently used to mask I/O bits. For example, the standard SERVOSTAR MC inputs can be operated on with BAnd (Bitwise And) to mask off some of the inputs. The following example masks off all bits of the digital outputs, except the rightmost four: Dim Shared MaskedBits As Long MaskedBits = System.
BASIC Moves Development Studio 06/2005 Danaher Motion 2.2.10. String Functions Beginning with version 3.0, MC-BASIC supports all the common string functions supported in standard BASIC. For detailed information on any of the string functions (including examples), refer to the SERVOSTAR® MC Reference Manual.
Danaher Motion 06/2005 BASIC Moves Development Studio 2.2.11. System Commands The following commands provide information about the system. You can issue these commands at any time either from task, terminal or the CONFIG.PRG file (with some exceptions). For detailed information on any of the system commands (including examples), refer to the SERVOSTAR® MC Reference Manual.
BASIC Moves Development Studio System.DecelerationRate System.DIn System.DipSwitch System.DiskFreeSpace System.DoubleFormat System.DOut System.Enable System.Error System.ErrorHandlerMode System.ErrorNumber System.ErrorPrintLevel System.FlashDiskSize System.HostDouble System.HostInteger System.Information System.IPAddressMask System.JerkRate System.Led System.MaxMemBlock System.MCDouble System.MCInteger System.Motion 26 06/2005 Danaher Motion Queries or sets the system deceleration exchange rate.
Danaher Motion 06/2005 System.MotionAssistance System.Name System.NoMotion System.NumberAxes System.PeakLoad System.PipeMode System.PrintMode System.RamDriveFreeSpace System.RamSize System.RtsTimeout System.SerconVersion System.SerialNumber System.ServicePrintLevel System.Time System.UserAuthorizationCode System.VelocityOverride System.VelocityRate System.VIn System.VOut System.
BASIC Moves Development Studio With…End With 06/2005 Danaher Motion Simplifies blocks of code, which set a number of parameters on the same motion element (axis or group). After a With is encountered, all parameters where the element is not specified are assumed to belong to the element specified in the With. With is valid in Configuration, Task, or Terminal contexts.
Danaher Motion 06/2005 BASIC Moves Development Studio On the other hand, expressions separated by a semicolon or a space in the print command are printed adjacently. Print 1,2 1 2 Print 1;2 12 Print 1 2 12 PrintUsing introduces formatting for printing. You can control the format and the number of digits that print. For example, by using the “#” sign and the decimal point, you can specify a minimum number of characters to be printed.
BASIC Moves Development Studio 06/2005 Danaher Motion To change printing to Binary format, type: System.PrintMode = BIN To restore printing to Decimal format, enter: System.PrintMode = DECIMAL Printing double floating point numbers is not affected by System.PrintMode. As an alternative to PrintMode, you can place the keywords Decimal, Hex or Binat the end of Print or PrintUsing to print expressions in these formats. Subsequent print instructions (?, PRINT, PRINTU, and PRINTUSING) are not affected.
Danaher Motion 06/2005 BASIC Moves Development Studio After you have specified the variable or expression, list one or more values or value ranges that the variable can take.
BASIC Moves Development Studio 06/2005 Danaher Motion For example: For I = 2 TO 5 Print "I = " I Next I 'Prints 2, 3, 4, 5 For I = 4 TO 2 STEP –0.5 Print "I = " I Next 'Prints 4.0, 3.5, 3.0, 2.5, 2.0 While…End While allows looping dependent on a dynamic condition. For example, you may want to remain in a loop until the velocity exceeds a certain value.
Danaher Motion 06/2005 BASIC Moves Development Studio For example: Dim Shared i as Long Program i = 0 Do i = i + 1 Print i Loop Until i = 10 End Program or, equivalently, you can use Loop While: Dim Shared i as Long Program i = 0 Do i = i + 1 Print i Loop While i < 10 End Program GoTo unconditionally redirects program execution. The syntax is: GoTo Label1 … Label1: where: Label1 is a valid label within the same task as the GoTo. The label must be on a separate line.
BASIC Moves Development Studio 06/2005 Danaher Motion Catch statements are used within three types of error trapping blocks. The Try block is designed to trap synchronous errors within task context (For more details, see the Error Handling section). There is no explicit limitation on the number of Try blocks instances in a program.
Danaher Motion 06/2005 BASIC Moves Development Studio An example of an OnError block, designed to stop motion in case of a motion error: OnError Catch 3001 To 3999 ‘ Motion errors System.Motion = 0 A1.Enable = 0 ? VESExecute("System.Motion = 1") A1. Enable = 1 Print "Caught a Motion error: " ThisTask.Prg.Error Catch Else Print "Caught a non-Motion error: " ThisTask.Prg.
BASIC Moves Development Studio 2. 3 06/2005 Danaher Motion PROGRAM DECLARATIONS You must declare the start of programs and subroutines. For programs, use Program…End Program. Use Sub…End Sub keywords for subroutines. 2.3.1. Program The Program…End Program keywords mark the boundary between the variable declaration section and the main program. Each task must have only one Program keyword, which ends with the End Program keyword. Another option is the Program Continue…Terminate Program block.
Danaher Motion 06/2005 BASIC Moves Development Studio When a variable is passed by reference (whether the variable is local to the task or global), the address of the variable is passed to the subroutine, which changes the value of the original variable (if the code of the subroutine is written to do this). When a variable is passed by value (ByVal) a local copy of the value of the variable is passed to the subroutine, and the subroutine cannot change the value of the original variable.
BASIC Moves Development Studio 06/2005 Danaher Motion Parentheses are not used in function CALL if no parameters are passed. Parameters (either scalar or array) passed to the function are used within the code of the function. Declare variable names and types of parameters in the declaration line of the function. Parameters can be passed by reference or by value. The default is by reference. Arrays can only be passed by reference. Trying to pass a whole array by value results in a translation error.
Danaher Motion 06/2005 BASIC Moves Development Studio An MC-BASIC library is an ASCII file containing only the subroutines’ and functions’ code. The file does not have a main program part. The name of a library file must have the extension, .LIB.
BASIC Moves Development Studio 2.4.1. 06/2005 Danaher Motion Global Libraries Global libraries are library files (.LIB), which, instead of being loaded from either the terminal or another task, are loaded from the configuration file (Config.Prg). Another option is loading from terminal, using LOADGLOBAL. PUBLIC subroutines and functions defined in such libraries can be called from everywhere (i.e., terminal and other tasks), without first being imported by the calling task.
Danaher Motion 2.5.2. 06/2005 BASIC Moves Development Studio Prototype File For the MC-Basic language translator to match function parameters, provide a C-function prototype file (PROTO.PRO). It is important to understand that matching between the provided MC prototype and actual C implementation cannot be tested by the translator. It is your responsibility to keep consistency between the function prototype and C implementation. NOTE To speedup translation of the prototype file, PROTO.
BASIC Moves Development Studio 06/2005 Danaher Motion Example of calling a C-function from MC-Basic: Dim shared Str2global as string Dim shared Str1global as string Dim shared LongArray[100] as long Dim shared d1 as double program ' Use OLOAD to load the object file before loading the program ' that uses the C-Functions ' ' /* No Parameters */ int CFUNC_LV(void) ?CFUNC_LV() ' double CFUNC_DV(double) ?CFUNC_DRD(1.
Danaher Motion 06/2005 BASIC Moves Development Studio Example of test.c: /* No Parameters */ int CFUNC_LV(void) { return 1; } double CFUNC_DV(void) { return 2.2; } char* CFUNC_SV(void) { return "SV"; } void CFUNC_VV(void) { int fd = open("/tyCo/1",2,0); fdprintf(fd,"VV\r\n"); close(fd); } /* A Single "By Value" Parameter */ int CFUNC_LL(int L) { L = L + 1; return L; } double CFUNC_DD(double D) { D = D + 2.
BASIC Moves Development Studio 06/2005 Danaher Motion { return (D + L + atoi(S)); } void CFUNC_VVALP(char* S, double D, int L) { int fd = open("/tyCo/1",2,0); fdprintf(fd,"Original Values:%d, %f, %s\r\n", L, D, S); L = 10; D = 22.2; strcpy(S,"VValP"); fdprintf(fd,"New Value:%d, %f, %s\r\n", L, D, S); close(fd); } /* By Reference Parameters */ double CFUNC_DREFP(char** S, int* L, double* D) { return (*D + *L + atof(*S)); } 2.5.3.
Danaher Motion 2. 6 06/2005 BASIC Moves Development Studio SEMAPHORES Semaphores are the basis for synchronization and mutual exclusion. The difference is that the mutual exclusion semaphore is created as “full” or “1”, while the synchronization semaphore is empty “0”. If the semaphore is used for protecting mutual resources, it is taken before accessing the resource and releases at the end. A synchronization semaphore is given by the producer and taken (consumed) by the consumer.
BASIC Moves Development Studio 2.6.2. 06/2005 Danaher Motion Synchronization Semaphores Synchronization semaphores are essential in producer-consumer applications where task A prepares some data, while task B consumes it. In this case, the semaphore may eliminate constant polling for ready data and save considerable CPU resources. Example of Producer: ‘ common shared syncSemaphore as semaphore ‘ defined in config.prg ‘ common shared globalA as long ‘ defined in config.
Danaher Motion 06/2005 BASIC Moves Development Studio VES Example: Program Dim s2 as string Dim s1 as string S2="?sys.time" S1=VesExecute(s2) Print s1 S1=VesExecute(“sys.time”) ‘ incorrect, returns syntax error Print s1 End program Output: D:18:27:19 E:Error: 7039, "Syntax Error", Module: Translator 2. 8 OUTPUT REDIRECTION Typically, tasks inherit their standard output from the loading context, such as the entry station or standard output of a loader task.
BASIC Moves Development Studio 2.9.2. 06/2005 Danaher Motion OPEN #, INPUT #, CLOSE, LOC See Serial port. 2.9.3. TELL Returns current file pointer, offset from the beginning of the file. Value has meaning only for SEEK to move the file pointer within a file. 2.9.4. SEEK Moves file pointer to specified location. Use with TELL. File operations example: program dim pos as long dim d1 as double dim s1 as string 'create file for writing Open "test.prg" mode ="w" as #1 print #1, "1.
Danaher Motion 3. 06/2005 Project PROJECT A project is all the software written for an application. The projects in MCBASIC are multi-tasking. They consist of many tasks running concurrently with, and independently of, each other. The project is stored in multiple files, one file for each task. Tasks are routines that run simultaneously with many other tasks. Projects also include other files such as cam tables and record files. Projects are controlled from the BASIC Moves (BMDS) software.
Project 06/2005 Danaher Motion A task-variable definition section The task-variable definition section, where all task variables are declared with the Dim…Shared command. The main program Most programming is done in the main programming section. The main programming section falls between the Program…End Program keywords. The main program itself has three sub-sections: The Start-up section The start-up section immediately follows the Program keyword.
Danaher Motion 06/2005 Project Optional subroutines Each task can have any number of subroutines. Subroutines are component parts of the task, and consequently, they can only be called from within the task. If you want to call the same subroutine from two tasks, place one copy in each task. 3.2.2. Configuration Task The name of the configuration task is Config.Prg.
Project 3. 3 06/2005 Danaher Motion PROGRAM DECLARATIONS You must declare the start of programs and subroutines. For programs, use the Program…End Program keywords. Use Sub…End Sub keywords for subroutines. The Program…End Program keywords mark the boundary between the variable declaration section and the main program. Each task must have only one Program keyword and end with the End Program keyword.
Danaher Motion 06/2005 Project Use CALL to execute a subroutine: CALL ({...}) where: is the name of the subroutine ... are the subroutine parameters Parentheses are not used in a subroutine if no parameters are passed. MC-BASIC automatically checks the type of compliance between the subroutine declaration and the subroutine call. Any type mismatch causes an error during program loading. Automatic casting applies to numericc variables types.
Project 06/2005 Danaher Motion The format of a library file is: Declaration of static variables ...Etc. {PUBLIC}SUB etc… {Declaration of variables local to the sub-program} {sub-program code} END SUB …etc … {PUBLIC} SUB etc… {Declaration of variables local to the sub-program} {sub-program code} END SUB The {PUBLIC} keyword allows a subroutine to be called from within any MC task. These subroutines are visible from outside the scope of the library.
Danaher Motion 06/2005 Project Functions are different from subroutines in one respect. Functions always return a value to the task that called the function. Otherwise, functions and subroutines use the same syntax and follow the same rules of application and behavior. Because funtions return a value, you can use functions expressions (i.e., tangent=sin(x)/cos(x) or If (Sgn(x) Or Sgn(y)) Then…).
Project 06/2005 Danaher Motion In this case, both Explorer and Word have their own contexts. They share one computer, but run as if the other were not present. There is inter-task communication. If you double-click on a document in the file manager, it launches Word to edit the file you clicked. With MC-BASIC, you can use different tasks to control different operational modes: one for power up, one for set-up, one for normal operation, and another for when problems occur.
Danaher Motion 3.4.1. 06/2005 Project Loading the Program BASIC Moves automatically loads all tasks in your project when you select Run Project. You can select Run Project by selecting it from the Debug menu, by pressing the F5 key, or by pressing the “Load Task”and “Run Task” buttons on the tool bar. By default, tasks are loaded from the host PC to the MC at a low priority (Priority = 16). When you select Run Task, the project’s main task is started at the lowest priority (Priority = 16).
Project 06/2005 Danaher Motion StartTask starts tasks from the main task. For testing, you can use STARTTASK from the terminal window. DanaherMotion recommends you do not use STARTTASK in AutoExec.Prg. The syntax of STARTTASK is: StartTask {Priority = }{NumberOfLoops = } NOL is a short form for NumberOfLoops. NOTE where: is a long with value between 1 and 16. If is not entered, it defaults to 16, the lowest priority. Priority = 1 is the highest priority.
Danaher Motion 3.4.4. 06/2005 Project Monitoring Tasks From the Terminal For detailed information on these commands, refer to the SERVOSTAR® MC Reference Manual. TASK.STATUS provides the current state of any task. You can query TASK.STATE from the terminal window. You cannot use TASK.STATUS from within a program. The syntax for TASK.STATUS is: ? .Status For example: ? TASK1.PRG.Status TASKLIST returns the state and priority of all tasks loaded in the system.
Project 3. 5 06/2005 Danaher Motion EVENT HANDLER The main program can contain sections which automatically handle events. This reduces the programming effort required to make tasks respond quickly and easily to realtime events. Event handlers begin with OnEvent and end with End OnEvent and occur just after the Program keyword. After OnEvent is loaded, turn the event On with EventOn just after the End OnEvent keyword (enable immediately).
Danaher Motion 06/2005 Project Events can either be controlled from within the task in which they reside, or from the terminal. The main program or any subroutine can issue EventOn (to enable the OnEvent command) or EventOff (to disable it). OnEvents cannot be controlled from other tasks. 3.5.2. EventOn EventOn enables OnEvent. The syntax of EventOn is: EventOn [Event Name] EventOn must come after the definition of the OnEvent. 3.5.3. EventOff EventOff disables OnEvent.
Project 3. 6 06/2005 Danaher Motion SETTING UP AXES In this section, we set up the axes in the system. We will discuss units for position, velocity, and acceleration. We discuss how the SERVOSTAR MC’s acceleration profile works. We talk about how to set up limits for axes. We conclude with a discussion of a few advanced topics: an overview of SERCOS, simulated axes, and dual-loop position control. 3.6.1. Axis Definition The MC is oriented around axes.
Danaher Motion 06/2005 Project You can rename the axis. It is usually worthwhile to name the axes according to their function. It makes your program easier to understand and to debug. For example, you could enter: A1.AxisName = ConveyorAxis Later, you can query the velocity with: ? ConveyorAxis.VelocityFeedback The axis name may only be changed into the configuration program Config.Prg. You cannot print the axis name at any time. 3.6.3.
Project 06/2005 Danaher Motion The motion program cycles axis A1 10 times. Most of this main program is commented out because this code enables the drive and generates motion commands. Remove the single-quote comment markers for the program to run. These lines are commented out because to ensure that it is safe to operate your machine before executing this program. This includes tuning your axes properly to assure stable motion control. Refer to the SERVOSTAR® MC Installation Manual for more information.
Danaher Motion 06/2005 Project Determine POSITIONFACTOR (number of counts per meter): 1 meter = 200 turns on the screw = 600 turns into the gearbox = 600 * 65536 counts = 39,321,600 counts POSITIONFACTOR is set to the number of counts per meter: 39321600. If you use the BASIC Moves auto setup program, provide the motor resolution and number of motor rotations per unit movement and BASIC Moves calculates the math. 3.6.8.
Project 06/2005 Danaher Motion 3.6.10. Jerk Units It is also necessary to define the jerk factor, even if you always use the smooth factor. The smooth factor automatically defines the jerk value from the velocity and acceleration values, but it is a value before factors, therefore totally invalid values of jerk (internally) can be computed. At least set Jfac=Afac/1000 and it should work. .JERKFACTOR specifies the conversion factor between your jerk units and the internal units [counts per 3 msec ].
Danaher Motion 3. 8 06/2005 Project POSITION AND VELOCITY Position and velocity are the key command and feedback signals for each axis. These properties are updated by the MC every SERCOS cycle and may be read at any time. Their properties are double-precision floating point numbers. Velocity Units are discussed above. The four properties which hold these values are: .POSITIONCOMMAND or .PCMD .POSITIONFEEDBACK or .PFB .VELOCITYCOMMAND or .VCMD .
Project 06/2005 Danaher Motion For example, a motor driving a rotating table is often configured as a rotary axis. In this case, the table units are set up as degrees and the units of the axis are set to repeat after 360°. In that way, the position repeats after every rotation of the table, rather than continuing to increase indefinitely. The key to the rotary mode is setting rollover position (POSITIONROLLOVER or PROLLOVER) correctly and accurately.
Danaher Motion 06/2005 Project The MC provides the external position through the axis property, POSITIONEXTERNAL or PEXT. This variable contains the accumulated encoder movement of the drive’s external encoder input. It is updated every SERCOS cycle. You can access PEXT two ways: realtime or on a as-needed basis. To access PEXT on an as-needed based, issue IDNVALUE. For example: Dim Shared StorePExt as Double StorePExt = IDNValue(1, 53, 7) This gets PEXT in counts, not user units.
Project 06/2005 Danaher Motion The MC checks realtime limits each SERCOS update cycle. Changes in these limits affect current operations. VELOCITYFEEDBACK is checked against VELOCITYOVERSPEED in every SERCOS cycle. Drive limits are imposed by the SERVOSTAR CD drive. Changes in these limits affect current operations. For example, ILIM limits the peak current that is output by the drive. These limits are imposed independently of the position and velocity commands issued by the controller. 3.9.1.
Danaher Motion 06/2005 Project Care should be taken to set PEMAX to a value that matches the needs of the application. When the actual position following error (PE) exceeds PEMAX, motion stops. If the motion is stopped when this condition is detected, the axis is disabled. During normal operation, occasional occurrences of position error overflow usually indicates a malfunction of the machine, such as a worn or broken part, or a need for lubrication.
Project 06/2005 Danaher Motion In many cases, 100% feed-forward is not acceptable. In these cases, you can reduce the feed-forward to reduce overshoot. The larger the feedforward gain, the greater reduction is seen steady-state following error. Most systems can tolerate the overshoot generated by feed-forward gains of 50%. Acceleration feed-forward allows the use of 100% velocity feed-forward with no overshoot.
Danaher Motion 06/2005 Project ISMOVING is a property that indicates the state of the motion profiler. The valid range of values is from –1 to 3, with the following meaning: -1 = element is a slave (gear or cam) unless an incremental move is issued, in which instance the following values are valid: 0 = element is not moving 1 = element is accelerating 2 = element is at constant velocity phase (cruise) 3 = element is decelerating Example: While a1.ismoving > 0 End While 3.9.2.
Project 06/2005 Danaher Motion Axis.DecelerationRate defines the axis deceleration maximum scaling factor from 0.1 to 100 persent independently of velocity, acceleration or jerk. .DecelerationRate may be modal or nodal. Axis.JerkRate defines the axis Jerk maximum scaling factor from 0.1 to 100 persents independently of velocity, acceleration or deceleration. .JerkRate may be modal or nodal. For example: A1.VRate A1.ARate A1.DRate A1.JRate 3.
Danaher Motion 3. 12 06/2005 Project SERCOS The MC uses the SERCOS fiber-optic ring network to communicate with the drives. The SERCOS interface (SErial Realtime COmmunication System) is an internationally recognized specification (IEC 1491), supported by many companies around the world. SERCOS replaces analog connections with digital, high-speed fiber-optic communication. Danaher Motion supports 2/4/8/16 Mbit/s baud rate speeds.
Project 06/2005 Danaher Motion 3.12.1. Communication Phases In SERCOS, one master controller and many drives are connected with the fiber optic cable to form a communication ring. The master attempts to establish communication in a step-by-step process. This process is referred to as bringing up the ring. Each step is defined in SERCOS as a phase. In order to bring up the ring, the system must proceed successfully through five phases (0 through 4).
Danaher Motion 06/2005 Project The first telegram in a communication cycle is the Master Synchronization Telegram (MST). The MST, issued by the controller. It provides a single mark in time for all the drives. All feedback and command data are synchronized for all axes via the MST. Immediately after the MST is issued, each drive returns feedback and status data in the Amplifier Telegram (AT). This includes position and velocity feedback as well as responses to non-cyclic commands.
Project 06/2005 Danaher Motion 3.12.4. Cyclic vs. Non-Cyclic Communication SERCOS communicates across the fiber-optic ring with two types of data: cyclic and non-cyclic. Cyclic data are sometimes referred to as real-time, and are updated at a regular rate (SERCOS update rate). The SERVOSTAR system supports update rates from 1 millisecond.
Danaher Motion 06/2005 Project 3.12.6. Position and Velocity Commands The MC sends position and velocity commands in the cyclic data, and SERVOSTAR drives return position and velocity feedback in the cyclic data. This allows you to configure your system as a position or a velocity loop. It also allows you to switch between position and velocity loop on-the-fly.
Project 06/2005 Danaher Motion Sercos.CycleTime is used to either set or query the SERCOS communications cycle time - rate of updating cyclic data (rate with which to the desired phase of communication (see Cyclic vs. Non-Cyclic Communication). This property is only set in SERCOS communication phases 0, 1, and 2, transferred from the MC to drives during phase 2 and becomes active in phase 3. sercos.cycletime = ? sercos.cycletime 2000 Sercos.
Danaher Motion 06/2005 Project Some IDNs have alpha-numeric string values. After these IDNs are defined, you can read the string values with READIDNSTRING. Specify the drive address, IDN, and IDN element. For example, you can enter: ? IDNString(5, 104, 7) IDNSTRING is used only in SERCOS communication phases 2, 3 and 4. Some IDNs have alpha-numeric string values. After these IDNs are defined, you can write new string values to most of them with WRITEIDNSTRING.
Project 06/2005 Danaher Motion 3.13.1. Standard Position Loop Position loop is the standard operating mode of the SERVOSTAR system. For position operation, set the position loop gain to a value greater than zero. Typically, you set up the position loop using MOTIONLINK. See the ® SERVOSTAR MC Installation Manual for more information. 3.13.2.
Danaher Motion 06/2005 Project 3.13.3. Velocity Loop For some applications, the motor must be under velocity loop control. Maintaining a position is not important. The advantage is that the motor is more responsive (typically 3 to 5 times faster in settling time). When you configure an axis for velocity loop, you more or less fool the drive by setting gains to disable the position loop. You need to set the position loop gain to zero and the feed-forward gain to 100%.
Project 06/2005 Danaher Motion The units on a simulated axis are flexible. The simplest way to set the units is to set PFAC=1, which can be thought of as 1 simulated unit (eg, 1 meter, 1 inch). Set VFAC to PFAC/1000 for units-per-second or set to PFAC/60000 for units-per-minute such as rpm. Set AFAC to VFAC/1000, such as meters2 per-second .
Danaher Motion 4. 06/2005 Single-Axis Motion SINGLE-AXIS MOTION The SERVOSTAR MC supports three main types of motion: Single-axis motion Master-Slave motion Multiple-axes motion A motion generator controls all motion in the MC. This software device receives commands from MC tasks and produces position and velocity commands for the drives every servo cycle. The two main single-axis motion commands are JOG and MOVE.
Single-Axis Motion 06/2005 Danaher Motion If no other task is attached to the axis, the axis is immediately attached. If another task has already attached the axis, an error is generated. A TRY CATCH can be used to wait for an axis to be unattached. As long as the task has the axis attached, no other task can control the axis.
Danaher Motion 06/2005 Single-Axis Motion The profile must be updated at regular intervals. The MC usually updates the profile every cycle time (1 ms update rate, if possible when the drive supports this update rate). The SERCOS telegram also gets longer with more axes. When using the MC with Pentium™ CPU board, the recommended update time to controls 8 or fewer axes is 2 ms and 4 ms when the MC controls 9-16 axes. When the MC is used with Pentium™III CPU, it controls up to 32 axes at 2 ms update rate.
Single-Axis Motion 06/2005 Danaher Motion For example: ConveyorAxis.Acc = 100 Jog ConveyorAxis 1000 ACC = 10 Even though the acceleration rate of the conveyor axis is specified at 100 in the first line, JOG accelerates at 10 (the override value). Motion commands that do not specify an override acceleration rate accelerate at the permanent value. Override values are used extensively in motion commands. The values that ® can be overridden are specified below as well as in the SERVOSTAR MC Reference Manual.
Danaher Motion 06/2005 Single-Axis Motion The following axis properties can be overridden as part of JOG: TIMEJOG ACCELERATION DECELERATION SMOOTHFACTOR JERK VELOCITYRATE ACCELERATIONRATE DECELERATIONRATE JERKRATE 4.1.6. Stop STOP stops motion in the motion buffer. In the command, you must specify the axis. For example: Stop ConveyorAxis Normally, STOP is set to stop motion immediately at the rate of DECELERATIONMAX. However, you can modify the effects of STOP with STOPTYPE.
Single-Axis Motion 06/2005 Danaher Motion PROCEED has two purposes: to enhance safety and to allow motion to continue along the original path. The safety enhancement is provided by not allowing motion on an axis to restart without the task that stopped the motion issuing a PROCEED. The path control is provided by .PROCEEDTYPE. PROCEEDTYPE can be set in one of three modes: CONTINUE, NEXT MOTION, and CLEARMOTION. The key rules of operation are: 1.
Danaher Motion 06/2005 Single-Axis Motion 4.1.8.1. POSITION FINAL AND INCREMENTAL VERSUS ABSOLUTE MOVES POSITIONFINAL (the end of a move), is always specified in MOVE. The meaning of PFINAL depends on ABSOLUTE (ABS). This allows point-topoint moves to be specified two ways: Absolute Moves (Absolute = TRUE) Final position is specified as actual motor position at the end of the move. The final position is equal to PFINAL. Incremental (Absolute = FALSE) Final position is referenced to the start position.
Single-Axis Motion 06/2005 Danaher Motion Ideally, settling time allows the motor to move to approach zero position error. However, you must allow for the condition where the position error never quite reaches zero. On the MC, you specify how low you consider to be low enough with .POSITIONERRORSETTLE (.PESETTLE): CutAxis.PESettle = 0.
Danaher Motion 06/2005 Single-Axis Motion StartType = InPosition (InPos) When STARTTYPE = INPOS, the motion generator delays executing the new motion command until the current move has completed and the position error is settled to near zero. INPOSITION is constant equal to 2. This command is not subject to additional system delays, but any delay associated with the command is due to user-specified parameters for settling time.
Single-Axis Motion 06/2005 Danaher Motion As you can see, the motor comes to rest because the MC waits for the following error to be small enough before proceeding to the next command. MainAxis.PESettle = 0.01 MainAxis.Tsettle = 10 Move MainAxis 100 Move MainAxis 200 StartType=InPos Normally, the ending speed of MOVE defaults to zero. However, you can specify an end speed other than zero (Non-Zero End Moves). To do this, use .VELOCITYFINAL. VELOCITYFINAL must be specified on the same line as MOVE.
Danaher Motion 06/2005 Single-Axis Motion Combining non-zero end-point moves in the motion buffer produces multistep moves. For example: Program Attach A1 Call AxisSetup Call SercosSetup Sys.En = On A1.En = On Sys.Motion = On A1.Motion = On A1.Abs = Off A1.StartType = Gcom ‘Do Two-step Move Move A1 100 VCruise = 20 VFinal = 10 Move A1 100 VCruise = 10 VFinal = 0 ‘Wait for move to complete and axis to settle out While A1.
Single-Axis Motion 3. 06/2005 Danaher Motion PFINAL of the succeeding move must be far enough in front of PFINAL of the current move that the profile is possible with the acceleration limits. The generated profile always reaches the target position. If the acceleration and smooth limitations prevent attaining the required final velocity, the motion is terminated with the final velocity as close as possible to the required value. You can change the end position or velocity of a move that is in progress.
Danaher Motion 06/2005 Single-Axis Motion Synchronization is controlled with STARTTYPE = SYNCSTART (SYNC). The feature works by allowing you to load the motion generator with a motion command, but delaying the generation of motion until a SYNCSTART command is issued.
Single-Axis Motion 4.1.9. 06/2005 Danaher Motion Velocity Override The MC can speed up or slow down all motion commands. This can be applied to the entire machine at once, or to individual axes, independently. This capability is used extensively in machine development as it enables you to adjust the entire machine speed in a single command. Since the command can be issued from the terminal, you can observe the operation of the machine at a variety of speeds without modifying your program.
Danaher Motion 06/2005 .In1 .In1Mode .In2 .In2Mode .In3 .In3Mode 4.2.2. Single-Axis Motion Returns the state of the drive digital input 1 (ON or OFF). Specifies the functionality of the drive digital input 1. The value 16 (keyword capturing) selects the capture input. Returns the state of the drive digital input 2 (ON or OFF). specifies the functionality of the drive digital input 2. The value 16 (keyword capturing) selects the capture input.
Single-Axis Motion 06/2005 .HomeDistanceMax .HomeType .HomeOffset .HomePolarity .HomeReturn .HomeStatus .HomeVelocity Danaher Motion Specifies the maximum distance from the point at which the homing process began (in either direction) that an axis is allowed to travel in order to find the hardhome position-switch-transition. Specifies the homing latch type: 0=Switch + marker1=switch2=marker Sets the soft home position to position 0000….
Danaher Motion 4.2.3. 06/2005 Single-Axis Motion Registration Registration applications are those that start motion and then modify the profile, based on a subsequent event. These applications generally involve discrete product processing, such as are common in the packaging, printing and converting industries. The event is usually generated by sensing a position on the product being processed (usually a mark is printed on the product and detected by an optical sensor).
Single-Axis Motion 06/2005 Danaher Motion The more accurately the position is determined, the more accurate the cut is with respect to the registration mark. If the process is feeding material at 10 ft/s, and the capture accuracy is ±3 microseconds, the mark is: 10 (ft/sec) * 3 µs = 3.225e-5 ft or about 0.0004 in. The original line was set to go much farther than the actual resultant move.
Danaher Motion 06/2005 Single-Axis Motion This program works by starting a slow move with low torque. The move continues until position error is greater than 0.25 units. When the axis runs into a stop, position error accumulates because the profile continues. You must be careful to set the threshold of the event greater than the position error of normal operation. The threshold of the event must also be smaller than the drive's maximum following error to avoid drive error before the event is triggered.
Single-Axis Motion 06/2005 Danaher Motion The data structure mapping depends on the PIPEMODE state: MC variables Byte offset Sys.HostDouble[1] Sys.HostDouble[2] Sys.HostDouble[3] Sys.HostDouble[4] Sys.HostDouble[5] Sys.HostDouble[6] Sys.HostDouble[7] Sys.HostDouble[8] 0…7 8…15 16…23 24…31 32…39 40…47 48…55 56…63 Sys.Vin 96…99 SYSTEM.PIPEMODE Position and Velocity (2) Position (1) A1.PCMD A1.PCMD A2.PCMD A1.VCMD A3.PCMD A2.PCMD A4.PCMD A2.VCMD A5.PCMD A3.PCMD A6.PCMD A3.VCMD A7.PCMD A4.PCMD A8.
Danaher Motion 5. 06/2005 Master-Slave MASTER-SLAVE Master-Slave motion links the position of one axis (slave) to the position of another (master). The master axis is any axis controlled by the MC or an external axis. External axes are connected to the MC via the external encoder input on any of the drives controlled by the MC. There are two types of master-slave motion: gearing and camming. Gearing is used when the position of the slave must be proportional to the position of the master.
Master-Slave 06/2005 Danaher Motion For optimal performance, the master axis should have an axis number less than the slave axis. If the slave axis is A1 and the master axis is A2, an additional time cycle is inserted in the motion. If the master velocity override is changed, the slave velocity is changed accordingly. In a relative move, the slave moves according to its new velocity override. VELOCITYOVERRIDE has no effect on the master signal for a slaved axis.
Danaher Motion 06/2005 Master-Slave Set the proportional constant between the master and slave with .GEARRATIO: A1.GearRatio = 0.5 'Slave goes half the speed of master GEARRATIO is a double-precision floating-point number that is set to less than zero to reverse the direction of the slave. 5.2.3. Incremental Moves The MC supports incremental moves with gearing.
Master-Slave 06/2005 Danaher Motion This next example shows the previous example, but with the starting after the incremental move is complete (STARTTYPE = GCOM): Jog A1 100 TimeJog=5000 Sleep 2000 A1.StartType=GCOM Jog A1 200 The resulting profile for this is: 5. 3 CAMMING Camming is an extension of gearing. It can be thought of as gearing where the gear ratio varies according to the master position. The master position, optionally runs through a gear ratio and drives the input to a cam table.
Danaher Motion 06/2005 Master-Slave Cam profiles do not need to return to the original position at the end of the profile. Cam tables are calculated either off-line and stored, or on the fly. Cams cycle either indefinitely or are specified to cycle a specific number of times. Multiple cams are defined and linked together automatically. The master position is processed through the master-slave gear ratio (GEARRATIO).
Master-Slave 06/2005 Danaher Motion In the unusual case that the master position is located exactly on one of the master position points, the slave position is the corresponding point of the master/slave point-pair. When the master is located between two points, the MC uses linear interpolation to calculate the position. Cam tables are incremental in one aspect and absolute in another. Within the cam table, the positions are absolute.
Danaher Motion 06/2005 Master-Slave In many applications, you must ensure that this quantity is precise or the master appears to creep over time. The MC uses double-precision math (16 digits of accuracy) for cam calculations. Use the MC to calculate mathematical expressions to obtain the greatest possible precision.
Master-Slave 06/2005 Danaher Motion For example, suppose you want a cam to run four cycles as shown below: You would use the following line: CAM1.CYCLE = 4 ' Run cam1 four cycles If you want a cam to run the same table an indefinite number of times, use: CAM1.CYCLE = -1 'Run the cam indefinitely When two cam tables are interconnected in a double-linked chain, only one cam table is active at a time.
Danaher Motion 06/2005 Master-Slave If you have linked cams, the cam cycle runs the number of times specified in CYCLES. For example, assume Cam1 is being driven by a forward rotating master. If CAM1.NEXT=CAM2 and CAM1.CYCLES=4, Cam1 cycles four times before transitioning to Cam2. Similarly, if the master is rotating backward and CAM1.PREVIOUS=Cam0, Cam1 cycles four times before transitioning to Cam0.
Master-Slave 06/2005 Danaher Motion If you are using a static table, use the Windows-based tools. This method is simpler and you have more tools available with which to graph and analyze the cam table. You can create point-pairs using windows applications such as a text editor, spread sheets (Excel), or mathematical programs (MatLab). For spreadsheets, create a new sheet with two columns and one row for each point-pair.
Danaher Motion 06/2005 Master-Slave This stores the cam as MyCam.Cam in flash memory. The name of the file follows the 8.3 format. The filename cannot have more than 8 characters in the main part and 3 characters in the extension. The cam data file must have the .cam extension This file can be loaded at any time using LOADCAMDATA.
Master-Slave 06/2005 Danaher Motion Step 1: Allocate Space Allocate space for the cam with Common Shared as Cam. All cams are global, so this line must be located in Config.Prg. For example: Common Shared CAM1 as Cam Step 2: Load Cam Data This can be accomplished in two ways. For a static cam data array which has been calculated and stored in the MC, use LOADCAMDATA: LoadCamData MyCam.Cam CAM1 or dynamically calculate the cam. This is a two step process.
Danaher Motion 06/2005 Master-Slave Step 5: Enable the Axis At this point, camming is enabled. However, you must enable the drive to see motion: A1.Enable = ON Camming cannot be enabled if the axis is in a relative or absolute move, or during STOP. Enabling camming when gearing is enabled or when an absolute move is being executed generates an error. Disabling or enabling the drive does not affect whether gearing is enabled. To disable camming, set SLAVE to OFF: A1.
Master-Slave 06/2005 Danaher Motion Step 6: Read Dynamic Information There are numerous read-only properties regarding the operation of the cam. Axis Properties .ACTIVECAM provides the name of the cam being executed by that axis. Cam Properties .CAMCYCLE provides the number of cycles the cam has executed. If the cam master is moving forward, the current cam ends at the completion of the cycle where CAMCYCLE=CYCLE.
Danaher Motion 5. 4 06/2005 Master-Slave SIMULATED AND MASTER-SLAVE AXES Simulated axes are used to enhance machine control. They typically are with gearing and camming. Three common uses are: 1. To act as fixed speed masters for slaved axes. 2. To monitor physical axes. 3. To synchronize slaved axes. 5.4.1. Fixed-Speed Masters The most common use for a simulated axis is as a fixed-speed master axis for geared or cammed axes. This is used for testing or as part of normal operation.
Master-Slave 06/2005 Danaher Motion For example: Program OnEvent Vel_Below_Min PseudoAxis.Vcmd < 100 Jog PseudoAxis 100 ‘This indirectly turns gearing off End OnEvent OnEvent Vel_Above_Min PseudoAxis.Vcmd >= 100 PseudoAxis.Slave=Gear End OnEvent Attach PseudoAxis EventOn Vel_Below_Min EventOn Vel_Above_Min While 1 Sleep 100 End While End Program The following figure shows this process.
Danaher Motion 6. 06/2005 Groups GROUPS Groups allow you to control multiple axes as a single mechanism. With groups, the position command and feedback signals are no longer single values, but instead, are vectors with two or three elements. Velocity and acceleration no longer apply to a motor, but instead, apply to the combination of two or three motors moving in concert. 6. 1 SET UP Groups are combinations of axes.
Groups 06/2005 Danaher Motion Group acceleration is the orthogonal combination of the axes' acceleration. Group acceleration and deceleration are limited according to the axes‘ values.You can impose limits to constrain the time during which group acceleration and deceleration occurs. .TIMEACCELERATION and .TIMEDECELERATION define the duration of the acceleration phase. 6.
Danaher Motion 6. 5 06/2005 Groups VELOCITY A group’s scalar velocity properties are always the orthogonal combination of the respective axes' velocity properties. Group velocity properties include: VELOCITYCOMMAND VELOCITYFEEDBACK VELOCITYCRUISE VELOCITYFINAL VELOCITYMAX VELOCITYOVERRIDE vector property vector property scalar property scalar property scalar property scalar property Each of these properties operates as its axis equivalent and are clearly ® defined in the SERVOSTAR MC Reference Manual.
Groups 06/2005 Danaher Motion ISSETTLED is a binary (ON or OFF) property that indicates if the group is settled. To be settled, the motion profile must be complete and the orthogonal combination of axis position errors must be below POSITIONERRORSETTLE. The time condition must also be satisfied. 6.6.4. Velocity There is one group limit in the MC related to velocity: VELOCITYMAX (VMAX) sets the maximum speed the motion generator can command the group.
Danaher Motion 06/2005 Groups For example: Common Shared Gr1 as Group AxisName=A1 AxisName=A2 Gr1.VRate = 50 ‘ VelocityRate 50% Gr1.ARate = 70 ‘ AccelerationRate 70% Gr1.DRate = 80 ‘ AccelerationRate 80% Gr1.JRate = 60 ‘ JerkRate 60% 6. 9 MOTION A group is controlled by the motion generator. This software device receives commands from MC tasks and produces position and velocity commands for each drive in the group every SERVO cycle. The two group motion commands are MOVE and CIRCLE.
Groups 6.9.3. 06/2005 Danaher Motion Motion Flags The last step in preparing a system for motion is to turn the motion flags ON. There are two motion flags: the system motion flag and the motion flags of each axis within the group. For example: System.Motion = ON A1.Motion = ON A2.Motion = ON A3.Motion = ON There is a motion flag for the group that can be used to enable motion for all axes in the group. In many applications, a hardware switch should be tied to the motion flag.
Danaher Motion 6.9.5. 06/2005 Groups PROCEED After a STOP, you must PROCEED to clear the motion buffer. You can use PROCEEDTYPE to specify which way the motion generator should continue: PROCEEDTYPE = CONTINUE The motion generator continues the stopped command until complete. PROCEEDTYPE = NEXTMOTION The motion generator aborts the current move and goes directly to the stopped move in the motion buffer. PROCEEDTYPE = CLEARMOTION Clears the motion buffer. No motion executes. Default value.
Groups 06/2005 Danaher Motion On the other hand: xyTableGroup.Absolute = FALSE Move xyTableGroup {100, 200} moves xyTableGroup a distance of (100, 200) units from the start position. ABSOLUTE defaults to INCREMENTAL. You can change ABSOLUTE any time, although the effect does not take place until you issue the next MOVE. 6.9.7. CIRCLE The MC supports 2-axis circular interpolation with CIRCLE.
Danaher Motion 06/2005 Groups CIRCLETARGET is a group size array. It specifies the target point of the circle. This array is not queried. CIRCLE, defined using CIRCLETARGET, is limited to 360 degrees. CIRCLEPOINT is a position array that specifies a point on the arc. The arc is calculated using the CIRCLETARGET and these points. This array is not queried. In case of 3 dimensions circle the active CIRCLEPLANE defines which group axes participate in the circle movement. The third axis is moved linearly.
Groups 06/2005 Danaher Motion CP 2 CP 2 When the second motion is completed before the first one, the system does not blend the first and the third motions together. The main parameter in this type of blending CP. It specifies the distance from the target point on which the blending (second motion) begins. CP is dimensional. It is expressed in group position units. The system automatically limits this value to half the segments length.
Danaher Motion 06/2005 Groups For example.
Groups 06/2005 Danaher Motion 6.10.1. Settling Time The MC actively watches to determine if the groups are settled into position. In most applications, the group position feedback is slightly delayed from the position command. After a move is complete, some time is required for the actual position to settle out to the commanded position. This time is called settling time. Ideally, settling time allows the group to move so that position error is zero .
Danaher Motion 06/2005 Groups If you want to delay the start of a new move until a condition has been met, use .STARTTYPE. There are four choices: StartType = GeneratorCompleted or GCOM When STARTTYPE=GCOM, the new move starts as soon as the motion generator completes the current move's motion. StartType = InPosition or INPOS When STARTTYPE=INPOS, the motion generator delays executing the new motion until the current move completes and the position error settles to near zero.
Groups 06/2005 Danaher Motion MyGroup.StartType is set to GCOM. The second move begins after the first move is complete. You must use STARTTYPE=GCOM when chaining a move after non-zero velocity end- move. You cannot use STARTTYPE=IMMED or SIMM because the new move overrides the old move. When the movement ends with non-zero final velocity, the next movement is started at the endpoint of the first movement or immediately, if STARTTYPE of the next movement is IMMED or SIMM.
Danaher Motion 06/2005 Groups For example: Group1.StartType = SYNC AuxAxis.StartType = SYNC Move Group1 {500, 500} VCruise = 2000 Sleep 1000 ‘Program delayed between Move Commands Move AuxAxis 100 VCruise = 1000 SyncStart Group1 AuxAxis causes the two profiles to start at the same time. .
Groups 06/2005 Danaher Motion If you use SYS.VORD and .VORD simultaneously, the axis speed is reduced by the product of both override properties. For example: Sys.VOrd = 66 GroupB.VOrd = 50 ‘Reduce entire system to 2/3 speed ‘Reduce GroupB to 1/3 speed You cannot override an axis in a group. Once an axis is part of a group, it cannot be controlled independently. 6.11.1.1.
Danaher Motion 7. 06/2005 Compensation Tables COMPENSATION TABLES Groups allow you to control multiple axes as a single mechanism. With groups, the position command and feedback signals are no longer single values, but instead, are vectors with two or three elements. Velocity and acceleration no longer apply to a motor, but instead, apply to the combination of two or three motors moving in concert.
Compensation Tables 06/2005 Danaher Motion The values in the “source” columns are in absolute units, while the “target” values are in relative units (i.e., the value specified in the table is added to the current position of the axis, whether it is a geared, cammed or a regular axis). A value different from 0 at the beginning of the table causes a jump at the target axes whenever the source axes get to the minimum value specified in the table.
Danaher Motion 7.1.4. 06/2005 Compensation Tables Load/Save From a File Another way to create a compensation table is to directly load it from a binary file stored on the Flash disk. The structure of the compensation file is: Header – …. (integer 4 bytes) Source data – ….. (double 8 bytes) Target data – target values for axis1,…….target values for axisn.
Compensation Tables 06/2005 Danaher Motion The table is composed from 4, 9, 3 entries for X, Y, Z axes, respectively. Common shared comp1 as comp CreateComp comp1 4 ,9, 3 Comp1.minposition[1] = 0.1 Comp1.maxposition[1] = 9 Comp1.minposition[2] = 1.1 Comp1.maxposition[2] = 2 Comp1.minposition[3] = 3 Comp1.maxposition[3] = 3.12 CompSet comp1 ax1 ,ax2, ax3 on ax1 ,ax2, ax3 Comp1.TargetData[1][1] = 0.01 Comp1.TargetData[3][3*9*4] = 0.02 Comp1.CompActive=1 ‘This declares a table in the system.
Danaher Motion 8. 06/2005 PHASER PHASER The purpose of PHASER is to amplify or attenuate the master input value before entering the cam table or before multiplying by the gear ratio. The master - slave connection is achieved either by a cam table or through gearing. A typical problem in camming is an offset in the master position that has to be compensated for before translating the value with a cam table. PHASER adds a correction to the master position.
PHASER 8.1.2. 06/2005 Danaher Motion Execute PHASER is a slave command, although it acts on the master signal. In the command (like MOVE), the slave axis and offset value are essential. With PHASER, there is a new factor ratio that translates between slave and master units. The additional properties that can be determined are the smoothness of change, profiler type, STARTTYPE and kinematics. A1.mastersource = a2.pcmd A1.slave = CAM Phase a1 10 ratio = 1 ‘ slave and master has the same units 8.1.3.
Danaher Motion 9. 06/2005 GENERIC ELEMENTS GENERIC ELEMENTS Writing complex multi-axis applications requires high level software organization. Avoid code repetition by encapsulating blocks of code into functions or subroutines. Code blocks of setup or query properties, which can be applied for all (or at least several) groups or axes in the system, and can be assembled into functions and subroutines. For example, if there are a number of identical motors in the system, their setup is the same.
GENERIC ELEMENTS 9.1.1. 06/2005 Danaher Motion Declaration Generic elements resemble other MC-Basic variables (longs, doubles, strings) in declaration syntax and scope (global, static and local), as well as in the ability to define arrays of up to 10 dimensions. COMMON SHARED|DIM {SHARED} {[]…} AS GENERIC AXIS COMMON SHARED|DIM {SHARED} {[]…} AS GENERIC GROUP 9.1.2.
Danaher Motion 06/2005 GENERIC ELEMENTS The right-side element of the assignment statement can be either generic or a “real”. A group cannot be assigned to a generic axis, and an axis cannot assign a generic group. Common Shared Gen_Group As Generic Group Gen_Axis = G1 Error: 7067, "Wrong input type", Module: Translator Gen_Group = A1 Error: 7067, "Wrong input type", Module: Translator Joint axes cannot be used in either sides of assignment statement. Gen_Group.
GENERIC ELEMENTS 9.1.4. 06/2005 Danaher Motion Functions Generic elements can be defined “by reference” in MC-Basic functions and subroutines. Axes or groups passed as arguments could be either “real” or generic. For example, axis setup can be encapsulated in a subroutine. In this example, the subroutine arguments are “real” axes: Sub AxisSetUp(Ax As Generic Axis) Ax.PFac = 0x8000 Ax.VFac = Ax.PFac/1000 Ax.AFac = Ax.VFac/1000 Ax.JFac = Ax.AFac/1000 Ax.VMax = 290 Ax.AMax = 1500 Ax.DMax = Ax.Amax Ax.
Danaher Motion 06/2005 GENERIC ELEMENTS Generic elements can also serve as returned values of MC-Basic functions. Both “real” and generic elements can be assigned to returned values. For example, to generalize the former code, an axis-indexing function can be added, in which a “real” axis is assigned to the return value: Function JointAxisByIndex(Byval I As Long) As Generic Axis Select Case I Case 1 JointAxisByIndex = G1.J1 Case 2 JointAxisByIndex = G1.
GENERIC ELEMENTS 9. 2 06/2005 Danaher Motion WITH WITH can be given in three contexts: configuration file, terminal and task. All three contexts of WITH can be applied to generic elements. With Gen_Axis PFac = 0x8000 VFac = PFac/1000 AFac = VFac/1000 JFac = AFac/1000 … End With WITH can be used on assigned and unassigned generic elements. These generic elements can be assigned and/or re-assigned later. This changes the WITH element without writing a new WITH command.
Danaher Motion 10. 06/2005 Input/Output INPUT/OUTPUT The MC provides numerous types of I/O. It includes more than 40 I/O points as standard plus the SERVOSTAR drive includes 5 I/O points per drive. In addition, you can input an external encoder through any SERVOSTAR drive. The I/O can be extended to include PC104 cards from a variety of suppliers. 10. 1 STANDARD I/O The MC includes 23 inputs and 20 outputs as standard on the MC. These are accessed with the system properties DIN.1 through DIN.
Input/Output 06/2005 Danaher Motion 10.2.2. Long-Word-Oriented Software I/O The entire word (32 bits) of software input and output is accessed when a bit position is not included in the reference to the input or output variable. So the following statement is valid: System.VOut=System.VIn This statement copies the virtual software input to the output. The physical input and output variables are used in this manner.
Danaher Motion 06/2005 Input/Output 10.3.2. Switch Positions The basic mechanism of the PLS is the switch position(s) where the PLS output changes state. The figure belows shows a PLS output with one switch position at 100. More switch positions can be added. To have the PLS in the above example turn back off at 200, simply add a second position at 200 as shown below: You can add any number of positions.
Input/Output 06/2005 Danaher Motion There is no explicit limit to the number of positions you can have in a PLS, but the PLS positions must be increasing monotonic (Position2 must be greater than Position1, Position3 must be greater than Position2, etc.). 10.3.3. Repetition Interval PLSREPEAT allows you to repeat the same PLS after a fixed number of counts. For example, the figure below shows a PLS that turns on at 0, off at 10 and has a PLSREPEAT value of 100: 10.3.4.
Danaher Motion 06/2005 Input/Output 10.3.7. PLS Output State Query the digital output associated with the PLS to query the state of the PLS output. For example, assume the PLS output is assigned to SYSTEM.DOUT.1. To determine the output state of the PLS, query the state of SYSTEM.DOUT.1: -->?Sys.Dout.1 0 | 1 10.3.8. Set Up Step 1 Declare the PLS with Common Shared as PLS in Config.Prg or at the terminal.
Input/Output 06/2005 Danaher Motion Step 4 Set PLSREPEAT. If you want the PLS to repeat, set the value of PLSREPEAT to a non-zero, positive number. For example, to have the PLS repeat every 10,000 position units, enter: MyPLS.PLSRepeat = 10000 PLSREPEAT defaults to 0, indicating that there is no repetition. Change PLSREPEAT only when the PLS is disabled. Step 5 Set PLSHYSTERESIS, if the application requires it. Hysteresis is only necessary if the system does stop on or near a PLS position.
Danaher Motion 06/2005 Input/Output If you are using the encoder for master/slave operation or in a way that requires the value of the signal be updated to the MC every SERCOS cycle, you must configure the telegram for that axis as Telegram type 7. You also must specify that external position must be included in the telegram. This command is only available when in communication phase of 2 or higher. 10.
Input/Output 06/2005 Danaher Motion 10.5.3. Commands The MC supports PC104 with memory and I/O instructions. For further ® information on these commands, refer to the SERVOSTAR MC Reference Manual. If you are using memory-mapped PC104 cards, you will need the memory access commands, PEEK and POKE. The valid memory address range for PEEK is 0xA0000 through 0xDFFFF. The valid memory address range for POKE depends on the hardware version of the MC card.
Danaher Motion 11. 06/2005 Error Handling ERROR HANDLING Error handling is the method used to react to and process fatal and non-fatal errors that occur during the operation of the MC. You can handle non-fatal faults, but not fatal faults. Fatal faults cause a WatchDog timer to be triggered. All errors have corresponding default actions to be taken when they occur. There are three contexts in which an error can occur and be handled: task, system, and terminal.
Error Handling 06/2005 Danaher Motion During the internal error action, the synchronous error is logged in the MC and the task is idled. The default system error handler stops all motion and all attached tasks. In the figure above, there are two mechanisms for trapping and dealing with errors: OnError and Try/Finally blocks. These two error-handling mechanisms allow you to write your program to respond to errors. 11.1.1.1. ONERROR The OnError block is handled like an event handler.
Danaher Motion 11.1.1.2. 06/2005 Error Handling TRY/FINALLY Unlike an OnError block, the Try/Finally block may appear anywhere in the main program section of the task. It can be used to take specific action with relation to a particular area of your program code. This type of error handler block only traps synchronous errors in the task context. The block is started using the Try keyword and is terminated with the End Try keyword. Try blocks can be nested.
Error Handling 06/2005 Danaher Motion SYSTEM.ERRORPRINTLEVEL only affects printing to the message log window. Fatal faults and errors continue to be logged, and can be viewed using ?ERRORHISTORY. ERRORPRINTLEVEL applies only to asynchronous errors. Synchronous errors are not affected. 11.1.3. Terminal Context Terminal context is similar to task context, as commands are processed similarly. The error action is different from a task as there is no interpreter to be idled when an error occurs. 11.
Danaher Motion 06/2005 Error Handling 11.2.1. WatchDog Setup To set up the MC to enable the WatchDog, follow these steps: 1. Create a new task solely for the WatchDog. Use BASIC Moves with File, New. 2 Define a local variable as a Long. For the example below, we use MyVar. 3 Initialize the WatchDog timer in the main program. Store the return value of the initialization step in the local variable from Step 1. 4 Write an event inside the task to reset the WatchDog timer.
Error Handling 06/2005 3. Danaher Motion Reset the WatchDog with an API command based on a timer. Run the following Visual BASIC code once upon initialization: Include KMAPI.BAS in your project KMExecuteCmd(MC, “MyVar=WDInit(5)”) KMExecuteCmd(MC, “WDCycle(MyVar)”) 4. Run the following Visual BASIC code from a timer set for 50 ms: KMEXecuteEmd(MC, “WDCycle(MyVar)”) 11.
Danaher Motion 06/2005 Error Handling If the exception number is not specified, the system associates exceptions with some numeric value, which can be queried. However, the system will not guarantee that this value is the same from load to load. Do not make any assumption about this number. It is a mechanism to maintain the exception database. 11.4.2. Deletion All exceptions declared at task level are lost when the task is killed.
Error Handling 06/2005 Danaher Motion 11.4.4. Log User exceptions are printed and logged according to existing rules: A note is printed but not logged, Unhandled errors are printed and logge, etc. In addition, the application developer can log an error without any error handling. Application exception is printed and logged but neither task generated such an exception nor motion associated with that task stops. User exceptions are logged according to the existing rules.
Danaher Motion 06/2005 Appendix A APPENDIX A SAMPLE NESTING PROGRAM Dim Shared I1 As Long Dim Shared I2 As Long Dim Shared I3 As Long Dim Shared I4 As Long Dim Shared I5 As Long Program Do If I1=0 Then 'First If...Then If I2=0 Then 'Second If...
Appendix A 06/2005 Danaher Motion SUBROUTINE EXAMPLE Dim Shared var_x As Double Dim Shared var_y As Long Dim Shared array_z[2][2] As Double Dim Shared rows As Long Dim Shared columns As Long Program REM initialize variables var_x=29.3172 var_y=5 rows=2 colums=2 array_z[1][1]=125.
Danaher Motion 06/2005 Appendix A SAMPLE AUTOSETUP PROGRAM Below is an example auto setup program. This sample covers several pages. You do not need to understand the program in detail at this point but you should familiarize yourself with the structure.
Appendix A 06/2005 ' Sys.Motion = on 'Allow system motion ' A1.Motion = on 'Allow motion in axis A1 ' For sample_int = 1 To 10 'Loop 10 times rem Move A1 to 5 position unit(s) ' Move A1 5 Absolute=0 ' Sleep 2000 rem ' Danaher Motion 'Sleep two seconds Move A1 back to start Move A1 -5 Absolute=0 ' Sleep 2000 ' Next sample_int ' Print "Sample program completed." ' Sys.Motion = off ' Sys.
Danaher Motion 06/2005 Appendix A rem ------------------------------------------------------------rem Axis Set-up Routine Automatically Generated by Project Wizard rem ------------------------------------------------------------Sub AxisSetup If Sercos.Phase = 4 then A1.enable = off 'make sure axis is disabled End If A1.PFac = 65536 'Revolutions A1.VFac = A1.PFac / 1000 'Revolutions/second A1.AFac = A1.PFac / 1000 / 1000 'Revolutions/second/second A1.AMax = 10000 A1.DMax = 10000 A1.Acc = A1.AMax A1.
Appendix A 06/2005 Danaher Motion Rem Configure the axis for Telegram Type 7 using IDN 15 WriteIDNValue Drive = A1.Dadd IDN = 15 Value = 7 Rem Configure the AT for VFb, PFb, and PExt (IDNs 40, 51, 53) WriteIDNValue Drive = A1.Dadd IDN = 16 Value = 40,51,53 Rem Configure the MDT for VCmd, PCmd (IDNs 36, 47) WriteIDNValue Drive = A1.Dadd IDN = 24 Value = 36,47 Rem Set Sercos.Phase to 4 Sercos.
Danaher Motion 06/2005 Appendix B APPENDIX B NON-HOMOGENOUS GROUPS Non-homogenous groups consist of different axes, both rotary and linear. A feature was added to support the definition of velocities for non-homogenous groups. In the setup, rotary and linear axes are declared. The system determines if it is a linear- or rotary-dominant group. For example, in SCARA robot, there are two rotary axes for the first and second joints and another rotary axis for the last joint (roll).
Appendix B 06/2005 Danaher Motion The concept of joint coordinates is an n-tupple number. Each number represents the coordinate of the specific joint. The world coordinates are supported by different built-in types (XY, XYZ, XYZR) that describe each of the different world space representations. Theoretically, there can be different world space descriptions for the same (or same dimensional) world coordinates. Each robot has its default world-space type.
Danaher Motion 06/2005 Appendix B Once all axes are set up, groups contain these axes. You must have the same user units on all axes. Set the group scaling factors. There is no position factor for the group! Instead, PFAC for each axis is used. MOVE g1 {1,2,3} vcruise = 10 Target coordinates are given to each axis and translated into encoder/resolver counts using PFAC for each axis. VCRUISE is not related to any axis. Group factors, VFAC, AFAC, and JFAC are used.
Appendix B 06/2005 Danaher Motion There are some properties that are axis- or group-only properties. For example DRIVEADDRESS is an axis-only property. MOVE consists two different command behaviors, Move-Group and Move-Axis. MoveGroup moves the whole group together. All the axes within the group start and end the motion at the same time. Move-Group stays within the kinematics limits (VELOCITY, ACCELERATION, JERK) of the group and axes.
Danaher Motion 06/2005 Appendix B Joint movement gives the illusion of moving one physical axis (MOVE J1 100), although several motors could be moving together. The movement is executed according to the specified joint’s movement parameters. For example: A1.Acc = 100 MOVE A1 50 Is analogous to: J1.Acc = 100 MOVE J1 50 Move-Joint simulates the behavior of moving a single axis by moving a single joint both by the parameters and physical motion.
Appendix B 06/2005 Danaher Motion In these cases, world-space is identical to joint-space. Each coordinate of the joint-space vector is directly translated into a coordinate of world-space. In groups with the robot model defined (model > 1), the translation between joint- and worldspace is much more complex. Translating joint coordinates into world coordinates is accomplished with TOCART taking both the robot and given joint coordinates (position variable) as input arguments.
Danaher Motion 06/2005 Appendix B The following graph shows MOVES as seen in joint-space. XY 100 90 80 70 60 50 40 42 46 50 54 58 62 66 70 74 78 82 The following graph shows MOVES as seen in world-space.
Appendix B 06/2005 Danaher Motion The following graph shows MOVE as seen in joint-space. XY 90 80 70 60 50 40 44 48 52 56 60 64 68 72 76 80 84 The following graph shows MOVES as seen in world-space. XY 700 680 660 640 620 600 580 560 540 520 500 -300 -200 -100 0 100 200 300 There are four commands to make point-to-point movement in robot groups. There are two commands to interpolate the motion (MOVE and MOVES) and two commands to define the target point (JOINT and LOCATION).
Danaher Motion 06/2005 Appendix B Cartesian Profile For kinematics parameters of straight-line (MOVES) motion (velocity, acceleration, deceleration), different joint parameters are obtained, depending on where in the robot working space the starting line is positioned. The further from the origin, the smaller joint velocities are obtained. Contrary to that, the closer to the origin the point is, the smaller the inertia and higher the acceleration.
Appendix B 06/2005 Danaher Motion Limitations are: Reduction factors are not allowed for individual axes – only for groups. The CVA works only for MOVES & PASS-THRUGH . The CADJA works only for MOVES & PASS-THRUGH. In PASS-THROUGH, only the first and last point are treated. Both methods work only for SCARA kinematics. Working Envelope Robot working space is determined by the position limits of each joint. The working space (all reachable positions) is limited by the working envelope of the robot.
Danaher Motion 06/2005 Appendix B Program attach move {j1.pmin,j2.pmin,0,0} while ismoving sleep 1 End While Print "Plotting the workspace" move {j1.pmin,0,0,0} move {j1.pmax,0,0,0} move {j1.pmax,j2.pmax,0,0} detach End Program Robot Configurations In robot models, there are several joint points representing the same robot end-effector position for each location point. To uniquely select between different joint coordinates, there are configuration flags.
Appendix B 06/2005 Danaher Motion Declaration A point must be declared before you can use it. The declaration of points is defined according to the type of robot (XYZR, XYZ, etc.). The MC enables the declaration of point variables, which can be scalar or arrays. Point arrays may have up to 10 dimensions. Point variables are designed to hold a list of 2 to 10 double-type coordinates. A point variable is declared in relation to a robot type.
Danaher Motion 06/2005 Appendix B Execution of the right side of the JOINT or LOCATION node results in pushing the number of the vector elements into the stack (as a long type constant). The point’s subtype (determined by the shape of the vector’s brackets) is pushed to the stack (as a long type constant) by executing the third side of the JOINT/LOCATION node. Vectors Vectors are actually constant points, at which a list of 2 to 10 coordinates is written between curly brackets {}.
Appendix B 06/2005 Danaher Motion Point Assignment Point assignment uses the following syntax: = (,,,…,) () = #{} for location () = {} for joint The expression can be a constant or other vector variable of the same robot type, but the size of the right side of the expression must equal the left side. If you try to assign a point with a point of other robot type, an error is received.
Danaher Motion 06/2005 Appendix B QUERY Point variables, properties and vectors return a value, so they can all be queried through printing or assignment into a compatible point variable or read-write property. Common Shared SCARA As Group Axnm = A1 Axnm = A2 Axnm = A3 Axnm = A4 Model = 4 Common Shared PointVar1 As Joint Of XYZR Dim Shared PointVar2 As Joint Of XYZ Dim PointArr[4] As Joint Of XYZR PointVar1 = PointArr[2] PointVar2 = {23.4, 60, 42} PointArr[1] = SCARA.PositionCommand SCARA.
Appendix B 06/2005 Danaher Motion Points in Functions Point variables can be passed to functions and subroutines both by reference and by value. An entire array of points can also be passed (by reference) to a function or subroutine. On the other hand, point properties and vectors can only be passed by value. Points can also serve as return values of functions. However, the point type and size (or robot type) of an argument or a return value must match function declaration.
Danaher Motion 06/2005 Appendix B Motion Commands Some motion commands use point nodal parameters when applied on groups. For example: CIRCLE, MOVE and MOVES. Some nodal parameters can be assigned with both point types (LOCATION and JOINT), like CIRCLECENTER, CIRCLEPOINT and the target positions of MOVE and MOVES. Other nodal parameters can accept only location points, like TOOL, BASE, etc. Assign all nodal parameters with points compatible in robot type or size to the group.
Appendix B 06/2005 Danaher Motion Group Point Properties Following modal-only and read-only group properties of the point data-type exist: DEST START HERE SETPOINT DEST_JOINT START_JOINT POSITIONFEEDBACK or PFB POSITIONCOMMAND or PCMD Target point of the movement. Starting point of the movement. Actual point of the robot (feedback). Actual point of the robot (group).
Danaher Motion 06/2005 Appendix B A function can return a structure variable like any other data type. For example: Dim Shared A as X Program Dim S1 as X S1 = MyFunc(1) End Program Function MyFunc(i1 as long) as X MyFunc->Type = 1 End Function Query You cannot query a whole structure or you receive a translation error.
Appendix B 06/2005 Danaher Motion Limitations A whole structure cannot be printed. Mathematical, logic and bitwise operators cannot be used for whole structures. A whole structure cannot be used as a condition in flow control statements and event definitions. A whole structure cannot be recorded.
Danaher Motion 06/2005 Appendix B You can classify objects in the working frame and only track certain types of objects. Each moving frame can have several master sources (external sources of moving position). The number of sources is the number of degrees of freedom of the moving frame. You can use several robots to track the same operating region, but the region must be presented as a different moving frame object.
Appendix B 06/2005 Danaher Motion The orientation is composed of two components: the master source (if there is one) and the orientation change due to movement. On the path, if the new position command is known, the new orientation can be calculated. Tracking Process The tracking process consists of two phases: approach (where the robot position catches the moving frame position) and track (when both positions are synchronized (.HERE and .HERE)).
Danaher Motion 06/2005 Appendix B Relative Approach Relative tracking algorithm (slave = 5) The system moves the initial (before tracking) robot position (.SETPOINT) in the same direction as the tracking object position. Once synchronization is achieved, the robot moves synchronously on the same relative position to the moving object at the moment of approach start (slave=0). It is your responsibility to add the appropriate movement and bring the robot position to the object.
Appendix B 06/2005 Danaher Motion CUSTOMER SUPPORT Danaher Motion products are available world-wide through an extensive authorized distributor network. These distributors offer literature, technical assistance, and a wide range of models off the shelf for the fastest possible delivery. Danaher Motion sales engineers are conveniently located to provide prompt attention to customer needs.