Parker Gem6K Series Programmer's Manual
Parker Gem6K Series Programmer's Manual

Parker Gem6K Series Programmer's Manual

Hide thumbs Also See for Gem6K Series:
Table of Contents

Advertisement

Quick Links

www.comoso.com
p/n 88-019934-01 A
G emini GV6K and
A utomation
G emini GT6K
P rogrammer ' s G uide
Effective: October 1, 2001

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Gem6K Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Parker Gem6K Series

  • Page 1 www.comoso.com p/n 88-019934-01 A G emini GV6K and A utomation G emini GT6K P rogrammer ' s G uide Effective: October 1, 2001...
  • Page 2 Gem6K Series products and the information in this user guide are the proprietary property of Parker Hannifin Corporation or its licensers, and may not be copied, disclosed, or used for any purpose not expressly authorized by the owner thereof.
  • Page 3: Table Of Contents

    www.comoso.com CONTENTS System Performance..........35 OVERVIEW..............I COMMUNICATION..........37 About This Manual ............i Organization of This Manual........i Communication Options ...........38 Programming Examples..........ii Motion Planner Communication Features....38 Reference Documentation........ii Ethernet Networking ..........39 Assumptions of Technical Experience....ii Overview...............39 Before You Begin ............iii Networking Guidelines .........42 Install and Use Motion Planner ......iii Configuring the Gem6K for Ethernet...
  • Page 4 Variable Arrays (teaching variable data)....110 Conditional “GO”s (GOWHEN)......163 Basics of Teach-Data Applications..... 110 Trigger Functions (TRGFN) ........166 Summary of Related Gem6K Series Commands 112 FOLLOWING ............167 Teach-Data Application Example....... 112 Ratio Following – Introduction.......168 PRODUCT CONTROL OPTIONS ......115 What can be a master? ........168...
  • Page 5 www.comoso.com Multi-Tasking Performance Issues ......214 When is a Task Active? ........214 Task Swapping............ 214 Task Execution Speed......... 215 TROUBLESHOOTING ........... 217 Troubleshooting Basics........... 218 Solutions to Common Problems ......218 Program Debug Tools..........221 Status Commands ..........222 Error Messages ...........
  • Page 6 www.comoso.com...
  • Page 7: Overview

    OVERVIEW About This Manual This manual is designed to help you implement the Gem6K Series Product’s features in your application. Detailed feature descriptions are provided, including application scenarios and programming examples. For details on each Gem6K command, refer to the Gem6K Series Command Reference.
  • Page 8: Programming Examples

    • Programming skills in a high-level language such as C, C++, or BASIC is helpful • Ethernet communication protocol (if using the Ethernet port) • If you are new to the Gem6K Series Programming Language, we encourage you to use the Motion Planner Wizards Editor (version 4.2 or later for Gem6K support).
  • Page 9: Before You Begin

    Motion Planner is a Windows-based graphical interface that assists you with programming and tuning your Gem6K Series controller, as well as setting up your Compumotor drives. The Motion Planner CD-ROM is provided in your ship kit. The Motion Planner interface allows you to: •...
  • Page 10 www.comoso.com...
  • Page 11: Programming Fundamentals

    www.comoso.com Programming Fundamentals C H A P T E R O N E Programming Fundamentals IN THIS CHAPTER This chapter is a guide to general Gem6K programming tasks. It is divided into these main topics: • Motion Planner programming environment ......•...
  • Page 12: Motion Planner Programming Environment

    Motion Planner Programming Environment Every Gem6K Series controller is shipped with Motion Planner, a free Windows-based programming tool designed to simplify your programming efforts. The Motion Planner CD- ROM is provided in your ship kit. Updates may be downloaded, free of charge, from the compumotor.com...
  • Page 13: Native Code Programming

    The rest of the contents in this manual are directed toward the native code programmer. If you are new to the Gem6K Series Programming Language, be sure to read Chapter 1 (Programming Fundamentals) thoroughly. Then proceed to the relevant chapters for the features you need for your programs.
  • Page 14: Command Syntax

    DRIVE 1 ; Set accel to 20 units/sec/sec ; Set velocity to 8 units/sec Binary data field D100000 ; Set distance to 100,000 counts ; Execute motion ; End definition of program called "motion" Command name Gem6K Series Programmer’s Guide...
  • Page 15: Description Of Syntax Letters And Symbols

    Description of Syntax Letters and Symbols The command descriptions provided within the Gem6K Series Command Reference use alphabetic letters and ASCII symbols within the description to represent different parameter requirements (see example below). S y n t a x...
  • Page 16: General Guidelines For Syntax

    Launch the “move1” program in Task 1: Identifier (%) command with a specific task. 1%move1 Check the error status for Task 3: 3%TER Check the system status for Task 3: 3%TSS NOTE: The command line is limited to 100 characters (excluding spaces). Gem6K Series Programmer’s Guide...
  • Page 17: Command Value Substitutions

    #25 is set if a target zone timeout occurs): IF(2AS.25=b1) The available comparison and assignment operators are listed below. For full descriptions, refer to their respective descriptions in the Gem6K Series Command Reference (be sure to refer only to the commands in brackets—e.g., A is the acceleration setup command, but [ A ] is the acceleration assignment/comparison operator).
  • Page 18 VAR ....Numeric variable substitution VARI.... Integer variable substitution VARB.... Binary variable substitution VEL ....Velocity (commanded by the controller) VELA.... Velocity (actual, as measured by a position feedback device) VMAS.... Current velocity of the master axis Gem6K Series Programmer’s Guide...
  • Page 19: Programmable Inputs And Outputs Bit Patterns

    These operators are described in detail, along with programming examples, at the beginning of the Command Descriptions section of the Gem6K Series Command Reference. Programmable Inputs and Outputs Bit Patterns The Gem6K product has programmable inputs and outputs. The total number of onboard inputs...
  • Page 20: Creating Programs

    These are command line comments, comprising a semi-colon and text. The comments are separated from the command by a tab. A carriage return is placed at the end of each command line. Gem6K Series Programmer’s Guide...
  • Page 21: Storing Programs

    www.comoso.com Storing Programs After a program or compiled program/profile is defined (DEF) or downloaded to the Gem6K controller, it is automatically stored in non-volatile memory (battery-backed RAM). Information on controlling memory allocation is provided below (see Memory Allocation). Memory Allocation Your controller's memory has two partitions: one for storing programs and one for storing compiled profiles &...
  • Page 22: Checking Memory Status

    The table below identifies memory allocation defaults and limits for all Gem6K Series products. When specifying the memory allocation, use only even numbers. The minimum storage capacity for one partition area (program or compiled) is 1,000 bytes. Feature All Other Products...
  • Page 23: Executing Programs (Options)

    www.comoso.com Executing Programs (options) Following is a list of the primary options for executing programs stored in your controller: Method Description See Also Execute from a terminal Type in the name of the program and press enter; or write a ------- emulator program to prompt the operator to select a program from the...
  • Page 24: Program Security

    GO command. If you wish to ensure the load settles adequately before the next move, use the WAIT(AS.24=b1) command instead (this requires you to define end-of- move settling criteria — see Target Zone Mode on page for details). Gem6K Series Programmer’s Guide...
  • Page 25: Comexl (Save Command Buffer On Limit)

    www.comoso.com In the programming example below, by enabling the continuous command execution mode (COMEXC1), the controller is able to turn on output #3 after the encoder moves 4000 units of its 125000-unit move. Normally, with COMEXC disabled (COMEXCØ), command processing would be temporarily stopped at the GO1 command until motion is complete.
  • Page 26: Comexs (Save Command Buffer On Stop)

    The program-select input functions are: BCD select INSELP INFNCi-B or LIMFNCi-B) – see page 97, and one-to-one select (INFNCi-P or ) – see page 103. LIMFNCi-P Gem6K Series Programmer’s Guide...
  • Page 27: Restricted Commands During Motion

    www.comoso.com Restricted Commands During Motion When motion is in progress on a given axis (or task), some commands cannot have their parameters changed until motion is complete (see table below). For the commands identified in the table, if the continuous command execution mode is enabled (COMEXC1) and you try to enter new command parameters, you will receive the error response MOTION IN PROGRESS.
  • Page 28: Variables

    Variables Gem6K Series controllers have four types of variables, each designated with a different command. All four types are automatically stored in non-volatile memory. Type Command Quantity Function Store real numeric data (range is ±999,999,999.99999999). Can be Numeric (real) used to perform mathematical (=, +, -, *, /, SQRT), trigonometric (ATAN, COS, PI, SIN, TAN), and Boolean (&, |, ^, ~) operations.
  • Page 29: Using Numeric (Var And Vari) Variables

    www.comoso.com Using Numeric (VAR and VARI) Variables NOTES • The examples below show the use of real numeric variables (VAR). Integer variables may be used in the same operations with these exceptions: - Values are truncated to nearest integer value - Operations using square root (SQRT) and trigonometric (ATAN, COS, PI, SIN, TAN) operators are not allowed •...
  • Page 30 R e s p o n s e Cosine RADIAN0 VAR1=COS(0) VAR1 *VAR1=+1.0 VAR1=COS(30) VAR1 *VAR1=+0.86603 VAR1=COS(45) VAR1 *VAR1=+0.70711 VAR1=COS(60) VAR1 *VAR1=+0.5 VAR1=COS(90) VAR1 *VAR1=+0.0 RADIAN1 VAR1=COS(0) VAR1 *VAR1=+1.0 VAR1=COS(PI/6) VAR1 *VAR1=+0.86603 VAR1=COS(PI/4) VAR1 *VAR1=+0.70711 VAR1=COS(PI/3) VAR1 *VAR1=+0.5 VAR1=COS(PI/2) VAR1 *VAR1=+0.0 Gem6K Series Programmer’s Guide...
  • Page 31 *VAR1=+30.0 Boolean Operations Gem6K Series products have the ability to perform Boolean operations with numeric variables. The following examples illustrate this capability. Refer to the Gem6K Series Command Reference for more information on each operator (&, |, ^, and ~).
  • Page 32: Using Binary Variables

    The following examples illustrate the Gem6K Series product's ability to perform bitwise functions with binary variables. Storing binary values. The Gem6K Series Language allows you to store binary numbers in the binary variables (VARB) command. The binary variables start at the left with the least significant bit, and increase to the right.
  • Page 33: Unconditional Looping And Branching

    If an invalid program or label name is entered, the branch command will be ignored and processing will continue with the next line in the program. Gem6K Series products do not support recursive calling of subroutines. Using labels: Labels, defined with the $ command, provide a method of branching to specific locations within the same program.
  • Page 34 ; Initiate motion on axes 3 and 4 BREAK ; Break out of current subroutine or program $ pick2 ; Define label for pick2 GO1001 ; Initiate motion on axes 1 and 4 ; End definition of program pick Gem6K Series Programmer’s Guide...
  • Page 35: Conditional Looping And Branching

    www.comoso.com Conditional Looping and Branching Conditional looping (REPEAT/UNTIL and WHILE/NWHILE) entails repeating a set of commands until or while a certain condition exists. In conditional branching (IF/ELSE/NIF), a specific set of commands is executed based on a certain condition. Both rely on the fulfillment of a conditional expression, a condition specified in the UNTIL, WHILE, or IF commands.
  • Page 36 ; numeric variable 3 IF (DKEY=24) ; Evaluate expression to see if function key F4 was hit DCLEAR2 ; Clear RP240 display line 2 DWRITE"TRY AGAIN" ; Send message to RP240 display ; End of IF Gem6K Series Programmer’s Guide...
  • Page 37 www.comoso.com RP240 Data Read The DREADI1 command allows continual numeric or function key data entry from the RP240 Immediate Mode (when used in conjunction with the DREAD and/or DREADF commands). In this immediate mode, program execution is not paused (waiting for data entry) when a DREAD or DREADF command is encountered.
  • Page 38 ; If onboard inputs 1-4 are 1110, initiate axis 1 move ; Executes the move (Go) ; End IF command ; End program definition ; ***************************************************** ; * To run prog10, execute the "RUN prog10" command ; ***************************************************** Gem6K Series Programmer’s Guide...
  • Page 39: Program Interrupts (On Conditions)

    www.comoso.com Program Interrupts (ON Conditions) While executing a program, the Gem6K controller can interrupt the program based on several possible ON conditions: programmable input(s) status, user status, or the value of numeric variables #1 or #2. These ON conditions are enabled with the ONCOND command, and are Multi-Tasking Each task has its own defined with the commands listed below.
  • Page 40: Error Handling

    Error Handling The Gem6K Series products have the ability to detect and recover the following error conditions: Wizards can help: Error bit 1* ..Stall Detected: Functions when stall detection has been enabled (ESTALL or DSTALL) Motion Planner’s Wizard and ESK1 is set.
  • Page 41: Enabling Error Checking

    www.comoso.com Enabling Error Checking To detect and respond to the error conditions noted above, the corresponding error-checking bit(s) must be enabled with the ERROR command (refer to the ERROR Bit # column in the table below). If an error condition occurs and the associated error-checking bit has been enabled with the ERROR command, the Gem6K controller will branch to the error program.
  • Page 42: Canceling The Branch To The Error Program

    Profile for pre-emptive GO or registration move not Issue another GO command. possible at the time of attempted execution. Gosub Issue these commands in this order: Servos only: Target Zone Timeout (STRGTT value STRGTEØ, DØ, GO, STRGTE1 has been exceeded). Gem6K Series Programmer’s Guide...
  • Page 43 www.comoso.com Servos only: Exceeded Max. Allowable Position Gosub Issue a DRIVE1 command to the axis that Error (set with the SMPER command). exceeded the allowable position error. Verify that feedback device is working properly. Goto GOWHEN condition was already true when the Issue another GOWHEN command;...
  • Page 44: Error Program Set-Up Example

    FAULT INPUT !INENE command. The !INENE command re-enables input #1. The message will not IN LOOP be displayed again, because the user fault input error is a GOTO branch (not a GOSUB branch) to the error program. Gem6K Series Programmer’s Guide...
  • Page 45: Non-Volatile Memory

    www.comoso.com Non-Volatile Memory The items listed below are automatically stored in the Gem6K product’s non-volatile memory (battery-backed RAM). Cycling power or issuing a RESET command will not affect these settings. • Power-up program (STARTP) • Programs (defined with DEF & END) •...
  • Page 46 www.comoso.com...
  • Page 47: Communication

    www.comoso.com Communication C H A P T E R T W O Communication IN THIS CHAPTER • Communication options (protocols, connections)............• Motion Planner™ communication features ..............• Ethernet Networking Overview: ................. − Networking Guidelines..................− Configuring the Gem6K for Ethernet Communications ........−...
  • Page 48: Communication Options

    Gem6K communication capability to your custom applications created with programming languages such as Visual Basic or Visual C++. For details, refer to the COM6SRVR Programmer’s Guide or to the Motion Planner Help System. Gem6K Series Programmer’s Guide...
  • Page 49: Ethernet Networking

    www.comoso.com Ethernet Networking Overview The Gem6K is equipped for Ethernet communication. It includes 10Base-T (10Mbps twisted pair); TCP/IP protocol. RJ-45 connector. Default IP address is 192.168.10.30. You have these options for networking the Gem6K over Ethernet: • Gem6K as a client. You can connect the Gem6K via Ethernet to multiple devices, creating a client/server network.
  • Page 50 EXAMPLE — Direct Connect to PC: Crossover Cable Switch or Hub provided in 6K ship kit (255.255.0.0) (p/n 71-017635-01) Connection to company network Ethernet Ethernet Card Card Server IP = 172.20.34.30 Client IP = 172.20.34.160 IP = 172.20.44.180 Gem6K Series Programmer’s Guide...
  • Page 51 www.comoso.com • Combination of server and client. For example, the Gem6K could be the client for an OPTO22 (server) and an Allen-Bradley PLC (server). At the same time, a software program running on a PC could be using the Gem6K as a server. Ethernet Switch Ethernet Switch (255.255.255.0)
  • Page 52: Networking Guidelines

    • Fieldbus (DeviceNet or Profibus) versions of the Gem6K (part numbers Gem6Kn-DN or Gem6Kn-PB) cannot also communicate as an Ethernet Client at the same time. If you have a Fieldbus unit and need to use Ethernet instead, execute the OPTENØ Gem6K Series Programmer’s Guide...
  • Page 53: Configuring The Gem6K For Ethernet Communication

    www.comoso.com command, then the command (this disables the Fieldbus features), and then the RESET command. To re-enable Fieldbus communication, execute the NTFEN1 NTFEN2 command, then the command (this disables Ethernet communication), NTFENØ RESET and then the command. OPTEN1 • You cannot communicate to the Gem6K with simultaneous transmissions over both the “ETHERNET”...
  • Page 54 ENTER. NTFEN1 RESET Use the following sub-procedure to statically map the Gem6K’s Ethernet MAC address to IP address of the Ethernet card in your PC. Static mapping eliminates the need for the PC Gem6K Series Programmer’s Guide...
  • Page 55 www.comoso.com to ARP the Gem6K controller, thereby reducing communication overhead. In Motion Planner’s Terminal window, type and press ENTER. The response includes the Gem6K IP address, and the Gem6K Ethernet address value in hex (this is also known as the “MAC” address). Write down the IP address and the Ethernet address (hex value) for later use in the procedure below.
  • Page 56: Networking With Other 6K Or Gem6K Products (Peer-To-Peer)

    SEG..Free segment buffers The type of data can be either binary, as in the (axis status) operand, or a 32-bit unscaled integer, as in (encoder position) operand. The data stored in the is not scaled. VARSHO Gem6K Series Programmer’s Guide...
  • Page 57 www.comoso.com Each unit will re-broadcast its updated data at a rate set with the command. VARSHO NTRATE RECOMMENDATION: Set all devices to broadcast at the same rate of 50 NTRATE milliseconds. Setup For 6K or Gem6K sending and/or receiving information via the Peer to Peer feature: 1.
  • Page 58: Networking With Opto22 Snap I/O

    ). If the connection is unsuccessful, Error Status bit #23 is TNTS TNTSF set (see TERF 6. Inform the Gem6K of the configuration of the OPTO22. For each module position, use command to specify the type of module in that position. NTIO Gem6K Series Programmer’s Guide...
  • Page 59 www.comoso.com n \ m NTIO <i> Network Server # Module Type. Options are: Range: 1-6 1 = Digital/Discrete Inputs 2 = Digital/Discrete Outputs 3 = Analog Inputs Module # on Server “n” 4 = Analog Outputs Range: 0-7 For example, if there is a digital input module in slot 0, then the command would be .
  • Page 60: Networking With A Dvt Vision System

    This will be used to reference the device from now on. 4. Enter the IP address of the camera and specify a 3 for connection type with the NTIP command. For example, if the DVT camera is Server #6 and its IP address is Gem6K Series Programmer’s Guide...
  • Page 61: Networking With An Allen-Bradley Slc 5/05 Plc

    www.comoso.com 172.20.34.150, then the command would be 6NTIP3,172,20,34,150 5. Attempt a connection to the device with . For example, if the server number is 6, NTCONN the command would be . If the connection is successful, Network Status bit 6NTCONN1 #1 is set (see ).
  • Page 62 50 milliseconds is recommended. For NTPOLL example, to set the polling rate to 50 ms on Server #5, use the command. If 5NTPOLL50 there is an error during polling, Error Status bit #24 will be set (see TERF Gem6K Series Programmer’s Guide...
  • Page 63 www.comoso.com NTADDR172,34,54,123 ; Set the IP address of the Gem6K Example OPTEN0 ; Disable the option card (for Fieldbus units only) RESET NTFEN2 ; Enable network function on Gem6K RESET 5NTIP1,172,34,54,124 ; Identify network server #5 as an Allen Bradley ;...
  • Page 64: Error Conditions

    Tried to read or write an OPTO22 I/O point that is not configured according to the NTIO command. INVALID POINT TYPE OR NUMBER, Tried to set or read an I/O point (with an \IN, \OUT, \ANI, Gem6K Series Programmer’s Guide...
  • Page 65 www.comoso.com Error Response Possible Cause SEE NTIO \ANO, \TANI, \TANO, \TIN, or \TOUT command), but that I/O point was configured with the NTIO command to be different I/O type. INVALID SERVER TYPE Tried an OPTO22-related command (\TANI, \TANO, \TIN, \TOUT, \TIO, \IN, \OUT, \ANI, \ANO, etc.) for a non- OPTO22 connection.
  • Page 66: Serial Communication

    (e.g., to communicate to the Gem6K product over an RS-485 interface), execute the PORT1 command, then execute the DRPCHKØ command. (refer to the Gem6K Series Command Reference to details on each command) DRPCHK..RP240 Check E....Enable Serial Communication ECHO.....
  • Page 67: Rs-232C Daisy-Chaining

    PORT command. RS-232C Daisy-Chaining Up to ninety-nine stand-alone Gem6K Series products may be daisy-chained. There are two methods of daisy-chaining: one uses a computer or terminal as the controller in the chain; the other uses one Gem6K product as the master controller.
  • Page 68 1 automatically on power-up by using the controller's power-up start program (highly recommended). After the error level for all units has been set to ERRLVL1, send a Gem6K series command to all units on the daisy-chain by entering that command from the master terminal.
  • Page 69 Step 4 After all programming is completed, program execution may be controlled by either a master terminal, or by a Gem6K Series controller used as a master. Daisy-Chaining Controlling the daisy-chain from a master computer or terminal follows the examples above:...
  • Page 70: Daisy-Chaining And Rp240S

    ; Send message "3_GO" down the daisy chain ; End of loop RS-485 Multi-Drop Up to 99 Gem6K Series products may be multi-dropped. Refer to your product's Installation Guide for multi-drop connections. To establish device addresses, using the ADDR command: The ADDR command allows you to establish up to 99 unique addresses.
  • Page 71 www.comoso.com 1_PORT2... Subsequent command affects COM1, the RS-485 port 1_ECHO2... Echo characters back through the other port, COM2 1_PORT1... Subsequent command affects COM2, the RS-232 port 1_ECHO3... Echo characters back through both ports, COM1 and COM2 NOTES Controllers on a multi-drop do not support XON/XOFF. To ensure that XON/XOFF is disabled for COM1, send the PORT1 command followed by the XONOFFØ...
  • Page 72 www.comoso.com...
  • Page 73: Basic Operation Setup

    www.comoso.com Basic Operation Setup C H A P T E R T H R E E Basic Operation Setup IN THIS CHAPTER This chapter will enable you to understand and implement these basic operation features: • Before You Begin (setup programs, Motion Planner, resetting, etc.)....•...
  • Page 74: Before You Begin

    Initialize numeric variable for data ..VAR or VARI Servo control signal offset .....SGAF Define data program and program size DATSIZ Integrator enable ........SGINTE Set data pointer & establish increment . DATPTR Reset data pointer to specific location .. DATRST Current damping ratio ......SGIRAT Gem6K Series Programmer’s Guide...
  • Page 75: Using A Setup Program

    The features described in this chapter are configured with certain Gem6K Series commands, commonly referred to as “setup commands.” We recommend placing these commands (except MEMORY) into a special “setup program” that is executed to prepare the Gem6K Series product for subsequent controller operations. Further details about setup programming are provided in the Creating and Executing a Setup Program section, page 13.
  • Page 76: Drive Setup

    If so, set the controller to the Disable Drive on Kill mode with the KDRIVE1 command. In this mode, a kill command or kill input will shut down the drives immediately, letting the motors free wheel (without control from the drives) to a stop. Gem6K Series Programmer’s Guide...
  • Page 77: Scaling

    www.comoso.com Scaling Units of Measure without Scaling Scaling is disabled (SCALEØ) as the factory default condition: • Steppers: When scaling is disabled, all distance values entered are in commanded counts (sometimes referred to as motor steps), and all acceleration, deceleration and velocity values entered are internally multiplied by the DRES command value.
  • Page 78: Acceleration & Deceleration Scaling (Scla)

    For example, if scaling is set to SCLV10, the V9.9999 command would be truncated to V9.9. Velocity Resolution Decimal Places SCLV Value (units/sec) (counts/unit) 1 - 9 10 - 99 100 - 999 0.01 1000 - 9999 0.001 10000 - 99999 0.0001 100000 - 999999 0.00001 Gem6K Series Programmer’s Guide...
  • Page 79: Distance Scaling (Scld And Sclmas)

    www.comoso.com Use the following equations to determine the maximum velocity range for your product type. Max. Velocity for Servos Max. Velocity for Steppers (determined by feedback source selected for axis #1) 6,5000,000 n = maximum velocity as set 6,5000,000 Encoder Feedback: by the PULSE command.
  • Page 80 SCLD16000 command (4000 counts/rev ∗ 4 revs/inch = 16000 counts/inch). SCALE1 ; Enable scaling SCLMAS800 ; Master scaling: ; (80 counts/tooth * 10 teeth/inch = 800 counts/inch) SCLD16000 ; Follower scaling: ; (4000 counts/rev ∗ 4 revs/inch = 16000 counts/inch) Gem6K Series Programmer’s Guide...
  • Page 81: Positioning Modes

    www.comoso.com Positioning Modes The Gem6K controller can be programmed to position in either the preset (incremental or absolute) mode or the continuous mode. You should select the mode that will be most convenient for your application. For example, a repetitive cut-to-length application requires incremental positioning.
  • Page 82: Preset Positioning Mode

    ; additional units in the positive direction to position +8,000) ; Set move to absolute position zero ; Initiate move (starting at absolute position +8,000, ; move 8,000 units in the negative direction to position zero) Gem6K Series Programmer’s Guide...
  • Page 83: Continuous Positioning Mode

    www.comoso.com Continuous Positioning Mode The Continuous Mode (MC1) is useful in these situations: • Applications that require constant movement of the load • Synchronize the motor to external events such as trigger input signals • Changing the motion profile after a specified distance or after a specified time period (T command) has elapsed You can manipulate the motor movement with either buffered or immediate commands.
  • Page 84 The illustration (below) shows an example of an electrical pitch of 42mm ( ). NOTE: Parker linear motors have an DMEPIT42 electrical pitch of 42mm.
  • Page 85 www.comoso.com Linear Position Metric: • D (distance) counts × Position counts Position • PSET (absolute rotary linear position reference) • REG (registration from encoder distance) • REGLOD (registration English: lockout distance) • STRGTD (target zone counts 0254 × × Position counts Position distance)
  • Page 86 Conversion Using a Parker 406-LXR-M-D15-E2 linear motor, the electrical pitch is 42mm Example ) and the encoder is 1 micron. Here, we will convert an acceleration of DMEPIT42 10 inches/sec , a velocity of 5 inches/sec, and a distance of 20 inches: 1.
  • Page 87: End-Of-Travel Limits

    www.comoso.com End-of-Travel Limits The Gem6K controller can respond to both hardware and software end-of-travel limits. The purpose of hardware and software end-of-travel limits is to prevent the motor’s load from Related Commands: traveling past defined limits. Software and hardware limits are typically positioned in such a LH .....Hard limit enable LHAD ..Hard limit decel way that when the software limit is reached, the motor/load will start to decelerate toward the...
  • Page 88 ; Enable limits 1 and 2, disable limits 3 and 4 LHAD10 ; Set hard limit deceleration LSAD5 ; Set soft limit deceleration LSNEG0 ; Set negative direction soft limit ; (0 revs) LSPOS10 ; Establish positive soft limit ; (10 revs) ; Enable soft limits Gem6K Series Programmer’s Guide...
  • Page 89: Homing (Using The Home Inputs)

    www.comoso.com Homing (Using the Home Inputs) The homing operation is a sequence of moves that position an axis using the Home Limit input and/or the Z Channel input of an incremental encoder. The goal of the homing operation is to Refer to the product's return the load to a repeatable initial starting location.
  • Page 90 HOMVF velocity. As soon as the home input CW edge is reached, this last move is immediately Step 7 terminated. The load is at home and the absolute position register is reset to zero. Gem6K Series Programmer’s Guide...
  • Page 91 www.comoso.com Figure C: Home Profile Attributes (commands): • Start home move in positive Home Active Region direction (HOM0) • Backup To Home enabled (HOMBAC1) • Final approach direction is positive (HOMDF0) • Stop on the positive-travel side Position Initial of the home switch active region CW Edge Position CCW Edge...
  • Page 92 • Backup To Home enabled (HOMBAC1) • Final approach direction is positive Position (HOMDF0) Initial • Stop on the positive-travel side of CW Edge CCW Edge Position of Home of Home the home switch active region (HOMEDG0) Limit Limit Gem6K Series Programmer’s Guide...
  • Page 93 www.comoso.com Homing Using Figures K through O show the homing operation when homing to an encoder index pulse, or Z The Z-Channel channel, is enabled (HOMZ1). The Z-channel will only be recognized after the home input is activated. It is desirable to position the Z channel within the home active region; this reduces the time required to search for the Z channel.
  • Page 94: Encoder-Based Stepper Operation (Stepper Only)

    If queried with the ER or the AS commands, the user may branch to any other section of program when a stall is detected. Refer to the ER, and AS command descriptions in the Gem6K Series Command Reference for more information. Kill-on-Stall functions only if the stall detection is enabled (ESTALL1).
  • Page 95: Encoder Count/Capture Referencing

    www.comoso.com Encoder Count/Capture Referencing to configure steppers to reference either the encoder position or the commanded ENCCNT position when capturing the position (see ) and checking the encoder position ( INFNCi-H ). When checking the actual velocity ( determines whether VELA TVELA ENCCNT...
  • Page 96: Position Mode Tuning Procedure

    (DMODE12). This completes the advanced tuning procedure. If ringing or oscillations persist, and do not seem to be affected by the above adjustments, you may need to use notch filters or lead/lag filters. See the Filter Adjustments procedure below. Gem6K Series Programmer’s Guide...
  • Page 97: Filter Adjustments

    www.comoso.com Filter Adjustments If the previous tuning procedures did not eliminate ringing or oscillations, then mechanical resonances may be causing problems with your system’s response. Before trying the procedure below, we recommend that you check your mechanical system, especially the mechanical stiffness and mounting rigidity of your system. Use bellows or disk style couplers, not helical couplers.
  • Page 98 However, do not set the lead filter higher than four times the lag filter frequency, or a drive configuration warning will result, and the drive will use the previous filter settings. 6. If you are done adjusting filters, reconfigure DMTLIM to its default value. Gem6K Series Programmer’s Guide...
  • Page 99: Target Zone Mode (Move Completion Criteria For Servos Only)

    www.comoso.com Target Zone Mode (move completion criteria for servos only) Under default operation (Target Zone Mode not enabled), the Gem6K product's move Commanded completion criteria is simply derived from the Move is actually move trajectory. The Gem6K product Completed Actual considers the current preset move to be Time complete when the commanded trajectory has...
  • Page 100: Programmable Inputs And Outputs (Onboard And External Inputs & Outputs)

    PLCP, SCANP I/O states with a compiled program * Refer also to the respective command descriptions in the Gem6K Series Command Reference. I/O UPDATE RATE: The programmable inputs and outputs are sampled at the “system update rate,” which is every 2 ms.
  • Page 101: Programmable I/O Bit Patterns

    www.comoso.com Programmable I/O Bit Patterns The Gem6K has programmable inputs and outputs. The total number of onboard inputs and outputs (analog inputs, digital inputs, and digital outputs) is fixed. The total number of expansion inputs and outputs (analog inputs, analog outputs, digital inputs and digital outputs) depends on your configuration of expansion I/O bricks.
  • Page 102 Output bit pattern for TOUT, [OUT], OUT, OUTFNC, OUTLVL, OUTEN, OUTALL, OUTPLC, OUTTW, POUT: Bit # Pin # Function Output 1. Output 2. Output 3. Output 4. Output 5. Output 6. Relay Output 7. Sample response to TOUT (onboard outputs status) command: *TOUT0000_000 Gem6K Series Programmer’s Guide...
  • Page 103 www.comoso.com Expansion I/O Bricks The Gem6K product allows you to expand your system I/O by connecting up to 8 I/O bricks (see Installation Guide for connections). Expansion I/O bricks may be ordered separately (referred to as the “EVM32”). Each I/O brick can hold from 1 to 4 of these I/O SIM modules in any combination: SIM Type Programming...
  • Page 104: Input Functions

    ; Map the binary state of VARB1 to be the input state ; of "virtual" input brick 2 (2IN) VARB1=b10100000 ; Change "virtual" input brick 2IN to a new VARB1 value 2TIN ; Check the input status. The response will be: ; "*2IN1010_0000_0000_0000_0000_0000_0000_0000" Gem6K Series Programmer’s Guide...
  • Page 105 www.comoso.com Letter Designator Function A ....General-purpose input (default function for onboard and expansion digital inputs on I/O bricks) B ....BCD program select C ....Kill D ....Stop E ....Pause/Continue F ....User fault G ....<RESERVED> H ....Trigger Interrupt for position capture or registration (trigger inputs only). Special trigger functions can be assigned with the TRGFN command (see page 166).
  • Page 106 ; Set velocity ; Set distance WAIT(IN=b1XX) ; Wait for onboard input 1 ; Initiate motion IF(IN=bX1) ; If onboard input 2 ; Transfer feedback device position ; End IF statement ; End definition of program prog1 Gem6K Series Programmer’s Guide...
  • Page 107 www.comoso.com BCD Program Select The BCD program select function allows you to execute defined Input # BCD Weight • programs by activating the program select inputs. LIMFNCi-B Input 1 • Input 2 INFNCi-B BCD program select inputs are assigned BCD weights, with the least Input 3 weight on the smallest numbered input.
  • Page 108 ) and INFNC LIMFNC INSELP Example: The 3INFNC2-D command assigns the “stop” function to the 2 input on SIM1 of I/O brick #3. When this input is activated, motion will stop. Gem6K Series Programmer’s Guide...
  • Page 109 www.comoso.com Pause/Continue An input defined as a Pause/Continue input will affect motion and program execution • LIMFNCi-E depending on the COMEXR command setting, as described below. In both cases, when the • INFNCi-E input is activated, the current command being processed will be allowed to finish executing before the program is paused.
  • Page 110 • “New Master Cycle” Function (TRGFNcx1): This is equivalent to executing the FMCNEW command. When the specified trigger input goes active, the controller begins a new Following master cycle. Refer to the FMCNEW command or to page more on master cycles. Gem6K Series Programmer’s Guide...
  • Page 111 www.comoso.com INFNC1-H ; Assign trigger A (onboard input 1) to function as Code Examples ; a trigger interrupt input. INFNC2-H ; Assign trigger B (onboard input 2) to function as ; a trigger interrupt input. TRGFNAx1 ; When trigger A goes active, begin a new master cycle TRGFNB1 ;...
  • Page 112 (input is low, not sinking current) selects the JOYVL configuration. The high range could be used to quickly move to a location, the low range could be used for accurate positioning. NOTE: When this input is not connected, joystick motion always uses the JOYVL velocity setting. Gem6K Series Programmer’s Guide...
  • Page 113 www.comoso.com An input defined as a One-to-One Program Select input is assigned to execute one specific One-to-One program. The targeted program is reference by its number (see note). Program Select • Program Numbers LIMFNCi-iP • A program’s number is determined by the order in which the program was downloaded to the INFNCi-iP controller.
  • Page 114 NOTE: Once an input or I/O brick input is assigned a limit function, it is no longer debounced (INDEB has no effect), and it must be enabled/disabled with the LH command instead of the INEN command. Gem6K Series Programmer’s Guide...
  • Page 115: Output Functions

    www.comoso.com Output Functions The Gem6K product provides programmable digital outputs, found on the drive I/O connect. Additional digital outputs may be installed on expansion I/O bricks (see example on page 93). You can turn the controller's programmable outputs on and off with the Output (OUT, POUT or OUTALL) commands, or you can use the Output Function (OUTFNC) command to configure them to activate based on seven different situations.
  • Page 116 SIM slot is changed (different SIM, vacant SIM slot, or jumper setting), the controller will set the SIM to factory default settings. If a new SIM is installed INEN OUTLVL where there was none before, the new SIM is auto-configured to factory defaults. Gem6K Series Programmer’s Guide...
  • Page 117 www.comoso.com • Relationships: Output Type OUTLVL Setting OUT State * Current OUT/TOUT status NPN (sinking) OUT1 Sinking current OUTLVL0 (default) OUT0 No current flow OUTLVL0 (default) OUTLVL1 OUT1 No current flow OUTLVL1 OUT0 Sinking current PNP (sourcing) OUTLVL0 No current flow OUT1 OUTLVL0 OUT0...
  • Page 118 TERF, TER and ER commands if bit #12 of the ERROR command is enabled). NOTE If the SMPER command is set to zero (SMPERØ — the default value), the position error will not be monitored; thus, the Maximum Position Error Exceeded function will not be usable. Gem6K Series Programmer’s Guide...
  • Page 119 www.comoso.com Output on Position The Output on Position feature activates the designated output when the motor or load has (OUTFNCi-H) reached a specified position. To use this feature, you must first assign the Output on Position function to output #1, and define the Output on Position characteristics with the OUTP command.
  • Page 120: Variable Arrays (Teaching Variable Data)

    *DATA=+Ø.Ø,+Ø.Ø,+Ø.Ø,+Ø.Ø *DATA=+Ø.Ø,+Ø.Ø,+Ø.Ø,+Ø.Ø *DATA=+Ø.Ø,+Ø.Ø,+Ø.Ø,+Ø.Ø *DATA=+Ø.Ø Each data statement, comprising four data elements, uses 43 bytes of memory. The memory for each data statement is subtracted from the memory allocated for user programs (see MEMORY command). Gem6K Series Programmer’s Guide...
  • Page 121 www.comoso.com 2. Teach the Data The data that you wish to write to the data elements in the data program must first be placed to the Data into numeric variables (VAR). Once the data is stored into numeric variables, the data elements Program in the data program can be edited by using the Data Pointer (DATPTR) command to move the data pointer to that element, and then using the Data Teach (DATTCH) command to write the...
  • Page 122: Summary Of Related Gem6K Series Commands

    [ DATi ] ... From the data program specified with i, assigns the numeric value of the data element (currently pointed to by the data pointer) to a specified variable parameter in a Gem6K series command (e.g., D(DAT3),(DAT3)). Teach-Data Application Example For the sake of brevity, this example is limited to teaching 10 position data points;...
  • Page 123 www.comoso.com Step 2 Define the SETUP Subroutine . The SETUP subroutine need only run once. DEF SETUP ; Begin definition of the subroutine called SETUP 1INFNC1-M ; Assign digital input 1 on SIM 2 (I/O point #1) of ; I/O brick 1 to function as a "Joystick Release" input. JOYVH3 ;...
  • Page 124 4. Repeat steps 2 and 3 for the remaining nine teach locations. After triggering the joystick release input the tenth time, the controller will home the motor, repeat the path that was taught, and then return to the home position. Gem6K Series Programmer’s Guide...
  • Page 125: Product Control Options

    www.comoso.com Product Control Options C H A P T E R F O U R Product Control Options IN THIS CHAPTER This chapter explains various options for controlling your Gem6K product: • Safety features ....................• Overview of product control options..............•...
  • Page 126: Safety Features

    A program stored in the controller may interactively prompt the user for input as part of the program (input via I/O switches, thumbwheels, RP240, joystick). A joystick can be use for situations requiring manual manipulation of the load. Option Application Example Gem6K Series Programmer’s Guide...
  • Page 127: Programmable Logic Controller

    www.comoso.com RP240 Grinding: Program the RP240 function keys to select certain part types, and program one function key as a GO button. Select the part you want (see page 123) to grind, then put the part in the grinding machine and press the GO function key.
  • Page 128: Programmable I/O Devices

    OUTFNCi-G ....Position error exceeds max. limit set with SMPER — servo axes only OUTFNCi-H ....Output on position * The “i” in the command syntax represents the number of the programmable input (e.g., OUTFNC3-H assigns onboard output #3 as an “output on position” function). Gem6K Series Programmer’s Guide...
  • Page 129: Thumbwheels

    Use the steps below to set up and read the thumbwheel interface. Refer to the Gem6K Series Command Reference for descriptions of the commands used below. Wire your thumbwheels to the Gem6K. Refer to your product’s Installation Guide for I/O Step 1 specifications.
  • Page 130: Plc Scan Mode

    PRUN (resuming at the command immediately following the command). PRUN • (start and stop the timer) — TIMST TIMSTP • (turn on a digital output) Gem6K Series Programmer’s Guide...
  • Page 131 www.comoso.com • (set an analog output voltage – requires an extended I/O brick with on an analog output SIM) — • (execute a program in a specific task — e.g., 2%EXE MOVE • (execute a compiled program in a specific task — e.g., PEXE 3%PEXE PLCP4 •...
  • Page 132 OUT(VARB1) Begin New Scan 6 msec Scanning 2 System Update Periods are needed to complete the scan for compiled program PLCP3, for a total of 4 msec. The response to a TSCAN command would be: *TSCAN4. Gem6K Series Programmer’s Guide...
  • Page 133: Rp240 Remote Operator Panel

    RP240 Remote Operator Panel Gem6K Series products are directly compatible with the Compumotor RP240 Remote Operator Panel. This section describes how to use your Gem6K product with the RP240. Instructions for connecting the RP240 are provided in the Gem6K Hardware Installation Guide.
  • Page 134: Operator Interface Features

    RP240 LEDs. The program can read data and make variable assignments via the RP240's keypad and function keys. The Gem6K Series software commands for the RP240 are listed below. Detailed descriptions are provided in the Gem6K Series Command Reference. The example below demonstrates the majority of these Gem6K Series commands for the RP240.
  • Page 135: Using The Default Menus

    www.comoso.com DEF panel1 ; Define program panel1 Programming REPEAT ; Start of repeat loop Example DCLEAR0 ; Clear display DWRITE"SELECT A FUNCTION KEY" ; Display text "SELECT A FUNCTION KEY" DPCUR2,2 ; Move cursor to line 2 column 2 DWRITE"DIST" ;...
  • Page 136 I/O BRICK SELECT: U/D ØØØØ_Ø ENCODER: AXIS 1: -1 ØOUT: I/O BRICK SELECT: U/D ØØØØ_ØØØ COMMAND: AXIS 1: -1 LIMITS: AXIS 1: POS:1 NEG:1 HOME:0 ENABLE:1 POSITION ERROR: AXIS 1: -1 JOYSTICK: GV6K only CH1,2,3,4: 0.000 0.000 0.000 0.000 Gem6K Series Programmer’s Guide...
  • Page 137 www.comoso.com Running a Stored COMPUMOTOR GEM6K COMPUMOTOR GEM6K STATUS DRIVE DISPLAY ACCESS Program PROGRAM TO RUN IS: PROGRAM TO RUN IS: FIND ALPHA TRACE STEP FIND ALPHA TRACE STEP After accessing the RUN menu, press F1 to “find” the names of the programs stored in the Gem6K product’s memory;...
  • Page 138 (see page to find the bit patterns for your product). The initial menu show the onboard outputs; use the up and down arrows to select the status of outputs on expansion I/O bricks. Gem6K Series Programmer’s Guide...
  • Page 139 www.comoso.com LIMITS Menu: • The POS, NEG and HOME status items represent the hardware states of the limit inputs on the “ ” connector, regardless of their LIMFNC input function LIMITS/HOME assignments; they do not represent INFNC limit functions assigned to onboard trigger inputs or digital inputs on expansion I/O bricks.
  • Page 140: Joystick Control, Analog Inputs

    I/O brick. The 12-bit analog inputs are available on board (single analog input) or if you install an analog input SIM on an external I/O brick (default voltage range is -10V to +10V, selectable with ANIRNG). Gem6K Series Programmer’s Guide...
  • Page 141 www.comoso.com To Set Up Joystick 1. Select the required digital inputs and analog inputs required for joystick operation. Connect Operation the joystick as instructed in your controller’s Installation Guide. (refer also to the 2. Assign the appropriate input functions to the digital inputs used for joystick's operation: example code below) •...
  • Page 142 ANIRNG command (0 to +5VDC, 0 to +10VDC, and -5 to +5VDC). The voltage value of the ANI inputs can be transferred to the terminal with the TANI command, or used in an assignment or comparison operation with the ANI operator (e.g., IF(1ANI<2.4)). Gem6K Series Programmer’s Guide...
  • Page 143: Analog Input Interface

    Gem6K.BAS ' ************************************************************** ' This program will set the communications parameters for the ' serial port on a PC to communicate with a Gem6K series ' stand-alone product. ' ************************************************************** 100 '*** open com port 1 at 9600 baud, no parity, 8 data bits, 1 stop bit...
  • Page 144: Graphical User Interface (Gui) Development Tools

    Sold separately as an add-on utility to Motion Planner, PanelMaker is a custom GUI creation tool based on the VisualBasic Scripting language. Using PanelMaker, you can create custom interfaces for operator input and diagnostics. The PanelMaker custom controls include: • Communication between the application and the Gem6K product• Gem6K Series Programmer’s Guide...
  • Page 145: Custom Profiling

    www.comoso.com Custom Profiling C H A P T E R F I V E Custom Profiling IN THIS CHAPTER This chapter explains how to use these custom profiling features: • S-Curve Profiling ..........136 • Compiled Motion Profiling .......139 • On-the-Fly Motion (pre-emptive GOs) ....155 •...
  • Page 146: S-Curve Profiling

    S-Curve Programming Requirements To program an S-curve profile, you must use the average accel/decel commands provided in the Gem6K Series programming language. For every maximum accel/decel command (e.g., A, AD, HOMA, HOMAD, JOGA, JOGAD, etc.) there is an average command for S-curve profiling (see table below).
  • Page 147: Programming Example

    www.comoso.com Acceleration Setting Profiling Condition AA > ½ A, but AA < A..... S-curve profile with a variable period of constant acceleration. Increasing the AA value above the pure S-curve level (AA > ½ A), the time required to reach the target velocity and the target distance is decreased. However, increasing AA also increases jerk.
  • Page 148: Calculating Jerk

    )” for “V” (V used in the S-curve calculations. Thus, in the calculations above, you would substitute “(V = final velocity, V = initial velocity). For example, the jerk equation would be: * AA Jerk = J ) (A-AA) Gem6K Series Programmer’s Guide...
  • Page 149: Compiled Motion Profiling

    Compiled Motion Profiling Gem6K Series products allow you to construct complex individual axis motion profiles which are compiled and saved. You can define separate and independent profiles for each individual axis. The profiles may contain: • Sequences of motion Related Commands: •...
  • Page 150 - Out of memory (see system status bit #30) - Axis already in motion at the time of the PCOMP command - Loop programming errors (e.g., no matching PLOOP or PLN, more than 4 embedded PLOOP/END loops) Gem6K Series Programmer’s Guide...
  • Page 151 www.comoso.com Axis Status (TASF, TAS, & AS): Bit #31 is set while compiled a GOBUF profile is executing. TSEG & SEG: Reports the number of available segments in compiled memory. TDIR: Identifies programs that are “compiled as a path” (compiled with the PCOMP command) and reports the percentage of remaining compiled memory.
  • Page 152: Compiled Following Profiles

    Just as with continuous Following ramps outside of a compiled profile, the master travel over which the ramp takes place is specified with FOLMD. The slave travel over which the ramp takes place is simply the Gem6K Series Programmer’s Guide...
  • Page 153 www.comoso.com product of master travel and average ratio. Because the slave travel is not specified explicitly, it is possible for arithmetic round-off errors to cause actual slave travel during a ramp to differ from theoretical calculations. For applications in which slave distance is important, preset segments should be used.
  • Page 154: Dwells And Direction Changes

    For example, a machine cycle replacing a cam may require a move out, dwell for 2000 master counts, and move back. To create this dwell, a compiled GOBUF of zero slave distance may be used between the two moves. The code within a compiled program may look Gem6K Series Programmer’s Guide...
  • Page 155: Compiled Motion Versus On-The-Fly Motion

    www.comoso.com like: ; Preset incremental positioning used D(VAR1) ; Target position is in VAR1 FOLMD4000 ; Move takes place over 4000 master counts FOLRNF0 ; Motion comes to rest at end of move GOBUF1 ; Create move out segment ; No change in target position FOLMD2000 ;...
  • Page 156: Related Commands

    The PCOMP, PRUN, and PUCOMP commands allow you to incorporate individual axis profiles & PUCOMP within compiled motion profiles. Compiled motion for the Gem6K series allows you to construct complex motion programs using individual profiles (a series of GOBUF commands).
  • Page 157: Compiled Motion - Sample Application 1

    www.comoso.com Output During Compiled Motion Profile: POUTA The POUTA command turns the programmable output bits on and off. Transfer/Display (TSEG) or Assign (SEG) the Number of Free Segment Buffers: TSEG & SEG The TSEG command returns the number of free segment buffers in compiled memory. The SEG command is used to assign the number of free segment buffers in compiled memory to a variable or to make a comparison against another value.
  • Page 158: Compiled Motion - Sample Application 2

    2000 master counts. The distance the push arm (slave) must travel is 4000 counts. Assume the detector is wired to trigger 1A (onboard trigger input 1). Below is a graph of this Following profile. Gem6K Series Programmer’s Guide...
  • Page 159 www.comoso.com Profile Ratio D(slave) D(slave) = 4000 = -4000 Master Distance 2000 8000 10000 12000 ; Setup code Program FOLMAS1 ; Master is coming in on the master encoder input FOLEN1 ; Enable Following INFNC1-H ; Assign onboard input 1 (TRG-1A) as trigger interrupt ;...
  • Page 160 ; and end at zero ratio GOBUF1 ; Build motion PLN1 ; Close cam loop ; End program example 2b PCOMP EXPL2B ; Compile program EXPL2B ; ********************************************************** ; * To execute the program, enter the PRUN EXPL2B command ; ********************************************************** Gem6K Series Programmer’s Guide...
  • Page 161: Compiled Motion - Sample Application 3

    www.comoso.com Compiled Motion — Sample Application 3 In this application, there is a wheel that stamps a logo onto the product. The product is assumed to be entering at a constant and fixed spacing, each product is 4 inches in length with 2 inches separating each unit.
  • Page 162: Compiled Motion - Sample Application 4

    1:1 with the plastic while the stamp is in the plastic. 30° 30° Gem6K Series Programmer’s Guide...
  • Page 163 www.comoso.com The table below shows these relationships. The arm is directly driven with a servo motor having 4096 steps per revolution. The table shows increments of 30 degrees, which is about 341 servo motor steps, or about 0.524 slave inches measured around the circumference described by rotation of the arm.
  • Page 164 ; Master distance during ramp GOBUF1 ; Build end segment ; End of STAMP program definition PCOMP STAMP ; Compile the program ; ********************************************************** ; * To execute the program, enter the PRUN STAMP command ; ********************************************************** Gem6K Series Programmer’s Guide...
  • Page 165: On-The-Fly Motion (Pre-Emptive Gos)

    www.comoso.com On-the-Fly Motion (pre-emptive GO While motion is in progress, you can change these motion parameters to affect a new profile: • Acceleration (A) — s-curve acceleration is not allowed • Deceleration (AD) — s-curve deceleration is not allowed • Velocity (V) •...
  • Page 166: Otf Error Conditions

    ( ) that was pre-empted [ > ]. The distances are the areas under the profiles, starting at for both. If the original move had continued, would have been reached at time is reached at time Gem6K Series Programmer’s Guide...
  • Page 167: On-The-Fly Motion - Sample Application

    www.comoso.com Scenario #2: OTF change of distance, where new commanded distance ( ) is less than the original distance ( ) that was pre-empted [ < ]. In this example, the position where the OTF change was entered is already beyond can not be reached with the commanded deceleration).
  • Page 168 ; New distance WAIT(IN.1=B0) ; Wait for end of this product ; Implement new distance and velocity NWHILE ; Sampler-pak completed product detection WAIT(AS.1=B0) ; Wait for move to complete OUT1 ; Output to indicate stacking complete Gem6K Series Programmer’s Guide...
  • Page 169: Registration

    www.comoso.com Registration When a registration input is activated, the motion profile currently being executed is replaced A “registration input” is a trigger input assigned by the registration profile with its own distance (REG), acceleration (A & AA), deceleration (AD the “trigger interrupt” &...
  • Page 170: Preventing Unwanted Registration Moves (Methods)

    TTRIG ..Binary report of each status bit (bits 1-17 from left to right). From left to right the bits represent trigger A and B, the 17 bit is master trigger M (the “ ” input MASTER TRIG terminal) — see page 91. Gem6K Series Programmer’s Guide...
  • Page 171: Registration - Sample Application 1

    www.comoso.com Registration — Sample Application 1 In this example, two-tiered registration is achieved (see illustration below). While the motor is executing it’s 50,000-unit move, trigger input 1 (TRG-1A) is activated and executes registration move A to slow the load’s movement. An open container of volatile liquid is then placed on the conveyor belts.
  • Page 172 Because of , the REGSS first registration move is NOT pre-empted by the second registration input. The registration “single shot” will be reset when you issue a new motion command ( , etc.). PRUN Gem6K Series Programmer’s Guide...
  • Page 173: Registration - Sample Application 3

    www.comoso.com Registration — Sample Application 3 A print wheel uses registration to initiate each print cycle. From the beginning of motion, the controller should ignore all registration marks before traveling 2000 steps. This is to ensure that the unit is up to speed and that the registration mark is a valid one. DEL REGI3 ;...
  • Page 174 The error status is monitored and reported only if you enable error- FSHFD provided on page 30. checking bit #14 with the command (e.g., ). NOTE: When the error ERROR ERROR.14-1 occurs, the controller with branch to the error program (assigned with the command). ERRORP Gem6K Series Programmer’s Guide...
  • Page 175 www.comoso.com ER.14 ..Assignment & comparison operator — use in a conditional expression (see page 26). TERF..Full text description of each status bit. (see “GOWHEN condition true” line item) TER ....Binary report of each status bit (bits 1-32 from left to right). See bit #14. GOWHEN ...
  • Page 176: Trigger Functions (Trgfn)

    ; When TRG-1B goes active, motor will begin a new ; master cycle TRGFNB1x ; When TRG-2B goes active, motor will execute the move ; commanded with the GO command. ; The move is commanded, but will not execute ; until trigger 2B goes active. Gem6K Series Programmer’s Guide...
  • Page 177: Following

    www.comoso.com Following C H A P T E R S I X Following IN THIS CHAPTER This chapter will help you understand Ratio Following: • Introduction to Ratio Following ..............168 • Implementing Ratio Following ...............170 • Master Cycle Concept ..................182 •...
  • Page 178: Ratio Following - Introduction

    Ratio Following – Introduction As part of its standard features, the Gem6K Series Drive/Controller family allows you to solve applications requiring Ratio Following. Ratio Following is, essentially, controlled motion based on the measurement of external Compiled Profiles motion. This includes concepts such as an electronic gearbox, trackball, follower axis feed-to- You can pre-compile length, as well as complex changes of ratio as a function of master position.
  • Page 179: Following Status (Tfsf, Tfs & Fs Commands)

    www.comoso.com Following Status (TFSF, TFS & FS Commands) Many of the Following features described in this document have associated status bits that can be displayed (with the TFSF and TFS commands) or used in assignment or comparison operations (with the FS operator). The portions of this document which describe those features also summarize the related status bits.
  • Page 180: Implementing Ratio Following

    The FOLMAS command defines the masters and the followers. The command syntax is: and Follower; (FOLMAS) Follower Axis FOLMAS <+ii> Format for master assignment to follower: <+ii> Sign Bit Master source axis # (optional) Master source selection Gem6K Series Programmer’s Guide...
  • Page 181 www.comoso.com • Sign bit (±): Specifies the count direction of the master source which will result in positive master travel counts. The sign bit is not meant to be used simply to change the direction of follower motion. That function can be done with the sign of the D command. Rather, the sign bit is used to allow forward motion of the physical master (e.g., conveyor belt, rotating wheel, or the continuous feed of material or product) to result in positive counts.
  • Page 182 FSHFD command. The SINAMP command affects the sine wave immediately, without any built in ramp in amplitude. If a gentle change is desired, a user program should be written which Gem6K Series Programmer’s Guide...
  • Page 183 www.comoso.com repeatedly issues the command with small changes in value, until the desired value is reached. Using SINGO with a “0” parameter abruptly stops the sine wave, without changing its current magnitude. Using SINGO with a “1” parameter abruptly starts the sine wave, also without changing its current magnitude.
  • Page 184 FOLMD to Ø will ensure precise tracking of the master's acceleration ramp. If scaling is enabled (SCALE1), the FOLMD value is scaled by the SCLMAS parameter. Examples and more information on this topic can be found below in the section titled Follower vs. Master Move Profiles. Gem6K Series Programmer’s Guide...
  • Page 185: Follower Vs. Master Move Profiles

    www.comoso.com Enable the When an axis is configured as a follower with the FOLMAS command, it will continuously Following Mode; monitor the position and motion of its master, even if the follower is at rest. This allows (FOLEN1) subsequent motion to be related to the motion of the master via ratios (FOLRN/FOLRD) and ramping over master distances (FOLMD).
  • Page 186 ; Wait until the previous ramp is finished GOWHEN(1PMAS>=5) ; Enable motion pre-processing so that follower motion ; begins at master position 5 ; Wait for master to reach 5 revolutions before ; follower starts ratio change to 0 (zero) Gem6K Series Programmer’s Guide...
  • Page 187 www.comoso.com Preset Positioning For preset positioning mode (MCØ) moves, the FOLMD parameter is the master distance over Mode Moves which the entire follower move is to take place. As an example, a follower is to move 20 inches over a master distance of 25 inches with a maximum ratio of 1:1 (ratio set with the FOLRN1 and FOLRD1 commands).
  • Page 188: Performing Phase Shifts

    Note that the distance traveled during the time-based deceleration due to stop, kill, or limits is included in the PSHF value. By comparing “before and after” values of PSHF, a Gem6K program may calculate how much shift was required to perform visual- or sensor-based alignment of a master/follower phase relationship. Gem6K Series Programmer’s Guide...
  • Page 189 www.comoso.com Phase Shift An FSHFC or FSHFD move may be needed to adjust the follower position on the fly because of Examples a load condition which changes during the continuous Following move. Below are programming examples to demonstrate both shift methods. An operator is visually inspecting the follower’s continuous Following motion with respect to FSHFC Example the master.
  • Page 190: Geared Advance Following

    OK to do FGADV ”): move • Master is specified with a command FOLMAS • Following is enabled with the command FOLEN • The follower is either not moving, or moving at constant ratio in continuous mode Gem6K Series Programmer’s Guide...
  • Page 191: Summary Of Ratio Following Commands

    www.comoso.com move may not be performed: FGADV • During a preset ( ) move • In a compiled profile or program Following Status ( , and ) bit #24 reports if a “ ”. TFSF FGADV move is underway Example COMEXC1 ;...
  • Page 192: Master Cycle Concept

    The new master cycle length takes affect as soon as it is issued. If the new master cycle length is greater than the current master cycle position, the cycle position will not change, but will rollover when the new master cycle length is reached. If the new master Gem6K Series Programmer’s Guide...
  • Page 193 www.comoso.com cycle length is less than the current master cycle position, the new master cycle position becomes equal to the old cycle position minus one or more multiples of the new cycle length. Example FMCLEN23 ; Set master cycle length: Code ;...
  • Page 194 If it is desired to WAIT or GOWHEN for a master cycle position of the next master cycle, the variable or constant specified in the command should be calculated by adding one master cycle length to the desired master cycle position. Gem6K Series Programmer’s Guide...
  • Page 195: Summary Of Master Cycle And Wait Commands

    www.comoso.com Finally, master cycle counting restart may be pending activation of a trigger (TRGFNcx1), and this will suspend the evaluation of PMAS for these commands. PMAS is not sampled, and the comparison evaluates as false. During this time, if the pending status of master cycle counting restart is aborted with FMCNEWØ, the GOWHEN condition is also cleared, and any motion profile of any axis waiting on that PMAS comparison will be canceled.
  • Page 196: Technical Considerations For Following

    For a case like this, the Gem6K allows you to filter the master position signal to generate a smooth follower position command. This is known as Master Position Filtering and is programmed with the FFILT command. Gem6K Series Programmer’s Guide...
  • Page 197: Master Position Prediction

    www.comoso.com Master Position Prediction Master Position Prediction is a technique used to compensate for the fact a follower's position command cannot be calculated and implemented infinitely fast. The master position prediction mode is enabled by default (FPPEN1) in the Following algorithm, but can be turned off as desired with the FPPENØ...
  • Page 198: Following Error

    (VAR) at any time using the PER command. The error value in follower steps is scaled by SCLD for the axis. This value may be used for subsequent decision making, or simply storing the error corresponding to some other event. Gem6K Series Programmer’s Guide...
  • Page 199: Maximum Velocity And Acceleration (Stepper Axes Only)

    www.comoso.com Maximum Velocity and Acceleration (Stepper Axes Only) The follower's attempt to faithfully follow the master may command velocities and accelerations that the follower axis is physically not able to complete. Therefore, the FMAXV and FMAXA commands are provided to set the maximum velocity and acceleration at which the follower will be allowed to move.
  • Page 200 (i.e., 40 to 200 microseconds ∗ master speed). As with the error due to position sampling accuracy, the error due to the position prediction mode being enabled is like a noise on the order of 200-600 Hz, which is not noticed by large loads. Gem6K Series Programmer’s Guide...
  • Page 201: Preset Vs. Continuous Following Moves

    A servo system’s tuning has a direct impact on how well the follower axis can track the master (Servo Axes Only) input. Overshoot, lag, oscillation, etc., can be devastating to Following performance. The best tool to use for tuning the Gem6K series controller is Motion Planner’s Gemini Servo Tuner utility. Repeatability of the...
  • Page 202: Master And Follower Distance Calculations

    When the Follower is in Continuous Positioning Mode (MC1) where: FOLMD * (R FOLMD = Master distance = New ratio (FOLRN ÷ FOLRD) = Current ratio (FOLRN ÷ FOLRD) D = Follower distance traveled during ramp Gem6K Series Programmer’s Guide...
  • Page 203 www.comoso.com When the Follower is in Preset Positioning Mode (MCØ) Trapezoidal = (FOLMD * R where: Follower Moves FOLMD = Master distance - D) = Master distance during accel & decel ramps = Master distance during constant ratio 2 * D D = Total follower axis preset distance commanded = Follower travel during accel and decel ramps = D - (2 * D...
  • Page 204: Using Other Features With Following

    The registration move itself, however, is always a time based move, and implements the (see page 159) registration velocity with respect to a stationary reference. Any trigger input may be used as a registration input or for any Following feature which uses triggers, even at the same time. Gem6K Series Programmer’s Guide...
  • Page 205 www.comoso.com Enter/Exit The FOLENØ command may be executed while a follower axis is moving at constant ratio. In Following Mode this case, the current velocity becomes the constant velocity, and the follower may accelerate or decelerate to other velocities. The FOLEN1 command may not be executed while the While Moving follower axis is moving in the non-Following mode.
  • Page 206: Troubleshooting For Following (See Also Chapter 8)

    • Ratios and master distances specified result in fractional follower steps covered during ramps, constant ratio Follower lags Following position • Inhibited by FMAXV (steppers only) • FMAXA clips acceleration peaks resulting from attempt to follow rough master Gem6K Series Programmer’s Guide...
  • Page 207: Error Messages

    www.comoso.com Error Messages If an illegal programming condition is discovered while programming or executing programs, the Gem6K responds with an error message. If a program execution error is detected, the program is aborted. The table below lists all the error messages that relate to Following, and indicates the command and cause that may generate them.
  • Page 208: Following Commands

    Following Commands Detailed information about these commands is provided in the Gem6K Series Command Reference. ANIMAS ......Assigns an analog input to be used as a master in a FOLMAS assignment (requires a ANI SIM located on an expansion I/O brick).
  • Page 209 WAIT ......A WAIT command suspends program execution until the specified conditional statement (based on PMAS, FS, NMCY, PCMS, PSHF, PSLV, or VMAS) is true; WAIT(SS.i=b1) suspends program execution until a trigger input is activated (“i” is the input bit number corresponding to the trigger input—refer to the Gem6K Series Command Reference). Chapter 7. Multi-Tasking...
  • Page 210 Gem6K Series Programmer’s Guide...
  • Page 211: Multi-Tasking

    www.comoso.com Multi-Tasking C H A P T E R S E V E N Multi-Tasking IN THIS CHAPTER • Introduction to Multi-Tasking .................202 • Using Gem6K Resources While Multi-Tasking..........210 • Multi-Tasking Performance Issues..............214 • Multi-Tasking Application Examples .............215...
  • Page 212: Introduction To Multi-Tasking

    (see list below). These resources can be shared with other tasks. • I/O........Inputs and Outputs (onboard I/O and expansion I/O bricks) • Communication ports ..“ ”, “ ”, and “ ” RS-232 RS-232/485 ETHERNET Gem6K Series Programmer’s Guide...
  • Page 213 www.comoso.com • Axis ......The Gem6K axis can be shared with any tasks • Variables ...... Real ( ), binary ( ), integer ( ), and string ( VARB VARI VARS “Program Memory” is the Gem6K’s non-volatile memory where programs are stored. Any task may run any program.
  • Page 214 Figure 3c: Multi-Tasking initiated from a computer terminal (cont’d). Starting Tasks from GEM6K a Program Resources Program Memory Supervisor main RUN main RUN main DEF main 1%move1 Serial Ports RUN main 2%inout 3%fill Ethernet Axis Variables Figure 4a: Multi-Tasking initiated from a program. Gem6K Series Programmer’s Guide...
  • Page 215 www.comoso.com GEM6K Resources Program Memory Supervisor main Running main 1%move1 DEF main 1%move1 1%move1 Serial Ports 2%inout 3%fill 1%move1 Ethernet Task 1 move1 Axis DEF move1 RUN move1 Variables Figure 4b: Multi-Tasking initiated from a program (cont’d). GEM6K Resources Program Memory Supervisor main Running...
  • Page 216: Interaction Between Tasks

    Figure 5a: Initiating multi-tasking. GEM6K Resources Program Memory Supervisor main Running main 1%move1 DEF main 1%move1 1%move1 Serial Ports 1%move1 Ethernet Task 1 move1 Axis DEF move1 RUN move1 3%fill Variables Figure 5b: Task initiated from another task (cont’d). Gem6K Series Programmer’s Guide...
  • Page 217 www.comoso.com GEM6K Resources Program Memory Supervisor main Running main DEF main 1%move1 Serial Ports Ethernet Task 1 move1 Running move1 Axis DEF move1 3%fill 3%fill 3%fill Variables 3%fill Task 3 fill RUN fill DEF fill 2%inout Figure 5c: Task initiated from another task (cont’d). GEM6K Resources Program Memory...
  • Page 218: Tasks

    ; Do not associate task 2 with motion) 1%move1 ; Execute the "move1" program in Task 1 2%inout ; Execute the "inout" program in Task 2 (Will not affect any ; motion) ; End definition of program called "main" Gem6K Series Programmer’s Guide...
  • Page 219: How A "Kill" Works While Multi-Tasking

    www.comoso.com How a “Kill” Works While Multi-Tasking The general rule of command execution within a task is that the command affects only the task in which it was executed or to which it was directed via the % prefix. This includes almost all motion commands when tasks have an associated (TSKAX) axis.
  • Page 220: Using Gem6K Resources While Multi-Tasking

    (ERROR), and error program (ERRORP). • Command buffer control: − COMEXC. Pauses command processing of that task until the associated motion has stopped − COMEXL. Allows the specified associated motion to not kill that task’s program. Gem6K Series Programmer’s Guide...
  • Page 221: Sharing Common Resources Between Multiple Tasks

    www.comoso.com Sharing Common Resources Between Multiple Tasks Controller resources other than processing time must also be shared between multiple tasks. All physical inputs and outputs are shared (i.e., each task may read all inputs and write to all outputs). Some of the functions associated with that I/O (defined with LIMFNC, INFNC and OUTFNC commands) are unique for each task.
  • Page 222 Command refers to These functions are task specific. All LIMFNCi-C, LIMFNCi-D, numbered task others affect the entire controller and LIMFNCi-E, LIMFNCi-F, cannot be affected by the % prefix. LIMFNCi-P, INFNCi-C, INFNCi-D, INFNCi-E, INFNCi-F, INFNCi-P, INSELP, OUTFNCi-C Gem6K Series Programmer’s Guide...
  • Page 223: Input And Output Functions And Multi-Tasking

    www.comoso.com Input and Output Functions and Multi-tasking The Gem6K has inputs and outputs (onboard and on external optional I/O bricks) that may be assigned various I/O functions with these function assignment commands: ..Assigns input functions to the dedicated limit inputs on the “ ”...
  • Page 224: Multi-Tasking Performance Issues

    The TSKTRN value for a task may be changed at any time, allowing a task to increase its weight for an isolated section of program statements. The TTASK command reports to the display the task number of the task which executed the Gem6K Series Programmer’s Guide...
  • Page 225: Task Execution Speed

    www.comoso.com command. This could be used for diagnostic purposes, as a way to indicate which task is executing a given section of program. The corresponding TASK assignment allows the program itself to determine which task is executing it. The current task number TASK may be assigned to a variable or evaluated in a conditional statement such as IF.
  • Page 226 Gem6K Series Programmer’s Guide...
  • Page 227: Troubleshooting

    www.comoso.com Troubleshooting C H A P T E R E I G H T Troubleshooting IN THIS CHAPTER • Troubleshooting basics ................218 • Solutions to common problems (problem/cause/remedy table)....218 • Program debug tools Status commands ................222 Error messages ................229 Trace mode..................232 Single-step mode................234...
  • Page 228: Troubleshooting Basics

    • Refer to other sections of this manual for more information on controller programming guidelines, system set up, and general feature implementation. You may also need to refer to the command descriptions in the Gem6K Series Command Reference. Refer to your product’s Installation Guide for hardware-related issues.
  • Page 229 www.comoso.com Problem Cause Solution Direction is reversed. 1. Phase of step motor 1. Switch A+ with A- connection from drive to motor. (stepper axes only) reversed (motor does not move in the commanded direction). 2. Phase of encoder reversed 2. Swap the A+ and A– connection at the ENCODER connector. (reported TPE direction is reversed).
  • Page 230 3. Check drive status. 4. Drive faulted. 4. Check drive status. 5. Shutdown issued to drive. 5. Re-enable drive by sending the DRIVE1 command. Velocity & acceleration is See Distance problem noted incorrect as programmed. above. Gem6K Series Programmer’s Guide...
  • Page 231: Program Debug Tools

    www.comoso.com Program Debug Tools After creating your programs, you may need to debug the programs to ensure that they perform as expected. The Gem6K provides several debugging tools. Detailed descriptions are provided on the following pages. • Status Commands: Use the “Transfer” commands (e.g., TAS, TSS, TIN) to display various controller status information.
  • Page 232: Status Commands

    (see List of All product during program Status Commands below). For more information on each status command, refer to the execution, prefix the respective command description in the Gem6K Series Command Reference. command with an “!” (e.g., !TASF). SPECIAL NOTATIONS The command has a binary report version (just leave the “F”...
  • Page 233 www.comoso.com TASF Reports axis-specific conditions. * (TAS) † (AS) 1. Axis is in motion (commanded) 17. Positive-direction software limit (LSPOS) encountered 2. Direction is negative 18. Negative-direction software limit (LSNEG) encountered 3. Accelerating (n/a to deceleration) 19. Within Deadband Within deadband (steppers) (EPMDB) —...
  • Page 234 25. Power dissipation circuit fault (not applicable on some servos) 26. RESERVED 27. RESERVED 28. Motor configuration warning 29. ORES failure 30. Motor thermal model fault (servos) 31. Command torque/force at limit (TTRQ=DMTLIM) (servos) 32. RESERVED Gem6K Series Programmer’s Guide...
  • Page 235 www.comoso.com TSTAT Reports general system setup and current conditions. Sample response for the Gem6K: *Gem6K revision: 92-XXXXXX-01-6.0 Gem6K GV6K-L3E D1.72 F1.3 *Ethernet address: xxxxxxxxxx; IP address: 192.168.10.30 *Power-up program assignment (STARTP): SETUP *ENABLE input OK: Yes *Drive status (DRIVE): 0 *Drive resolution (DRES): 25000 *Encoder resolution (ERES): 4000 *Hard Limit enable: LH3...
  • Page 236 28. RESERVED 13. Master cycle trigger input is pending 29. RESERVED 14. Mas cycle length (FMCLEN) given 30. RESERVED 15. Master cycle position is negative 31. RESERVED 16. Master cycle number is > 0 32. RESERVED Gem6K Series Programmer’s Guide...
  • Page 237 www.comoso.com TERF Reports error conditions. ** * (TER) † (ER) Multi-tasking: Each task has its own error status; therefore, to check the error status for a specific task, prefix the TERF command (e.g., 2%TErF). 1. Stall detected. 1st: Enable Stall Detection (ESTALL or DSTALL). 2.
  • Page 238 TTASK .....Task Number of the program that executes this command † TTIM ....Time Value † TTRIG .....Status of “Trigger Interrupt” Activation * † TUS ....User Status * † TVEL ....Current Commanded Velocity † TVELA .....Current Actual Velocity † TVMAS .....Current Velocity of the Master Axis † Gem6K Series Programmer’s Guide...
  • Page 239: Error Messages

    AXIS NOT READY Compiled Profile path compilation error. COMMAND NOT IMPLEMENTED Command is not applicable to the Gem6K Series product. COMMAND NOT ALLOWED IN PROGRAM Command is not allowed inside a program definition (between DEF and END). The command (or ≥ one field in the command) is not appropriate to the COMMAND/DRIVE MISMATCH AXSDEF configuration (e.g., attempting to execute a servo tuning command on...
  • Page 240 EXCEEDED Attempting to execute a command not allowed during motion (see Restricted MOTION IN PROGRESS Commands During Motion on page 17.) Following: The FOLEN1 command was given while that follower was moving in a non-Following mode. Gem6K Series Programmer’s Guide...
  • Page 241 www.comoso.com Programming Error Messages (continued) Error Response Possible Cause NEST LEVEL TOO DEEP IFs, REPEATs, WHILEs, or GOSUBs nested greater than 16 levels ( for each type NO MOTION IN PROGRESS Attempting to execute a command that requires motion, but motion is not in progress NO PATH SEGMENTS DEFINED Compiled Profile compilation error...
  • Page 242: Trace Mode

    ; If variable #1 is < 16, increment the counter by 1 ; End IF statement ; End programming of program called badprg 2. Using Motion Planner’s terminal emulator, download the program to the Gem6K Series product. Notice that an error response identifies the bad command as an “ INCORRECT ”...
  • Page 243 www.comoso.com Step 2 Create a program prog3: DEF prog3 ; Begin definition of program prog3 D50000 ; Sets the distance to 50,000 ; Initiates motion ; End definition of program prog3 Step 3 Enable the Trace Mode: TRACE1 ; Enables the Trace mode Step 4 Execute the program prog1: (each command in the program is displayed as it is executed) EOT13,10,0...
  • Page 244: Single-Step Mode

    *PROGRAM=PROG1 COMMAND=V5.0000 *PROGRAM=PROG1 COMMAND=L3 To complete the sequence, use the # sign until all the commands are completed (!#16 would complete the example). To exit Single-Step mode, type: Step 5 STEP0 ; Disables Single Step Mode Gem6K Series Programmer’s Guide...
  • Page 245: Break Points

    www.comoso.com Break Points The Break Point ( ) command allows you to establish a location in the program where command processing will halt and a message will be transmitted to the PC. There are 32 break points available, , all transmitting the message BP32 *BREAKPOINT NUMBER n<cr>...
  • Page 246 Notice that output 2 and output 4 have not changed state because the output (OUT) command has no effect on disabled outputs. Step 4 To re-enable the outputs, use the OUTEN command. OUTENEEEE ; Re-enables outputs 1-4 Gem6K Series Programmer’s Guide...
  • Page 247: Simulating Analog Input Channel Voltages

    www.comoso.com Inputs The steps below describe the use and function of the INEN command. You can use it to cause an input state to occur. The inputs will not actually be in this state but the Gem6K treats them as if they are in the given state and will use this state to execute its program. This program will wait for an input state to occur and will then make a preset move: Step 1 INFNC1-A...
  • Page 248: Technical Support

    Product Return Procedure If you must return your Gem6K Series product to affect repairs or upgrades, use this procedure: Get the serial number and the model number of the defective unit, and a purchase order number...
  • Page 249: Index

    www.comoso.com Index buffer 73 assumptions, skills required to after pause 99 implement features ii after stop 98 axis moving status 223 command buffer execution absolute position axis scaling 67 after end-of-travel limit absolute positioning mode 72 axis status 223 (COMEXL) 15 absolute zero position 72 extended 224 after pause/continue input...
  • Page 250 Filter Adjustments 87 hexadecimal value identifier (h) 6, 22 filtering, master position See master, homing distance master position filtering home See limits, home calculations, Following 192 follower status 223 compiled motion 143 Gem6K Series Programmer’s Guide...
  • Page 251 www.comoso.com zeroing the absolute position 79 distance host computer operation 133 move calculations 192 programming (FOLMD) 174 jerk (acceleration), reducing 136 master cycle jogging counting 182 input functions 101 restart 183 RP240 jog mode 127 I/O activation (simulation) 235 status 182 setup 101 I/O device interface 118 length 182...
  • Page 252 107 sample programs provided ii used to active an output 109 operand (OUT) 25 scan programs in PLC mode 120 zeroed after homing 79 output on position 109 set-up program 13 positive-direction end-of-travel limits Gem6K Series Programmer’s Guide...
  • Page 253 www.comoso.com skills required ii serial ports, controlling 56 RP240 display 128 storing programs 11 settling time, actual 89 program execution 226 set-up commands 64 programmable inputs 95 set-up program 13 programmable outputs 106 shift registration 160 advance 180 RP240 displays 128 ratio of follower to master 174 continuous 178 setup parameters 64...
  • Page 254 110 Filter Adjustments 87 string 18 Position Mode 85 Z-channel 79, 83 variable arrays 110 Procedures 85 status 224 velocity zero position after homing 79 change on the fly 71, 155 compiled motion 141 Gem6K Series Programmer’s Guide...

This manual is also suitable for:

Gemini gv6kGemini gt6k

Table of Contents