GFK-1742 New In Stock! GE Fanuc Manuals http://www.pdfsupply.com/automation/ge-fanuc-manuals/motionsolutions/GFK-1742 motion-solutions 1-919-535-3180 Motion Mate DSM314 for Series 90-30 PLCs www.pdfsupply.com Email: sales@pdfsupply.
GFK-1742 New In Stock! GE Fanuc Manuals http://www.pdfsupply.com/automation/ge-fanuc-manuals/motionsolutions/GFK-1742 motion-solutions 1-919-535-3180 Motion Mate DSM314 for Series 90-30 PLCs www.pdfsupply.com Email: sales@pdfsupply.
GE Fanuc Automation Programmable Control Products Motion Mate™ DSM314 for Series 90™-30 PLCs User's Manual GFK-1742A January 2001
GFL-002 Warnings, Cautions, and Notes as Used in this Publication Warning Warning notices are used in this publication to emphasize that hazardous voltages, currents, temperatures, or other conditions that could cause personal injury exist in this equipment or may be associated with its use. In situations where inattention could cause either personal injury or damage to equipment, a Warning notice is used. Caution Caution notices are used where equipment might be damaged if care is not taken.
Preface Content of This Manual This manual describes the Motion Mate DSM314 - a complete, integrated motion control system in the form of an intelligent, programmable option module for the Series 90-30 Programmable Logic Controller (PLC). Chapter 1. Product Overview: This chapter provides an overview of the hardware and software used to set up and operate a Motion Mate DSM314 motion control system. Chapter 2.
Preface Chapter 15. Using VersaPro with the DSM314: Describes basic operations in VersaPro pertaining to the DSM314, such as accessing the Motion and Local Logic editors, saving programs, printing hardcopies, and storing configuration and programs to a PLC. Chapter 16: Using the Electronic CAM Feature: Describes electronic CAM concepts, commands, and programming methods. Appendix A. Error Reporting: Describes the errors reported by the module status code and axis error code words in %AI memory. Appendix B.
Contents Chapter 1 Product Overview............................................................................................ 1-1 Servo Types Supported........................................................................................... 1-1 Features of the Motion Mate DSM314 .......................................................................... 1-1 High Performance................................................................................................... 1-1 Easy to Use ................
Contents Installing and Wiring the DSM314 for Analog Mode............................................ 2-21 Grounding the Motion Mate DSM314 Motion System .......................................... 2-22 Section 3: Turning on the Motion Mate DSM314.......................................2-24 Section 4: Configuring the Motion Mate DSM314......................................2-25 VersaPro Program Folders....................................................................................
Contents I/O Circuit Identifiers and Signal Names............................................................... 3-24 I/O Circuit Function and Pin Assignments ............................................................ 3-24 Digital Servo Axis 1, 2 Circuit and Pin Assignments ........................................... 3-25 Analog Servo Axis 1-4 Circuit and Pin Assignments ........................................... 3-26 Aux Axis 2-4 Circuit and Pin Assignments...............................................
Contents Home Switch Example................................................................................... 6-2 Move+ and Move– Modes ...................................................................................... 6-3 Move – (Minus) Home Cycle Example........................................................... 6-4 Find Home Routine for Move + or Move – ..................................................... 6-4 Jogging with the DSM314 ...............................................................
Contents Single-axis Program Structure ...................................................................... 7-17 Single-Axis Program Example...................................................................... 7-17 Multi-Axis Program Structure ...................................................................... 7-18 Multi-Axis Program Example....................................................................... 7-18 Single-axis Subroutine Structure......................................................
Contents Example 13: S-CURVE - Jumping Before the Midpoint of Acceleration or Deceleration ....................................................................................................... 7-36 S-CURVE Jumps to a higher Acceleration while Accelerating or a lower Deceleration while Decelerating ..............................................................................................
Contents Control Sequence:................................................................................................. 9-5 Chapter 10 Introduction to Local Logic Programming ...................................................10-1 Introduction to Local Logic Programming................................................................... 10-1 When to Use Local Logic Versus PLC Logic ..............................................................
Contents Trigger Output Based Upon Position Program Example............................................ 11-10 Windowing Strobes Program Example...................................................................... 11-12 Windowing Strobes Local Logic Program .................................................. 11-12 Chapter 12 Local Logic Language Syntax........................................................................12-1 Introduction....................................................................
Contents Chapter 13 Local Logic Variables.....................................................................................13-1 Local Logic Variable Types ........................................................................................ 13-1 Local Logic System Variables..................................................................................... 13-2 First_Local_Logic_Sweep variable............................................................... 13-2 Overflow variable .....................
Contents Section 1: Introduction.............................................................................16-1 Electronic CAM Overview.......................................................................................... 16-1 Basic CAM Shapes/Definition .................................................................................... 16-4 Section 2: Cam Syntax .............................................................................16-5 CAM Types..........................................
Contents Module Status Code Word............................................................................. A-1 Axis Error Code Words ................................................................................. A-1 Error Code Format ................................................................................................ A-2 Response Methods................................................................................................. A-2 DSM Digital Servo Alarms (B0–BE) ...................
Contents Tuning Requirements ............................................................................................ D-4 Tuning the Velocity Loop..................................................................................... D-5 Method #1: .......................................................................................................... D-5 Method #2: .......................................................................................................... D-5 Equation 1 .................
Chapter Product Overview 1 The Motion Mate DSM314 is a high performance, easy-to-use, multi-axis motion control module that is highly integrated with the Series 90-30 PLC logic solving and communications functions. The DSM314 supports two primary control loop configurations: Standard Mode (Follower Control Loop Disabled) Follower Mode (Follower Control Loop Enabled) Servo Types Supported Digital – GE Fanuc α Series and β Series digital servo amplifiers and motors.
1 Non-volatile storage for 10 programs and 40 subroutines created with VersaPro software (Version 1.1 or later). Compatible with Series 90-30 CPUs equipped with firmware release 10.0 or later (will not work with CPUs 311 – 341 and 351). Please consult the Series 90-30 PLC Installation and Hardware Manual, GFK-0356P or later, for CPU details. Single point of connect for all programming and configuration tasks, including motion program creation (Motion Programs 1 – 10) and Local Logic programming.
Product Overview 1 Section 1: Motion System Overview The DSM314 is an intelligent, fully programmable, motion control option module for the Series 90-30 Programmable Logic Controller (PLC). The DSM314 allows a PLC user to combine high performance motion control and Local Logic capabilities with PLC logic solving functions in one integrated system. The figure below illustrates the hardware and software used to set up and operate a servo system.
1 The Series 90-30 PLC and the DSM314 The DSM314 and Series 90-30 PLC operate together as one integrated motion control package. The DSM314 communicates with the PLC through the backplane interface. Every PLC sweep, data such as Commanded Velocity and Actual Position within the DSM314 is transferred to the PLC in %I and %AI data. Also every PLC sweep, %Q and %AQ data is transferred from the PLC to the DSM314. The %Q and %AQ data is used to control the DSM314.
1 Product Overview Motion Program/CTL Faceplate Inputs • Delays associated with motion program control or branching via faceplate CTL inputs are equal to a position loop update time interval (0.5 to 2 ms) plus the input filter delay (5 ms typical for 24 volt CTL inputs or 10 µs for 5 volt CTL inputs). See tables 1-1, 1-2, and 1-3 for position loop update times.
1 DSM314 Position Strobes Each axis connector on the DSM314 faceplate has two Position Strobe inputs. A rising edge pulse on a Strobe input causes the axis Actual Position to be captured. The position capture resolution is +/- 2 counts with an additional 10 microseconds of variance for the strobe input filter delay. The actual error seen is dependent upon servo acceleration and strobe input filtering/sampling. Consult Appendix G for the exact formulas used to calculate strobe accuracy.
Product Overview 1 Software VersaPro The VersaPro (version 1.1 or later) software package is used for the following tasks: • Configuration. Allows user to select module settings and default operational parameters. • Motion program creation. Up to 10 motion programs and 40 subroutines are allowed. • Local Logic program creation. A Local Logic program runs synchronously with the motion program, but is independent of the PLC’s CPU scan.
1 Servo Drive and Machine Interfaces The servo drive and machine interface is made through a 36-pin connector for each axis. This interface carries the signals that control axis position such as the Pulse Width Modulated (PWM) signals to the amplifier, Digital Serial Encoder Feedback signals or Analog Servo Command and Quadrature Encoder Feedback. Also provided are Home Switch and Axis Overtravel inputs as well as general purpose PLC inputs and outputs.
Product Overview 1 Section 2: Overview of Product Operations Each DSM314 axis may be operated with the Follower Control Loop enabled or disabled: Standard Mode (Follower Control Loop Axis Configuration = Disabled) In Digital Standard mode, the module provides closed loop position, velocity, and torque control for up to two GE Fanuc α or β Series servomotors on Axis 1 and Axis 2. Axis 3 can be used as an Analog servo axis or an Aux master axis.
1 Standard Mode Operation Figure 1-2 is a simplified diagram of the Standard mode Position Loop. An internal motion Command Generator provides Commanded Position and Commanded Velocity to the Position Loop. The Position Loop subtracts Actual Position (Position Feedback) from Commanded Position to produce a Position Error. The Position Error value is multiplied by a Position Loop Gain constant to produce the Servo Velocity Command.
Product Overview 1 Follower Mode Operation Figure 1-3 is a simplified diagram of the Follower mode Position Loop. It is similar to the Standard mode Position Loop (see previous page) with the addition of a Master Axis input. The Master Axis input is an additional command source producing a Master Axis Position and Master Axis Velocity. Master Axis Position is summed with Commanded Position from the axis Command Generator.
1 Section 3: α Series Servos (Digital Mode) The GE Fanuc Digital α (pronounced “Alpha”) Series Servo features include: World-leading reliability Low maintenance, no component drift, no commutator brushes All parameters digitally set, no re-tuning required Absolute encoder eliminates re-homing (requires optional battery kit) An optional motor brake is available Optional IP67 environmental rating is also available for most motors High resolution 64K count per revolution encoder fe
1 Product Overview Cables to connect the SVU Amps to the DSM314 and to the motors are available in various lengths. Refer to publication GFH-001, Servo Product Specification Guide for more information about the α Series servo products. α Series Servo Motors The α Series of servomotors incorporate design improvements to provide the best performance possible. Ratings up to 56 Nm are offered. These motors are up to 15% shorter and lighter than the previous S Series of servomotors.
1 Section 4: β Series Servos (Digital Mode) The GE Fanuc Digital β (pronounced “Beta”) Series Servo features include: World leading reliability Low maintenance, no component drift, no commutator brushes All parameters digitally set, no re-tuning required Absolute encoder eliminates re-homing (optional battery kit required) Optional motor brake High resolution 32K count per revolution encoder The GE Fanuc β Series Servos offer the highest reliability and performance.
1 Product Overview β Series Servo Motors The β Series Servomotors are built on the superior technology of the α Series servos. They incorporate several design innovations that provide the best possible combination of high performance, low cost, and compact size. Ratings of 0.5 to 12 Nm are offered. These motors are up to 15% shorter and lighter than comparable servos. New insulation on the windings and an overall sealant coating help protect the motor from the environment.
1 Section 5: SL Series Servos (Analog Mode) The DSM314 supports all models of the GE Fanuc SL Series Servos. For details on the SL Series Servo amplifiers, motors, and accessories, please see the SL Series Servo User’s Manual, GFK1581.
Chapter Getting Started 2 Objectives of this chapter: To help you become familiar with the components and cables used in a DSM servo system as well as show you how they connect together. To show you how to verify your motion system connections and functionality. To identify supporting documentation providing detailed information on this subject. This chapter serves as an introduction for those not familiar with the Motion Mate DSM314 motion system.
2 SNP (RS-232) RS-232 to RS-485 Converter a45636A SNP (RS-232) Series 90-30 PLC D S M PWM, Serial Encoder, & Diagnostic Signals Power Digital Servo Amplifier to Motor Motor Encoder Feedback Encoder Battery Pack (Optional) Encoder PWM, Serial Encoder, & Diagnostic Signals Programmer Power to Motor Motor Digital Servo Amplifier Encoder Feedback Encoder Encoder Battery Pack (Optional) Axis 1 Axis 2 Figure 2-1.
Getting Started 2 Section 1: Unpacking the System The DSM314, Digital Servo Amplifiers, and Motors are packed separately. This section describes how to unpack the hardware and perform a preliminary check on the components. Unpacking the DSM314 Carefully unpack the DSM314 and PLC system components. Verify that you have received all the items listed on the bill of material. Keep all documentation and shipping papers that accompanied the DSM314 motion system.
2 Section 2: Assembling the Motion Mate DSM314 System Before discussing specific assembly details, let’s first review these general guidelines: Always make sure that the connectors lock into the sockets. The connectors are designed to fit only one way. Do not force them. Do not overlook the importance of properly grounding the DSM314 system components, including the DSM314 faceplate shield ground wire. Grounding information is included in this section.
2 Getting Started Connecting the α Series SVU Digital Servo Amplifier Skip to the next section if you are connecting a β Series amplifier. The α Series Digital Servo Amplifier does not require tuning adjustment during initial startup or when a component is replaced. It also does not need adjustment when environmental conditions change. To connect the α Series Digital Servo Amplifier, follow the steps outlined below. 1. Connect the α Series Servo Amplifier to the DSM314. A.
2 SVU Amplifier Channel Switches ON OFF Confirm that the Channel Switches (DIP switches), located behind the SVU amplifier door, are set as shown in the following tables. Note that the OFF position is to the left, and the ON position is to the right. Note also, that the switches are numbered from bottom to top (Switch 1 is the bottom switch). For example, in Figure 2-3, Switches 1, 3, and 4 are shown ON, and switch 2 is shown OFF 4 3 2 1 ON Figure 2-3. SVU Amplifier Channel Switches Table 2-1.
Getting Started STAT IC693ACC335 Axis Terminal Board COMM OK CFG EN3 EN4 C 2 FANUC EN1 EN2 A IC800CBL001/002 Servo Command Cable (K1) IC693CBL324/325 Terminal Board Connection Cable α SERIES Hinged Cover STATUS Motor Power Cable Connects to Terminals Behind Hinged Cover - : NOT READY O : READY # : ALARM Servo Amplifier Front View B D IC800CBL061/062 Motor Power Cable (K4) JV1B CX3 CX4 Motor IC800CBL021 Motor Encoder Cable (K2) JA4 Motion Mate DSM314 Servo Amplifier Bottom View With T
2 2. Connect the Motor Power Cable to the α Series Digital Servo Amplifier. A. The motor size ordered for your system determines the K4 motor power cable you will use if you ordered prefabricated cables with your system. The motors in the following table are grouped to use one of the prefabricated cables available through GE Fanuc. This is not a complete listing of all α Series servomotor power cables, however the ones most commonly specified are included.
Getting Started 2 a48015 13 14 15 16 17 18 19 FANUC AC Servo Amplifier α Series Status JS1B JF1 1 2 3 4 5 6 7 8 9 10 11 12 Terminal Of Servo Amp A = Phase U B = Phase V C = Phase W D = Ground Encoder Motor Power Figure 2-5.
2 3. Connect the Motor Encoder to the α Series Digital Servo Amplifier. A. Remove the protective plastic cap from the encoder connector on the motor, and locate the K2 feedback cable IC800CBL021. The cable is configured so that it can only be attached to one connection on the motor. B. Plug the opposite end into the connection labeled JF1 on the bottom of the α Series servo amplifier (see Figure 2-6). (Repeat this procedure for all axes in the system.
Getting Started 2 4. Connect 220-Volt AC 3 Phase Power to the α Series Digital Amplifier An AC line filter will reduce the effect of harmonic noise to the power supply; its use is recommended. Two or more amplifiers may be connected to one AC line filter if its power capacity has not been exceeded. Figure 2-6 shows how to connect the amplifier to the line filter.
2 Caution Do not apply any external voltage to this connector. Front Face a48026 JV1B JS1B 3 2 JF1 JA4 CX3 CX4 ESP Normally Closed Machine E-STOP Device(s) +24V (Bottom View) ESP 3 2 3 2 CX4 Of First α Series (SVU) Amplifier CX4 Of Second α Series (SVU) Amplifier Up to 6 α Series SVU AMPs can be connected in series Figure 2-8. Connecting Emergency Stop to the α Series Servo Amplifier For more information, refer to the α Series Servo Amplifier (SVU) Descriptions Manual, GFZ65192EN.
2 Getting Started Connecting the β Series SVU Digital Servo Amplifier The β Series Digital Servo Amplifier does not contain any user adjustments. To connect the β Series Servo Amplifier, follow the steps outlined below. Refer to the previous section for α Series Amplifiers. 1. Connect the β Series Digital Servo Amplifier to the DSM314 A. Before connecting the servo command cable, make sure the DSM314 faceplate shield ground wire is connected.
2 COMM STAT IC693ACC335 Axis Terminal Board OK CFG EN3 EN4 C EN1 + + EN2 A DSM SERVO With Terminal Board IC693CBL324/325 Terminal Board Connection Cable Servo Amplifier CX11-3 V U W B D IC800CBL001/002 Servo Command Cable (K1) CX11 3 JS1B JF1 Motor β Series Amplifier (Front Face View) + Encoder Motor Power + Motion Mate DSM314 COMM STAT OK CFG EN3 EN4 C EN1 + + EN2 A Without Terminal Board Servo Amplifier CX11-3 V B D IC800CBL001/002 Servo Command Cable (K1) U W CX11 3 J
2 Getting Started 2. Connect the Motor Power Cable (K4) to the β Series Digital Servo Amplifier Note: Make connections to the CX-11 connector carefully. This connector is not keyed. Double-check your connections before applying power. Incorrect connections could result in equipment malfunction or damage. A. The size of the motor ordered for your system determines the motor power cable (K4) you must use. You can choose to purchase prefabricated cables or to build custom cables.
2 B. Attach the other end of the motor power cable to the motor, after first removing the plastic cap protecting the motor’s connector. Note that this cable is keyed and can only be properly attached to one of the motor’s connection points. C. Motor power cables purchased from GE Fanuc will include a 1-meter, single conductor wire with a CX11-3 connector on one end and a ring terminal on the other. This cable provides grounding connections for the frame of the motor and should always be connected.
Getting Started 2 a48025 CX11-1 R L1 S L2 T L3 1 R 2 3 4 5 6 To Power Source S T Line Filter β Series Amplifier Connection Strip Ground Lug Figure 2-11. Connecting the β Series Servo Amplifier to the Line Filter and Power Source Note You must supply the cable for the connection between the line filter and the power source. Use 4-conductor, 600V, 60°C (140°F), UL or CSA approved cable between the line filter and the servo amplifier.
2 Note You must supply the cable for this connection package. The JX5 connector and connector cover is included with the amplifier as part number A02B0120-K301. If no E-STOP circuit is required, this connection must be made with a wire jumper or the amplifier will not enable. Connector JX5 Pin 20 supplies +24V DC for the E-STOP circuit. Wire Pin 20 through a normally closed contact or switch so there is +24V DC to JX5 Pin 17 when not in E-STOP. GE Fanuc uses two brands of connectors for the JX5 connector.
Getting Started 2 7. Connect Cable K8 – Jumper or External Regeneration Resistor to the β Series Digital Servo Amplifier Without External Regeneration Resistor (Using a Jumper) If you do not have an external regeneration resistor, you must leave the connections on CX11-2 (DCP and DCC) open. However, you must jumper the CX11-6 (TH1 and TH2) terminals, shown in the figure below.
2 CX11-2 (DCC) CX11-6 (TH1) CX11-6 (TH2) CX11-2 (DCP) K7 External Regeneration Resistor K8 K7 Figure 2-15. Connecting the External Regeneration Resistor 65 (2.56) 57 (2.24) 150 (5.91) To CX11-2 DCP DCC To CX11-6 A06B-6093-H401 (20 Watt unit) 52 60 (2.05)(2.36) 2- ∅ 4.5 (0.177) TH1 TH2 100 (3.94) 7 10 Max (.276) (.
Getting Started 2 Installing and Wiring the DSM314 for Analog Mode Important Analog Servo Considerations: GFK-1742A 1. The Analog Servo Velocity Command output is a single-ended signal on pin 6 of the Auxiliary Terminal Board. This signal is referenced to 0v of the DSM module and PLC. This signal should be connected to the velocity command input of the servo amplifier. 2.
2 Grounding the Motion Mate DSM314 Motion System The DSM314 System must be properly grounded. Many problems occur simply because this practice is not followed. To properly ground your Motion Mate DSM314 system, you should follow these guidelines: The grounding resistance of the system ground should be 100 ohms or less (class 3 grounding).
Getting Started 2 Table 2-6. Grounding Systems Grounding System Description Frame Ground System The frame ground system is used for safety and to suppress external and internal noises. In a frame ground system, the frames, cases of the units, panels, and shields for the interface cables between the units are connected. System Ground System The system ground system is used to connect the frame ground systems connected between devices or units with the ground.
2 Section 3: Turning on the Motion Mate DSM314 Before turning on the power, you should: Confirm that the supplied cables are properly attached to the appropriate connectors. Confirm that all wiring to the power sources is correct. Make sure that the motors are properly secured. Check that all components are properly grounded, including the DSM314 faceplate shield.
2 Getting Started Section 4: Configuring the Motion Mate DSM314 The DSM314 Controller is configured using the VersaPro configuration software version 1.1 or later. The DSM314 has an extensive set of features that enable it to adapt to many different applications. You can easily make adjustments to your motion system. Parameter registers in the DSM314 memory allow you to use variables in DSM314 motion programs.
2 The VersaPro user environment is a self-contained environment that allows the user to perform all the actions necessary to configure, create, edit, and download programs to the PLC and DSM. To begin, evoke the VersaPro environment. Once in VersaPro, create a new VersaPro Folder. To create a VersaPro folder select the File menu followed by New Folder. This will cause the New Folder Wizard to execute. The user is prompted to enter a Folder Name, a location, and a Folder Description.
Getting Started 2 Figure 2-19. New Folder Wizard Page 2 Click the Finish button to create the new folder. The resulting VersaPro display will be as shown in Figure 2-20. Figure 2-20. New Folder VersaPro Main Screen The next step is to start the hardware configuration tool. There are several ways to do this. (Consult VersaPro documentation for additional details.
2 Either method will start the Hardware configuration tool. The default hardware configuration screens are for the VersaMax product. As such, the first operation we need to perform is to select the Series 90-30. To perform this action select File from the main menu (menu bar), Convert To from the File menu, and Series 90-30 from the Convert To menu. This will change the VersaMax default to a Series 90-30. The menu selections are as shown in Figure 2-21. Figure 2-21.
Getting Started 2 Figure 2-23. Hardware Configuration 90-30 rack with CPU The user then needs to select the power supply and CPU that is appropriate for their installation. Note that the DSM314 requires that the CPU firmware be release 10 or higher. The default CPU, “CPU351,” does not support release 10.0 firmware. Therefore, we are going to change the CPU to the “CPU364” model, which does support CPU release 10 firmware.
2 Figure 2-24. Hardware Configuration 90-30 rack with CPU364 At this point, we need to add the DSM314 into the rack. To perform this step, select the rack slot where the DSM314 is to be installed. In our example, we are going to install the DSM314 in slot number 2. As such, we want to add the DSM314 module to this slot location. There are several ways to add modules to a rack slot. Consult the VersaPro documentation for additional details and procedure. Two methods to add the module are as follows.
2 Getting Started Module Configuration Data (Getting Started Tutorial only) If you followed the process above, the DSM314 configuration screens will be open. If you are starting at this point double click the DSM314 module you wish to edit. This operation will also bring up the configuration screens. For now, select or enter the values from the following tables for the type of servo system, digital or analog, that you will be using.
2 Table 2-8.
2 Getting Started Table 2-8, Continued Follower Enable Trigger Follower Enable Input Trigger None None None Follower Disable Trigger Follower Disable Action Ramp Makeup Acceleration Ramp Makeup Mode Follower Enable Input Trigger Follower Disable Action None None None Stop Stop Stop Follower Ramp Makeup Acceleration Follower Ramp Makeup Mode Follower Ramp Acceleration Makeup Time 10,000 10,000 10,000 Makeup Time Makeup Time Makeup Time 0 0 0 +1000 +1000 +1000 For Digital Mode For
2 Motor Type (Digital Mode) Selects the type of FANUC AC servomotor to be used with the DSM314. The DSM314 internally stores default setup motor parameter tables for each of the GE Fanuc servos supported. A particular motor for the indicated axis is selected via the configuration fields Motor1 Type (for axis 1) or Motor2 Type (for axis 2). Supported motor types are listed in the table below. FANUC Motor Model: Motor model information is in the form series, continuous torque in Newton meters / maximum rpm.
Getting Started 2 Table 2-10, Continued Motor Type Code GFK-1742A Motor Model Motor Specification 7 αC 3/2000 0121 8 αC 6/2000 0126 9 αC 12/2000 0141 10 αC 22/1500 0145 3 α 12HV/3000 0176 4 α 22HV/3000 0177 5 α 30HV/3000 0178 24 αM 3/3000 0161 25 αM 6/3000 0162 26 αM 9/3000 0163 13 β 0.
2 Store the Configuration to the PLC You should complete the configuration of your Series 90-30 system to include the Power Supply, Rack, CPU and additional modules to match the target system. Consult the VersaPro Programming Software User’s Guide, GFK-1670, and VersaPro on-line help as needed. IMPORTANT The completed configuration must be stored to the PLC. See “Connecting to and Storing Your Configuration to the PLC” in Chapter 15 for instructions on how to do this.
2 Getting Started Section 5: Testing Your System Generating Motion CAUTION For correct machine operation, the recommended start-up procedure must be performed. This includes validating operation of the Overtravel Limits and Home Switch, checking for correct motor rotation direction, and tuning the velocity and position loops. This must be done by experienced personnel. For detailed start-up instructions, refer to Appendix D, Start-Up and Tuning a GE Fanuc Digital or Analog Servo System.
2 blinking, toggle (on then off) the Clear Error %Q bit (%Q1 for this configuration) in the PLC data table. Conditions that continue to cause an error must be corrected in order to clear the status indicator. Refer to Appendix A, “Error Codes”, for DSM Error Status information. Jogging With the Motion Mate DSM314 The Jog Velocity, Jog Acceleration, and Jog Acceleration Mode are configurable in the DSM314 module. These values are used whenever a Jog Plus or Jog Minus %Q bit is turned ON.
2 Getting Started Getting Help If you still cannot solve the problem, you may contact the GE Fanuc number for your area, listed in the table below: Telephone Numbers GE Fanuc Telephone Numbers Location Number North America, Canada, Mexico (Technical Support Hotline) Toll Free: 1-800 GE Fanuc Latin America (for Mexico, see above) Direct Dial: (804) 978-6036 France, Germany, Luxembourg, Switzerland, and United Kingdom Toll Free: 00800 433 268 23 Italy Toll Free: 16 77 80 596 Direct Dial: (804)
2 Section 7: Next Steps to Take After successfully moving an axis, what’s next? This startup chapter does not cover all aspects of the DSM314 motion system. For this reason, you should review the information provided in all the manuals (see Related Publications in the Preface of this manual). Additionally, GE Fanuc offers applicable training courses. If your application requires a custom machine interface, you should also attend a GE Fanuc programming course.
Chapter Installing and Wiring the DSM314 3 Section 1: Hardware Description This section identifies the module’s major hardware features. The module’s faceplate provides seven status LEDs, one communications port RJ-11 connector and four user I/O connectors (36 pin). A grounding tab on the bottom of the module provides a convenient way to connect the module’s faceplate shield to a panel ground. Status LED’s Stat OK CFG EN1 - EN4 COMM 6-pin RJ-11 connector.
3 LED Indicators There are seven LED status indicators on the DSM314 module, described below: STAT Normally ON. FLASHES to provide an indication of operational errors. Flashes slow (four times/second) for Status-Only errors. Flashes fast (eight times/second) for errors which cause the servo to stop. ON: When the LED is steady ON, the DSM314 is functioning properly. Normally, this LED should always be ON. OFF: When the LED is OFF, the DSM314 is not functioning.
Installation and Wiring 3 The DSM COMM (Serial Communications) Connector The module’s front panel contains a single RJ-11 connector for serial communications, labeled “COMM”. It is used to download firmware updates to the DSM module from a personal computer running the GE Fanuc PC Loader or Win Loader utility software. (See Appendix F for details.) This serial COMM port connects to the personal computer’s serial port and uses the GE Fanuc SNP protocol and the RS-232 serial communications standard.
3 All 4 connectors provide similar analog and digital I/O circuits. Only Axis 1 and Axis 2 can be configured to control digital servos. If digital servos are used, both Axis 1 and Axis 2 must be configured for Digital Servo mode. When Axis 1 and Axis 2 are configured for digital servos, Axis 3 can be used for Analog Servo or Aux Axis control. Axis 4 is not available for Analog Servo or Aux Axis control when Axis 1 and 2 are configured for digital servos.
3 Installation and Wiring Section 2: Installing the DSM314 Module The Motion Mate DSM314 can operate in any Series 90-30 CPU, expansion, or remote baseplate (Series 90-30 release 6.50 or later). The configuration files created by VersaPro Configuration software must match the physical configuration of the modules. Note: For general Series 90-30 installation and environment considerations, refer to the Series 90-30 PLC Installation and Hardware Manual, GFK-0356.
3 Table 3-3. Maximum Number of DSM Modules per System by Baseplate and Power Supply Types Power Supply Voltage: Power Supply Current Draw by DSM: 5 VDC from PLC backplane 800 mA plus encoder supply current (see next item).
Installation and Wiring 3 Notes Refer to GFK-0867B, (GE Fanuc Product Agency Approvals, Standards, General Specifications), or later version for product standards and general specifications. Installation instructions in this manual are provided for installations that do not require special procedures for noisy or hazardous environments. For installations that must conform to more stringent requirements (such as CE Mark), see GFK-1179, Installation Requirements for Conformance to Standards.
3 Section 3: I/O Wiring and Connections I/O Circuit Types Each of the module’s four connectors (Connector A, B, C, and D) provide the following types of I/O circuits: • Three differential / single ended 5v inputs (IN1-IN3) • 5 VDC Encoder Power (P5V) • One single ended 5v input (IN4) • Four single ended 5v input / output circuits (IO5-IO8) • Three 24v inputs (IN9-IN11) • One 24v, 125 ma solid state relay output (OUT1) • Two differential 5v line driver outputs (OUT2-OUT3) • One 24v, 30 ma sol
3 Installation and Wiring 1. For Analog servos, it connects to DSM Connector A, B, C or D to provide screw terminals for wiring to a third party Analog servo amplifier and I/O devices. See Figures 3-19 through 3-23. 2. For Auxiliary axes, it connects to DSM Connector B, C, or D to provide screw terminals for wiring to external devices such as Strobe sensors, Home switches, and Overtravel Limit switches. Note: See Figure 3-23.
3 Digital Servo Axis Terminal Board - IC693ACC335 Description The IC693ACC335 Digital Servo Axis Terminal Board is used to connect the DSM314 to GE Fanuc Digital Servo Amplifiers. The board contains two 36 pin connectors, labeled DSM and SERVO. A cable IC693CBL324 (1 meter) or IC693CBL325 (3 meters) connects from DSM connector (PL2) to the DSM314 faceplate connector A or B.
3 Installation and Wiring Eighteen screw terminals are provided on the Digital Servo Axis Terminal Board for connections to user devices. These terminals have the following assignments: Table 3-4.
3 Mounting Dimensions 3.03" (77mm) 8 16 7 15 6 14 5 2.68" (68mm) 13 4 12 3 Height Above Panel 2.05" (52mm) 11 2 10 1 9 S S DIN-Rail Mount 3.03" (77mm) 0.76" (19.4mm) 8 16 7 15 6 14 5 2.68" (68mm) 3.18" (80.7mm) 13 4 12 3 Height Above Panel 1.54" (39mm) 11 2 10 1 9 3.62" (92mm) S S 0.368" (9.3mm) Counterbore Dia. 0.176" (4.5 mm) Thru. Dia. Panel Mount Figure 3-4.
3 Installation and Wiring Converting From DIN-Rail Mounting to Panel Mounting The following parts are used in either the DIN-rail or Panel mount assembly options. The axis terminal board is shipped configured for DIN-rail mounting. The instructions in this section guide you in converting the board to its panel mounting optional configuration.
3 Figure 3-6. Digital Servo Axis Terminal Board Assembly Side View The following procedure should be used to convert the Digital Servo axis terminal board to its panel mounting form. Remember to save all removed parts for possible later conversion back to DIN-rail mounting. 3-14 1. Carefully remove one UMK-SE 11.25-1 side element from the UMK-BE 45 base element. If a screwdriver or other device is used, exercise extreme caution to avoid damaging either the plastic parts or the circuit board. 2.
3 Installation and Wiring Auxiliary Terminal Board - IC693ACC336 Description and Mounting Dimensions The IC693ACC336 Auxiliary Terminal Board is used to connect the DSM314 to Analog Servo Axes and auxiliary devices such as Incremental Quadrature Encoders, Strobe detectors and external switches. The board contains one 36 pin connector, labeled DSM. A cable IC693CBL324 (1 meter) or IC693CBL325 (3 meters) connects from the DSM connector (PL2) to the DSM314 faceplate.
3 Converting From DIN-Rail Mounting to Panel Mounting The following parts are used in either the DIN-rail or Panel mount assembly options. The auxiliary terminal board is shipped configured for DIN-rail mounting. The instructions in this section guide you in converting the board to its panel mounting optional configuration.
Installation and Wiring 3 Figure 3-9. Auxiliary Terminal Board Assembly Side View The following procedure should be used if you wish to mount the auxiliary terminal board directly to a panel instead of on a DIN-rail. Remember to save all removed parts for possible later conversion back to DIN-rail mounting. GFK-1742A 1. Using a small bladed Phillips screwdriver, carefully remove the two screws holding one UM45 SEFE side element with foot to the UM 45 Profil PCB carrier.
3 Cables Five cables are available for the DSM314: Table 3-7.
Installation and Wiring 3 The figure below illustrates the Digital Servo Axis terminal board and cables associated with the DSM314.
3 The figure below illustrates the Analog Servo terminal boards and cables associated with the DSM314.
3 Installation and Wiring I/O Cable Grounding Properly routing signal cables, amplifier power cables and motor power cables along with installation of proper Class 3 grounding will insure reliable operation. Typically Class 3 grounding specifies a ground conductor of a minimum wire diameter larger than the power input wire diameter, connected via a maximum 100 ohm resistance to an earth ground. Consult local electrical codes and install in conformance to local regulations.
3 strain relief and as cable shield ground. The outer insulation of the Digital servo amplifier cable must be removed to expose the cable shield in the contact area of the clamp. able Grounding Bar 40 (1.57) to 80 (3.15) Cable Grounding Clamp Figure 3-12. Detail of Cable Grounding Clamp A99L-0035-0001 Figure 3-13. .
3 Installation and Wiring 9.84 8.51 1.38 1.11 0.58 Figure 3-14. 44B295864-001 Grounding Bar Dimensions, Rear View Showing Mounting Holes 3. For installations which must meet IEC electrical noise immunity standards, a Cable Shield Grounding Clamp A99L-0035-0001 and one of the 11 available slots on the Grounding Bar 44B295864-001 must also be used at the Digital Servo Axis Terminal Block end of the servo amplifier cable IC800CBL001/002.
3 I/O Circuit Identifiers and Signal Names I/O circuit identifiers provide a consistent method of naming the I/O circuits. For example, IN1 refers to the first of three differential / single ended 5v inputs for each axis. Signal names are assigned to the circuit identifiers for each axis. The signal name consists of the circuit identifier followed by a suffix A-D to identify the axis connector.
Installation and Wiring 3 Digital Servo Axis 1, 2 Circuit and Pin Assignments This table identifies all circuits and pin assignments for Digital Servo Axis 1 and Digital Servo Axis 2. The shaded areas indicate signals which are cabled to the servo amplifier and are not available for user connections. Table 3-11.
3 Analog Servo Axis 1-4 Circuit and Pin Assignments This table identifies all circuits and pin assignments for Analog Servo Axis 1 - Analog Servo Axis 4. The shaded areas indicate signals which are unused and not available for user connections. Table 3-12.
Installation and Wiring 3 Aux Axis 2-4 Circuit and Pin Assignments This table identifies all circuits and pin assignments for Aux Axis 2 - Aux Axis 4. The shaded areas indicate signals, that are unused and not available for user connections. Table 3-13.
3 I/O Connection Diagrams The following diagrams illustrate typical user connections to the DSM314.
Installation and Wiring DS M P in # Ax is TB Term in al 1 1 T e rm in als on IC 6 93 A C C 33 5 A x is T e rm ina l B o ard IN 1 P _B (S T R O B E 1+ ) 5V D IF F E R E N T IA L D R IV E R IN 1 M _ B (S T R O B E 1 -) 19 9 2 2 IN 2 P _B (S T R O B E 2+ ) 5V S IN G LE E N D E D D R IV E R IN 2 M _ B (S T R O B E 2 -) 20 10 4 3 22 11 S 3 0V P 5 V _B (5 V ) 0 V _B (0 V ) % I B IT (DE F AUL T C FG ) C T L0 5 C T L0 6 C T L0 7 C T L0 8 INP U T +O T : -O T : HO ME: S T R O B E 1: S H IE L D
3 DSM Pin # Axis TB Conn PL3 3 3 21 21 5 5 23 23 9 9 27 27 10 10 28 28 11 11 29 29 12 12 30 30 13 13 31 31 15 15 33 33 7 7 25 25 8 8 26 26 Shield Shield Servo Amp Conn Pins on IC693ACC335 Axis Terminal Board PL3 Connector IN3P_A ENCD+ IN3M_A ENCD- IN4_A *SRDY 0V_A 0V IO5_A 0V_A IO6_A 0V_A IO7_A 0V_A IO8_A 0V_A *PWMA 0V *PWMC 0V *PWME 0V *ENBL 0V OUT2P_A ENCR+ OUT2M_A ENCR- ENBL1_A *MCON ENBL2_A 0V AIN1P_A IR+ AIN1M_A IR- AIN2P_A IS+ AIN2M
Installation and Wiring DSM Pin # Aux TB Termin al IC 6 9 3A C C 33 6 A u x . T e rm .
3 Faceplate Pin # Aux TB Termin al IC 6 9 3 A C C 33 6 A u x. T e rm .
3 Installation and Wiring Faceplate Pin # Aux TB Termin al IC 6 9 3 A C C 33 6 A u x. T e rm .
3 Faceplate Pin # Aux TB Terminal IC693ACC336 Aux. Term.
Installation and Wiring DSM Pin # Aux TB Terminal 9 9 27 27 10 10 28 28 5 5 23 23 S 3 Terminals on IC693ACC336 Aux.
3 I/O Specifications The specifications and simplified schematics for the module’s I/O circuits are provided on the following pages.
3 Installation and Wiring Differential / Single Ended 5v Inputs Circuit Identifier Digital Servo Axis 1, 2 Circuit Function Analog Servo Axis 1-4 Signal Name and Aux Axis 2-4 (X = A, B, C, or Circuit Function D Connector) Faceplate Pin Auxiliary Terminal Board Servo Terminal Board IN1 Strobe Input 1 (+) Strobe Input 1 (-) Encoder Chan. A (+) Encoder Chan. A (-) IN1P_X IN1M_X 1 19 1 19 1 9 IN2 Strobe Input 2 (+) Strobe Input 2 (-) Encoder Chan. B (+) Encoder Chan.
3 Single Ended 5v Sink Input Circuit Servo Axis 1-4 Circuit Identifier Function IN4 Servo Ready Input Aux Axis 2-4 Circuit Function Signal Name Faceplate Pin (X = A, B, C, or D Connector) Faceplate 5v Input IN4_X 5 Auxiliary Terminal Board Servo Terminal Board 5 N/C I/O Type: Single Ended 5v Sink Input Circuit Type: Sink Input (4.7K ohm pull-up to internal +5v) Input Impedance: 4.7K ohms to +5v Maximum Input Voltage: +/- 10.0 v Logic 0 Threshold: +0.8 v max Logic 1 Threshold : +2.
Installation and Wiring 3 Optically Isolated 24v Source / Sink Inputs Circuit Servo Axis 1-4 Circuit Identifier Function Aux Axis 2-4 Circuit Function Signal Name Faceplate Auxiliary Pin Terminal (X = A, B, C, or Board D Connector) Servo Terminal Board IN9 Overtravel (+) Faceplate 24v Input IN9_X 16 16 6 IN10 Overtravel (-) Faceplate 24v Input IN10_X 34 34 14 IN11 INCOM Home Switch 24v Input Common Home Switch 24v Input Common IN11_X INCOM_X 17 35 17 35 7 15 I/O Type: Optically I
3 Single Ended 5v Inputs/Outputs Circuit Identifier Digital Servo Axis 1, 2 Circuit Function Analog Servo Axis 1-4 Signal Name and Aux Axis 2-4 (X = A, B, C, or Circuit Function D Connector) Faceplate Pin Auxiliary Terminal Board Servo Terminal Board IO5 0V Servo PWM / Alarm 0v Strobe 1 Input 0v IO5_X / IN5_X 0V_X 9 27 9 27 N/C N/C IO6 0V IO7 0V Servo PWM / Alarm 0v Servo PWM / Alarm 0v Strobe 2 Input 0v Not Used 0v IO6_X / IN6_X 0V_X IO7_X / IN7_X 0V_X 10 28 11 29 10 28 11 29 N/C N/C N/
3 Installation and Wiring 5v Differential Outputs Circuit Identifier OUT2 OUT3 Digital Servo Axis 1, 2 Circuit Function Serial Encoder Req (+) Serial Encoder Req (-) Faceplate 5v Output (+) Faceplate 5v Output (-) Analog Servo Axis 1-4 and Aux Axis 2-4 Circuit Function Signal Name (X = A, B, C, or D Connector) Faceplate Pin Auxiliary Terminal Board Servo Terminal Board Not Used Not Used Faceplate 5v Output (+) Faceplate 5v Output (-) OUT2P_X OUT2M_X OUT3P_X OUT3M_X 13 31 14 32 13 31 14 32 N/C N
3 24v DC Optically Isolated Output Circuit Identifier OUT1 Servo Axis 1-4 Circuit Function Aux 2-4 Axis Circuit Function Faceplate 24v Output (+) Faceplate 24v Output (+) Faceplate 24v Output (-) Faceplate 24v Output (-) Signal Name (X = A, B, C, or D Connector) Faceplate Pin Auxiliary Terminal Board Servo Terminal Board OUT1P_X OUT1M_X 18 36 18 36 8 16 I/O Type: 24v DC Optically Isolated Output Circuit Type: Isolated Solid State Relay (SSR) Output Current: 125 ma continuous, 500 ma for 10
3 Installation and Wiring Optically Isolated Enable Relay Output Circuit Identifier ENBL Digital Servo Axis 1, Analog Servo Axis Aux Axis 2-4 2 Circuit Function 1-4 Circuit Circuit Function Function Servo MCON (+) Servo MCON 0v Drive Enable (+) Drive Enable (-) Drive Enable (+) Drive Enable (-) Signal Name (X = A, B, C, or D Connector) Faceplate Pin Auxiliary Terminal Board Servo Terminal Board ENBL1_X ENBL2_X 15 33 15 33 N/C N/C I/O Type: Optically Isolated Enable Relay Output Circuit Type:
3 Differential +/- 10v Analog Inputs Circuit Identifier Digital Servo Axis 1, 2 Circuit Function Analog Servo Axis 1-4 and Aux Axis 2-4 Circuit Function Signal Name Faceplate Auxiliary Servo Pin Terminal Terminal (X = A, B, C, or Board Board D Connector) AIN1 IR Phase Current (+) Faceplate Analog In (+) IR Phase Current (-) Faceplate Analog In (-) AIN1P_X AIN1M_X 7 25 7 25 N/C N/C AIN2 IS Phase Current (+) Faceplate Analog In (+) IS Phase Current (-) Faceplate Analog In (-) AIN2P_X AIN2M_X 8 2
Installation and Wiring 3 Single Ended +/- 10v Analog Output Circuit Analog Servo Axis 1-4 Digital Servo Axis 1,2 Signal Name Faceplate Identifier Pin Circuit Function and Aux Axis 2-4 (X = A, B, C, or D Circuit Function Connector) Auxiliary Terminal Board Servo Terminal Board AOUT1 Analog Servo Velocity Faceplate Analog Out Command AOUT_X 6 6 4 ACOM ACOM_X 24 24 12 Analog Out Com Analog Out Com I/O Type: Single Ended Analog Output Circuit Type: Op Amp Voltage Follower Output Load Imped
3 +5v Power Signal Name Faceplate Pin (X = A, B, C, or D Connector) Auxiliary Terminal Board Servo Terminal Board Circuit Identifier Servo Axis Circuit Function Aux Axis Circuit Function P5V 5v Power 5v Power P5V_X 4 4 3 0V 0v 0v 0V_X 22 22 11 I/O Type: +5V Encoder Power Circuit Type: +5V Power with Electronic Short Circuit Protection Output Voltage: 4.70 v to 5.20 v at 0.5 amp Output Current: 0.
Chapter Configuration 4 This chapter describes all configuration details necessary to set up the DSM314 for a specific application. Refer to Chapter 2 for start-up instructions on how to configure the system to send a Jog command to the DSM in order to test that the system components are operable. Refer to Chapter 16 for Electronic CAM configuration information. The DSM314 module is configured using the VersaPro software.
4 Module Configuration Setting the Configuration Parameters As with I/O Rack Configuration, module configuration is done by completing screens in the VersaPro hardware configuration software. The hardware configuration data is presented to the user in a tabular format. The tabs correspond to the groupings shown below. The tab and/or tabs that correspond to the groups are shown in parenthesis after the group name.
Configuration 4 Settings The Settings tab contains configuration information that allows the user to define basic module operation. These settings are for the number of controlled axes, axis operating modes etc. The selections on these tabs will cause other tabs within the configuration to appear or disappear. For example if the user disables axis #4, then the Axis and Tuning tabs relating to axis #4 will not be displayed.
4 Table 4-1. Settings Tab, Continued Configuration Description Parameter Axis 3 Mode Axis 3 Control Mode Axis 4 Mode Axis 4 Control Mode Local Logic Mode The Local Logic Engine mode Total Encoder Power Motion Program Block Name Local Logic Block Name CAM Block Name Encoder power requirements 1.
4 Configuration 24. 25. 26. 27. 28. 30. 31. 32. 33. 34. 35.
4 1.05 Total Encoder Power. This parameter defines the total power consumption for all encoders attached to the DSM module. (VersaPro Default = 0). This parameter should account for all analog axis and master encoders and is used to update the Power Consumption chart in VersaPro. 1.06 Motion Program Block Name. This parameter defines the optional Motion Program block name to execute on the DSM module. If no name is entered, the DSM will assume that Motion Program blocks are not used.
4 Configuration Table 4-4. SNP Port Tab Configuration Parameter Baud Rate Stop Bits Parity Idle Time Modem Turnaround Time SNP ID 2.01 Description Baud rate of SNP Port Number of stop bits Parity Maximum link idle time Modem turnaround time SNP ID Values Defaults Units Ref. 300, 600, 1200, 2400, 4800, 9600, 19200 1 or 2 ODD, EVEN, NONE 1...255 19200 N/A 2.01 1 ODD 10 N/A N/A sec 2.02 2.03 2.04 0…255 0 .01 sec/count N/A 2.05 7 characters consisting of A-F and 0- A000001 9.
4 Control (CTL) Bits The CTL Bits configuration tab allows the user to configure the input source for Control Bits (CTL01-CTL24). The configuration screen allows the user to select a CTL bit configuration that corresponds with Motion Program and Local Logic program requirements. CTL Bits configuration parameters are described in Table 4-5. . For additional information concerning CTL bit configuration, consult chapter 14. Table 4-5.
Configuration 4 Each CTL bit shown in the previous table can be configured to one of the values in the following table Table 4-6.
4 Axis Configuration Data The DSM314 Axis configuration parameters define items such as User Units to Counts ratio, Jog Velocity, Jog Acceleration, End of Travel, and Velocity limits. The configuration parameters for each control loop mode are defined and briefly described here. The numbers in the “Ref” column refer to section reference numbers in this chapter.
Configuration Configuration Parameter Description Mode VersaPro Defaults Values Home Offset Home Offset Value Final Home Velocity Final Home Velocity Scurve Low Position Limit … High Position Limit -32,768...+32,767 1...MaxVelUu* Find Home Velocity Find Home Velocity 1...MaxVelUu* +2000 Home Mode Find Home Mode Home Switch Move + Move 0…FF Home Switch Home Position Home Position 4 Ref Units 0 user units 5.19 0 +500 user units 5.20 5.21 User Units sec User Units sec N/A 5.22 5.
4 Configuration Parameter Description VersaPro Defaults Values Ref Units Cmd Position 3 Actual Position 3 Cmd Position 4 Actual Position 4 Follower Enable Trigger Follower Enable Input Trigger None Follower Disable Trigger Follower Enable Input Trigger None Follower Disable Action Follower Disable Action Stop None N/A 5.30 None N/A 5.31 Stop N/A 5.
Configuration 4 configured to allow this. With this ratio, one user unit would represent .01 millimeters. 2540 user units would represent 25.40 millimeters (one inch) of travel. The example below illustrates how to meet the requirements that the User Units and Counts values be within the range of 1 to 65,535, and the User Units to Counts ratio be within the range of 8:1 to 1:32.
4 This ratio is too small, so something must be changed. Any of the following system components could be changed to solve the problem: • • • • Change the spur gear diameter to 15.92 inch or larger Change the encoder lines per revolution to 1800 or less Change the gear reduction to 18:1 or less Change the desired programming unit to 0.001 inch By far, the easiest component to change is the desired programming unit to 0.001 inch. 4.
Configuration 4 not open until after the %Q Enable Drive command is set to zero. An error code indicating which limit is tripped is reported to the %AI Axis Error Code. At this point, only one DSM314 action is allowed: the appropriate %Q Jog and %Q Clear Error bits may be used simultaneously to back away from the Limit Switch. The %Q Clear Error bit must be maintained ON to Jog off the limit switch. The user may also manually move the disabled axis off the limit switch.
4 value is more positive than the High Position Limit, the High Software EOT Limit will internally be set equal to the High Position Limit. Axis error code 17h will also be reported, indicating that the limit has been adjusted. The High Software EOT Limit is ignored for Jog commands if the Position Valid %I bit is off.
Configuration 4 will be reported and the servo command will internally be set to the limit value. Default: 1,000,000 5.10 Command Direction. Allows an axis to be configured for unidirectional or bi-directional operation. If unidirectional operation is selected (Positive Only or Negative Only), servo commands in the opposite direction will not be sent to the servo position loop. Default: Bidirectional 5.
4 5.14 Reversal Compensation. A compensation factor that allows the servo to reverse direction and still provide accurate positioning in systems exhibiting backlash. Backlash is exhibited by a servomotor that must move a small amount (lost motion) before the load begins moving when direction is reversed. For example, consider a dead bolt door lock. Imagine the servo controls the key in the lock and the feedback reports bolt movement. When the servo turns the key counterclockwise, the bolt moves left.
4 Configuration more slowly than the linear mode at the beginning and end of acceleration intervals. Motions using S-Curve acceleration require twice the time and distance to change velocity compared to motions using the same acceleration value with Linear acceleration. In order to maintain equal machine cycle times, an S-Curve motion profile requires an acceleration value (and peak motor torque) twice as large as the equivalent Linear acceleration motion profile.
4 Table 4-9. User Selected Return Data Digital Analog Selected Return Data Data Mode Data Offset Y N Torque Command 00h not used Y Y DSM Firmware Revision 10h not used Y Y 11h not used Y N DSM Firmware Build ID No.
4 Configuration 5.25 Cam Master Source. This configuration item is unused in the present DSM314 firmware. 5.26 Follower Control Loop. When this configuration item is set to Enabled, the servo axis will follow a master axis input in addition to the standard internally generated motion functions. Default: Disabled 5.27 Ratio A Value and Ratio B Value. (Follower Control Loop must be Enabled) The A over B ratio sets the follower slave/master gear ratio.
4 P235 = Axis 2 Incremental distance P242 = Axis 3 Incremental distance P250 = Axis 4 Incremental distance The incremental distance represents the total actual position change that will occur from the point where the follower is disabled until it stops. A configuration of Abs Position is not supported in the present DSM314 firmware. Default: Stop 5.33 Ramp Makeup Acceleration. Follower Ramp Makeup Acceleration (uu/sec2).
Configuration 4 Refer to Chapter 8, Follower Motion, Follower Axis Acceleration Ramp Control section, for a much more detailed discussion of this feature 5.36 GFK-1742A Ramp Makeup Velocity. This field is reserved.
4 Tuning Data The DSM314 Tuning tabs are used to configure Servo axis tuning data. Parameters such as Motor Type, Velocity at Max Cmd, Velocity Feed Forward Percentage, and Position Loop Time Constant are configured in these tabs. From one to four Tuning tabs may appear in the DSM314 configuration window, one tab for each Servo axis configured in the Settings tab. The numbers in the “Ref” column of the table below refer to item numbers in this chapter. Table 4-10.
Configuration 4 α Series FANUC Servo Motor Motor Type Code GFK-1742A Motor Model Motor Specification 61 α 1/3000 0371 46 α 2/2000 0372 62 α 2/3000 0373 15 α 3/3000 0123 16 α 6/2000 0127 17 α 6/3000 0128 18 α 12/2000 0142 19 α 12/3000 0143 27 α 22/1500 0146 20 α 22/2000 0147 21 α 22/3000 0148 28 α 30/1200 0151 22 α 30/2000 0152 23 α 30/3000 0153 30 α 40/2000 0157 29 α 40/FAN 0158 Chapter 4 Configuration 4-25
4 α L Series FANUC Servo Motor Motor Type Code Motor Model Motor Specification 56 α L3/3000 0561 57 α L6/3000 0562 58 α L9/3000 0564 59 α L25/3000 0571 60 α L50/2000 0572 α C Series FANUC Servo Motor Motor Type Code Motor Model Motor Specification 7 α C3/2000 0121 8 α C6/2000 0126 9 α C12/2000 0141 10 α C22/1500 0145 α HV Series FANUC Servo Motor Motor Type Code Motor Model Motor Specification 3 α 12HV/3000 0176 4 α 22HV/3000 0177 5 α 30HV/3000 0178 α M Series F
4 Configuration 6.02 Analog Servo Command. The Analog Servo Command determines whether the analog command issued by the DSM300 series module is a velocity or torque command. The torque command selection is not supported in the present DSM314 firmware. Default: Velocity 6.03 Position Error Limit. Position Error Limit (User Units). The Position Error Limit is the maximum Position Error (Commanded Position - Actual Position) allowed when the DSM314 is controlling a servo.
4 3. Servo drives failure. 4. Mechanically forcing the motor/encoder shaft past the servo torque capability. 5. Commanded motor acceleration or motor deceleration that is greater than system capability. 6.04 In Position Zone. In Position Zone (User Units). When the Position Error is less than or equal to the active In Position Zone value, the In Zone %I bit will be ON. Default: 10. 6.05 Pos Loop Time Constant (0.1ms). Position Loop Time Constant (units = 0.1 milliseconds).
4 Configuration 6.06 Velocity at MaxCmd (User Units/Second.) All DSM314 analog servo functions depend on this value being correct for proper operation. For Digital Servo Mode, the Velocity at Max Cmd configuration field is not used. For Analog Servo Mode, the Velocity at Max Cmd configuration field is the Actual Servo Velocity (User Units/second) desired for a 10 Volt DSM314 analog velocity command output to the servo.
4 off the integrator. If used, the Integrator Time Constant should be 5 to 10 times greater than the Position Loop Time Constant to prevent instability and oscillation. Default: 0. 6.11 Velocity Loop Gain Velocity Loop Gain. Used to set velocity loop gain. This applies to GE Fanuc Digital Servos only. This parameter is not used for Analog Servo Mode. The formula Load Inertia (JL) Velocity Loop Gain = x 16 Motor Inertia (JM) can be used to select an initial velocity loop gain value.
Configuration 4 Advanced Tab Data Although the Advanced Tab has 16 rows for entering axis tuning parameter data, the DSM314 Release 1.0 firmware only allows Entry rows 1 and 2 to be used. The figure below shows data in the cells for Axis 1 on Entry rows 1 and 2. Entry Row 1 Entry Row 2 Figure 4-2. Advanced Tab Tuning Parameters Supported in Release 1.0 DSM314 release 1.0 only supports Tuning Parameters 1 and 3: Tuning Parameter 1: Sets Digital Encoder Resolution (for GE Fanuc digital servos only).
4 Entering Tuning Parameter Numbers and Data in the Advanced Tab Cells To start, double click the desired cell. For example, if you double clicked the cell on Entry row 1, in the Axis 1 Par # column, the 1:Axis 1 Par # dialog box would appear, shown below. Enter the Tuning Parameter Number desired. Remember, DSM314 firmware Release 1.0 only supports Tuning Parameters 1 and 3.
Chapter Motion Mate DSM314 to PLC Interface 5 This chapter defines the data that is transferred between the CPU and the Motion Mate DSM314 automatically each PLC sweep, without user programming.
5 Section 1: %I Status Bits The following %I Status Bits are transferred automatically from the DSM314 to the CPU each sweep. The actual addresses of the Status Bits depend on the starting address configured for the %I references (see Table 4-1, “Settings Tab”). The bit offsets listed in the following table are offsets to this starting address. All reference section designations pertain to this chapter. Bit Offset 5-2 Table 5-1. %I Status Bits Description Axis Ref. Bit Offset Description Axis Ref.
5 DSM to PLC Interface 1.01 Module Error Present. This status bit is set when the DSM314 detects any error. Errors related to a specific Servo or Auxiliary Axis will be identified in the associated Axis n Error Code %AI word. Module errors not related to a specific axis will be identified in the Module Status Code %AI word. See section 2, “%AI Status Words”, for more details.
5 1.04 Configurable %I Status Bits. These inputs indicate the state of configurable CTL bits CTL01-CTL08 and CTL13-CTL16. The default CTL bit assignments report the level of external input devices connected to faceplate signals. All CTL bits may be tested during the execution of motion program Wait and Conditional Jump commands. CTL bits can also be used to trigger the follower ramp enable / disable functions. The CTL bit assignments are selected through configuration.
5 DSM to PLC Interface 1.07 Drive Enabled. The Drive Enabled status bit indicates the state of the Enable Drive %Q bit and the solid state relay output supplied by the DSM314. The ON state of the Drive Enabled %I bit corresponds to the CLOSED state of the relay output and the ON state of the associated faceplate EN LED. In Digital mode, the solid state relay provides the MCON signal to the GE Fanuc Digital Servo through the servo command cable.
5 Limit status bit is set, Commanded Velocity and Commanded Position are frozen to allow the axis to ”catch up” to the Commanded Position. 1.13 Torque Limit. The Torque Limit status bit is set when the commanded torque exceeds the torque limit setting for the configured motor type. 1.14 Servo Ready. This status bit is set when faceplate signal IN4 of the associated connector (A, B, C or D) is ON (active low: ON = 0v, OFF = +5v).
DSM to PLC Interface 5 Section 2: %AI Status Words The following %AI Status Words are transferred automatically from the DSM314 to the CPU each sweep. The total number of the %AI Status Words is configured with the Configuration Software to be a length of 24, 44, 64 or 84. The actual addresses of the Status Words depend on the starting address configured for the %AI references. See Table 4-1, “Settings Tab.” The word numbers listed in the following table are offsets to this starting address.
5 2.01 Module Status Code. Module Status Code indicates the current DSM314 operational status. When the Module Error Present %I flag is set, and the error is not related to a specific axis, an error code number is reported in the Module Status Code that describes the condition causing the error. A new Module Status Code will not replace a previous Module Status Code unless the new Module Status Code has Fast Stop or System Error priority.
5 DSM to PLC Interface ON state (thus holding the Strobe 1, 2 Flag %I bit in the cleared state), then each Strobe Input that occurs will cause the axis position to be captured in Strobe 1, 2 Position. The Strobe 1, 2 Position actual position values are also placed in data parameter registers for use with motion programs commands.
5 Section 3: %Q Discrete Commands The following %Q Outputs represent Discrete Commands that are sent automatically to the DSM314 from the CPU each PLC sweep. A command is executed simply by turning on its corresponding Output Bit. The actual addresses of the Discrete Command bits depend on the starting address configured for the %Q references. See Table 4-1, “Settings Tab.” The Bit Offsets listed in the following table are offsets to this starting address.
5 DSM to PLC Interface 3.01 Clear Error. When an error condition is reported, this command is used to clear the Module Error Present %I status bit as well as the associated Module Status Code and Axis 1-Axis 4 Error Code %AI status words. Error conditions that are still present (such as an End of Travel limit switch error) will not be cleared and must be cleared by some other corrective action.
5 If jogging occurred while Feed Hold was ON, the interrupted Move command will resume from where the axis was left after the Jog. The Move finishes at the correct programmed velocity and continues to the original programmed position as if no jog displacement occurred. 5-12 3.07 Enable Drive / MCON. If the Module Error Present and Drive Enabled %I status bits are cleared, this command will cause the Drive Enable relay contact to close and the Drive Enabled %I bit to be set.
DSM to PLC Interface 3.12 5 OUT1_A, B, C, D Output Control / Configurable CTL Bit Source. Each axis connector has a 24-vdc solid state relay (SSR) output rated at 125 ma. The OUT1_A, OUT1_B, OUT1_C and OUT1_D Output Control %Q bits can control the state of the associated output, but only if the associated Output Bits configuration is set for PLC Control. Refer to Chapter 4 for configuration information.
5 5-14 3.14 Enable Follower. When this bit is set and the Follower Enabled %I status bit indicates the Follower is enabled, motion commanded by the external or internal master will act as an input to the follower loop. An optional Follower Trigger bit may be configured to initiate follower motion. When a Follower Trigger is used, Enable Follower must be ON for the trigger condition to be tested. Clearing Enable Follower disconnects the follower loop from the master source.
DSM to PLC Interface 5 Section 4: %AQ Immediate Commands The following %AQ Immediate Command words are transferred each PLC sweep from the CPU %AQ data to the DSM314. The number of %AQ words configured (6, 9, or 12) depends upon the number of controlled axes configured. The actual addresses of the Immediate Command words depend on the starting address configured for the %AQ words. See Table 4-1, “Settings Tab.” The word offset numbers listed in the following table are offsets to this starting address.
5 second and third words contain the data for the Set Position command that is a position. The second word, word 1, is the least significant word of the position and the third word, word 2, is the most significant word. Example: To set a position of 3,400,250, first convert the value to hexadecimal. 3,400,250 decimal equals 0033E23A hexadecimal. For this value, 0033 is the most significant word and E23A is the least significant word.
DSM to PLC Interface 5 In the following %AQ command table, only the word offsets for Servo Axis 1 are listed. Word offsets for the other axes are computed by adding 3 (Servo Axis 2), 6 (Servo Axis 3), or 9 (Servo Axis 4) to the listed word offsets. The Ref column numbers refer to sections in this chapter. Table 5-7. %AQ Immediate Commands Using the 6-Byte Format Word 2 Word 1 Word 0 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 Byte 0 xx xx xx xx 00 00h Null 4.
5 Table 5-7. - Continued - %AQ Immediate Commands Using the 6-Byte Format Word 2 Word 1 Byte 5 Byte 4 Byte 3 Word 0 Byte 2 xx Immediate Command Definition Ref 00 31h Set Aux Encoder Position Pos. = -MaxPosnUu ... + MaxPosnUu-1 4.18 Digital Servo Velocity Cmd 00 34h Force Digital Servo Velocity 4.19 Position xx Byte 1 Byte 0 Servo Velocity Cmd = -4,095 ... +4,095 RPM xx xx Offset Mode 40h Select Return Data 1 4.20 xx xx Offset Mode 41h Select Return Data 2 4.
5 DSM to PLC Interface 4.05 Set Position. (User units) This command changes the axis position register values without moving the axis. Operation of the command depends on the axis configuration: Servo Axis - The Commanded Position and Actual Position values will both be changed so that no motion command will be generated. The Actual Position will be set to the value designated and the Commanded Position will be set to the value + Position Error.
5 Digital Mode • The Force Analog Output command can only be used on connectors C and D in Digital mode (in Digital mode, both Axis 1 and Axis 2, on connectors A and B respectively, must be digital). In fact, Force Analog Output is the default signal on connectors C and D in Digital mode. • If Axes 1 and 2 (connectors A and B) are configured for digital servo, their analog outputs are used only for servo tuning, and this function cannot be overriden by the Force Analog Output command.
5 DSM to PLC Interface Analog Mode 4.07 • In Analog mode, the Force Analog Output command can be used on all four connectors to force a voltage output. • The Select Analog Output command, discussed in the “Digital Mode” section above, does not work in Analog mode. Position Increment with Position Update.
5 Move Type (byte 1): 00h = Abs, Pmove, Linear 01h = Abs, Cmove, Linear 10h = Abs, Pmove, Scurve 11h = Abs, Cmove, Scurve 40h = Inc, Pmove, Linear 41h = Inc, Cmove, Linear 50h = Inc, Pmove, Scurve 51h = Inc, Cmove, Scurve The data field for this command may contain a parameter number in byte 2 (bytes 3-5 unused) with the command type as defined below: Move Type (byte 1): 80h = Abs, Pmove, Linear 81h = Abs, Cmove, Linear 90h = Abs, Pmove, Scurve 91h = Abs, Cmove, Scurve C0h = Inc, Pmove, Linear C1h = Inc, C
5 DSM to PLC Interface time. For Analog mode, the “Vel at Max Cmd” configuration value must be set correctly for proper operation of the Position Loop Time Constant. A PLC reset or power cycle returns this value to the configured data. 4.13 Velocity Feedforward. This command sets the Velocity Feedforward gain (0.01 percent). It is the percentage of Commanded Velocity that is added to the DSM314 velocity command output.
5 4.17 Torque Limit. (0.01 percent) Digital Mode only. The Torque Limit Command provides a method of limiting the torque produced by the GE Fanuc servomotor. The DSM314 will set the Torque Limit at the default 10000 (100 %) whenever a power cycle or reset occurs. The PLC application logic must set any other value for desired Torque Limit. The valid range for Torque Limit is 0 to 10000 in units of 0.01%. This represents 0 - 100 % of peak torque at commanded velocity.
5 DSM to PLC Interface Digital Analog Selected Return Data Data Mode Data Offset Y N Torque Command 00h not used Y Y DSM Firmware Revision 10h not used Y Y 11h not used Y N DSM Firmware Build ID No.
5 4.22 Follower Ramp Distance Make-Up Time. When the Follower Ramp feature has been selected and the follower is enabled, the following axis is ramped up to the Master velocity at the configured Follower Ramp Acceleration rate when the Master Velocity is non-zero at the time the Follower is enabled. The master counts that accumulate during acceleration of the follower axis are stored.
DSM to PLC Interface • Byte 1 contains the Connector Code, a hex number. • Bytes 2-3 contain the Signal Code, a decimal number. • Bytes 4-5 are not used and should contain 0. 5 Connector Codes Connector Code Connector Selected 01h Connector A 02h Connector B 03h Connector C 04h Connector D Connector Pins Pin 6 = OUT Pin 24 = COM (Ref. to 0V) Refer to the I/O Connection Diagrams in Chapter 3 for Terminal Board connections.
5 Example 1: In this example, the Servo Axis 1 Actual Velocity signal (Signal Code=15) is re-routed from its default output on Connector A to Connector B (Connector Code=02h), replacing any previous signal on Connector B.
5 DSM to PLC Interface 4.24 Clear New Configuration Received. This command clears the New Configuration Received %I bit. Once cleared, the Configuration Complete bit is only set when the PLC resets or reconfigures the module. The PLC can monitor the bit to determine if it must re-send other %AQ commands, such as In Position Zone or Jog Acceleration. This would only be necessary if the %AQ commands were used to override DSM314 configuration data programmed with the PLC configuration software.
Chapter Non-Programmed Motion 6 The DSM314 can generate motion in an axis in one of several ways without using a motion program. Find Home and Jog Plus/Minus use the %Q bits to command motion. Move at Velocity, Move, Force Digital Servo Velocity, Force Analog Output, and Position Increment use %AQ immediate commands. During Jog, Find Home, Move at Velocity, Move and Force Digital Servo Velocity, any other commanded motion, programmed or non-programmed, will generate an error.
6 switch. An OFF to ON transition of the Find Home %Q command yields the following home cycle. Unless otherwise specified, acceleration is at the current Jog Acceleration and configured Jog Acceleration Mode. Find Home Routine for Home Switch If initiated from a position on the positive side of the home switch, in which case the home switch must be OPEN (Logic 0), the Find Home routine starts with step 1 below.
6 Non-Programmed Motion adjustment and setup of these positions and for the “find home” routine, which requires that its final move be in the negative direction. Distance is also provided between the overtravel limit position and the positive stop. Enough distance should be allowed here to prevent the machine slide from hitting the positive stop. The correct distance needs to be greater than the worst-case stopping distance required by the machine slide after it reaches the overtravel limit position.
6 to the home position first, then initiates the find home command. To assist the operator in jogging to the correct position, a set of alignment marks indicating a close proximity to the home position is sometimes placed on the machine and machine axis. Move – (Minus) Home Cycle Example The next picture shows an example of the Home Position parameter set to Move – (minus).
Non-Programmed Motion 3. 4. 5. 6 The axis is moved, at the configured Jog Velocity and with the configured Jog Acceleration rate and Jog Acceleration Mode, the number of user units specified by the Home Offset value from the home reference position. If Home Offset = 0, the axis moves back to the position of the marker pulse. The axis is stopped at the configured Jog Acceleration rate and with the configured Jog Acceleration Mode.
6 value must change while the Drive Enabled bit is ON for the DSM314 to accept it. The DSM314 detects a Move at Velocity command when the %AQ values change. When the DSM314 is performing a Move at Velocity command, it ignores the software end of travel limits (Pos EOT and Neg EOT). Hardware overtravel limits must be ON if they are enabled.
Non-Programmed Motion 6 Position Increment Commands To generate small corrections between the axis position and the DSM314 tracking, the Position Increment %AQ commands can be used to offset Actual Position by a specific number of user units. If the Drive Enabled %I bit is ON, the axis will immediately move the increment amount. If the position increment without position update is used (%AQ command 21h), the Actual Position %AI status word reported by the DSM314 will remain unchanged.
Chapter Programmed Motion 7 A motion program consists of a group of user-programmed motion command statements that are stored to and executed in the DSM314. The DSM314 executes motion program commands sequentially in a block-by-block fashion once a program is selected to run. The motion program is executed autonomously from the PLC, although the PLC starts the DSM314 motion program and can interface with it (with parameters and certain commands) during execution.
7 Multi-axis Motion Programs and Subroutines The term multi-axis is specified in the definition statement (on the first line) of a program or subroutine, for example: PROGRAM 2 MULTI-AXIS, or SUBROUTINE 7 MULTI-AXIS. Axis 1 and Axis 2 are the only two axis numbers permitted in a multi-axis program or subroutine. Both axes must be home referenced and meet the remaining prerequisites (see the section “Prerequisites for Programmed Motion” in this chapter) before a program can be executed.
7 Programmed Motion Type 1 commands can redirect the program path execution, but do not directly affect positioning. • Call (Subroutine) executes a subroutine before returning execution to the next command. • Jumps may be conditional or unconditional. An unconditional jump always redirects execution to a specified program location. A conditional jump is assigned a CTL bit to check. If the CTL bit is ON, the jump redirects execution to a specified program location.
7 A multi-axis program can contain SYNC commands to synchronize the axes at designated points. When the first axis reaches a SYNC block (a block containing a SYNC command), it will not execute the next block until the other axis has also reached the SYNC Block. Refer to Example 18, “Multi-axis Programming”, later in this chapter, for an example of this.
Programmed Motion 7 Motion Program Basics Number of Programs, Subroutines, and Statements The DSM314 supports 10 motion programs, 40 subroutines, and a maximum total of 1000 motion program statements. Format • Motion programs and subroutines are written using ASCII text. • Only one motion language statement is permitted per line, and a motion language statement may not span more than one line. Normal comments may span multiple lines.
7 Motion Language Syntax and Commands White space White space has no significance and is ignored, except where necessary to use as a separator. For example, in “CMOVE AXIS1 50000,ABS,S-CURVE” a space is required as a separator between CMOVE and AXIS1, but is not required in the phrase 50000,ABS because the comma separates the parameters. Blanks, blank lines, and tabs are considered white space.
Programmed Motion 7 Variables Motion Programs support a limited set of predefined variables: the parameter data registers and the CTL bits. In the following table, x represents a decimal value in the specified range. The value x is interpreted based on its numeric value. Therefore, a given variable may be referenced several ways. For example, P1 and P001 both refer to Parameter Data Register 1 and will be accepted by the Motion Editor.
7 Motion Program Commands This section describes the motion commands. Most motion commands have two forms, multi-axis and single-axis. The multi-axis form is used in multi-axis programs and subroutines and requires the axis to be specified as a parameter in certain commands (for example: VELOC AXIS1 5000). In single-axis programs the axis number is specified in the program header (for example: PROGRAM 2 AXIS1) and must not be specified within the program. Some of the command keywords have aliases.
7 Programmed Motion 2. 3. 4. 5. 6. Specified acceleration constant is not in the range of 1 - 1,073,741,823 Parameter data register is not in the range of 0 - 255. Axis specified in single-axis program. No axis specified in multi-axis program. Specified axis does not support programmed motion. Block Number Block numbers may be used as the destination of JUMP commands. They may appear alone on a line, or preceding a command.
7 CMOVE The CMOVE command programs a continuous move using the specified position and acceleration mode. Syntax: CMOVE {} , , Parameter Description The axis can only be specified in a multi-axis program or subroutine. The axis may be specified using the AXISx keywords or constants. The destination position. May be a constant or a parameter data register. Specifies incremental (INCR) or absolute (ABS) positioning.
Programmed Motion 7 Aliases: None Errors: 1. Axis specified in single-axis program. 2. No axis specified in multi-axis program. 3. Delay must be in the range of 0 – 60,000 or parameter data register 0 - 255. 4. Specified axis does not support programmed motion. ENDPROG The ENDPROG statement terminates a motion program definition. Syntax: ENDPROG Aliases: ENDP ENDSUB The ENDSUB statement terminates a motion subroutine definition.
7 LOAD Initializes or changes a parameter data register with a 32-bit twos-complement integer value. Syntax: LOAD , Parameter Description Parameter data register to be initialized. Restricted to registers P000 – P255. 32-bit numeric constant. Aliases: None Errors: 1. 2. Parameter data register must be in the range of P000 – P255. Load value must be in the range of a 32-bit twos-complement value.
Programmed Motion 7 PROGRAM The PROGRAM statement is the first statement in a motion program. The program statement identifies the program number (1-10) and the axis configuration. Program definitions cannot nest. There are two types of motion programs, single-axis in which all commands are directed to the same axis, and multi-axis, which may contain commands for axis 1 and axis 2. The program type is specified by the PROGRAM statement.
7 SUBROUTINE The SUBROUTINE statement is the first statement in a motion subroutine. The subroutine statement identifies the subroutine number (1-40) and the axis configuration. Subroutine definitions cannot nest. There are two types of motion subroutines, single-axis in which all commands are directed to the same axis, and multi-axis, which may contain commands for axis 1 and axis 2. The subroutine type is specified by the SUBROUTINE statement.
Programmed Motion 7 Sync Block A sync block is a special case of a block number. A sync block may only be used in a multi-axis program. A sync block is identified by a block number followed by the command SYNC. The SYNC command must appear on the same line as the block number. Syntax: : SYNC Parameter Description Block number must be in the range of 1 – 65535 Aliases: none Errors: 1. Sync blocks can only appear in multi-axis programs. 2.
7 WAIT Permits synchronization with some external event through the CTL bits. Execution of the next command is suspended until the specified CTL is set. A single WAIT command only applies to one axis. Therefore, in a multi-axis program, you must designate the axis number that a WAIT applies to. For example: WAIT AXIS1 CTL01. If you wish to make both axes wait in a multi-axis program, you must use a separate WAIT command for each axis.
7 Programmed Motion Program and Subroutine Structure Single-axis Program Structure • PROGRAM definition statement. It must be the first line of the program. It must identify the program number and axis number. The program number has a space between the PROGRAM keyword and the number. In contrast, the axis number must not have a space within it. For example: PROGRAM 1 AXIS3 • Body. The program body contains the actual program commands.
7 Multi-Axis Program Structure • PROGRAM definition statement. It must be the first line of the program. It must identify the program number and the fact that this is a multi-axis program by using the MULTI-AXIS term. For example: PROGRAM 3 MULTI-AXIS • Body. The program body contains the actual program commands. Note that in a multi-axis program, you must specify an axis number in many of the commands. Failure to do so will generate an error.
Programmed Motion 7 Single-axis Subroutine Structure • SUBROUTINE definition statement. It must be the first line of the subroutine. It must identify the subroutine number and contain the SINGLE-AXIS statement. For example: SUBROUTINE 3 SINGLE-AXIS • Body. The subroutine body contains the actual programmed commands. Note that in a single-axis subroutine, you must not specify an axis number in any of the commands. Doing so will generate an error.
7 • End of Subroutine. Uses the ENDSUB statement. This statement clearly identifies the end of the subroutine and helps separate one subroutine or program from another.
Programmed Motion 7 Command Usage Examples The following examples are not complete programs. For example, in many cases the PROGRAM and ENDPROG statements are not shown. These statements (in correct context) would need to be added to make the program compile successfully. Programmed moves have three parameters: 1. The distance (data) to move or position to move to, 2. The type of positioning reference (command modifier) to use for the move, and 3.
7 Types of Acceleration Linear Acceleration A sample linear move profile that plots velocity versus time is shown in Figure 7-1. As illustrated, a linear move uses constant (linear) acceleration. The area under the graph represents the distance moved. v ACCEL 1000 VELOC 2000 PMOVE 6000, INCR, LINEAR t Figure 7-1. Sample Linear Motion S-Curve Acceleration An S-Curve motion sample, plotting velocity versus time, is shown below. As illustrated, SCurve acceleration is non-linear.
Programmed Motion 7 Types of Programmed Move Commands The following examples are not complete programs. For example, in many cases the PROGRAM and ENDPROG statements are not shown. These statements (in correct context) would need to be added to make the program compile successfully. Positioning Move (PMOVE) A PMOVE must always come to a complete stop. The stop must long enough to allow the In Zone %I bit to turn ON before the next move can begin.
7 Command VELOC CMOVE VELOC CMOVE CMOVE VELOC PMOVE Data Comments 10000 15000, ABS, LINEAR 20000 30000, ABS, LINEAR 0, INCR, LINEAR //Set velocity of first move = 10000 //Reach velocity of second move (20000) at position = 15000 //Set velocity of second move = 20000 (*Stay at velocity = 20000 until position = 30000, then change to velocity = 5000*) (*Flag to signal the DSM314 to wait for next move before changing to the next velocity*) //Set velocity of third move = 5000 //Final stop position = 40000
Programmed Motion 7 Programmed Moves By combining CMOVEs and PMOVES, absolute and incremental moves, and linear and s-curve motion, virtually any motion profile can be generated. The following examples show some simple motion profiles, as well as some common motion programming errors. Example 1: Combining PMOVEs and CMOVEs This example shows how simple PMOVEs and CMOVEs combine to form motion profiles.
7 Example 2: Changing the Acceleration Mode During a Profile The following example shows how a different acceleration, and an even acceleration mode, can be used during a profile using CMOVEs. The first CMOVE accelerates linearly to the programmed velocity. Because the second CMOVE’s velocity is identical to the first, the first CMOVE finishes its move without changing velocity. The acceleration of the second move is S-curve as it decelerates to zero velocity.
7 Programmed Motion is not large enough, the following profile could occur. The DSM314 attempts to avoid overshooting the final position by commanding a zero velocity. This rapid velocity change is undesirable and can cause machine damage. ACCEL VELOC CMOVE ACCEL CMOVE 500 3000 9000, ABS, LINEAR 600 4800, INCR, LINEAR v C1 C2 t 9 00 0 Figure 7-8. Hanging the DSM314 When the Distance Runs Out DWELL Command A DWELL command is used to generate no motion for a specified number of milliseconds.
7 Wait Command The WAIT command is similar to the DWELL command. Instead of generating no motion for a specified period of time, a WAIT stops program motion until a specified CTL bit turns ON. Thus motion stops any time a WAIT is encountered, even if the CTL bit is ON before the WAIT is reached in the program. The trigger to continue the program can be any of the twelve CTL bits.
7 Programmed Motion command simply tells the DSM314 to continue program execution at the destination block number. A conditional jump only executes if the specified condition occurs. Examples of both types of jumps follow. Unconditional Jumps Example 6: Unconditional Jump In the example below, the program executes a PMOVE, dwells for 2 seconds, then unconditionally jumps back to the beginning of the program at block 1.
7 A Conditional Jump cannot be used as the last line of a Subroutine (or on the line before an Unconditional Jump to the end of a subroutine) because jump testing terminates when the End Subroutine command is processed. In summary, a Conditional Jump transfers control to a new program block on the basis of one of the external CTL input bits turning ON. Tests for CTL bit status can be carried out once or continuously during the following Type 3 command if it is in the same program block.
7 Programmed Motion 3: DWELL ENDPROG 100 In this example, the CTL01 bit is tested throughout the PMOVE because the PMOVE and JUMP commands are in the same Block. The DSM314 can perform a Conditional JUMP from an active CMOVE to a program block containing a CMOVE or PMOVE without stopping. For the axis to jump without stopping, the distance represented by the CMOVE or PMOVE in the Jump block must be greater than the servo stopping distance.
7 monitored is very short. However, in Example 2, the JUMP command is encountered before the CMOVE command. This starts the jump testing before motion begins, and jump testing continues as long as the move lasts. If the CTL bit turns ON while the move is being performed, the jump will be performed. After the move completes, the next block number is encountered, which ends jump testing, and program execution continues normally.
7 Programmed Motion Jumping Without Stopping If the Type 3 command following a conditional jump is a CMOVE and the Type 3 command at the destination is a move command with sufficient distance to fully decelerate to zero when completed, the jump will be executed without stopping. This is the only way to sustain motion when a jump is performed. Example 9: JUMP Without Stopping This is a simple example of a conditional jump from one CMOVE to another.
7 Jump Stop A jump stop is a stop that is caused by a jump. When a jump stop occurs, the current programmed acceleration and acceleration mode are used. Note that s-curve motion will achieve constant velocity before beginning to decelerate. See the s-curve jump examples for more details. There are two ways of generating a jump stop each described below. A conditional JUMP triggered during a PMOVE will always generate a jump stop.
Programmed Motion 7 Example 11: Jump Followed by PMOVE In this JUMP example, the command after the JUMP is a PMOVE in the same direction. The velocity profile below shows the acceleration and movement for the first CMOVE and the deceleration to the PMOVE’s velocity. The CTL01 bit, OFF when the PMOVE begins, turns ON at the second dashed line. Motion stops after a PMOVE, even if a conditional jump goes to another block. Thus the CTL01 bit triggers a deceleration to zero before the final CMOVE begins.
7 Example 12: S-CURVE - Jumping After the Midpoint of Acceleration or Deceleration In the following example, a jump occurs during the final phase of deceleration, at the dashed line. The deceleration continues until constant velocity is reached and then the acceleration to the higher velocity begins. ACCEL 50000 VELOC 100000 1: JUMP CTL01, 3 CMOVE 500000, ABS, S-CURVE v 2: VELOC 60000 CMOVE 500000, INCR, S-CURVE C1 C3 3: VELOC 85000 ACCEL 100000 CTL01 ON CMOVE 250000, INCR, S-CURVE t Figure 7-15.
7 Programmed Motion S-CURVE Jumps to a higher Acceleration while Accelerating or a lower Deceleration while Decelerating The second case involves jumping to a higher velocity while accelerating or a lower velocity while decelerating. When this occurs, the DSM314 continues to the first move’s acceleration or deceleration. This acceleration or deceleration is maintained, similar to be a linear acceleration, until the axis approaches the new velocity.
7 Other Programmed Motion Considerations The following examples are not complete programs. For example, in many cases the PROGRAM and ENDPROG statements are not shown. These statements (in correct context) would need to be added to make the program compile successfully. Maximum Acceleration Time The maximum time for a programmed acceleration or deceleration is 131 seconds.
7 Programmed Motion Example 2 below shows how the result desired in Example 1 could be obtained by replacing Example 1’s single move with four moves. Four moves are required since both the acceleration and deceleration portions of the profile must each be divided into two moves. To divide the total acceleration (or deceleration) time in half, we calculate the distance at the midpoint of either slope, when velocity is 12000, to be 720,000 user units.
7 Feedhold with the DSM314 Feedhold is used to temporarily pause program execution without ending the program, often to examine some aspect of a system. It causes all axis motion to end at the programmed acceleration. When Feedhold is ended, program execution resumes. Interrupted motion will resume at the programmed acceleration and velocity. Feedhold is asserted by turning ON the Feed Hold %Q bit and lasts until the %Q bit is turned OFF.
Programmed Motion 7 Feedrate Override Some applications require small modifications to a programmed velocity to handle outside changes. A Rate Override %AQ immediate command, which is sent to the DSM through ladder logic, allows changes to a programmed feedrate (velocity) during program execution. (Details about the Rate Override command are found in Chapter 5.) When a program begins executing, the override rate is initially set to 100%.
7 Multi-axis Programming Sync Blocks can be used in a multi-axis program to synchronize the axis motion commands at positions where timing is critical. Example 18: Multi-axis Programming This example assumes that axis 1 controls vertical motion and axis 2 controls horizontal motion. The objective is to move a piece of material from point A to point E as quickly as possible while avoiding the obstacle that prevents a direct move between those points.
Programmed Motion 7 If this program segment is not at the beginning of a program, and for some reason axis 2 has not yet reached Block 20 when axis 1 has moved 30,000 counts, an error would occur. Axis 1 would continue to 80,000 counts, and the DSM314 would report a “Block Sync Error during a CMOVE” in the Status Code. If it is imperative that the axes synchronize at Block 20, Changing Block 10 to a PMOVE would guarantee synchronization, but then axis 1 would stop at 30,000 counts.
7 Parameters (P0-P255) in the DSM314 The DSM314 maintains 256 double word parameters (0 through 255) in memory. These parameters can be used as variables in ACCEL, VELOC, DWELL, PMOVE, and CMOVE motion commands. Be aware that range limits still apply and errors may occur if a parameter contains a value out of range. Parameters 216-255 are special purpose parameters. Some of the special purpose parameters are automatically written by the DSM314.
7 Programmed Motion • • • The motion program LOAD command. The Load Parameter Immediate %AQ command. The COMM_REQ function block. This is the preferred way if you need to send multiple parameters per scan. The COMM_REQ function block is described in Appendix B. Assigning a value to a parameter overwrites any previous value.
7 Calculating Acceleration, Velocity and Position Values One method of determining the value for APM or DSM motion program variables such as Acceleration, Velocity or Position is to plot the desired move or move segment as a velocity profile. A velocity profile plots time on the horizontal axis of a graph and velocity on the vertical axis. The key to understanding profile generation is to break the complete move into smaller segments that may be analyzed geometrically.
7 Programmed Motion Trapezoidal Move Vpk •Limits max motor speed •Higher accel torque than triangle move •Symmetrical profile (1/3, 1/3, 1/3 time) maximizes power transfer to load Velocity •Most common for long moves A = acceleration D = deceleration X = distance Vpk = velocity peak ta = time acceleration ts = time at slew velocity td = time deceleration Ta = acceleration Torque Td = deceleration Torque Xa = acceleration distance Xs = slew distance Xd = deceleration distance A D Xs Xa Xd ta Torque
7 Triangular Velocity Profiles The triangular velocity profile minimizes servo acceleration rate and requires a higher servomotor velocity when compared to a trapezoidal profile of the same distance and time. Use a triangular profile for fast short moves. Equations: Position = Area Vpk 1 x = V pk (ta + td ) 2 A D Velocity X ta 2( x) = (t a + td ) V pk td time Torque Ta Td a= V pk ta Figure 7-24.
7 Programmed Motion Motion Editor Error and Warning Messages The editor will generate three types of error messages; syntax errors, semantic errors, and warnings. These are explained below. The editor will only generate program code if your source motion program contains no syntactic or semantic errors. If the editor detects unrecognized syntax or semantic errors, it will generate an error message that can be used to troubleshoot the program.
7 Motion program contains a signed integer value that cannot be represented in 32 bits. (M214) SYNC Statement is only valid in multi-axis programs and subroutines A single-axis motion program or subroutine attempted to define a sync block. (M215) Multi-axis programs do not support Axis 3 or 4 Commands in multi-axis programs can only reference axis 1 or 2. (M220) Specified axis is out of range A single-axis motion program can only reference axis 1, 2, 3, or 4.
7 Programmed Motion (M238) Program must be in range 1 – 10 A PROGRAM statement is attempting to define a program number that is outside the valid range. (M239) Attempt to redefine program. Program already defined A PROGRAM statement is attempting to define a program using a program number that is already defined. (M240) End program definition with ENDPROG statement A PROGRAM has been terminated with an ENDSUB statement, or an ENDSUB statement was encountered within a program.
7 This error is issued if motion program commands occur outside a PROGRAM or SUBROUTINE. (M283) This instruction is invalid for the specified module type A motion program block contains an instruction that is invalid for the destination module. (M293) Maximum error count exceeded. The motion program parser reports up to 30 errors when parsing a motion program block. When that limit is reached, this error is issued and no more errors are reported.
Programmed Motion 7 Using Error Messages to Troubleshoot Motion Programs After creating motion programs or subroutines in the Motion Editor window, you can check for basic errors by clicking the Block Check icon on the toolbar. The editor will check the motion program block and report any errors it detects in the Information window. The next figure shows an example of an error detected during the check. Cursor Highlighted Error Message Figure 7-26.
Chapter Follower Motion 8 Configuring the DSM314 for Follower Control Loop = Enabled (in the VersaPro Axis Configuration tab) allows each Servo Axis (slave) to respond to a Master Axis input using a programmable slave : master ratio. The DSM314 defines the slave : master ratio as the ratio of two integer numbers A and B.
8 Master Sources A DSM314 Servo Axis can be configured to follow any two of eight possible master input sources. The two sources are identified as Source 1 and Source 2. A Follower Master Source Select %Q bit determines whether Source 1 or Source 2 is the active source.
8 Follower Motion Internal Master Axis Command generators Commanded Position for Axis 1 - Axis 4 represent internal master axis sources. The DSM314 follower loop will allow a slave axis to follow a selected internal command source as shown in this example: Example 2: Following an Internal Master command In this example, Axis 1 of the DSM314 is configured with Follower Master Source 2 = Commanded Position 2 and the Select Internal Master %Q bit is ON. The A:B ratio is 1:2.
8 Example 3: Sample A:B Ratios All of the following samples are following the master source input at various A:B ratios. v v a45331 t t Follower Axis A:B Ratio = 1:2 Master Source v v t t Follower Axis A:B Ratio = 1:3 Follower Axis A:B Ratio = 2:1 v v t t Follower Axis A:B Ratio = 5:6 Follower Axis A:B Ratio = 4:3 v v t Follower Axis A:B Ratio = -1:1 t Follower Axis A:B Ratio = -2:3 Figure 8-3.
Follower Motion 8 Example 4: Changing the A:B Ratio One example of variable A:B ratios is to use one ratio while moving positive, and another when moving negative. Note that determination of positive and negative velocity and update of the A:B ratio must be done in the PLC or the DSM314 Local Logic program. In the profile below, the following axis uses a 2:1 ratio when moving positive and a 1:2 ratio when moving negative. v a45332 v Ratio 2:1 t Master Source Following Axis Ratio 1:2 t Figure 8-4.
8 v v a45334 Ratio 1:1 t t Master Axis Following Axis Figure 8-5. Velocity Clamping Unidirectional Operation Setting the axis Command Direction configuration to Positive Only or Negative Only results in unidirectional follower motion. Any master axis counts in the zero limited direction are ignored. No error is generated by counts in the zero limited direction. The In Velocity Limit %I bit, however, does reflect the presence of a master command in the zero limited direction.
Follower Motion 8 inputs have 5 ms filters that result in a Follower Enable Trigger response time of 5-7 milliseconds. The faceplate 5v inputs do not have these filters and will provide an Enable Trigger response time of 2 millisecond or less. When the Enable Follower trigger occurs, the Commanded Position at that point is captured in a parameter register so that it can be used in a Programmed Move command.
8 is ON, then the CTL bit chosen acts as a rising edge trigger to enable follower mode. After Follower is enabled, only the PLC Enable Follower %Q bit controls the active state of the following function. When the follower axis is enabled to a moving master source, some master source counts cannot be used immediately. The master counts that accumulate during acceleration of the follower axis are stored.
8 Follower Motion master command velocity and the makeup move velocity reach 100% of the velocity limit. The master command velocity will not exceed 100% of the Velocity Limit value. Accumulated counts may be lost and the makeup move will not complete. The Follower Ramp Active %I bit indication is turned on while the ramp control is in effect for both the ramp up/make-up and ramp down.
8 The programmed make-up time can be too short for the required distance correction. In this case a warning error is reported (in the point B of the trajectory), but system continues acceleration up to the speed, insuring the minimum possible distance correction time . The velocity profile for such case is shown on the figure 8-12. C Follower Disabled Make-up distance B Velocity make-up time 0 Time Figure 8-8. Follower Ramp Up/Ramp Down Cycle – Case 2 with make-up time too small.
8 Follower Motion Follower Mode Command Source and Connection Options The diagrams on the following pages illustrate a variety of Master axis and Follower slave axis loop connection options. The diagram below illustrates the three DSM314 analog axes connected in parallel with Actual Position for Axis #4. The reader should note that with this configuration, the Local Logic function can be run. This is because the command generator for axis #4 is not required for this configuration.
8 The diagram below illustrates the three DSM314 analog axes connected in parallel with Commanded Position for Axis #4. The reader should note that with this configuration, the Local Logic function can not be run. This is because the command generator for axis #4 is required for this configuration. The Master Source Configuration items are all set to Commanded Position Axis #4. This is not a requirement. However, it does eliminate a source of error due to the master source select bit being set incorrectly.
8 Follower Motion The diagram below illustrates the two DSM314 digital axes connected in parallel with Commanded Position or Actual Position for Axis #3. The reader should note that with this configuration the Local Logic function can be run. This is because the command generator for axis #4 is not required for this configuration.
8 The diagram below illustrates two DSM314 digital axes connected in parallel with Commanded Position from Axis 1 driving servo loops for Axis 1 and Axis 2. This will allow both axes to run from the same commanded path. Note that Axis 1 is configured with Follower Control Loop = Disabled. This configuration does not allow for load sharing between axes that are tightly coupled. The reader should note that with this configuration the Local Logic function can be run.
8 Follower Motion The diagram below illustrates the four DSM314 analog axes connected in two parallel pairs. The reader should note that with this configuration the Local Logic function can not be run. This is because the servo position loop for axis #4 is required for this configuration.
8 Follower Control Loop Block Diagram %Q Enable Follower Master Source 1 %Q Master Source Select CTL01CTL32 Follower Enabled Axis Follower Control Loop (Axis 1 loop is shown) (Axis 2,3,4 loop is identical) Follower Ramp Active Enable/ Disable Control 1 per Servo Axis ACC Ramp Control Path Generator Axis # or Actual Position Axis # Velocity Timebase *A Selected by Configuration Master FF Velocity + + Velocity Limit Velocity Limit Master Source 2 Path Generator Axis # or Actual Position Axis
Chapter Combined Follower and Commanded Motion 9 Combined motion consists of Follower motion commanded from a master axis combined with one of these internally commanded motions: Jog Plus/Minus %Q Command Move at Velocity %AQ Command Move %AQ Command Stored Motion Program Combined motions are additive. The slave axis motion is equal to the sum of the motion commanded by the master axis and the internally commanded motion.
9 Follower Motion Combined with Motion Programs Motion commands from stored programs or the Move %AQ command can also be combined with the master command to drive the follower axis. These point-to-point move commands can come from one of the stored motion programs 1 through 10 and any stored subroutines they may call. The Move %AQ command is treated as a single line motion program, which uses the present Jog Velocity and Jog Acceleration.
Combined Follower and Commanded Motion 9 Table 9-1 below indicates which source commands affect these position registers and the actual and commanded velocities. Program Command Position is updated only by internally generated move commands (program commands, Jog Plus Minus, Find Home, and Move at Velocity). The Commanded Velocity (returned in %AI data) also only indicates velocity commanded by these internally generated move commands.
9 Table 9-1. - Continued - Command Input Effect on Position Registers COMMAND Input Other Internally Generated Move Follower Enabled No Follower Registers Affected by input Actual Position %AI status word is updated Commanded Position %AI status word is updated Commands (Actual Position + Position Error) Program Command Position is updated but not used (Home, Jog, and Move at Velocity) Actual Velocity %AI status word is updated.
Combined Follower and Commanded Motion 9 Program moves will execute in a continuous fashion such that incremental PMOVE or CMOVE commands past the limits will roll over at the limit and continue. Absolute PMOVE or CMOVE commands can also be used for applications that do not require going beyond the high/low count limits. Any internally generated move command can be immediately terminated by the Abort All Moves %Q command.
9 following the master command. Note that the Accel Ramp and Make-Up Time feature could be used to allow the follower axis to catch up to the master axis if required. 4. Once the follower is enabled, the PLC sends the Execute Motion Program n %Q bit to start execution of the selected program for the follower axis. At the time the program is selected, Program Command Position will be set to program reference position (0) because the follower is enabled.
Chapter Introduction to Local Logic Programming 10 This chapter contains an introduction to the basic local logic programming concepts. The DSM and the DSM motion programming language are not discussed in detail in this chapter. These concepts are discussed in other chapters within this manual. Introduction to Local Logic Programming The local logic program works in conjunction with the PLC logic program and motion program to yield a flexible programming environment.
10 Motion Program CMOVE ##,ABS,SCURVE PMOVE ##,ABS,SCURVE DWELL ## PMOVE ##,ABS,LINEAR . . . . Motion Program Supervisory Logic Block CMOVE Local Logic Program (Supervisory Logic Block) Position_Loop_TC_1:=50; IF Actual_Position_1>4000 THEN Digital_Output1_1:=ON; END_IF; IF Actual_Position_1>=4500 THEN Digital_Output1_1:=OFF; END_IF; IF Actual_Position_1> 6000 THEN Digital_Output2_1:=ON; END_IF; IF Actual_Position_1>=7500 THEN Digital_Output2_1:=OFF; END_IF; PMOVE DWELL PMOVE ETC..
Introduction to Local Logic Programming 10 Table 10-1.
10 When to Use Local Logic Versus PLC Logic The local logic programming language contains basic mathematical and logical constructs. The capabilities have not been designed to replace the PLC’s logic capabilities. Instead, local logic is designed to complement the PLC logic and mathematical abilities. Specifically, local logic is designed to solve a small logic and mathematical set that requires tight synchronization with the controlled motion.
Introduction to Local Logic Programming 10 Getting Started with Local Logic and Motion Programming The sections that follow provide information on getting started with the Local Logic Editor and Motion program editors. The sections concentrate on program usage with an emphasis on program creation, syntax check, and program download. Requirements The Local Logic and Motion Program editors are integrated within the VersaPro programming environment.
10 Another method for starting VersaPro is to double-click “My Computer” Icon, navigate to the location on your computer where VersaPro is installed, and double-click the VersaPro icon (VersaPro.exe), shown in Figure 10-3 Figure 10-3. VersaPro Program Directory Or, you may wish to create a VersaPro “short-cut” and place the short-cut on the Windows desktop. (Reference the operating system documentation to determine how to create a short-cut.) Then, to open VersaPro, double-click the short-cut.
Introduction to Local Logic Programming 10 Using the Local Logic Editor The Local Logic editor is integrated into the VersaPro environment. The editor allows the user to easily create, edit, store, and download a Local Logic program. To create a Local Logic program the user needs to open or create a new VersaPro folder. Reference the VersaPro documentation on how to create or open a folder.
10 Figure 10-5. Create New Local Logic Program The user then selects the OK button to create the Local Logic program. Once this action is complete, the Local Logic editor screen is brought up by VersaPro. (Figure 106). Figure 10-6.
Introduction to Local Logic Programming 10 Local Logic Variable Table The VersaPro programming environment includes a window that contains the Local Logic Variables. The table has several tabs that break the variables up by category.
10 To resize columns in the Local Logic Variable table, move the mouse pointer over the top of the right edge of the column. The cursor will change to a vertical bar with arrows. Press the primary mouse button and drag the column width to the appropriate size. The table has a floating menu that can be accessed by right click the mouse when the pointer is over the table. The pop-up menu is shown in Figure 10-8. Figure 10-8.
Introduction to Local Logic Programming 10 Figure 10-10. File Submenu New Motion opens a sub menu that allows the user to create a new Local Logic, Motion, or Cam program. The sub menu is shown in Figure 10-11. Figure 10-11. New Motion Submenu The Local Logic Program selection opens a dialog box that allows you to name the Local Logic program, give it a description, and choose the destination module type (DSM314).
10 an existing folder. When you open a folder, you are prompted to save the old folder. You can also close an open folder directly. Print … allows the user to prints the selected item. Edit The Edit menu contains a submenu that allows the user to edit the current document. Operations like cut, paste find/replace among others are contained in this menu. The Edit submenu is shown in Figure 10-12. Figure 10-12. Edit Submenu 10-12 • Undo allows the user to reverses the previous action.
Introduction to Local Logic Programming 10 • Find/Replace allows the user to Find and Replace a variable Name or Address, a Call to a Subroutine, or a Jump/Label or MCR/END_MCR pair in logic, or text within a Local Logic or Motion Program. • Find Next allows the user to finds the next item of defined search criteria.
10 • Folder Browser allows the user to open or close the Folder Browser window. • Information Window allows the user to open or close the Information window. This window contains the status of the syntax check for Local Logic and Motion Programs along with other informative messages. Consult the VersaPro documentation for additional information concerning this window. • Variable Declaration Table allows the user to open or close the Variable Declaration Table window.
Introduction to Local Logic Programming • 10 Compact allows the user to reduce the size of the folder by removing edit history information from the VDT. PLC The PLC menu allows the user to interact with the PLC. The PLC submenu is shown in Figure 10-15. Figure 10-15.
10 • Write allows the user to write a value to a reference. • Tuning Parameters allows the user to tune PLC PID Instructions. • Status Info allows the user to view the PLC status. • Abort! allows the user to stop a communication action. Tools The Tools menu allows the user to set various options, settings, import and export variables among other functions. The Tools submenu is shown in Figure 10-16. Figure 10-16. Tools Submenu 10-16 • Fault Table allows the user to open the fault table.
Introduction to Local Logic Programming 10 Figure 10-17. Options Dialog Box Window The Window menu allows the user to control window placement, icon placement, and editor focus. The Window submenu is shown in Figure 10-18. Figure 10-18. Window Submenu • GFK-1742A Cascade allows the user to arrange all open block windows so that all title bars are visible and the active window is in front.
10 • Tile Horizontally allows the user to resize and horizontally arranges all open block windows so that all of them are visible. • Tile Vertically allows the user to resize and vertically arranges all open block windows so that all of them are visible. • Arrange Icons allow the user to align all minimized block windows. • Close All allows the user to close all open block windows. • Next Window allows the user to make the next window in the clockwise direction active.
10 Introduction to Local Logic Programming The connect to PLC button shown at left allows the user to connect to the PLC. The disconnect from PLC button shown at left allows the user to disconnect from the PLC The store folder to PLC button shown at left allows the user to store the folder to the PLC The load folder from PLC button shown at left allows the load the folder from the PLC The Local Logic Variable Table button shown at left toggles the Local Logic Variable Table on and off.
10 VersaPro/Local Logic Editor Window Layout The main VersaPro/Local Logic editor layout is shown in Figure 10-20. Menu Bar (DropDown Menus) Tool Bars Local Logic Program Window Folder Browser Information Window Local Logic Variable Table Figure 10-20. Local Logic Editor Main Screen Layout Changing a VersaPro Screen Layout If the default screen layout is not to your liking, you can easily change it.
Introduction to Local Logic Programming 10 Connecting the Local Logic Editor to the DSM VersaPro software has several communications options. The most commonly used communications option is to connect directly to the PLC SNP port, shown in Figure 10-21 below. Ethernet options are also available. All DSM314 programming is done through the VersaPro interface, yielding single point of programming for the module.
10 Building Your First Local Logic Program The VersaPro user environment is a self-contained environment that allows the user to perform all the actions necessary to create, edit, and download a local logic program to a DSM314 module. To aid the first time user the sections that follow will give a step by step process that results in a local logic program successfully downloaded to the motion module. To begin, evoke the VersaPro environment. Once in VersaPro, create a new VersaPro Folder.
Introduction to Local Logic Programming 10 Figure 10-23. New Folder Wizard Page 2 Click the Finish button to create the new folder. The resulting VersaPro display will be as shown in Figure 10-24.
10 Figure 10-24. New Folder VersaPro Main Screen At this point, we need to create an example Local Logic Program. To perform this action select File from the main menu, select New Program from the sub menu, and then select Local Logic.
Introduction to Local Logic Programming 10 Figure 10-25. Local Logic Program Creation This will cause the “Create New Local Logic Program” dialog box to be shown. For the example, enter the following text in the dialog box fields. Name: LLExample Description: My first Local Logic Program Motion Module Type: DSM314 The dialog box with these entries is shown in Figure 10-26.
10 Figure 10-26. Create New Local Logic Program Dialog Click the OK button. The Local Logic program named “LLExample” will be created and the editor window opened. The resulting display will be similar to Figure 10-27. Figure 10-27.
Introduction to Local Logic Programming 10 The Local Logic editor is a free-form text editor that allows users to enter programs in the style that they prefer. The example is of a very simple Local Logic program that does not represent a fully functional application because it is intended for instructional purposes only. The example program is a simple timer application that relies on the digital servos position loop sample period (2 mSec) as a time base.
10 Figure 10-28. VersaPro Local Logic (LLExample) At this point, the user needs to check the program to verify correct language syntax. The language syntax verification is done by selecting from the main menu Folder then the submenu Check Block ‘LLExample’. This causes the syntax check routines to run on the specified Local Logic program. Note: The user can also select Check All which will cause all the blocks within the folder to be checked.
Introduction to Local Logic Programming 10 Figure 10-29. LLExample Syntax Check Command Checking the blocks causes the information window to appear if it was not previously displayed. Note the Information window can be toggled on and off by pressing the icon. information toolbar The information window displays the output of the syntax check operation. If the sample program has been entered correctly, the user should receive a message indicating zero errors and zero warnings.
10 Figure 10-30. LLExample Successful Syntax Check If the information window indicates a syntax error has occurred, the user can scroll the information window to the line that contains the error message. While the information window has focus, double click the error message. This will cause the editor window to automatically go to the line within the program that caused this error.
Introduction to Local Logic Programming 10 Figure 10-31. LLExample Syntax Check Failure Chapter 12 contains additional details that cover an unsuccessful syntax check and corrective action. Once a successful syntax check has occurred, we need to set up the hardware configuration that will allow the example program to be downloaded to the correct DSM314 module. The order the example is done is not typical for most installations.
10 Figure 10-32. Hardware Configuration Rack Selection A dialog box will appear that warns the user that information will be deleted. The folder that we created for the example is new, as such no information will be lost. If the user has not created a new folder then they need to be aware that configuration information will be lost by performing this operation. It is recommended that you use a new “scratch” folder for this example. Answer Yes to the dialog box. (Figure 10-33) Figure 10-33.
Introduction to Local Logic Programming 10 Figure 10-34. Hardware Configuration 90-30 rack with CPU The user then needs to select the power supply and CPU that is appropriate for their installation. The reader should note that Local Logic requires that the CPU firmware be release 10 or higher and the CPU hardware support release 10.0 firmware as well. The default CPU “CPU351” does not support release 10.0 firmware. As such, we are going to change the CPU to the “CPU364” model.
10 Figure 10-35. Hardware Configuration 90-30 rack with CPU364 At this point, we need to add the DSM314 into the rack. To perform this step, select the rack slot that the DSM314 is to be installed. In our example, we are going to install the DSM314 in slot number 2. As such, we want to add the DSM314 module to this slot location. There are several ways to add modules to a rack slot. Consult the VersaPro documentation for additional details and procedure. Two methods to add the module are as follows.
Introduction to Local Logic Programming 10 Figure 10-36. Hardware Configuration 90-30 rack DSM314 Selection This operation will add the DSM314 to the rack and bring up the DSM314 configuration screens. This will allow the user to customize the DSM314 to their particular application. The reader should reference chapter 4 for details concerning the DSM314 configuration settings.
10 Figure 10-37. Hardware Configuration 90-30 rack DSM314 Settings Tab The example Local Logic program uses parameter registers P001,P003, and P004 as counters. The counters contain values that represent time. We want to be able to view these parameter registers in the DSM return data registers. To configure return data, access the Axis #1 tab and input 18 in Return Data 1 Mode. This tells the DSM that you want to return parameter registers. In Return Data 1 Offset, enter a 1.
Introduction to Local Logic Programming 10 Figure 10-38. Hardware Configuration 90-30 rack DSM314 Axis#1 Tab We need to repeat the above step for P003 and P004. To set this up, access the Axis #2 tab and input 18 in Return Data 1 Mode. This tells the DSM that you want to return parameter registers. In Return Data 1 Offset, enter a 3. This tells the DSM to return parameter P003.Next enter in 18 in Return Data 2 Mode and 4 in Return Data 2 Offset to tell the DSM to return P004.
10 Figure 10-40. Hardware Configuration 90-30 rack DSM314 CTL Bits Tab This completes the configuration changes necessary for the example. Close the Hardware Configuration tool and save the folder. To save the folder, select the File from the main menu and then select Save All from the file menu. The link between our example Local Logic program and the DSM314 module is now complete. The user can now create any required PLC rung ladder logic and then perform a Check All on the programs.
Introduction to Local Logic Programming 10 Figure 10-41. Communications Setup Password Dialog Box Once the user has entered the password, the communications configuration utility is invoked (Figure 10-42). VersaPro uses the Host Communications Toolkit (HCT) to provide the communications drivers. The reader should consult the “GFK1026 - GE Fanuc Communications Configuration Utility” for additional details concerning the proper application of this utility.
10 After configuring the communications port, the local logic program can be downloaded to the PLC CPU. To store the current folder to the PLC, choose PLC from the Menu Bar and Connect from the submenu. Once connected, choose PLC from the Menu Bar and Store from the submenu. The store operation begins the folder transfer process from the programmer to the PLC CPU. When the user initiates the store operation, a dialog box is presented that allows the user to choose what they wish to store to the PLC.
Introduction to Local Logic Programming 10 Figure 10-44. New Reference View Table Dialog Box The user can then insert variables, determine variable display formats, toggle data points, and send AQ commands, among other actions. Consult the VersaPro documentation for details on RVT construction. One example RVT that is useful for this program is shown in Figure 10-45. Figure 10-45.
10 Using the Motion Program Editor Now that we have successfully gotten our Local Logic program working, it would be nice to link in a Motion Program. The Motion Program editor is accessed in a manor very similar to the Local Logic editor. The editor allows the user to easily create, edit, store, and download Motion programs. To create a Motion program the user needs to have a VersaPro folder open.
Introduction to Local Logic Programming 10 Figure 10-47. Create New Motion Program Dialog Box The user then selects the OK button to create the Motion program. Once this action is complete, VersaPro brings up the Motion editor screen. (Figure 10-48). Figure 10-48. VersaPro Blank Motion Program Editor In the previous sections, the file menu functions where covered, this will not be repeated in this section. Please reference the previous sections for this information.
10 3URJUDP 1DPH //([DPSOH 'HVFULSWLRQ 7KH IROORZLQJ H[DPSOH ORFDO ORJLF SURJUDP LV D SURJUDP WKDW FUHDWHV D VLPSOH WLPHU 7KH WLPHU EHJLQV DIWHU WKH ILUVW /RFDOB/RJLFB6ZHHS KDV RFFXUUHG 7KH SURJUDP PDNHV XVHV WKH IDFW WKDW /RFDO /RJLF LV UXQ E\ WKH '60 HYHU\ P6HF 7KXV LW FRXQWV ORFDO ORJLF VZHHSV 7KH SURJUDP KDV WKUHH FRXQWHUV 7KH ILUVW FRXQWHU LV WKH PLOOLVHFRQGV FRXQWHU ZKLOH WKH RWKHU WZR FRXQWHUV DUH IRU VHFRQGV DQG PLQXWHV 7KH VHFRQGV FRXQWHU DQG PLQXWHV FRXQWHUV UROO RYHU DW 7KH SURJUDP
10 Introduction to Local Logic Programming CTL01 transition. The motion program will therefore make the motor shaft act like the second hand on a quartz clock. Not an elegant application, but it does demonstrate several concepts. Before we write the Motion Program, we will need to determine axis scaling. The first variable we need to determine is the user units to counts ratio. The User Units to Counts ratio sets the number of programming units for each position feedback count.
10 uu rev cnts User Units uu ⋅ TopSpeed ⋅ = Motor Top Speed ⋅ Enc. Counts per Rev ⋅ ⋅ sec sec rev Counts cnts uu 3000 rev cnts 600 uu ⋅ ⋅ TopSpeed ⋅ = ⋅ 8192 ⋅ ⋅ 60 sec sec rev 8192 cnts uu uu TopSpeed ⋅ = 3000 ⋅ 10 ⋅ sec sec uu uu = 30000 ⋅ TopSpeed ⋅ sec sec Next, we need to calculate the velocity and acceleration that we want for our move.
Introduction to Local Logic Programming 10 Given : t a = 0.01 ⋅ sec t d = 0.01⋅ sec x= 1 ⋅ rev 60 1 ⋅ rev 60 V pk = 0.01⋅ sec + 0.01⋅ sec rev V pk = 1.6667 ⋅ sec rev cnts 600 uu ⋅ 8192 ⋅ ⋅ ⋅ V pk = 1.6667 ⋅ sec rev 8192 cnts uu V pk = 1000 ⋅ sec V pk a= ta 2⋅ uu sec a= 0.01⋅ sec uu a = 10000 ⋅ sec 2 1000 ⋅ We are now ready to write our motion program. The code is as follows.
10 Figure 10-49. VersaPro Motion Editor MPExample At this point, the user needs to check the program to verify correct language syntax. The language syntax verification is done by selecting from the main menu Folder then the submenu Check Block ‘MPExample’. This causes the syntax check routines to run on the specified Motion program. Note: The user can also select Check All which will cause all the blocks within the folder to be checked.
Introduction to Local Logic Programming 10 Figure 10-50. MPExample Check Block Menu Checking the blocks causes the information window to appear if it was not previously displayed. Note the Information window can be toggled on and off by pressing the icon. information toolbar The information window displays the output of the syntax check operation. If the sample program has been entered correctly, the user should receive a message indicating zero errors and zero warnings.
10 Figure 10-51. MPExample Successful Syntax Check If the information window indicates a syntax error has occurred, the user can scroll the information window to the line that contains the error message. While the information window has focus, double click the error message. This causes the editor window to automatically go to the line within the program that caused this error.
10 Introduction to Local Logic Programming the field “Motion Program Block Name:”, we want to type in the name of our example program. Our example program is named “MPExample”. Thus, we type “MPExample” into this field. Note: This method of linking the DSM314 to a Motion program was chosen to allow the user to easily specify multiple DSM314s that all use the same Motion program. In our example, we only have one DSM314.
10 Figure 10-53. Hardware Configuration DSM314 Axis#1 Tab To finish our configuration we need go to the Tuning#1 tab and enter the following data.
Introduction to Local Logic Programming 10 Figure 10-54. Hardware Configuration Tuning#1 Tab At this point, we can close the module configuration dialog box. This is a good point to save our work. To save your work, select the File from the main menu and then select Save All from the file menu. The link between our example Motion program, Local Logic program, and the DSM314 module is now complete.
10 Figure 10-55. RVTExample Screen At this point, if we have no errors, we can execute the motion program. Enter a 1 (or toggle) Q bit offset 2 (%Q00003). The motor should then begin to execute the motion program and advance 1/60 of a revolution each second. Additional details concerning the interface between the DSM and the PLC are contained in Chapter 5.
Chapter Local Logic Tutorial 11 Introduction The Local Logic programming language supports assignment, conditional statements, arithmetic, logical, and relational operations. The Local Logic program runs synchronously with the motion module position loop and as such is deterministic. The language includes constructs that allow the Local Logic program to communicate information between the Logic program, the Motion Program, and the host PLC.
11 Comments Comments allow the programmer to describe program operation, or any information that the programmer wishes to embed in the program. Comment text begins with the (* character pair and terminates with the *) character pair and may appear anywhere within the program. For example: (* Valid Comment Structure *) The DSM during program execution ignores comments. Thus, comment lines do not count when determining local logic program length.
Local Logic Tutorial 11 The Local Logic Parser generates an error if the program attempts to write to a read only variable, or attempts to read a write only variable. In addition, Local Logic variables have a size attribute ranging from Boolean (1-bit) to double integer (64-bits). The Local Logic Parser generates a warning message when a non-Boolean value is assigned to a Boolean variable. The warning indicates that data may be lost, due to truncation, when this assignment occurs.
11 Relational Operators Relational operators compare two operands in a conditional statement. The < (less than), > (greater than), <= (less than or equal), >= (greater than or equal), = (equal), and <> (not equal) operators are valid relational operators. The IF statement body execution takes place when the conditional expression is a true. In the example, the variable Torque_Limit_1 is set to 10000 if the variable Block_1 equals 3.
11 Local Logic Tutorial isolates bits 1,3,14, and 16 from CTL_1_to_32 and places the result in P001. The next statement performs a bitwise test to see if any of the bits in the least significant byte are set.
11 Torque Limiting Program Example The following example illustrates a method to use local logic in concert with a motion program to perform torque limiting based upon a block number within a motion program. In the example, the servo axis 1 applies a nut on the threaded shaft. At the beginning the axis moves a little backward to improve the nut and shaft threads engagement. This motion has the torque limit set to the maximum value.
Local Logic Tutorial 11 Torque Limiting Motion Program 7RUTXH /LPLWLQJ 0RWLRQ 3URJUDP 3URJUDP $;,6 :$,7 &7/ $&&(/ 3 9(/2& 3 3029( $&&(/ 9(/2& &029( :DLW IRU VWDUW FRPPDQG 6HW DFFHOHUDWLRQ RI WKH PRWLRQ 6HW YHORFLW\ RI WKH PRWLRQ 3 ,1&5 /,1($5 %DFNZDUG PRWLRQ 3 6HW DFFHOHUDWLRQ RI WKH PRWLRQ 3 6HW YHORFLW\ RI WKH PRWLRQ 3 ,1&5 /,1($5 0DLQ QXW WZLVW PRWLRQ :$,7 &7/ 3029( $%6 /,1($5 -803 &7/ :DLW IRU JULSSHU UHOHDVHG VLJQDO 0RYH WR WKH LQLWLDO SRVLWLRQ -
11 Gain Scheduler Program Example The following example illustrates a method to use local logic to implement a simple gainscheduling algorithm. Care should be taken whenever one implements an algorithm that dynamically changes the control characteristics. In many situations, dynamically changing the control characteristics can cause the controlled process to go unstable. Note that the Velocity_Loop_Gain control variable may be written multiple times in the same sweep in the following program.
Local Logic Tutorial 11 Programmable Limit Switch Program Example The following example illustrates a method to use local logic to perform a programmable limit switch function. This particular programmable limit switch turns on/off an output based upon the current motor position and block within a motion program Digital_O utput1_1 ON O FF Actual_Position_1 4000 4500 Figure 11-1.
11 Trigger Output Based Upon Position Program Example The following example illustrates a method to use Local Logic to trigger a timed output based upon the current motor position. The reader should note that the timer implementation uses a counter within the program. The counter counts the number of times the program has been executed since the counter was last reset. Since local logic programs are executed every position loop sample period, the counter time period is based upon this period.
Local Logic Tutorial 11 (1'B,) (1'B,) ,) 3 7+(1 3 3 ZKHQHYHU 'LJLWDOB2XWSXW B LV 21 LQFUHPHQW WKH 7LPHU E\ PV ,) 3 ! 7+(1 ZKHQ WKH 7LPHU H[FHHGV PV 'LJLWDOB2XWSXW B WXUQ 'LJLWDOB2XWSXW B 2)) 3 UHPHPEHU RQO\ WKH ODVW ZULWH LQ D /RFDO /RJLF VZHHS DFWXDOO\ RFFXUV IRU WKH GLJLWDO RXWSXW (1'B,) (1'B,) The motion program segment corresponding with the above local logic program is shown below.
11 Windowing Strobes Program Example The following example illustrates a method to use local logic to perform a windowing strobe function. The example ignores the strobe command unless the current motor position is inside the window (Actual Position > 4000 but less than 5000). If the motor position is inside the aforementioned window, the first strobe occurrence causes the current motor position to be captured within the strobe register. The application is shown pictorially in Figure 11-3.
Chapter Local Logic Language Syntax 12 Introduction This chapter describes the Local Logic programming language syntax, rules, and language elements. The language uses free-format text based constructs derived from the IEC 1131 structured text standard. The sections that follow describe the available commands and the command syntax. Syntactic Elements The local logic language syntax is described in the following sections.
12 Examples: 16#FFFF Hexadecimal constant 16#7fff_ffff Hexadecimal constant with embedded underscores Binary (base 2) constants are identified by a 2# prefix and must have a value that can be represented in 32-bits (32 binary digits). Binary constants cannot have a sign (+/-) prefix.
Local Logic Language Syntax 12 The operator may consist of any read-write or write-only variable. The may be a simple constant or variable, a mathematical or bitwise logical operation on two operands, an ABS function, or a bitwise NOT operation. Write-only variables can not be the expression for an assignment operation. Examples: Í This construct is okay. Í This construct is okay. P001 := ABS(Analog_Input1_1); Reset_Strobe1_1 := BWNOT Strobe1_Flag_1; Í This construct is okay.
12 IF BWNOT P100 THEN IF BWNOT P001 <> P002 THEN Í This construct is okay. Í This construct is ILLEGAL – too many operations. If statements may nest up to 8 levels deep. When counting the number of program statements, the IF-THEN and END_IF statements count as two separate statements. Table 12-1.
Local Logic Language Syntax 12 In the above code segment, the end comment structure, line shown in bold/italic for illustrative purpose, is incorrect because the asterisk in the close comment structure is absent. The error causes the following line to be considered a comment as well. Thus, the statement Digital_Output_1:=0 is considered a comment and not executed. The color scheme within the Local Logic editor can be very useful to help find these types of problems.
12 Enabling and Disabling Local Logic Local Logic execution is enabled using a PLC Q bit. For example if a DSM is configured with a starting %Q reference of %Q0001 then the Local Logic enable bit is %Q0002 (beginning reference + offset of 1 ). The Local Logic program name must be specified in VersaPro Hardware Configuration and the field for Local Logic Enabled/Disabled must be set to Enabled. Refer to Chapter 10 for a detailed description of configuring Local Logic in Versapro Hardware Configuration.
Local Logic Language Syntax 12 Example: Jog_Plus_1 := TRUE; (* Turn on Jog Plus for Axis 1 *) Strobe_Reset1_3 := 0; (* Turn off the Strobe 1 reset bit for Axis 3 *) (* Some more code here *) Follower_Ratio_A_1 := 10; (* Set the Follower Ratio A for Axis 1 to 10 *) Jog_Plus_1 := FALSE; (* Turn off Jog Plus for Axis 1*) Strobe_Reset1_3 := 1; (* Turn on the Strobe 1 reset bit for Axis 3 *) Follower_Ratio_A_1 := 20; (* Set the Follower Ratio A for Axis 1 to 20 *) For each of the output commands shown above
12 Local Logic Arithmetic Operators The Local Logic language contains familiar constructs to perform basic signed integer arithmetic computations. The language supports 32-bit arithmetic in the Local Logic program and limited use of 64/32-bit arithmetic. All operations require two operands except for the ABS function, which returns the absolute value of a variable or numeric constant. Table 12-3.
Local Logic Language Syntax 12 Operator Subtracts source2 from source1 and stores the result in destination destination := source1 – source2; The – operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers. source1 Any readable local logic variable/constant except Dxx registers. source2 Any readable local logic variable/constant except Dxx registers.
12 Operator / Performs signed integer division of source1 by source2 and returns the quotient in destination. A double precision (64-bit) parameter register may be used as the numerator. Syntax 1 destination := source1 / source2; Syntax 2 destination := double source1 / source2; The / operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers. source1 Any readable local logic variable or numeric constant.
Local Logic Language Syntax 12 Operator MOD The MOD operator returns the remainder resulting from the signed integer division of source1 by source2. A double precision (64-bit) parameter register may be used as the numerator. Syntax 1 destination := source1 MOD source2; Syntax 2 destination := double source1 MOD source2; The MOD operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers.
12 Function ABS The ABS function returns the unsigned magnitude of the variable or constant parameter. Syntax destination := ABS(parameter); The ABS operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers. Parameter Any readable local logic variable/constant except Dxx registers. Overflow – Set if the operand has a value of –2,147,483,648. The Module_Status_Code is set to a value of 16#0096, which is a status-only error.
Local Logic Language Syntax 12 Local Logic Bitwise Logical Operators All logical operations are performed on a bit-by-bit basis, for example the result of a BWAND operation is composed of 32 and operations between each of the corresponding bits of the operands. The logic operators are prefixed with ‘BW’ to highlight the fact that they are not Boolean operators. Table 12-4.
12 Operator BWOR The BWOR operator returns the bitwise or on source1 and source2. Syntax 1 destination := source1 BWOR source2; Syntax 2 IF source1 BWOR source2 THEN The BWOR operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers. source1 Any readable local logic variable/constant except Dxx registers. source2 Any readable local logic variable/constant except Dxx registers.
Local Logic Language Syntax 12 Operator BWNOT The BWNOT operator returns the one’s complement of the source parameter. Syntax 1 destination := BWNOT source; Syntax 2 IF BWNOT source THEN The BWNOT operator syntax has these parts: Part Description Destination Any writeable local logic variable except Dxx registers. source1 Any readable local logic variable/constant except Dxx registers. Remarks Syntax 1 is used for assignment, syntax 2 is used in a conditional evaluation.
12 Comparison Operators The comparison operators form a relational assertion between two operands. The comparison expression evaluates the conditional based on the operands signed integer value. Table 12-5. Relational Operators Operator < > <= >= = <> Meaning Less than Greater than Less than or equal to Greater than or equal to Equal to Not Equal to Comparison operators may only be used as expressions in conditional statements, and only one comparison operator may be used per expression.
Local Logic Language Syntax 12 Local Logic Runtime Errors Overflow Status Some arithmetic operations may have results that cannot be correctly represented as a signed 32-bit value. An example is shown in the following code segment. P001 := 16#7FFF_FFFF; // (1) P001 P003 := P001 + 1; Í 2,147,483,647 (maximum positive 32 bit value) // (2) ! Overflow ! In the first line, P001 is loaded with 2,147,483,647, the largest value that can be represented as a 32 bit signed two’s-complement value.
12 Watchdog Timeout Warning / Error Local Logic programs are constrained to complete execution within 300 microseconds in the Logic Engine. This is to allow sufficient processing time in the module for Path Generation and other tasks. Refer to Appendix E for a detailed listing of the execution times for all valid Local Logic operations. The user can compute the execution time required for a given program using the data tables supplied in Appendix E.
Local Logic Language Syntax 12 Local Logic Error Messages Local Logic Build Error Messages The local logic program build process communicates the build status through the local logic, editor error log window. In the event an error occurs, the build process reports the error and attempts to continue the build process. Error messages generated by the local logic build process fall into three categories; syntax errors, parse errors, and parse warnings. Parser error messages have several common elements.
12 Local Logic Parse Errors Parse errors occur when the program syntax is correct, but there is a semantic problem. For example, it is invalid to assign a value to a double precision variable except as the result of a multiplication operation. Examples: Error (P203) Invalid assignment to Double precision var: D00 In this case the error message is followed by a string which identifies the token that caused the error. A list of Parse errors and typical causes follows: Table 12-7.
Local Logic Language Syntax 12 Error Number (P221) (P222) (P223) (P230) (P231) (P232) (P233) (P240) (P241) (P242) (P260) (P280) (P290) (P291) (P292) (P293) 298(P299) (P300) (P301) GFK-1742A Error Description Binary constants must be in range of 0 to (2^32)-1 The program has defined a binary constant that cannot be represented in 32 bits Integer constants must be in range of -2147483648 to 2147483647 The program has defined a decimal constant that cannot be represented in 32 bits Constant table ove
12 Error Number Error Description (P302) Invalid directive parameter An invalid argument to the #pragma errors only directive was specified. The argument must be 1, ON, 0, or OFF. Local Logic Parse Warnings Parse warnings are generated for conditions that may have unexpected results or indicate a possible oversight in the Local Logic Program. Table 12-8.
Local Logic Language Syntax 12 Local Logic Download Error Messages The following errors may be reported in the Module Status Code when a Local Logic program is downloaded into the module. Table 12-9.
12 Local Logic Runtime Errors The following errors and warnings may be reported when a Local Logic program is executed in the module. Table 12-11.
Chapter Local Logic Variables 13 Local Logic Variable Types Local Logic accesses the motion controller variables and parameter registers using pre-defined variable names. Refer to Table 13-1 through Table 13-6 for a complete listing of all Local Logic variables. Examples: IF Actual_Position_2 > 5000 THEN ...; IF Strobe1_Level_2 = ON THEN ...
13 as the destination variable in a non-Boolean Math operation (only the least significant bit of the result would be stored). Note: The AQ command variables (Torque Limit, Velocity Loop Gain, Follower Ratio, Position Increment and Position Loop Time Constant) may have an allowed range that is smaller than the Local Logic variable size. The module reports a warning error code and rejects any invalid values if the program attempts to write a value outside the valid range of an AQ command.
Local Logic Variables 13 3) It’s cleared when the user toggles the error clear Q bit. System_Halt variable The System_Halt variable is a Write-Only Bit Operand (refer to Table 13-5). If the Local Logic program writes a 1 to the System_Halt variable servo motion and Local Logic execution is halted. An error code is also reported in the Module Status Code ( refer to Chapter 12). Thus the System_Halt variable can be used to trap for fatal error conditions and perform error recovery.
13 Local Logic User Data Table Local Logic provides an 8192 Byte Circular Buffer which can be used to store and retrieve data by the Local Logic program. Refer to Table 13-5 for a listing of the Data_Table variables. The data table is accessed using indirect memory addressing. The Data_Table_Ptr variable (the “Pointer”) is used to point to the correct Byte location in the 8192 Byte buffer. Therefore the Data_Table_Ptr variable size is 13 bits (0-8191 allowed range).
Local Logic Variables 13 Table 13-1.
13 Servo_Ready_1 Follower_Enabled_1 Follower_Velocity_Limit_1 Follower_Ramp_Active_1 Read Only Read Only Read Only Read Only Bit Operand Bit Operand Bit Operand Bit Operand Notes: (1) These Digital Outputs must be configured for Local Logic control in VersaPro Hardware Configuration in order to be writeable by Local Logic. (2) The Position_Increment_Cnts_n variable has a maximum range of r1023 counts. Table 13-2.
Local Logic Variables 13 Strobe1_Flag_2 Strobe2_Flag_2 Drive_Enabled_2 Program_Active_2 Moving_2 In_Zone_2 Position_Error_Limit_2 Torque_Limited_2 Servo_Ready_2 Follower_Enabled_2 Follower_Velocity_Limit_2 Follower_Ramp_Active_2 Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Read Only Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Bit Operand Notes: (1) These
13 Table 13-4.
Local Logic Variables 13 Table 13-6.
Chapter Local Logic Configuration 14 CTL Bit Configuration The VersaPro programming environment allows the user to configure the input source for CTL bits (CTL01-CTL24) using the Hardware Configuration screen. From the Hardware Configuration screen, select the DSM314 module you wish to configure. Reference chapter 10 for the correct menu/toolbar button sequence to access Hardware configuration. The DSM314 configuration screens contain a tab called CTL Bits.
14 New CTL bits CTL01-CTL32 • CTL01 - CTL24 are configurable CTL bits. • CTL25-CTL32 are non-configurable CTL bits providing Local Logic read and Local Logic write. Table 14-1.
14 Local Logic Configuration The figure below illustrates the sources that write to CTL bits and the destinations that read CTL bits: CTL01-CTL24 Source Source for each bit configurable as: 1. 2. 3. 4. 5.
14 CTL01-CTL24 Bit Configuration Selections Each of the bits CTL01-CTL24 are individually configurable. CTL17-CTL22 default to the %Q digital output control bits for axis 1 - axis 3. CTL23-CTL24 default to Fast Backplane Status Access (FBSA) write bits 1-2. The configuration choices are shown in the following table. Table 14-2.
14 Local Logic Configuration FBSA Function and CTL Bit Assignments The backplane Fast Backplane Status Access (FBSA) function will write 4 bits to the DSM and read 8 bits. The FBSA function is mapped as shown in the following table. For information on the FBSA service request, refer to GFK-0467L (or later version), the Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual. Table 14-3.
14 Faceplate Output Bit Configuration The VersaPro programming environment, through Hardware configuration, allows the user to configure the DSM314 faceplate digital outputs for either Local Logic program control or PLC program control. To access the Output Bits configuration screen, evoke Hardware configuration from VersaPro. Once inside Hardware configuration, select the DSM314 module you wish to configure. Reference GFK-1670 or the VersaPro 1.
Chapter Using VersaPro with the DSM314 15 Getting Started Note: VersaPro Version 1.1 or later is required for use with the DSM314. This document discusses how to start the VersaPro software and use it to access the DSM314 configuration, motion programming, and Local Logic programming screens. It does not tell you specifically what values to configure, or what commands to use in motion or Local Logic programs. That information is covered elsewhere in this manual.
15 • Before creating a file, check the Workbench default settings to make sure that Series 90-30 is the default PLC. To do this, click Tools on the Menu bar (see Figure 15-4), then click the Options selection. The Options dialog box will appear, as shown next: Figure 15-2. Checking the VersaPro Default Settings in the Tools/Options Dialog Box • Make sure Series 90-30 is shown in the Default Hardware Configuration box, then click the OK button.
Using VersaPro with the DSM314 15 Name is “Pumphouse_Number_1,” the Nickname stored to the PLC is “umber_1” which may not convey the meaning you desire. Better names might be something like “PHouse1” or “PH1.” Chapter 2 of the VersaPro user’s manual (GFK-1670) has a section that explains the rules for creating Folder Names, including which characters are allowed.
15 Starting the Configuration Process The configurator is actually a separate program that you can launch from the Main screen (shown in the previous figure). To begin, double click the Hardware Configuration icon to launch the HWC (Hardware Configuration) program. The HWC screen may appear as a window in or on top of the VersaPro Workbench, as shown below. If so, click the Expand button to expand it to full size. (You may also have to click the Expand Button in the smaller window to expand it also.
Using VersaPro with the DSM314 15 • If you are not able to read the module numbers clearly, you can enlarge the left window by dragging its border (noted in the previous figure) to the right. After doing so, your screen should look similar to the next figure: Figure 15-7. Enlarged Hardware Configuration Screen You are now ready to begin the configuration process, described in the next section “Configuring the DSM314.
15 Configuring the DSM314 The following information disusses configuring the DSM314. For configuring other hardware, please refer to the VersaPro User’s Guide, GFK-1670, and the VersaPro on-line help. • With the Configuration window open, as shown in the previous figure, double click the empty slot where the DSM314 is to be installed. You will see a Module Catalog window appear with a list of module categories: Figure 15-8.
Using VersaPro with the DSM314 15 • Double click the IC693DSM314, or highlight it as shown and click the OK button. The DSM314 will be added to the on-screen rack, and its Configuration window will appear: Figure 15-10. DSM314 Hardware Configuration Window The figure above shows the DSM314 default configuration settings. Only 11 of the selection tabs are displayed. Other tabs not shown will appear if their associated parameters are selected.
15 • When finished configuring the module, click the DSM314 configuration window’s close button (the button in the upper right corner of the configuration window with an X) to return to the “Rack View.” At this point, your configuration settings are not yet saved to disk. They only reside in your computer’s volatile RAM memory. Saving Your Configuration Settings to Disk 15-8 • Click File on the Menu bar, then click Save on the drop-down File menu.
Using VersaPro with the DSM314 15 Connecting to and Storing Your Configuration to the PLC Note You cannot store your configuration file to the PLC from within the configurator program. You must be on VersaPro’s Main LD screen in order to store to the PLC. Useful Tool Bar Icons Several toolbar icons will be used in the next several steps to initiate such operations as Connect, Stop the PLC, and Store. The following figure identifies these toolbar icons: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.
15 • If connecting directly to the PLC programmer port from the COM1 serial port on your computer, use the DEFAULT settings shown in the figure above. • Make sure your serial cable is connected between your computer and the serial port on the PLC. Then click the Connect button on the Connect dialog box to begin connecting to the PLC. The message bar at the bottom of the VersaPro screen will display a “Connecting” message with a horizontal bar graph.
Using VersaPro with the DSM314 15 Using the Motion Editor Accessing the Motion Editor Screen Both the Motion Editor and Local Logic Editor are accessed from the VersaPro Folder Browser window. However, once created and saved, motion programs and Local Logic programs become part of the PLC CPU Hardware Configuration and are Stored to the PLC with the other configuration information. • On the Main LD screen, click File on the Menu bar, then select New Motion.
15 Test102 in this case, and motion program name, Part1 in this case. Notice also in the next figure that an icon for the new motion program, called “Part1 – MP” (Motion Program), appears in the Folder Browser window. Figure 15-17. A New Motion Editor Window • The text-based motion programs and subroutines are created in the Motion Editor window, as shown in the following figure.
Using VersaPro with the DSM314 15 Saving your Motion Program • When ready to save your motion program/subroutine file to your computer’s hard disk, either click the Save icon on the tool bar (looks like a floppy diskette), or click File from the Menu bar and click Save.
15 to start printing. Motion program, Local Logic, and Ladder Diagram blocks will be printed as part of this report. • To print only selected blocks, highlight them in the Folder Browser window. Click File on the Menu bar and select Print Report. Click the Blocks checkbox, then choose the Selected radio button. This limits the reports to only those blocks that you have highlighted in the Folder Browser window. See the next figure for an example of this.
Using VersaPro with the DSM314 15 Accessing the Local Logic Editor Screen Both the Motion Editor and Local Logic Editor are accessed from VersaPro’s Folder Browser window. However, once created and saved, motion programs and Local Logic programs become part of the PLC CPU Hardware Configuration and are Stored to the PLC with the other configuration information. • On the Main LD screen, click File on the Menu bar, then select New Motion. Then, on the side menu, click Local Logic Program. Figure 15-21.
15 Figure 15-23. New Local Logic Program Window The text-based Local Logic program is created the left window (Local Logic Editor window). Details on Local Logic commands and syntax are covered in Chapters 10 - 14. Saving your Local Logic Program When ready to save your Local Logic file to your computer’s hard disk, either click the Save icon on the tool bar (looks like a floppy diskette), or click File from the Menu bar and click Save.
Using VersaPro with the DSM314 15 Printing a Hardcopy of your Local Logic Program There are two print selections on the File menu: Print and Print Report. Print: • Printing your entire Local Logic file (block): While the Local Logic Editor is active, click File on the Menu bar and select Print. The Printer dialog box will display. Make any desired printer setup changes, then click the OK button. Figure 15-24.
15 Highlighted Local Logic Program Block “Selected” Radio Button Folder Browser Window Figure 15-25. The Print Report Dialog Box Viewing the Local Logic Variable Table The Local Logic Variable Table appears in the Information Window area of the screen and contains information on the variables used in your Local Logic program. To use this feature, a Local Logic block must exist. If none exist, create a new one.
Using VersaPro with the DSM314 15 Once the Local Logic Variable Table appears near the bottom of the VersaPro screen, you can drag its top border or column borders to size them to your preference. See the next figure. Figure 15-27. View Showing Local Logic Variable Table near Bottom of Screen This table is useful when creating a Local Logic program because it allows you to copy and paste variable names, such as “Actual_Position_1,” into your program.
Chapter Using the Electronic CAM Feature 16 Section 1: Introduction This chapter introduces the reader to the DSM314 release 2.0 electronic CAM function. An electronic CAM is analogous to a mechanical CAM. In most cases, an electronic CAM not only can replace the traditional mechanical CAM but performs many functions not achievable with its mechanical counterpart. For example, an electronic CAM never mechanically wears out.
16 Cutter Motor Blade Product Master Encoder Figure 16-2. Rotary Knife Application Another example application is a bottle filling line (reference Figure 16-3 and Figure 16-4). In this case, the lift that raises and lowers the bottles serves as the CAM master. The slave is the plunger that pushes the fluid into the bottle. In this example, the bottles have a curved shape.
Using the Electronic CAM Feature 16 F ill T a n k P lu n g e r A xis (S la v e ) M a s te r E n co d e r Figure 16-4.
16 Basic Cam Shapes/Definition Electronic Cams duplicate the behavior of their mechanical counterparts. The following figure illustrates the elements of a basic mechanical cam system and shows the Slave Position for two positions of the Master Cam. As the Master Shaft rotates, the Master Cam, which is fastened to the Master Shaft, rotates as well. The Cam Follower (which is a ball bearing mounted to the Offset Link Arm) rolls on the Master Cam as the Master Cam rotates.
16 Using the Electronic CAM Feature Section 2: Cam Syntax This section covers some critical features of the CAM feature and introduces the CAM Motion Program statements and error codes. CAM Types An important concept concerning the CAM function is the different CAM types available. The CAM profiles can be one of the following types: 1) Non-Cyclic CAM 2) Linear Cyclic CAM 3) Circular Cyclic CAM The following sections describe each of these CAM types.
16 Note For any Cyclic CAM, the master High/Low Position limits in Hardware Configuration must be set up according to the master rollover points in the CAM profile. The master axis Low Limit must equal the first master position in the profile. The master High Position Limit must be equal to the (Last Master Position – 1) in user units. This is because a cyclic profile's first and last point are the same on the physical device. 2.
Using the Electronic CAM Feature 16 Note 1. 2. 3. The Editor will not display “Circular Cyclic” as an option in the “CAM Type” field unless the constraint described above is satisfied. For Cyclic CAMs, the master High/Low Position limits in Hardware Configuration must be set up according to the master rollover points in the CAM profile. The master axis Low Limit must equal the first master position in the profile.
16 Interpolation and Smoothing One CAM key feature is the interpolation scheme used to define the CAM profiles. The following is a reprint of a section from the CAM Editor help system. It is included in this section to not only introduce these important concepts, but also to encourage you to explore the CAM Editor on-line help for additional information. The CAM editor employs spline polynomial interpolation to define regions of a profile that fall between user-defined points.
Using the Electronic CAM Feature 16 Blending Sectors The process applied to blend adjacent sectors depends on their curve-fit order. The following descriptions cover the possible scenarios. 1st order to 1st order No action is taken to smooth the transition between successive linear sectors (that is, with curve-fit order of 1). The profile simply connects the end point of one sector to the start point of the next with a straight line.
16 sectors meet are made equal. The curve-fit polynomial coefficients for the two adjacent segments are calculated simultaneously. Boundary Conditions For non-cyclic profiles it is necessary to define some condition at the start and end of a profile for the purpose of calculating curve-fit polynomial coefficients. The start or end boundary condition can be: • The numerical value of the profile's 1st derivative (slope). • The numerical value of the profile's 2nd derivative. • Based on a default calculation.
Using the Electronic CAM Feature 16 Interaction of Motion Programs with CAM CAM motion shall be initiated in the DSM314 using instructions in the motion program. The following new motion instructions are required to support CAM motion programming: 1) CAM: Used in the motion program to start CAM motion and specify exit conditions. 2) CAM-LOAD: Used to load a parameter register with the starting location for a CAM slave axis.
16 Notes 1. 2. 3. The CAM instruction is not permitted in a Multi-Axis motion program. A CAM command counts as two instructions towards the 1000 instruction limit in a motion program. The Profile Names UDT_CAM_1, UDT_CAM_2, UDT_CAM_3 and UDT_CAM_4 are reserved for future usage. The argument in the CAM command is used to define the maximum distance the master can travel through the profile before exiting.
Using the Electronic CAM Feature 16 CAM-LOAD Command The CAM-LOAD command is used to load the slave axis position into a parameter register. A regular PMOVE command can then be used to move the slave axis to the loaded position. The CAM-LOAD command uses the CAM profile name, actual master position and phase (specified using the CAM-PHASE command) to determine the starting point for the slave axis.
16 CAM-PHASE Command The CAM-PHASE command is used to specify a phase for CAM commands. This command lets you offset or shift the phase relationship between the master position and follower position. The phase value may be specified either through a parameter register or as a constant. Note that a phase value is active for all CAM instructions that follow it, until modified by another CAM-PHASE command. The default Cam Phase value for a motion program is 0.
Using the Electronic CAM Feature 16 travel for the driven load. In our example, the motor connected to the driven load has an encoder that produces 8,192 counts per motor revolution. Thus, 8,192 feedback counts equals 1 inch of load travel. Some users would find it easier to program motion in inches rather than in feedback counts. In our case, we could set up our scaling such that we can program motion in thousandths of an inch.
16 Figure 16-8. Slave User Units/Counts Hardware Configuration The Master User Units/Counts value would be entered as shown in Figure 16-9 Figure 16-9. Master User Units/Counts Hardware Configuration This tells the module the correct scaling to use when it runs motion programs. However, the CAM Editor also needs to know the correct scaling to perform the proper transformations from user units to counts. For our example, we need to enter this data into any CAM profiles we plan to run on these axes.
16 Using the Electronic CAM Feature When you finally correct this error and enter the correct scaling, you will note that all non-zero numbers in the CAM data tables have changed to reflect the new User Units values. The following section discusses how the CAM editor rounds values when the user is entering data. This function is performed automatically and does not require the user to perform or configure the editor in any special way.
16 Figure 16-11. CAM Data Table User Units Example The CAM Editor automatically changes the values to correspond with an integer number of feedback counts. The Editor also rounds the displayed values to limit clutter within the table. Note that the editor maintains the variable’s precision and it is only the display that is rounded. For illustration, we will perform the functions that are automatically performed by the CAM editor below.
Using the Electronic CAM Feature 16 Synchronization of CAM Motion with External Events The following mechanisms allow the programmer to synchronize CAM motion with external events: GFK-1742A • The start of CAM motion can be synchronized with an external event by using the existing WAIT command in a motion program. • A Cyclic CAM can be synchronized with a strobe using Local Logic variables. Refer to Chapter 11-14 for additional information concerning Local Logic.
16 CAM-Specific DSM Error Codes Table 16-4. CAM Specific Error Codes Cam Program Error Codes Error Code (hex) 2A Response Description Normal Stop Cyclic CAM CTL Exit condition specified for Non-Cyclic CAM Axis 2B Normal Stop CAM Phase out of range Axis Error Type Possible Cause CTL exit conditions are permitted for Cyclic CAMs only. The motion program contains a non-cyclic CAM instruction with a CTL exit condition. The CAM PHASE value is outside the axis position range.
16 Using the Electronic CAM Feature Configuration Parameter Error Codes Error Code (hex) 1D Response Description Normal Stop Attempt to use CAM, CAM-Load, or CAMPhase commands with Follower Mode Error Type Possible Cause Axis 1. 2. If using CAM, ensure that Follower Mode is not configured (Follower Mode cannot be used when using CAM). If using Follower Mode, ensure that CAM commands are not present in motion program (CAM cannot be used when Follower Mode is configured).
16 Section 3: Electronic Cam Programming Basics This section contains an introduction to the basic electronic CAM programming concepts. The Local Logic function, and motion programming are not discussed in detail in this section, since they are discussed in other chapters in this manual. Requirements The Local Logic, CAM Editors, and Motion Program editors are integrated within the VersaPro version 1.5 or later software.
Using the Electronic CAM Feature 6. Specify the CAM Type 7. Specify the Correction Property 8. Save the CAM profile 9. Generate motion and Local Logic programs 16 10. Set up hardware configuration in VersaPro 11. Execute (test) the application Step 1: Create a New Folder You should begin by opening VersaPro. The method required to do this is described in Chapter 15 of this manual, in the VersaPro on-line help, and in the VersaPro manual, GFK-1670.
16 Figure 16-13. New Folder Wizard page 2 Clicking the finish button will cause VersaPro to create the folder and enter the main program. Step 2: Create a CAM Block Using the CAM Editor The CAM editor is integrated into the VersaPro environment. The editor allows you to easily create, edit, store, and download CAM blocks. To create a CAM block, you must open or create a new VersaPro folder (see Step 1). Refer to Chapter 15 for information on how to create or open a folder.
Using the Electronic CAM Feature 16 Figure 16-14. Create CAM Program A “Create New Program” dialog box will now appear that allows you to give the CAM block a name, a descriptive comment, and select the motion module type. At this time, the CAM feature is only supported on the DSM314 (release 2.0). Therefore, the default selection for Motion Module Type should not be changed. (Figure 16-15).
16 Figure 16-15. Create New CAM Program Enter the data in the “Create New CAM Program” box, then click the OK button to create the CAM Block. This will prompt VersaPro to launch the CAM editor program. (Figure 16-16) Figure 16-16. Initial CAM Editor with InfoViewer Screen The CAM Editor contains extensive on-line hypertext help. This manual only attempts to introduce some of these concepts.
Using the Electronic CAM Feature 16 Step 3: Create a CAM Profile The next step is to create a simple CAM profile in the CAM editor. The CAM Editor has a CAM profile library that is created by the user. The CAM profiles within the library are then linked to the CAM blocks. Additional information on this interlinking is contained within the on-line help. For our example we must first create a profile in the library.
16 Figure 16-18. New Profile Creation You can then rename this profile to a name more suitable to the application if desired. The naming rules are: • Any alpha-numeric character or the underscore ( _ ) symbol may be used. • The first character in a profile name must be a letter. • A profile name cannot be more than 20 characters long. • A profile is referenced by name in a VersaPro motion program. NOTE: VersaPro is not case-sensitive when referencing a profile name.
Using the Electronic CAM Feature 16 Figure 16-19. Rename Profile Step 4: Link the CAM Profile to the CAM Block • CAM Profiles must be linked to their associated CAM block. A CAM block can contain numerous CAM profiles. The DSM has two limits that affect the number of profiles. The maximum CAM block size is 50K, and the maximum number of linked profiles for an individual block is 100. The CAM Profile library is only limited by available disk space on the host computer.
16 Figure 16-20. Linking a Profile to a CAM Block Step 5: Configure CAM Profile Data Points Once these operations are complete, you must configure the CAM profile. The CAM profile is a relationship between the master position and the slave position. For this example, we are going to configure a simple CAM profile. A CAM profile is composed of a series of Points. Each point is defined by two coordinates.
Using the Electronic CAM Feature 16 Short-Cut Menu Curve-Fit Column CAM Profile Graphical Editor CAM Profile Table Editor Figure 16-21. Inserting a Point in the Profile Editor Window Since the Slave Position end point is the same value (0) as the initial Slave Position point, this CAM meets the requirements for a Linear Cyclic CAM. (If desired, refer to Section 2 for more information on the different CAM types.
16 Selected Point Coordinates of Selected Point . Figure 16-23. CAM Editor Example There are numerous other features in the editor. These include being able to define additional sectors that each have a different curve fit method. These editor features are discussed in the programming software’s on-line help. Please reference this source for additional information. Step 6: Specify the CAM Type The next item we want to specify is the CAM type.
16 Using the Electronic CAM Feature Curve-Fit Order Number Sector Bracket CAM Type Drop-Down Menu Figure 16-24. CAM Editor CAM Type Selection Step 7: Specify the Correction Property The last item we need to specify for the simple example is the correction status. The Correction property determines whether the motion module will permit an online correction for a specific sector. A sector is a region of a CAM profile defined by at least two adjacent user-defined points.
16 Figure 16-25. CAM Editor Correction Enable Step 8: Save the CAM Profile At this point, we have defined a simple CAM profile. Next, we will save the profile and return to the main VersaPro program. To save the CAM blocks/profiles, select the File main menu item followed by the Save Project submenu selection. You could also select Exit, which causes an automatic save. The CAM editor has many more additional features and functionality.
16 Using the Electronic CAM Feature // Motion program for example CAM block // Slave Axis Program 1 AXIS1 VELOC 10000 ACCEL 10000 100: WAIT CTL01 110: CAM-LOAD "ExCamProfile", P006, ABS 120: PMOVE P005, ABS, LINEAR 130: 140: 150: CAM "ExCamProfile", 50000, ABS PMOVE 0,ABS,S-CURVE // Set Velocity // Set Acceleration // Wait For LL to Say Master is ready // Load Param. Reg.
16 // Local Logic Program for CAM Example CTL01 := 0; // Outputs written when logic completes initialize to zero to allow toggle to true // Outputs written when logic completes initialize to CTL08 := 0; zero to allow toggle to true // Control Logic for Program 1 and 2 // Program 1 = Slave // Program 2 = Master IF PROGRAM_ACTIVE_2=1 THEN // Make sure Program 2 is active IF BLOCK_2=210 THEN // Indicates Master is Ready to Start CAM IF PROGRAM_ACTIVE_1=1 THEN // Check that Program on Axis 1 is active IF BLOCK_
Using the Electronic CAM Feature 16 Figure 16-26. CAM Example VersaPro Screens Step 10: Set up Hardware Configuration in VersaPro Once a successful syntax check is completed for the local logic and motion programs, we need to set up the hardware configuration that will allow the example program to be downloaded to the DSM314 module. The sequence of steps in this example is not typical for most installations.
16 Figure 16-27. Hardware Configuration Rack Selection A dialog box will appear that warns that information will be deleted. The folder that we created for the example is new; therefore, no information will be lost. If you have not created a new folder, be aware that configuration information will be lost by performing this operation. It is recommended that you use a new “scratch” folder for this example. Answer Yes to the dialog box, shown in Figure 16-28. Figure 16-28.
Using the Electronic CAM Feature 16 . Figure 16-29.
16 Next, you must select the power supply and CPU that are appropriate for your installation. Note that Local Logic requires that the CPU be equipped with firmware release 10.00 or higher. The default “CPU351” CPU does not support release 10.00 firmware, but the “CPU363” CPU does; therefore, we are going to change the CPU to the “CPU363” model. The steps are: • Right-click the CPU on the hardware configuration screen and select Replace CPU from the short-cut menu. A module selection box will appear.
16 Using the Electronic CAM Feature At this point, we need to add the DSM314 into the rack. To perform this step, select the rack slot where the DSM314 is to be installed. In our example, we are going to install the DSM314 in slot number 2. There are several ways to add modules to a rack slot. Two methods to add the module are presented here (consult the VersaPro documentation for additional details and procedures).
16 This operation will add the DSM314 to the rack and bring up the DSM314 configuration screens. This will allow you to customize the DSM314 to your particular application. Refer to Chapter 4 for details concerning the DSM314 configuration settings. For the example, we are going to change the Local Logic Block name, Motion Program Block name, Cam Block name and “Local Logic Mode:” These fields are contained on the “Settings” tab. In the field “Local Logic Mode”, we want to set it to Enabled.
Using the Electronic CAM Feature 16 In this example, the Local Logic program will control CTL01 and CTL08. CTL01 and CTL08 are used to signal the Motion Programs; so, we need to configure these CTL bits to be under Local Logic Control. To do this, access the CTL Bits tab in the VersaPro hardware configuration. Select “CTL01 Config” and choose Local_Logic_Controlled. Repeat the procedure for CTL08. The resulting Hardware Configuration screens are shown in Figure 16-33. Figure 16-33.
16 Since we are using the Beta 0.5 digital servo for our example, we need to set Axis1 and Axis 2 Mode to Digital Servo. The resulting Hardware Configuration screens are shown in Figure 16-34. Figure 16-34.
Using the Electronic CAM Feature 16 We also need to indicate to Axis #1 that we want it to use the Axis #2 commanded position as its CAM Master source. To do this select, the Axis #1 tab in hardware configuration. Go to the CAM Master Source data entry field. From the drop-down box, select Cmd Position 2. This will configure Axis #1 to use the Axis #2 commanded position as it’s CAM master source (Figure 1635). While in this tab, change the Home Mode: to Move + and OverTravel Switch to Disabled.
16 We also need to indicate to Axis #2, the rollover points for the Master axis position reference. To do this, select the Axis #2 tab in hardware configuration. Input 49,999 into the High Position Limit and 0 into the Low Position Limit data entry fields (Figure 16-36). Note that since this is a Cyclic CAM, the master source high limit, by definition, must be one less than the last point in the master data table. In our example this is point 50,000. Thus, the high limit is equal to 49,999.
16 Using the Electronic CAM Feature To finish our configuration we need go to the Tuning#1 and Tuning #2 tabs and enter the following data: • Motor Type: 13 • Position Error Limit: 200 (Optional; see Configuration information for additional information) • In Position Zone: 20 (Optional; see Configuration information for additional information) • Pos Loop Time Const: 200 (Note: Based upon application/mechanics reference Chapter 4 and Appendix D) • Velocity FeedForward: 9000 (Note: Based upon appli
16 Step 11: Execute (Test) Your CAM-Based Motion Program Warning Before testing your application on actual machinery, you must first verify that it is safe to do so. This includes insuring that all devices are securely mounted, all safety equipment is installed and operational, and personnel in the area have been notified. Failure to address all safety-related issues could result in injury to personnel and damage to equipment.
16 Using the Electronic CAM Feature 4. Enable Local Logic by setting the %Q offset 1 bit from the PLC. If there are no errors, we can then execute the motion programs. 5. Execute Program 1 by toggling %Q offset 2 bit. The motor connected to Axis #1 should then begin to execute Motion Program #1. 6. Execute Program 2 by toggling %Q offset 3 bit. The motor connected to Axis #2 should begin to execute Motion Program #2. 7.
16 Axis 1 Actual Position Axis 1 Commanded Position Figure 16-40. RVTExample Screen Second Dwell Axis 2 Actual Position Axis 2 Commanded Position When the master axis reaches 50000 (47500 +2500), the CAM command will exit, the slave axis will decelerate at the programmed acceleration rate and come to a halt, and both axes will return to zero. Details on the DSM314’s %AI, %AQ, %I, and %Q memory are found in Chapter 5.
Appendix Error Reporting A DSM314 Error Codes The DSM314 reports error codes in these %AI Table locations: %AI Table Location 00 04 24 44 64 Data Reported Module Status Code Axis 1 Error Code Axis 2 Error Code Axis 3 Error Code Axis 4 Error Code Usage Errors not related to a specific axis Errors related to Axis 1 Errors related to Axis 2 Errors related to Axis 3 Errors related to Axis 4 Each error code is a hexadecimal word which describes the error indicated when the Module Error Present %I status bit
A Error or Load Parameter. The %Q Clear Error bit will always clear the Axis Error Code; however, if the condition that caused the error still exists, the error will immediately be reported again. Note The STAT LED on the faceplate of the module flashes slow (four times/second) for Status Only errors and fast (eight times/second) for errors which cause the servo to stop.
A Error Reporting Table A-1.
A position range (-536,870,912 to +536,870,911 at 1:1 scaling) 29 Status Only Dwell time greater than 60 seconds, 5 seconds used Axis The executing motion program encountered a DWELL statement where the DWELL time is greater than 60 seconds. This value is larger than allowed. The DWELL time used for the program is 5 seconds. The user should open the motion program and correct the DWELL time statement to be lees than 60 seconds.
A Error Reporting Move at Velocity Errors 38 Status Only Move at Velocity on First PLC sweep error Axis The Move at Velocity command (22h) was sent during the first PLC sweep. The PLC program must be corrected to prevent this command from being sent on the first PLC sweep. 39 Status Only Move at Velocity while Drive Not Enabled error Axis The Move at Velocity command (22h) was sent when the Drive Enable bit was not on. The user should enable the drive and re-execute the command.
A Enabled I bit off) prior to executing Force Digital Servo Velocity or Force Analog Output. Set Position Errors 50 Status Only Set Position while Program Selected error Axis The user executed a Set Position command while a Motion Program was selected to execute. The motion program must be halted (Program Active I bit off) prior to executing the Set Position command.
A Error Reporting Program and Subroutine Errors 61 Stop Normal Invalid subroutine number Axis The Motion Program called a subroutine that was not contained in the module program space. If the call instruction references a parameter which contains the subroutine number, confirm that the parameter data is correct. 62 Stop Normal Call Error (subroutine already active on axis) Axis A Motion Subroutine called itself or called another subroutine which called the original subroutine.
A Program Execution Conditions Errors 80 Status Only Execute Program while Home Cycle active Axis The PLC set an Execute Program Q bit while the module was executing a home cycle. The user either needs to wait until the home cycle completes or abort the home cycle prior to executing the Motion Program. 81 Status Only Execute Program while Jog Axis The PLC set an Execute Program Q bit while the module was performing a Jog operation.
A Error Reporting 95 Status Only Local Logic Add/Subtract Overflow Warning Module The Local Logic program added or subtracted numbers that caused an overflow condition to occur. The allowable range is –2,147,483,648 to +2,147,483,647. Change the local logic program to prevent overflow or set the Overflow variable to 0 at the end of each local logic cycle.
A Encoder Alarms C0 Stop Fast Servo not ready Axis For analog servos, the Drive Ready faceplate input must be set on (0 volts) within 1 second after turning on the Enable Drive Q bit. If the Drive Ready input for analog servos is not used, the input configuration must be set to Disabled. For FANUC Digital servos, the amplifier E–Stop input may be activated or an amplifier fault may have occurred. C1 Status Only C2 C3 Serial Encoder Battery Low Axis The Serial Encoder battery voltage is low.
Error Reporting A D3 Stop Fast Over Acceleration Detected Axis The Motor Control firmware detected an acceleration value that exceeded allowed values. This error is not encountered under normal operating conditions. Possible error causes include encoder failure, encoder slippage, incorrect position reported from encoder. If error is not explained by physical hardware consult factory.
A EC Status Only Follower makeup time is not long enough Axis The configured Ramp Makeup Time is too small so that actual makeup time is longer. The makeup time of follower ramp acceleration should be increased. ED Status Only Velocity limit violation during follower ramp Axis Follower ramp makeup requires a velocity greater than 0.8 * the configured axis velocity limit, so that actual makeup time is longer than the configured value. Increase the velocity limit, makeup time or ramp acceleration.
Error Reporting A System Error Codes If the DSM encounters errors with either the VersaPro configuration, a motion program, or local logic block, it will place a System Error code in the Module Status Code register (the first AI word). When a System Error occurs, the DSM will not update any %I bits or %AI data and will not respond to any %Q bit or %AQ commands. So the %Q Clear Error bit has no effect on a System Error.
A DSM Digital Servo Alarms (B0–BE) GE Fanuc α and βdigital servo systems have built in detection and safety shut down circuitry for many potentially dangerous conditions. The table below reflects that three different models of servo amplifiers may be used with the DSM, the β Series, the α Series SVU and the α Series SVM. The following table indicates alarms supported by a particular servo amplifier and the corresponding DSM error code.
A Error Reporting Troubleshooting Digital Servo Alarms: The guidelines below are intended to assist in isolating problems associated with various servo alarms. If the items below do not fit the case or resolve the alarm, replace the servo amplifier, or call GE Fanuc Hotline for support. The appropriate amplifier and motor, Maintenance Manual or Description Manual, will include more detailed trouble shooting procedures.
A 2. 3. 4. The motor may be operating in violation of duty cycle restrictions. Calculate the amount of cooling time needed based on the duty cycle curves published for the particular motor. The motor may be over loaded. Check for excessive friction or binding in the machine. For all the above problems, allow ten minutes cooling of the amplifier with minimum or no motor loading then cycle amplifier power to reset. FAL (Fan Alarm): The cooling fan has failed. 1. Check the fan for obstructions or debris.
Error Reporting 1 2 3 4 5 6 A Motor power wiring (U, V and W) may be shorted to ground or connected with improper phase connections. Check the wiring and connections. Check the servomotor for shorts to motor frame. Replace the motor if shorted. Improper motor type code may be configured or excessive values for tuning parameters. Confirm that the proper motor is configured and lower gain values. The amplifier maintenance manual will describe the procedure for monitoring motor current signals (IR and IS).
A CFG EN1 EN2 EN3 EN4 A-18 This LED is ON when a module configuration has been received from the PLC. When this LED is ON, the Axis 1 Drive Enable relay output is active.. When this LED is ON, the Axis 2 Drive Enable relay output is active. When this LED is ON, the Axis 3 Drive Enable relay output is active. When this LED is ON, the Axis 4 Drive Enable relay output is active.
Appendix DSM314 Communications Request Instructions B This appendix describes two types of Communications Request (abbreviated COMM REQ in this appendix) ladder instructions used with the DSM314: • Parameter Load Type: Used to load DSM Parameter Memory. An advantage of the COMM REQ instruction is that each one can load up to 16 parameters, and multiple COMM REQ instructions may be used in one PLC sweep.
B Section 1: Communications Request Overview The Communications Request uses the parameters of the COMM REQ Ladder Instruction and an associated Command Block to define the characteristics of the request. An associated Status Word reports the results of each request.
DSM314 COMM REQ B The Command Block: The Command Block consists of several words of PLC memory that contain additional information about the communications request. This information includes timing parameters, a pointer to the Status Word, a Data Block, memory types and sizes, and a specific command code. The Data Block specifies the direction of the data transfer (via the Command Code) and location and type of data to be transferred.
B Table B-1. DSM COMM REQ Status Word Codes DSM COMM REQ Status Word Codes Code Name Code # Description Possible Corrective Action IOB_SUCCESS 1 All communications proceeded normally. None required. IOB_PARITY_ERR -1 A parity error occurred while communicating with an expansion rack. Retry. Check hardware – expansion cables, DSM module, etc. IOB_NOT_COMPL -2 After the communication was over, the module did not indicate that it was complete. Retry. Verify the COMM REQ parameters.
DSM314 COMM REQ B Monitoring the Status Word Error Detection and Handling As shown in the table above, a value of 1 is returned to the Status Word if communications proceed normally, but if any error condition is detected, a negative value is returned. If you require error detection in your ladder program, you can use a Less Than (LT) compare instruction to determine if the value in the Status Word is negative (less than zero). An example of this is shown in the following figure.
B Operation of the Communications Request The figure below illustrates the flow of information from the PLC CPU to the DSM module: DSM MODULE PLC CPU a44917a.cvs BACKPLANE LADDER PROGRAM COMREQ CPU MEMORY DATA STATUS WORD COMMAND DATA FIRMWARE INSTRUCTIONS ON-BOARD MEMORY STATUS Figure B-2. Operation of the DSM Communications Request A Communications Request is initiated when a COMM REQ ladder instruction is activated during the PLC scan.
DSM314 COMM REQ B Section 2: The COMM REQ Ladder Instruction This section discusses the COMM REQ instruction in general. More information is available in the Series 90-30/20/Micro PLC CPU Instruction Set Reference Manual, GFK-0467L or later. The Communications Request begins when the COMM REQ Ladder Instruction is activated.
B Table B-2. COMM REQ Instruction FT Output Truth Table FT Output Enable Input Does an Error Status Exist? Active Active Not active • No Yes No execution FT output Low High Low The FT output will be set High if: • The specified target address is not present (for example, specifying Rack 1 when the system only uses Rack 0). • The specified task number is not valid for the device (the TASK number should always be 0 for the DSM). • Data length is set to 0.
DSM314 COMM REQ B Section 3: The User Data Table (UDT) COMM REQ The DSM314 has an 8192-byte memory area called the User Data Table (UDT) that is designated for use with Local Logic (LL) programs. LL Programs can access all or part of this memory to store and retrieve data. The UDT is useful for storing and retrieving large amounts of data such as large batches of setup data.
B The UDT COMM REQ Command Block Table B-3. User Data Table Command Block User Data TableCOMM REQ Command Block for DSM314 Module Description Address Offset Word No.
DSM314 COMM REQ B Status Word Pointer Offset (Word 4): This word contains the offset within the memory type selected. Note: The Status Word Pointer Offset is a zero-based number. In practical terms, this means that you should subtract one from the address number that you wish to specify. For example, to select %R0001, enter a zero (1 – 1 = 0). Or, if you want to specify %R0100, enter a 99 (100 – 1 = 99).
B PLC Data Start Pointer Offset (Word 10): This word contains the offset within the memory type selected in the PLC Data Memory Type word (Word 9). Note: The PLC Data Start Pointer Offset is a zero-based number. In practical terms, this means that you should subtract one from the address number that you wish to specify. For example, to select %R0001 as the PLC Data Start location, enter zero (1 – 1 = 0). Or, to select %R0100, enter 99 (100 – 1 = 99).
DSM314 COMM REQ B User Data Table COMM REQ Example MSWD-TWM SEND %T0001 ENABLE %T0001 COMM_ REQ FAULT %M0295 (Command Block pointer) Fault output %R196 IN 0007 FT S SYSID 00000 TASK (Always 0 for DSM) (0007 = Rack 0, Slot 7) Series 90-30 PLC, Rack 0 Power Supply CPU Slot No: 1 DSM 2 3 4 5 6 7 8 9 10 Command Block for DSM COMM_REQ Memory Address %R196 %R197 %R198 %R199 %R200 %R201 Value Description 4 0 8 Length, in words, of Data Block Header (always 4) WAIT/NOWAIT Flag.
B Section 4: The Parameter Load COMM REQ The Command Block The Command Block contains the details of a Communications Request. The first address of the Command Block is specified by the IN input of the COMM REQ Ladder Instruction. This address can be in any word-oriented area of memory (%R, %AI, or %AQ). The Command Block structure can be placed in the designated memory area using an appropriate programming instruction (the BLOCK MOVE instruction is recommended).
DSM314 COMM REQ B Data Block Length (Word 1): The length of the Data Block header portion of the Command Block. It should be set to 4 for the DSM. The Data Block header is stored in Words 7 through 10 of the Command Block WAIT/NOWAIT Flag (Word 2): This must always be set to logic zero for the DSM. Status Word Pointer Memory Type (Word 3): This word specifies the memory type that will be used for the Status Word. Each memory type has its own specific code number, shown in the Memory Type Codes table below.
B the Parameter Data Start location, enter zero (1 – 1 = 0). Or, to select %R0100, enter 99 (100 – 1 = 99). Note that the memory type, %R in this example, is specified in the previous word. Starting Parameter Number (Word 11): Specifies the number of the first parameter to be loaded. Valid values are 0 – 255. However, this number must take into account the value in Word 12.
DSM314 COMM REQ B DSM Parameter Load COMM REQ Example This example is used as the basis for the following section, “Section 5: COMM REQ Ladder Logic Example.” In this example, the following specifications are given: • The DSM module is mounted in Rack 0, Slot 7 of the PLC. • The Command Block’s starting address is %R0196. • The Status Word is located at %R0195. • 16 parameters are to be sent. • The COMM REQ’s FT (fault) output drives a Set Coil.
B SEND %T0001 MSWD-TWM ENABLE %T0001 COMM_ REQ FAULT %M0295 (Command Block pointer) Fault output %R196 IN 0007 FT S SYSID 00000 TASK (Always 0 for DSM) (0007 = Rack 0, Slot 7) Series 90-30 PLC, Rack 0 Power Supply CPU Slot No: 1 DSM 2 3 4 5 6 7 8 9 10 Command Block for DSM COMM_REQ Memory Address %R196 %R197 %R198 %R199 %R200 %R201 Value Description 4 0 8 Length, in words, of Data Block header (always 4) WAIT/NOWAIT Flag.
DSM314 COMM REQ B Section 5: COMM REQ Ladder Logic Example The following ladder logic example is based upon the Parameter Load COMM REQ example in the previous section. Refer to the table on the previous page for the Command Block listing. Setting up the COMM REQ Command Block Values The next two rungs load the appropriate values into the first seven words of the COMM REQ’s Command Block.
B Locic for Parameter Data (not Shown) Additional logic will be required to load your data into registers %R00208 - %R00239 so that it can be sent to the DSM314 parameters. (The value in double word %R00208/%R00209 will be sent to Parameter 1, the value in %R00210/%R00211 will be sent to Parameter 2, and so on, until finally, the value in %R00238/%R00239 will be sent to Parameter 16.) The method to be used for loading the data into these registers depends upon your application.
DSM314 COMM REQ B In the example above, when switch %I00001 is closed, the Binary Coded Decimal (BCD) value in BCDINP (%I00017-%I00032) from a BCD Operator Input device is converted to an integer value (by the BDC4 TO INT instruction), and the integer value is placed in register %R00150. Next, %R00151 is cleared to zero by the BLK CLR instruction. Note that on the output of the BCD4 TO INT instruction, %R00150 is a single integer value.
B Verifying the Data Sent to Parameter 1 In this example, we’ll assume that the value in DSM Parameter 1 is critical because it specifies a move distance that, if incorrect, could result in machine damage. So, the logic in the following two rungs verifies that Parameter 1 received the correct value. If the value is not correct, contacts (not shown) from output coil “VERIFY” in the second rung will prevent the DSM from producing motion.
Appendix Position Feedback Devices C There are four GE Fanuc α and β Series Digital serial encoder models that will function with the DSM314: Table C-1. Digital Serial Encoder Resolutions 8K (8,192 cts/rev) - No longer available on new motors 32K (32,768 cts / rev) - Standard on β Series motors 64K (65,536 cts/rev) - Standard on α Series motors 1000K (1,048,576 cts/rev) - Optional on α Series motors Note The older “A” or “C” Series million count serial encoder will not operate with the DSM314.
C valid and the Actual Position %AI status word as reported by the DSM314 will wrap from high to low count or from low to high count values. This is an excellent mode for continuous applications that will always operate via incremental moves, in the same direction. Home Offset and Home Position configuration items allow simple referencing to the desired location.
Postion Feedback Devices C Set Position Command - Absolute Encoder Mode The Set Position %AQ command functions the same way as in incremental encoder mode. At the completion of the Set Position operation, Actual Position is set to the Set Position value. The DSM314 internally calculates the encoder Absolute Feedback Offset needed to produce the commanded Set Position value. This Absolute Feedback Offset is immediately saved in the DSM314 non-volatile (capacitor backup) memory.
Appendix Start-Up and Tuning GE Fanuc Digital and D Analog Servo Systems This appendix provides a procedure for starting up and tuning a GE Fanuc Digital or Analog servo system. For Digital servos systems, there are two control loops in the DSM314 that require tuning, the velocity loop and the position loop. Always begin with module configuration then proceed to the velocity loop setting and finally the position loop. For Analog servo systems, there are a series of Start-Up Procedures to follow.
D switch is mounted at or near one end of the axis travel. It is important to verify the operation of the home switch prior to attempting a home cycle. It may be necessary to reverse the motor direction (Motor1 or Motor2 Dir = POS/NEG) in the module configuration. 4. Use the configuration software to set the desired user scaling factors and other configurable parameters.
Startup and Tuning D 11. Monitor servo performance and use the Jog Plus and Jog Minus %Q bits to move the servomotor in each direction. Placing the correct command code in the % AQ table can temporarily modify the Position Loop Time Constant. For most systems the Position Loop Time Constant can be reduced until some servo instability is noted, then increased to a value approximately 50% higher.
D Tuning a GE Fanuc Digital Servo Drive The following pages provide you with an introduction to the basics required for tuning a GE Fanuc Digital servo drive. This introduction shows one method for tuning a servo drive. The method will not work in all applications, and you should modify the approach based on the application. In order to display and measure the necessary signal waveforms, the DSM314 analog outputs must be connected to an oscilloscope.
Startup and Tuning D Tuning the Velocity Loop The proper method to tune the velocity loop is to separate the velocity loop from the position loop. To achieve this separation, a method must be used to directly send velocity commands without using the position loop control. The DSM module has several modes that will allow the user to send a velocity command directly to the velocity loop.
D 2. Connect an oscilloscope to the analog outputs for Motor Velocity feedback and Torque Command. See Section 4.25 of Chapter 5 for analog output configuration instructions. 3. Set the Velocity Loop Gain to zero. This is a conservative approach. If the application is known to not have resonant frequencies from zero to approximately 250 Hz, you can start with a higher value, but do not exceed the value calculated in equation 1 at this point. 4. Generate a velocity command step change.
Startup and Tuning D Figure D-2. Velocity Loop Step Response Velocity vs. Time VLGN = 0 Figure D-3. Velocity Loop Step Response Torque Command vs. Time VLGN = 0 Note that in Figures D-2 and D-3 the system does not have enough damping. In this case the controller does not have the required bandwidth and the Velocity Loop Gain must be increased.
D Figure D-4. Velocity Loop Step Response Velocity vs. Time VLGN = 24 Figure D-5. Velocity Loop Step Response Torque Command vs. Time VLGN = 24 Note that in Figures D-4 and D-5, the system is beginning to look acceptable. The only problem is the velocity overshoot.
Startup and Tuning D Figure D-6. Velocity Loop Step Response Velocity vs. Time VLGN = 48 Figure D-7. Velocity Loop Step Response Torque Command vs. Time VLGN = 48 The response shown in Figures D-6 and D-7 is good.
D Figure D-8. Velocity Loop Step Response Velocity vs. Time VLGN = 64 Figure D-9. Velocity Loop Step Response Torque Command vs. Time VLGN = 64 The response shown in Figures D-8 and D-9 is acceptable.
Startup and Tuning D Figure D-10. Velocity Loop Step Response Velocity vs. Time VLGN = 208 Figure D-11. Velocity Loop Step Response Torque Command vs. Time VLGN = 208 The response shown in Figures D-10 and D-11 is marginally stable and would be unacceptable in many applications. The plots are shown for reference only.
D Tuning the Position Loop The very first step in adjusting the tuning for the position loop is to insure that the velocity loop is stable and has response suitable to the application. Refer to the previous section for methods of setting the velocity loop. Preliminary Position Loop Settings for Tuning Session. 1. If using Standard Mode control loop settings, set the User Unit and Counts configuration to values appropriate to the mechanical configuration for the axis.
Startup and Tuning D • • Rejects torque disturbances from mechanics or outside influences improving system accuracy Can expose machine resonance, which occur at frequencies near or below the bandwidth The response of a proportional only system, which is what we set up by setting Integrator Mode to “OFF”, is an exponential rise. A time constant for an exponential curve represents 68% of the remaining rise.
D GE Fanuc Start-Up and Tuning Information for Analog Servo Systems There are two major sections covered; • Validating Home Switch, Over Travel Inputs, and Motor direction. • Velocity at Max Cmd, Position Loop Time Constant, and Velocity Feedforward determination Analog Mode System Startup Procedures Startup Procedures 1. Connect the analog motor to the servo amplifier according to the manufacturer’s recommendations. 2.
Startup and Tuning D 6. Send the command code for Force D/A Output equal to +3200 (+1.0v). Confirm that the motor moves in the desired POSITIVE direction (based on the Axis Direction configuration parameter setting) and the Actual Velocity reported in the DSM314 %AI table is POSITIVE. If the motor moves in the wrong direction, consult the servo amplifier manufacturer's instructions for corrective action.
D System Troubleshooting Hints (Analog Mode) D-16 1. The DSM314 requires PLC firmware release 10.0 or greater and VersaPro software release 1.10 or greater. 2. If the Drive Ready input is enabled in the module configuration, the input must be connected to 0v within 1 second after the Drive Enable relay turns on or the Motion Mate DSM314 will not operate. Incorrect Drive Ready configuration or wiring will cause Error Code C0h to be reported in the Axis Error Code %AI data. 3.
Appendix Local Logic Execution Time E This appendix contains information necessary to determine a local logic program’s execution time. Local Logic Execution Timing Data Local Logic program in the DSM is constrained to complete execution within 300 Microseconds. Exceeding the execution time limit will result in a watchdog timeout and an error being reported. The watchdog timeout error will stop axes motion and Local Logic execution.
E Execution Time for Instruction Line 1=> (Time to Load P002) + (Time to load Constant) + (Time to perform Addition) + (Time to write P001) => 0.60 (from Table E-7) + 0.50 (from Table E-7) + 0.90 (from Table E-1) + 0.60 (from Table E-7) => 2.60 microseconds Execution Time for Instruction Line 2 => (Time to Load P001) + (Time to load Constant) + (Time to perform > Conditional) => 0.60 (from Table E-7) + 0.50 (from Table E-7) + 2.50 (from Table E-2) => 3.
E Local Logic Execution Time Example 2 ' 3 3 ' ,QVWUXFWLRQ /LQH ,QVWUXFWLRQ /LQH (QDEOHB)ROORZHUB &7/ %:$1' &7/ )ROORZHUB5DWLRB$B 3 ,QVWUXFWLRQ /LQH ,QVWUXFWLRQ /LQH Execution Time for Instruction Line 1 => (Time to Load P100) + (Time to Load Constant) + (Time to Multiply) +(Time to write D00) => 0.60 (from Table E-7) + 0.50 (from Table E-7) + 1.30 (from Table E-1) + 0.70 (from Table E-7) => 3.
E Table E-1. Local Logic Math/Logical Operation execution times Local Logic Math and Logical Operations (Assignment, := ) Local Logic Execution Time (In Microseconds) Add (+) Subtract (-) Multiply (*) Divide (/) Modulus (MOD) Absolute (ABS) BWAND BWOR BWXOR BWNOT 0.90** 0.90** 1.30 2.90 2.90 1.70** 0.20 0.30 0.20 0.50 **Note Execution times for Addition, Subtraction and Absolute value (ABS) assume there are no computation overflows. Table E-2.
Local Logic Execution Time E Table E-3. Axis 1 Local Logic Variable Execution Times X- Not Applicable.
E Table E-4. Axis 2 Local Logic Variable Execution Times X- Not Applicable.
Local Logic Execution Time E Table E-5. Axis 3 Local Logic Variable Execution Times X- Not Applicable. Local Logic Execution Time (In Microseconds) Local Logic Variable Name Strobe1_Level_3 Strobe2_Level_3 Positive_EOT_3 Negative_EOT_3 Home_Switch_3 Digital_Output1_3 Digital_Output3_3 Analog_Input1_3 Analog_Input2_3 Reset_Strobe1_3 Reset_Strobe2_3 Error_Code_3 Actual_Position_3 Strobe1_Position_3 Strobe2_Position_3 Actual_Velocity_3 Axis_OK_3 Position_Valid_3 Strobe1_Flag_3 Strobe2_Flag_3 Read Write 1.
E Table E-7. Global Local Logic Variable Execution Times X- Not Applicable. Local Logic Execution Time (In Microseconds) Local Logic Variable Name Local Logic Program Constants Overflow System_Halt Data_Table_Ptr Data_Table_sint Data_Table_usint Data_Table_int Data_Table_uint Data_Table_dint Module_Error_Present New_Configuration_Received First_Local_Logic_Sweep Module_Status_Code CTL_1_to_32 P000-P255 D00-D07 CTL01-CTL32 E-8 Read Write 0.50 2.40 X 0.60 2.10 1.80 2.30 2.30 3.80 1.40 1.40 1.40 0.50 0.
Appendix Updating Firmware in the DSM314 F The DSM314 operating firmware is stored in on-board FLASH memory. The firmware update is provided on a floppy disk. The PC Loader utility controls downloading the new firmware from the floppy to the DSM314 FLASH memory and is a DOS-based program. For Windows, Winloader is also available. PC Loader requires an IBM AT/PC compatible computer with at least 640K ram, one floppy drive, MS-DOS 3.3 (or higher),and one RS-232 serial port.
F 7. (DOS) 8. (DOS) 9. (DOS) 10. (DOS) 11. (DOS) 12. (DOS) 13. (DOS) space on the hard drive. To run from the floppy, type install at the A:\> or B:\> prompt. From the main menu, press the F3 key to configure the correct serial port if the cable is not connected to COM1. Press the TAB key to toggle through the options, and ENTER to accept the displayed choice. From the main menu, press the F1 key to attach to the DSM302 slave device.
Appendix Strobe Accuracy Calculations G In general the accuracy of the strobe position value can be expressed as +/- 2 counts with an additional variance of 10 microseconds. However, the actual accuracy of the strobe position value may be better than that depending upon axis configuration, motor acceleration during a strobe event, and the number of counts per revolution of the encoder used. The first consideration is whether the axis configuration is Digital or Analog.
G A = Acceleration/deceleration during the strobe event which is 250,000,000 cnts/sec2 (assumed to be constant over the entire 250µs period; Larger acceleration values will increase the amount of error in the calculation) Tp = Position sampling period which is 250 microseconds VI = Initial velocity just before the strobe event which will be 0 for this example.
G Strobe Accuracy Calculations 0.4 0.3 Estimated assuming constant velocity 0.2 Position (deg) Actual 0.1 0 0 6.25 10 5 -0.1 1.25 10 4 1.875 10 4 2.5 10 4 Error -0.
G below represents the effective delay that would be seen across the change in position for the sampling period in this example. 1.25 10 2.5 10 5 5 Time (sec) 3.75 10 5 10 6.25 10 5 5 5 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 Position (deg) Figure G-2: Effective response time delay Therefore, in the example above, the worst case error due to acceleration/deceleration can be expressed as +/- 0.086 degrees (approximately 2 counts) of position or as 62.
Strobe Accuracy Calculations G Note that the formulas above assume constant acceleration throughout the sampling period. The formulas for determining the error for the cases where acceleration is not constant during the sampling period are too complex for the context of this manual. Note that an additional error as much as 10 microseconds (or the number of degrees or position counts that can occur in 10 microseconds) may also be seen due to input filtering/sampling delays in the hardware.
Index Clear Error, 5-11 CTL09 - CTL12 Output Controls, 5-11 Enable Drive / MCON, 5-12 Enable Follower, 5-13 Execute Motion Program 0 - 10, 5-11 Feed Hold (Off Transition), 5-11 Feed Hold (On Transition), 5-11 Find Home, 5-12 Jog Minus, 5-12 Jog Plus, 5-12 Reset Strobe 1, 2 Flags, 5-12 Select Follower Internal Master, 5-14 # α Series amplifiers, 1-12, 1-14 motor table, 1-15 motors, 1-13, 1-15 servos, 1-12, 1-14 α Series C12 motor, 1-15 % %Q Output Bit 5 Volt Output, 5-12, 5-13 %AI Status Words Actual P
Index Types of, 7-22 Acceleration values calculating, 7-46 Actual Position %AI Status Word, 5-8 Actual Velocity %AI Status Word, 5-9 Amplifier SVU digital, 1-12 Amplifiers digital, 1-14 Appendix B DSM302 Error Codes, A-1 Error Reporting, A-1 Appendix D Position Feedback Devices, C-1 Appendix F Tuning a GE Fanuc Digital Servo System, D-1 Arithmetic Operators, 11-3, 12-8 Assignment Statements, 12-2 Automatic Data Transfers Input Status Data, 5-1 Output Command Data, 5-1 Auxiliary Terminal Board, 3-15
Index Motor Power Cables, α Series, 2-8, 2-15 CFG LED, 3-2, A-18 Circular Cyclic CAM, 16-6 Clamping, Velocity, 8-5 Clear Error %Q Discrete Command, 5-11 CMOVE, 7-23 CMOVE command motion programming, 7-10 Comm, 10-15 COMM_REQ error detection and handling, B-5 Command Block, B-14 compared to Load Param.
Index E Electronic CAM Overview, 16-1 EN1 LED, 3-2, A-18 EN2 LED, 3-2, A-18 EN3 LED, 3-2, A-18 EN4 LED, 3-2, A-18 Enable Drive / MCON %Q Discrete Command, 5-12 Enable Follower %Q Discrete Command, 5-13 Enabling and Disabling Local Logic, 12-6 Enabling Follower with External Input, 8-6, 8-7 Encoder 3 Master Input, 8-2 Encoder, Incremental Quadrature, C-3 End of Program, 7-2 ENDPROG command motion programming, 7-11 ENDSUB command motion programming, 7-11 Error Code Format, A-2, A-13 Error messages Motion
Index Force D/A Output %AQ Immediate Command, 5-19, 5-24, 6-6 Function ABS, 12-12 Functional Block Diagrams for the 2-Axis DSM302 Axis 1 Master Source Encoder 3/Internal Master, 1-11 Axis 2 Master Source Analog Input, 1-11 G Gain Scheduler Program Example, 11-8 Global Local Logic Variable Execution Times, E-8 Global Variables, 13-8, 13-9 Ground Connection, Faceplate Shield, 3-4 Grounding DSM314 system, 2-22 I/O Cable, 3-21 Shield Ground Clamp, 3-23 Grounding Systems Frame Ground, 2-23 System Ground, 2-23
Index Jump, 7-2 JUMP command motion programming, 7-11 Jump Stop, 7-34 Jump Testing, 7-31 Jumping Without Stopping, 7-33 Jumps and Block Numbers, 7-28 Jumps, Conditional, 7-29 Jumps, S-CURVES, 7-35, 7-36, 7-37 Jumps, Unconditional, 7-29 JX5 Connector, 2-18 K K1 Cable to DSM314 α Series Connection, 2-5, 2-13 K12 Cable β Series, 24 VDC to Servo Amplifier, 2-18 K2 Cable α Series Connection, 2-10, 2-16 Prefabricated Cable Part Numbers, 2-16 K3 Cable β Series Connection, 2-16 K4 Cable, Motor Power α Se
Index Servo Amplifiers, 2-1 Turning Power On, 2-24 Motion program command types, 7-2 commands, 7-8 format, 7-5 key words, 7-6 structure, 7-17 syntax and commands, 7-6 variables, 7-7 Motion Program, Conditions Which Stop, 7-4 Motion programs multi-axis, 7-2 single-axis, 7-1 Motion subroutine structure, 7-17 Motor direction startup validation, D-1 Motor Power Cable Prefabricated, Part Numbers to α Series, 2-8, 2-15 Motors α Series, 1-13 β Series, 1-15 Move %AQ Immediate Command, 5-21 Move At Velocity %
Index Call Subroutine, 7-2 Jump, 7-2 Type 2 Acceleration, 7-2 Block #, 7-2 Null, 7-2 Velocity, 7-2 Type 2 Load Parameter, 7-2 Type 3 Continuous Move, 7-2 Dwell, 7-2 End of program, 7-2 Positioning Move, 7-2 Wait, 7-2 Program, motion structure, 7-17 Programmable Limit Switch Program Example, 11-9 Programmed Moves, 7-25 Programming, multiaxis, 7-42 R Rack/Slot Configuration, 4-1 Rate Override %AQ Immediate Command, 5-18 Ratio A:B, 8-3 Relational Operators, 11-4, 12-16 Requirements, 16-22 Reset Strobe 1,
Index Sync, Out of, 4-27 Synchronization of CAM with External Events, 16-19 Syntax Errors, 12-19 System Requirements, 10-5 System Troubleshooting Hints, D-16 System_Halt variable, 13-3 T Terminal board quick selection table, 3-9 Terminal Board and Cable Connections Illustration of, 3-19 Terminal Board Assemblies Update time servo loop, 1-5 User Connections, 3-28 User Selected Data %AI Status Word, 5-9 Using the Local Logic Editor, 10-7, 10-43 V Variables, 11-2, 12-2 Vel Lp Gain (Velocity Loop Gain), 4