Profibus Dp Manual Pdf - PROFIBUS-DP Slave Module User's Manual
Not Your Device? Search For Manuals or Datasheets below:
File Info : application/pdf, 0 Pages, 1.10MB
Document DEVICE REPORTProfibus ManualAutomation p/n 88-019048-01 D PROFIBUS Guide for 6K and Gemini products Effective: August 1, 2002 6Kn-PB GV6-xxx-PB GT6-xxx-PB User Information ! WARNING ! Parker Automation products are used to control electrical and mechanical components of motion control systems. You should test your motion system for safety under all potential conditions. Failure to do so can result in damage to equipment and/or serious injury to personnel. Parker Automation products and the information in this user guide are the proprietary property of Parker Hannifin Corporation or its licensers, and may not be copied, disclosed, or used for any purpose not expressly authorized by the owner thereof. Since Parker Hannifin constantly strives to improve all of its products, we reserve the right to change this user guide and software and hardware mentioned therein at any time without notice. In no event will the provider of the equipment be liable for any incidental, consequential, or special damages of any kind or nature whatsoever, including but not limited to lost profits arising from or in any way connected with the use of the equipment or this user guide. © 2002, Parker Hannifin Corporation All Rights Reserved Technical Assistance Contact your local automation technology center (ATC) or distributor, or ... North America and Asia: Compumotor Division of Parker Hannifin 5500 Business Park Drive Rohnert Park, CA 94928 Telephone: (800) 358-9070 or (707) 584-7558 Fax: (707) 584-3793 FaxBack: (800) 936-6939 or (707) 586-8586 e-mail: [email protected] Internet: http://www.compumotor.com Europe (non-German speaking): Parker Digiplan 21 Balena Close Poole, Dorset England BH17 7DX Telephone: +44 (0)1202 69 9000 Fax: +44 (0)1202 69 5750 Germany, Austria, Switzerland: HAUSER Elektronik GmbH Postfach: 77607-1720 Robert-Bosch-Str. 22 D-77656 Offenburg Telephone: +49 (0)781 509-0 Fax: +49 (0)781 509-176 Automation Technical Support Email [email protected] ABOUT THIS GUIDE Chapter 1. Implementing 6K PROFIBUS ..................... 1 PROFIBUS Overview.................................................................2 6Kn-PB ................................................................................2 Technical Assistance ...........................................................2 Implementation Process.......................................................2 GSD File ..............................................................................2 Hardware Interface ....................................................................3 LED Status Indicators ..........................................................3 PROFIBUS Connector Pin Out ............................................4 Termination.......................................................................... 4 Node Address ......................................................................4 Baud Rate............................................................................4 Programming Notes ...................................................................5 Data Format.........................................................................5 Implementing Data Exchange ..............................................5 Network Behavior.................................................................6 Handling a PROFIBUS Fault................................................7 Affected Commands and Features.......................................7 Command Descriptions..............................................................8 ERROR Error Checking Enable ................................8 FBADDR Fieldbus Address ....................................8 [ FBS ] Fieldbus Status................................................9 FBSIZE Fieldbus Data Packet Size ........................10 OPTEN Option Card Enable/Disable ......................10 OUTFNC Output Function ....................................11 TFBS Transfer Fieldbus Status................................11 TFBSF Fieldbus Status Full Text ...............................12 TOPSTS Option Card Status Full Text .....................12 Programming Scenario ............................................................13 Chapter 2. Implementing Gemini PROFIBUS............ 15 PROFIBUS Overview...............................................................16 Gemini GT6-PB/GV6-PB....................................................16 Technical Assistance .........................................................16 Implementation Process.....................................................16 GSD File ............................................................................16 Data Types ........................................................................16 Hardware Interface...................................................................17 LED Status Indicators.........................................................17 PROFIBUS Connector Pin Out...........................................18 Termination ........................................................................18 Node Address ....................................................................18 Baud Rate ..........................................................................19 Configuration and Programming...............................................19 Basic Requirements ...........................................................19 Data Format Requirements ................................................19 Coherency..........................................................................19 Acyclic Command Messages ...................................................20 Acyclic Message Command ...............................................20 Acyclic Message Response................................................22 Acyclic BNU Commands Type 1 and 2 (Gemini Parameters)22 Acyclic BNU Commands Type 3 and 4 (Gemini Commands)25 PZD (10 Bytes) Cyclic Command Messages ............................26 Gemini to Master (Input bytes 10 bytes maximum) ..........26 Master to Gemini (Output bytes 10 bytes maximum) .......27 Command Descriptions ............................................................28 ERROR Error Checking Enable ..............................28 FBADDR Fieldbus Address ..................................28 FBMASK Fieldbus I/O Mask .................................29 FBPIC Fieldbus Process Input Control ......................29 FBPOC Fieldbus Process Output Control ...............30 [ FBS ] Fieldbus Status ..............................................30 OUTFNC Output Function ....................................31 TASX Transfer Extended Axis Status.......................31 TCS Transfer Configuration Status.............................31 TFBS Transfer Fieldbus Status ................................32 Configuration Example .............................................................32 Appendix A. Gemini PROFIBUS CE Compliance ......33 CE Compliance ........................................................................34 Installation Instructions.............................................................34 Appendix B. Gemini Dimensions ...............................35 Gemini Drive Dimensions .........................................................36 Gemini Panel Layout Dimensions.............................................38 Change Summary Revision D August 1, 2002 This document, 88-019048-01D, supersedes 88-019048-01C. Changes and corrections are noted below. Topic Node Address Configuration FBADDR Command Description · The software command FBADDR0 is now required to configure the node address via hardware (default from the factory). Refer to page 4 for 6K PROFIBUS; and to page 18 for Gemini PROFIBUS. · Range for the FBADDR command (Fieldbus Address) is now 0 125. The factory default value is now 0. Refer to page 8 for 6K PROFIBUS; and to page 28 for Gemini PROFIBUS. Online Manuals This manual (in Acrobat PDF format) is available from our web site: http://www.compumotor.com Purpose of This Guide This document is designed to help you implement the PROFIBUS features provided in your 6K and Gemini series products, as ordered with the PROFIBUS option. This publication addresses only the installation and programming tasks for the PROFIBUS features. For all other installation and programming instructions, refer to: · 6K Series Hardware Installation Guide, part number 88-017547-01 · 6K Series Command Reference, part number 88-017136-01 · 6K Series Programmer's Guide, part number 88-017137-01 · Gemini GV6 Hardware Installation Guide, part number 88-018364-01 · Gemini GT6 Hardware Installation Guide, part number 88-018374-01 · Gemini Series Programmer's Reference, part number 88-017778-01 · Refer also to the online help system in Motion Planner What You Should Know To install and troubleshoot your 6K and Gemini series products with the PROFIBUS option, you should have a fundamental understanding of: · Electronics concepts, such as voltage, current and switches. · Implementing and maintaining a given PROFIBUS network. · Mechanical motion control concepts, such as inertia, torque, velocity, distance and force. · Ethernet or serial (RS-232 or RS-485) communication, depending upon which communication protocol you are using. WARNINGS The 6K and Gemini products are used to control your system's electrical and mechanical components. Therefore, you should test your system for safety under all potential conditions. Failure to do so can result in damage to equipment and/or serious injury to personnel. ALWAYS REMOVE POWER to the product before connecting any electrical devices (e.g., fieldbus connections, drives, encoders, I/O bricks, inputs, outputs, etc.). Certification 6K and Gemini products with the PROFIBUS option have been PTO certified to comply with PROFIBUS-DP international standard EN 50170. ii 6K and Gemini PROFIBUS Guide 1CHAPTER ONE Implementing 6K PROFIBUS-DP IN THIS CHAPTER · PROFIBUS Overview.............................................................2 · Hardware Interface .....................................................................3 · Programming Notes ....................................................................5 · Command Descriptions ..............................................................8 · Programming Scenario .............................................................13 Chapter 1. Implementing 6K PROFIBUS-DP 1 PROFIBUS Overview 6Kn-PB The PROFIBUS option allows a 6K controller to be controlled via a PROFIBUS master, utilizing the PROFIBUS protocol for robust data exchange. The 6K is implemented as a generic PROFIBUS-DP device, allowing the user's application to fully define the data exchanged with a PROFIBUS master. Cabling is not provided by Compumotor. Technical Assistance Technical questions regarding PROFIBUS should be addressed to your local PROFIBUS User Group. An address list is available on the PROFIBUS Internet site at www.profibus.com. For support with 6K specific questions, contact Compumotor Applications Engineering at 800-358-9070, or e-mail us at [email protected]. Implementation Process PROFIBUS Master (user defined): 1. Use the provided CMTR090D.GSD file. Do not modify. 2. Configure communication baud rate. 3. Configure data packet size. GSD File 6K Controller: 1. Enable/disable terminating resistors as needed (see page 4). 2. Launch Motion Planner (CD-ROM is provided in your ship kit). 3. Establish a direct communication link (serial) with the 6K. Refer to the 6K Series Hardware Installation Guide for connection instructions. 4. Configure node address (see FBADDR on page 8, or use hardware method on page 4). 5. Configure data packet size (FBSIZE must match master configuration). Refer to step 3 in the PROFIBUS Master implementation process above. 6. Reset the 6K controller to initialize the PROFIBUS card. 7. Write user code using VARB1-VARB8 (depending on data packet size) for sending data from the 6K controller to the PROFIBUS master. 8. Write user code to read data from VARB9-VARB16 (depending on data packet size) for receiving data from PROFIBUS master to 6K controller. For more information, refer to the Programming Scenario on page 13. Each device in a PROFIBUS network is associated with a GSD file, containing all necessary information about the device. The latest version of the 6K GSD file (CMTR090D.GSD) can be downloaded from www.compumotor.com. 2 6K and Gemini PROFIBUS Guide Hardware Interface LEDs Hardware Address Settings Termination Switch PROFIBUS Connector LED Status Indicators Bicolor LED indicators are provided on the PROFIBUS option card. Refer to the following table for troubleshooting information provided by these LEDs. LED Steady Flash Function Status * FB1 -- -- Not used -- FB2 Off Module is not online FBS bit #4= 0 Green Module is online FBS bit #4= 1 FB3 Off Module is not offline FBS bit #4= 1 Red Module is offline FBS bit #4 =0 FB4 Off No diagnostics present -- Red 1 flash/second - FBSIZE setting does -- not match network configuration Red 4 flashes/second - Hardware failure -- * To check status, execute the TFBS command (bit status report) or the TFBSF command (full text status report) in the terminal emulator. You can also use the FBS operator to assign or compare one or more status bits (e.g., use in an IF expression, assign to VARB variable, etc.). Refer to the TFBS command description on page 12. Chapter 1. Implementing 6K PROFIBUS-DP 3 PROFIBUS Connector Pin Out The following table gives the pin out for the PROFIBUS Connector. The industry standard PROFIBUS connectors are used. Termination Pin Name Function Housing 1 2 3 4 5 6 7 8 9 Shield Not connected Not connected B-Line RTS GND BUS +5V BUS Not connected A-Line Not connected Protective earth ------------Positive Rx/TxD Request to send * Isolated GND * Isolated +5V * ------Negative Rx/TxD ------- * +5V BUS and GND BUS are used for termination. Some devices like optical transceivers (RS485 to fiber optics) might require external power from these pins (not to exceed 80 mA). RTS is used in some equipment to determine the direction of transmission. In normal applications only A-Line, B-Line, and Shield are used. If the 6K controller is used as the last node in a network, the termination switch must be in the ON position. Otherwise the switch must be in the OFF position. Please note, if an external termination connector is used, the switch must be in the OFF position. Node Address To configure the node address via hardware, two rotary switches are provided to set a node address of 1-99. The software command FBADDR0 is also required to configure the node address via hardware (default from factory). Setting the rotary switches to 0 enables software configuration of node address (see FBADDR on page 8). Baud Rate Example: Switch x1 = 3 and x10 = 2, node address is 23 The 6K will auto detect the baud rate of the PROFIBUS network. For a complete list of supported baud rates, see the CMTR090D.GSD file. 4 6K and Gemini PROFIBUS Guide Programming Notes Data Format When sending data over the fieldbus network, you can configure the data to be consistent over a word or the full data packet (see CMTR090D.GSD and FBSIZE on page 10). Most fieldbus masters will support full data packet consistency; however, some resource limited fieldbus masters may only be able to perform data consistency over a word. The following table represents the internal binary variables and how they map to the data packet. Data is transmitted and received from left to right. VARB1 MSW1 LSW2 MSB3 LSB4 MSB LSB VARB2 MSW LSW MSB LSB MSB LSB 1 Most significant word, 16-bits, bits 31 to 16 2 Least significant word, 16-bits, bits 15 to 0 3 Most significant byte, 8-bits 4 Least significant byte, 8-bits VARBn MSW LSW MSB LSB MSB LSB Binary variables within the 6K programming language follow an unconventional format for bit assignment: bit 1 is the left-most bit and bit 32 is the right-most bit. When binary variables are exchanged with a PROFIBUS master, bit 1 may correspond to the right-most bit, and bit 32 may correspond to the left-most bit. Example: VARB1=h12345678 VARI1=4PE VARB1=VCVT(VARI1) ; PROFIBUS Master receives, 0x87654321 ; assume encoder position is +230 ; PROFIBUS Master receives, 0x000000E6 Implementing Data Exchange It is up to the user's 6000 program to facilitate handshaking between the PROFIBUS master and the motion controller. There is no built-in handshaking or data synchronization performed by the motion controller (not to be confused with Sync mode). To implement mailbox messaging (handshaking) between the 6K controller and the PROFIBUS master, you must set aside 2-bits/message within VARB1-16. One bit is used to acknowledge reading a message, a second bit is used notify the recipient a new message is available. A message is user defined but could be used to control motion on a particular axis, update a task, update I/O, control a set of axes from a single message, or report motion status. For example, if you would like to send a message from the PROFIBUS master to the 6K controller and then have the 6K controller generate a response message, the PROFIBUS master will use VARB9 bits 1 and 2, and the 6K controller will use VARB1 bits 1 and 2. To send a mailbox message to the PROFIBUS master: 1. Make sure VARB1.1 is equal to VARB9.1; no unprocessed messages. 2. Place the message in VARB2 through VARB8. 3. Toggle VARB1.1 to indicate new message is available. VARB1.1 is now not equal to VARB9.1. Chapter 1. Implementing 6K PROFIBUS-DP 5 To receive a message from the PROFIBUS master: 1. Make sure VARB1.2 is not equal to VARB9.2, new message available. 2. Read the message from VARB10-VARB16. 3. Toggle VARB1.2 to acknowledge reading the message. VARB1.2 is now equal to VARB9.2. The same operation would be repeated on the master side, except bits 1 and 2 would be reversed. An application scenario using mailbox messaging is provided on page 13. Network Behavior For complete list of supported features, see the CMTR090D.GSD file. The PROFIBUS master has the option to send a Sync Control command to the 6K, which will then exchange VARB9-16 only when a Sync command is received. The following diagram shows how data is exchanged in Sync mode. Fieldbus Network 1 Buffer 2 VARB1-8 VARB9-16 3 User s Application (6K Program) 1. 6K receives Sync Control command from PROFIBUS master. 2. 6K updates the contents of VARB9-16 from the network. 3. User's application reads the new VARB9-16 contents. Note: VARB1-8 will still be sent to the master regardless of Sync mode. 6 6K and Gemini PROFIBUS Guide Handling a PROFIBUS Fault If a PROFIBUS fault (Option card fault) occurs, the event causing the fault can be determined by checking the Fieldbus Status bit values (see FBS on page 9). · If error bit #19 is disabled (ERROR.19-0), the controller performs a kill all when a PROFIBUS fault occurs. · If error-checking bit #19 is set (ERROR.19-1), the controller performs a kill all and Error Status bit #19 is set (reported with ER, TER, and TERF). If an error program is assigned with the ERRORP command, the 6K controller branches (GOTO) to the program. On power-up or out of reset, the events that can generate a fieldbus fault are ignored. This allows the PROFIBUS master time to commission individual nodes without causing the 6K controller to fault. Error bit #19 is edge sensitive to fault conditions. To recover from an ER.19 fault, resolve the cause (see FBS on page 9) or reset the controller. To acknowledge the fault condition, issue the ERROR.19-0 command and then the ERROR.19-1 command. Refer also to page 13 for sample application scenarios. Affected Commands and Features When the PROFIBUS-DP option is installed, the following 6K commands and features are affected: · Binary variables are affected by updates performed over the fieldbus network. See FBSIZE on page 10 for the exact binary variables affected by the fieldbus network. · VARCLR will have no affect on binary variables assigned to the fieldbus network. · A user's application will not be permitted to write to VARB9-16. If you attempt to change the state of VARB9-16, the controller will respond with an error message "VARB USED BY OPTION CARD" and the VARB command will not be executed; however, command processing will continue. · A new bit definition for ERROR (bit #19) has been added for supporting the option card. · A new function (option "I") has been added to the OUTFNC command to support detection of ERROR bit #19 being set. · All commands preceded by "FB" or "TFB " (e.g., FBSIZE. TFBS, etc.) will be enabled when a fieldbus card is detected, and disabled when no fieldbus card is present or enabled. · Ethernet will be disabled on the 6K when the PROFIBUS card is enabled (OPTEN1). Chapter 1. Implementing 6K PROFIBUS-DP 7 Command Descriptions The following is a list of all the PROFIBUS specific commands. For a complete listing of 6K commands see the 6K Series Command Reference. ERROR (Error Checking Enable) .......................See page 8 FBADDR (Fieldbus Address) ..............................See page 8 [FBS] (Fieldbus Status)....................................See page 9 FBSIZE (Fieldbus Data Size Packet) ................See page 10 OPTEN (Option Card Enable/Disable) ...............See page 10 OUTFNC (Output Function)................................See page 11 TFBS (Transfer Fieldbus Status) .......................See page 11 TFBSF (Fieldbus Status Full Text) ....................See page 12 TOPSTS (Option Card Status Full Text) ............See page 12 ERROR Error Checking Enable Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup Product Rev <!><%>ERROR<b><b>...<b><b> (32bits) 6Kn-PB 5.2 n/a b=0 (disable), 1 (enable), or X (don't change) 0 ERROR: *ERROR0000_0000_0000_0000_0000_0000_0000_0000 OUTFNC, FBS, TER, TERF A new bit assignment is added for the ERROR command, bit #19. See FBS on page 9 for the event causing the error condition. To clear the error event, first resolve the cause, and then issue the ERROR.19-0 command followed by the ERROR.19-1 command. Error bit 19 is edge sensitive to error events. In the event an option card fault occurs, VARB1-16 are cleared on the controller side. Bit # 19 Function Option card fault Branch Type GOTO FBADDR Fieldbus Address Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup <!>FBADDR<i> i = fieldbus address i = 0-125 0 FBADDR: *FBADDR3 FBSIZE, TOPSTS Product Rev 6Kn-PB 5.2 Use the FBADDR command to report the controller's current node address assignment and set the node address via software. The new value is saved into nonvolatile memory, and becomes effective after the controller is reset. Network configuration of node address is not supported. This command cannot report the hardware configuration setting. In order to set the node address via software, the hardware configuration method must be disabled (default from factory). Setting FBADDR0 is required to return to the hardware configuration method. See Node Address on page 4. 8 6K and Gemini PROFIBUS Guide If the hardware configuration method is used to set the address, any attempt to set the address via software will be ignored and the message "CONFLICT WITH HARDWARE SETTING DISABLE HARDWARE CONFIG FIRST" will be reported back. Example: Assume controller was assigned node address 1 out of reset: >FBADDR *FBADDR1 >FBADDR3 >FBADDR *FBADDR3 Set node address to 3 New network setting will take effect after unit is reset! [ FBS ] Type: Syntax: Units: Range: Default: Response: See Also: Fieldbus Status Communication Setup See below n/a n/a n/a n/a ER.19, TFBS, TFBSF Product Rev 6Kn-PB 5.2 Use the FBS command to assign the fieldbus status to a binary variable or for use in a comparison command. Example: IF(FBS.4=b1) ;Branch based on the status of FBS bit 4 The Fieldbus Status register bits are defined as follows: Bit # 1 2 Function (1=Yes, 0=No) TIMEOUT 1,2 CHECKSUM FAULT 1,2 Description Watchdog timed out. Controller has lost communication with fieldbus card Fieldbus card failed hardware check on boot-up 3 HWD CFG MODE 0 - Configuration set via software, 4 ONLINE 1,3 1 - Configuration set via hardware Controller is connected and data exchange is possible 5 -32 RESERVED 1 If any of these error conditions occur (bit #1 = 1, bit #2 = 1, or bit #4 = 0), the motion controller will perform a Kill (K command) on all axes. If error-checking bit #19 is enabled with the ERROR command (ERROR.19-1) the controller will also set error status bit #19 (ER, TER, and TERF) and branch to the ERRORP program. 2 Error event is latched. Reset the controller to clear the error. 3 Error event is recoverable, if error checking (ERROR) bit #19 is enabled and ERRORP program exists. If error bit #19 is disabled or no ERRORP program exists, the event becomes latched, and you will need to reset the controller to clear the error. Chapter 1. Implementing 6K PROFIBUS-DP 9 FBSIZE Fieldbus Data Packet Size Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup <!>FBSIZE<i> n/a i = 1-8 8 FBSIZE: *FBSIZE8 FBADDR, TOPSTS Product Rev 6Kn-PB 5.2 Use the FBSIZE command to set the number of binary variables exchanged with a PROFIBUS master. Data received or sent to the master is of the same size (cyclic), and each binary variable is 4 bytes. The new value is saved into nonvolatile memory, and becomes effective after the controller is reset. Example: FBSIZE8 FBSIZE2 ;Set fieldbus data packet size to 8 binary variables. ;Set fieldbus data packet size to 2 binary variables. Here are the variable assignments (from the controller's perspective) for each possibility of FBSIZE: Command FBSIZE1 FBSIZE2 FBSIZE3 FBSIZE4 FBSIZE5 FBSIZE6 FBSIZE7 FBSIZE8 Data Out VARB1VARB1 VARB1VARB2 VARB1VARB3 VARB1VARB4 VARB1VARB5 VARB1VARB6 VARB1VARB7 VARB1VARB8 Data In VARB9VARB9 VARB9VARB10 VARB9VARB11 VARB9VARB12 VARB9VARB13 VARB9VARB14 VARB9VARB15 VARB9VARB16 Regardless of FBSIZE setting, VARB1-16 are reserved for PROFIBUS activity and are not available for general use. OPTEN Option Card Enable/Disable Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup <!>OPTEN<i> n/a r = 0 (disable) or 1 (enable) 1 OPTEN: *OPTEN1 TOPSTS Product Rev 6Kn-PB 5.2 Use the OPTEN command to enable (OPTEN1) or disable (OPTEN0) the option card on powerup. This feature allows Ethernet to be enabled when an option card is installed but disabled (if applicable). It also restores VARB1-16 for use by the user's application. Caution: If you later re-enable OPTEN1, VARB1-16 are then reserved for fieldbus activity. NOTE: The new value is saved into non-volatile memory, and becomes effective after power is cycled. 10 6K and Gemini PROFIBUS Guide OUTFNC Output Function Type: Syntax: Units: Range: Default: Response: See Also: Output Product Rev <!><B>OUTFNC<i><-<a>c> 6Kn-PB 5.2 i = output #, a = axis, c = function identifier (letter) i = 1-32 (I/O brick dependent), a = 1-8 (depends on product), c = A-I c = A (programmable output function - default) OUTFNC: (function and status of onboard outputs) 1OUTFNC: (function and status of outputs on I/O brick 1) 1OUTFNC1: *1OUTFNC1-A PROGRAMMABLE OUTPUT - STATUS OFF An additional function (I) is added to the OUTFNC functions: Identifier I Function Description Option Card Fault: Output activates when error bit #19 is set for the option card fault. See the ERROR command for description of events. This requires ERROR.191 to be set, or the output will not activate. The OUTFNC-I command can only be assigned to task 0. If it is assigned to other than task 0, the error message "ALTERNATE TASK NOT ALLOWED" will be generated. OUTFNC-I cannot be assigned to a specific axis. Example: 0%1OUTFNC8-i ; Assign brick 1, output 8 to option card fault 0%OUTFNC1-i ; Assign on-board output 1 to option card fault 2%OUTFNC1-i ; Only task 0 allowed 2%ALTERNATE TASK NOT ALLOWED TFBS Type: Syntax: Units: Range: Default: Response: See Also: Transfer Fieldbus Status Communication Setup <!>TFBS<.i> i = status bit number 1-32 n/a TFBS: TFBS.4: *1 (unit online or link ok, yes) *TFBS0001_0000_0000_0000_0000_0000_0000_0000 ER.19, [FBS], TFBSF Product Rev 6Kn-PB 5.2 The TFBS command provides information on the 32 fieldbus status bits. The TFBS command reports a binary bit report. If you would like to see a more descriptive text based report, use the TFBSF command. Response for TFBS: *TFBS0001_0000_0000_0000_0000_0000_0000_0000 Bit#1...bit#32 For bit description, see FBS on page 9. Chapter 1. Implementing 6K PROFIBUS-DP 11 TFBSF Type: Syntax: Units: Range: Default: Response: See Also: Fieldbus Status Full Text Communication Setup <!>TFBSF n/a n/a n/a see example ER.19, [FBS], TFBS, TOPSTS Product Rev 6Kn-PB 5.2 Use the TFBSF command to check the status of the fieldbus and display the status in full ASCII text to a terminal. For status description, see FBS on page 9. Example TFBSF response: * TIMEOUT NO * CHECKSUM FAULT NO * HWD CFG MODE NO * ONLINE YES * * RESERVED NO * RESERVED NO * RESERVED NO * RESERVED NO * * RESERVED NO * RESERVED NO * RESERVED NO * RESERVED NO * * RESERVED NO * RESERVED NO * RESERVED NO * RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO RESERVED NO TOPSTS Option Card Status Full Text Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup <!>TOPSTS n/a n/a n/a see example OPTEN, TFBSF Product Rev 6Kn-PB 5.2 Use the TOPSTS command to check the status of the option card, and display the status in full ASCII text to a terminal. Example TOPSTS response: *6K OPTION CARD STATUS * *Option Card Enabled: Yes *Option Card Type: PROFIBUS-DP *Option Card Firmware Rev: 92-018751-01-1.1 *Option Card Serial Number: 8-65535-65535 * *6K PROFIBUS Product ID: 2317 (decimal) *6K PROFIBUS Configured Via Software *6K PROFIBUS Packet Size: FBSIZE8 *6K PROFIBUS Address: FBADDR1 12 6K and Gemini PROFIBUS Guide Programming Scenario NOTE: To understand the overall implementation process, refer to page 2. ;******************************************************************************* DEL ERHND DEF ERHND ;------------------------------------------------------------------------------;Fieldbus error event ;If the error event can be resolved, an unconditional jump is made to ;re-initialize the controller. ;------------------------------------------------------------------------------IF (ER.19 = b1) ;Insert application specific events to execute when a fieldbus error occurs. ;Wait for controller to go back online WAIT(FBS = b00X1) ; Controller back online ERROR.19-0 ;Acknowledge error event has been resolved ERROR.19-1 ; JUMP MAIN NIF ;Call to MAIN or other suitable initializer. ;------------------------------------------------------------------------------;Post power-up error event ;If the error event can be resolved, an unconditional jump is made to ;re-initialize the controller. ;------------------------------------------------------------------------------IF (FBS <> b00X1) ;Wait for controller to go back online WAIT(FBS = b00X1) JUMP MAIN NIF END ;ERHND program ;******************************************************************************* ;------------------------------------------------------------------------------;MAIN program ; ;In this program, the fieldbus error handler is assigned, enabled, and an output ;is activated when a fieldbus error occurs. ; ;Next a power-up check is made to determine if the 6k is active on the fieldbus. ;If not, the controller makes an unconditional jump to the error handler. ; ;After completing configuration and power-up checks, the controller begins ;exchanging data with the master. This section demonstrates mailbox messaging. ; ;------------------------------------------------------------------------------DEL MAIN DEF MAIN ;Initialize controller ERRORP ERHND ;Assign error handler program ERROR.19-1 ;Run ERRORP program (ERHND) when fieldbus error occurs OUTFNC8-I ;Activate onboard output 8 if fieldbus fault occurs Chapter 1. Implementing 6K PROFIBUS-DP 13 ;Post power-up check to verify no fieldbus errors exist. IF(FBS <> b00X1) ;Check to see if it's online JUMP ERHND ;Fieldbus error, jump to error program NIF ;Application's main loop L IF(VARB9.1 <> VARB1.1) ;SEND NEW MESSAGE TO MASTER WRITE"SENT NEW MESSAGE" VARI1=4PE VARB2=VCVT(VARI1) ;Assign axis 4 encoder position to VARI1 ;Send encoder position out VARB1=VARB1^H1 T2 NIF ;Notify master new message exists IF(VARB9.2 <> VARB1.2) ;READ MESSAGE FROM MASTER WRITE"GOT NEW MESSAGE" VAR10=VCVT(VARB10) A,(VAR10) ;Assign new accel value VAR11=VCVT(VARB11) D,(VAR11) ;Assign new distance value VARB1=VARB1^H2 T2 NIF LN ;Acknowledge message received END ; MAIN program ;******************************************************************************* STARTP MAIN ;Assign MAIN as the program to be run automatically on power-up and reset. 14 6K and Gemini PROFIBUS Guide 2CHAPTER TWO Implementing Gemini PROFIBUS-DP IN THIS CHAPTER · PROFIBUS Overview ..................................................................16 · Hardware Interface .......................................................................17 · Configuration and Programming ..................................................19 · Acyclic Command Messages........................................................20 · Command Descriptions ................................................................28 · Configuration Example.................................................................32 Chapter 2. Implementing Gemini PROFIBUS-DP 15 PROFIBUS Overview Gemini GT6-PB/GV6-PB The Gemini GT6-PB and GV6-PB are high performance stepper and servo drives designed to support the PROFIBUS Trade Organization (PTO) specification for PROFIBUS-DP. These compact digital drives offer features such as digital tuning and notch filters for our servos, as well as sensorless stall detect and ABS damping for our steppers. These drive/controllers are configured over RS232/485 with either Motion Planner on a full size PC or laptop, or Pocket Motion Planner on a pocket PC. Cabling is not provided by Compumotor. Technical Assistance Technical questions regarding PROFIBUS should be addressed to your local PROFIBUS User Group. An address list is available on the PROFIBUS Internet site at www.profibus.com. For support with Gemini specific questions, contact Compumotor Applications Engineering at 800-358-9070, or e-mail us at [email protected]. Implementation Process PROFIBUS Master (user defined): 1. Use the provided CMTR090E.GSD file. Do not modify. 2. Select the module type "Gemini Drive (9 words IN/OUT)". 3. Configure communication baudrate. Gemini Drive: 1. Enable/disable terminating resistors as needed (see page 18). 2. Launch Motion Planner (CD-ROM is provided in your ship kit). 3. Establish a direct communication link (serial) with the Gemini. Refer to your hardware installation documentation for connection instructions. 4. Configure node address (see FBADDR on page 28, or use hardware method on page 18). 5. Configure cyclic data exchange (see FBPIC and FBPOC on page 29). 6. Configure programmable outputs (see FBMASK on page 29). 7. Reset the Gemini drive to initialize the PROFIBUS card. GSD File Each device in a PROFIBUS network is associated with a GSD file, containing all necessary information about the device. The latest version of the Gemini GSD file (CMTR090E.GSD) can be downloaded from www.compumotor.com. Data Types The table below describes the data type, number of bits, and min/max values. Data Type Number of Bits Min Value Max Value BOOL (Boolean) 1 SINT (Short Integer) 8 USINT (Unsigned Short Integer) 8 INT (Integer) 16 UINT (Unsigned Integer) 16 DINT (Double Integer) 32 UDINT (Unsigned Double Integer) 32 0 (False) -128 0 -32768 0 -231 0 1 (True) 127 255 32767 65535 231-1 232-1 16 6K and Gemini PROFIBUS Guide Hardware Interface GV6 Gemini Servo PROFIBUS Connector Termination Switch Hardware Address Settings LEDs LED Status Indicators Bicolor flashing LED indicators are provided on the PROFIBUS option card. Refer to the following table for troubleshooting information provided by these LEDs. Chapter 2. Implementing Gemini PROFIBUS-DP 17 LED Steady Flash Function Status * FB1 -- -- Not used -- FB2 Off Module is not online FBS bit #4 = 0 Green Module is online FBS bit #4 = 1 FB3 Off Module is not offline FBS bit #4 = 1 Red Module is offline FBS bit #4 = 0 FB4 Off No diagnostics present -- Red 4 flashes/second - Hardware failure -- * To check status, execute the TFBS command (bit status report). You can also use the FBS operator to assign or compare one or more status bits (e.g., use in an IF expression, etc.). Refer to the TFBS command description on page 32. PROFIBUS Connector Pin Out The following table gives the pin out for the PROFIBUS Connector. The industry standard PROFIBUS connectors are used. Termination Pin Housing 1 2 3 4 5 6 7 8 9 Name Shield Not connected Not connected B-Line RTS GND BUS +5V BUS Not connected A-Line Not connected Function Protective earth Positive Rx/TxD Request to send * Isolated GND * Isolated +5V * Negative Rx/TxD - * +5V BUS and GND BUS are used for termination. Some devices like optical transceivers (RS485 to fiber optics) might require external power from these pins (not to exceed 80 mA). RTS is used in some equipment to determine the direction of transmission. In normal applications only A-Line, B-Line, and Shield are used. If the Gemini driver/controller is used as the last node in a network, the termination switch must be in the ON position. Otherwise the switch must be in the OFF position. Please note, if an external termination connector is used, the switch must be in the OFF position. Node Address To configure the node address via hardware, two rotary switches are provided to set a node address of 1-99. The software command FBADDR0 is also required to configure the node address via hardware (default from factory). Setting the rotary switches to 0 enables software configuration of node address (see FBADDR on page 28). 23 23 901 901 Example: Switch x1 = 3 and x10 = 2, node address is 23 78 78 456 456 18 6K and Gemini PROFIBUS Guide Baud Rate The Gemini drive/controller will auto-detect the baud rate of the PROFIBUS network. For a complete list of supported baud rates, see the CMTR090E.GSD file. Configuration and Programming There are no dip switches, pots, etc. for configuration and adjustment on any of the drives. All parameters on the drives are set over RS-232/485 except with regard to the PROFIBUS card. This card provides rotary switches for device number. Basic Requirements The Gemini PROFIBUS options (GV6-PB and GT6-PB) are based on the Gemini GV6 and GT6 platforms. All commands supported by GV6 and GT6 drives are also supported by GV6-PB and GT6-PB drives. See the Gemini Series Programmer's Reference for a complete listing of Gemini commands. Additional PROFIBUS-specific commands are listed on page 28 in this manual. All commands that are sent over PROFIBUS are treated as immediate commands by the Gemini drive (i.e. the command will execute as soon as you send it to the drive). Data Format Requirements Devices are expected to operate in the following environment: BKD (8 Bytes) PZD STW BKE IND BDA ZSW 0123 PAD (8 BYTES) PED (8 BYTES) 0 1 2 3 4 5 67 Data Coherency Coherency is the amount of data that must be changed as a single block. It is important that multiple-byte data all change at the same time so that the correct values are received by the drive. The Gemini Drive module in the CMTR090E.GSD file breaks the data into three separate, coherent sections: BKD (3 words), STW/ZSW (1 word), PAD/PED (3 words). Chapter 2. Implementing Gemini PROFIBUS-DP 19 Acyclic Command Messages Acyclic messaging provides generic, multi-purpose communication paths between two devices. Acyclic messages are exchanged across the BKD section of the 18-byte data. Acyclic messages are used to command the performance of a particular task and to report the results of performing the task. The meaning/intended use of an acyclic message is stated within the BKE data word. Acyclic messaging provides the means by which typical request/response oriented functions are performed (e.g. module configuration). PROFIBUS defines an acyclic messaging protocol that states the meaning of the message. An acyclic message consists of the command ID and the command data. All commands are not stored in non-volatile memory and are treated as immediate commands by the Gemini drive. NOTE: The Gemini PROFIBUS interface only processes a new command if one of the incoming bytes has changed. Thus, if the interface is being used to poll a single status word (i.e. TAS) and the PZD data is not changing, the response will reflect the value at the time the initial BNU command was received by the drive; changes in the status word will not be updated in the BNU response. However, the values returned from the drive in the STW and PAD will be continually updated, regardless of the input packet. Acyclic Message Command The Command data sent from a master to the Gemini: BKE Octet 1 Octet 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ACK BNU ACK: Command sent to Gemini drive. See ACK table on page 22. BNU: Acyclic command sent (Attribute number goes here) IND Octet 3 Octet 4 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Not currently used BDA (command data from the BNU command goes here) Octet 5 15 14 13 12 11 10 9 87 Octet 6 6543210 Octet 7 15 14 13 12 11 10 9 87 Octet 8 6543210 20 6K and Gemini PROFIBUS Guide The Command response from a Master request: BKE Octet 1 Octet 2 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ACK BNU ACK: Command response to Master. See the ACK Table on page 22. BNU: Acyclic command response (Attribute number response) IND Octet 3 Octet 4 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Not currently used BDA (response data from attribute number) Octet 5 15 14 13 12 11 10 9 87 Octet 6 6543210 Octet 7 15 14 13 12 11 10 9 87 Octet 8 6543210 Examples of BDA data lengths: For 1-bit data (BOOLEAN) or 8-bit data: Octet 6 7 6543210 (MSB) (LSBa) For 16-bit data (INTEGER): Octet 5 15 14 13 12 11 10 9 87 (MSB) Octet 6 6543210 (LSB) For 32-bit data (DOUBLE INTEGER): Octet 5 15 14 13 12 11 10 9 87 (MSB) Octet 6 6543210 Octet 7 15 14 13 12 11 10 9 87 Octet 8 6543210 (LSB) Chapter 2. Implementing Gemini PROFIBUS-DP 21 Acyclic Message Response ACK (Acknowledge) Command 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Command: Master to Gemini No Command Write Gemini Parameter Read Gemini Parameter/status Execute Gemini command Read Command Status Unused Unused Unused Unused Unused Unused Unused Unused Unused Unused Unused Reply 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Reply: Gemini to Master No Reply Parameter written Status read Executed Command Status Read Invalid object Command is read only Command is write only Cannot execute command Unused Unused Unused Unused Unused Unused Unused Acyclic BNU Commands Type 1 and 2 (Gemini Parameters) This section describes the required behavior of the acyclic BNU commands sent in the BKE two-word object. Instance Attributes # Attribute Name Service Name Description Units Range Default Scale Data Factor Type 1 General Fault Get_Attribute_Single The logical OR of all fault n/a 0 - No Fault 0 1 condition attribute flags in the device. This bit is reset when 1 - Fault the fault condition is removed. When active, this indicates a drive failure has occurred (bridge fault, overcurrent, etc). Logical OR of bits 14 and 23 of the TAS command and TAS.13 if FLTDSB1 is set. BOO L 2 Fault Output Get_Attribute_Single Displays state of Hardware n/a Fault Output 0 - Inactive 1 - Active 0 1 BOO L 3 Profile Units Get_Attribute_Single Returns the number of counts 200-1024000 (GV) 1 1 DINT motor/feedback counts per second for velocity and 200-128000 (GT) acceleration/ deceleration. ERES command for servo and DRES for steppers 4 Home Active Get_Attribute_Single Sets the active level of the n/a 0 - Active Low 0 1 BOO Level Set_Attribute_Single Hardware Home Input. 1 - Active High L INLVL for INFNCn-T. If no home input is defined, this is an invalid object. 5 Home Input Get_Attribute_Single Status of the home input. n/a Level TIN command. Returns 0 if no home input is defined. 0 - Off 1 - On 0 1 BOO L 6 Forward Limit Get_Attribute_Single Motion is allowed in positive n/a 0 - Pos. limit not 0 1 BOO Set_Attribute_Single direction when active. Set active L when forward limit is active. 1- Pos. limit Write = LH. Read = TAS.15. active 22 6K and Gemini PROFIBUS Guide # Attribute Name Service Name Description Units Range Default Scale Data Factor Type 7 Reverse Limit Get_Attribute_Single Motion is not allowed in the n/a 0 - Neg. limit not 0 1 BOO Set_Attribute_Single negative direction when active L active. Set when the negative 1 - Neg. limit limit is active. Write = LH. active Read = TAS.16. 8 Soft Limit Get_Attribute_Single Enables Soft Limit checking n/a 0 - Disable Soft 0 1 Enable Set_Attribute_Single (see LS). Returns 1 for LS1, Limit Check LS2, or LS3; and 0 for LS0. 1 - Enable Soft Writing 1 sends !LS3 to drive. Limit Check 9 Positive Soft Get_Attribute_Single Specifies the positive soft limit n/a -231 to (231 1) n/a 1 Limit Position Set_Attribute_Single position in Position Units. See LSPOS. 10 Negative Soft Get_Attribute_Single This specifies the negative n/a -231 to (231 1) n/a 1 Limit Position Set_Attribute_Single soft limit position in Position Units. See LSNEG. BOO L DINT DINT 11 Enable Drive Get_Attribute_Single Set_Attribute_Single 12 Target Get_Attribute_Single Acceleration Set_Attribute_Single 13 Target Get_Attribute_Single Deceleration Set_Attribute_Single Enables/disables motor current. See DRIVE. Sets/returns the target acceleration See A. Sets/returns the target deceleration. See AD. n/a 0 - Disable 1 - Enable rps2 0.0001 - 9999.9999 rps2 0.0001 - 9999.9999 0 1 BOO L 10 10000 DINT 10 10000 DINT 14 Target Velocity 15 Target Position 16 Average Acceleration 17 Average Deceleration Get_Attribute_Single Set_Attribute_Single Get_Attribute_Single Set_Attribute_Single Get_Attribute_Single Set_Attribute_Single Get_Attribute_Single Set_Attribute_Single Sets/returns the target velocity. See V. Sets/returns the target position. See D. Sets/returns the average acceleration. See AA. Sets/returns the average deceleration. See ADA. rps 0.0000 - 1 200.0000 counts -231 to (231-1) 0 rps2 0.0001 - 0 9999.9999 rps2 0.0001 - 0 9999.9999 10000 DINT 1 DINT 10000 DINT 10000 DINT 18 RESERVED -------------- -------------- --- ------------- --- --- ----- 19 Inputs Status Get_Attribute_Single Reports the input values. n/a See TIN. 0000_0000 to n/a 1 1111_1111 BOO L 20 Outputs Status 21 Actual Position Input 1 Get_Attribute_Single Sets/reports the value of the n/a 000_0000 to n/a 1 Set_Attribute_Single outputs. See OUT and TOUT. 111_1111 Output 1 Get_Attribute_Single Sets a new position. counts -231 to (231 1) 0 1 Set_Attribute_Single Read = TPE on GV6, or TPC on GT6. Write = PSET. BOO L DINT 22 Drive Status Get_Attribute_Single Reports the drive status of the n/a 0000_0000_ n/a 1 drive. See TAS. 0000_0000... DINT 1111_1111_ 1111_1111... 23 Error Status Get_Attribute_Single Reports the error status of the n/a 0000_0000_ n/a 1 drive. See TASX. 0000_0000... DINT 1111_1111_ 1111_1111... 24 Actual Velocity Get_Attribute_Single Reports the actual velocity. rps See TVELA for GV6, TVEL for GT6. -200.0000000 to n/a 200.0000000 10000 DINT 25 Positive Torque Limit 26 Maximum Dynamic Following Error 27 Actual Following Error Get_Attribute_Single Set_Attribute_Single Get_Attribute_Single Set_Attribute_Single Get_Attribute_Single Gemini GV6-PB only. Specifies maximum torque motor can achieve. See DMTIP. Gemini GV6-PB only. Specifies maximum following error allowed before Following Error Fault. See SMPER. Gemini GV6-PB only. Reports the actual following error. See TPER. Arms counts counts 0.00 - 128.00 0 to (231 1) 0 to (231 1) n/a 256 INT 4000 1 DINT n/a 1 DINT Chapter 2. Implementing Gemini PROFIBUS-DP 23 # Attribute Name 28 Position Bandwidth Service Name Get_Attribute_Single Set_Attribute_Single Description Gemini GV6-PB only. See DPBW. 29 Position Damping Ratio Get_Attribute_Single Set_Attribute_Single 30 Load to Rotor Get_Attribute_Single Inertia Ratio Set_Attribute_Single 31 Load Damping Get_Attribute_Single Set_Attribute_Single 32 Integrator Enable Get_Attribute_Single Set_Attribute_Single Gemini GV6-PB only. See SGPRAT. See LJRAT command. Gemini GV6-PB only. See LDAMP. Gemini GV6-PB only. See SGINTE. 33 Velocity/ Position Bandwidth Ratio Get_Attribute_Single Set_Attribute_Single 34 Torque/Force Get_Attribute_Single Limit Set_Attribute_Single 35 Enable a Gain Set Get_Attribute_Single Set_Attribute_Single 40 Integer Variable Get_Attribute_Single Set_Attribute_Single Gemini GV6-PB only. See SGPSIG. Gemini GV6-PB only. See DMTLIM. Gemini GV6-PB only. See SGENB. Access to internal integer variables. See VARI. Units Hz Range 1.00 - 100.00 Default Scale Data Factor Type 5.0 327.68 INT n/a 0.500 - 2.000 1 16384 INT n/a 0.0 - 100.0 0.0 10 INT Nm/rad 0.0000 - 1.0000 0.0000 32768 INT /sec n/a 0 - Disable 1 1 INT 1 - Enable 2 - Enable at end of move n/a 0.100 - 2.000 1.000 16384 INT Nm 0.0 - 500 500 65.536 INT n/a 1 - 3 n/a 1 n/a -231 to (231 1) 0 1 INT DINT EXAMPLES of Acyclic BNU Commands Type 1 and 2 (xx indicates "don't care") · Set a velocity of 8.2 rps: ACK = 1 (write parameter) = 1 hex BNU = 14 (Target Velocity) = 00E hex BDA = 8.2 * 10,000 (desired velocity * scale factor) = 82000 = 14050 hex This object is a 32-bit parameter so BKD = 10 0E xx xx 00 01 40 50 · Set the bandwidth of the position loop to 50 Hz: ACK = 1 (write parameter) = 1 hex BNU = 28 (Position Bandwidth) = 01C hex BDA = 50 * 327.68 (desired position loop bandwidth * scale factor) = 16384 = 4000 hex This object is a 16-bit parameter so BKD = 10 1C xx xx 40 00 xx xx · Enable soft limit checking: ACK = 1 (write parameter) = 1 hex BNU = 8 (Soft Limit Enable) = 008 hex BDA = 1 * 1 (desired value * scale factor) = 1 = 1 hex This object is a Boolean parameter so BKD = 10 08 xx xx xx 01 xx xx · Read acceleration value: ACK = 2 (read parameter/status) = 2 hex BNU = 12 (Target Acceleration) = 00C hex Send to Gemini drive in BKD = 20 0C xx xx xx xx xx xx So return value from Gemini drive BKD = 20 0C xx xx 00 07 A1 20 BDA = 00 07 A1 20 hex = 500000 = (accel value * scale factor), so the acceleration is 50 rps/sec. · Read Position Damping Ratio: ACK = 2 (read parameter/status) = 2 hex BNU = 29 (Postion Damping Ratio) = 01D hex Send to Gemini drive in BKD = 20 1D xx xx xx xx xx xx So return value from Gemini drive BKD = 20 1D xx xx 33 33 xx xx BDA = 33 33 hex = 13107 = (damping ratio * scale factor) so the damping ratio is 0.8. 24 6K and Gemini PROFIBUS Guide · Read Home Input Level: ACK = 2 (read parameter/status) = 2 hex BNU = 5 (Home Input Level) = 005 hex Send to Gemini drive in BKD = 20 05 xx xx xx xx xx xx So return value from Gemini drive BKD = 20 05 xx xx xx 01 xx xx BDA = 01 hex = 1 = (home input value * scale factor) so the home input state is active. · Set Variable 5 to 305419896: ACK = 1 (write parameter) = 1 hex BNU = 40 (Integer Variable) = 028 hex IND = 5 (variable number) = 0005 hex BDA = 305419896 = 12345678 hex This object is a 32-bit parameter so BKD = 10 28 00 05 12 34 56 78 NOTE: An invalid variable is indicated by an ACK of 9. Acyclic BNU Commands Type 3 and 4 (Gemini Commands) This section describes the required behavior of the acyclic BNU commands sent in the BKE 2-word object. See the ZSW for other motion commands. # Attribute Name Service Name Description Range 1 Start a Profile Move Get_Attribute_Single Set_Attribute_Single Used to load command data, start a profile move, and indicate that a profile move is in progress. This will remain set until the motion is complete, or a hard/soft stop is issued. 0 - No Action 1 - Start Move Write = GO. Read = TAS.1 (motion is commanded). 2 Uncompiled Get_Attribute_Single Selects and runs a program in 1 - 32 Program Selection Set_Attribute_Single the drive. Write = RUN. Read = TSS.3 (executing a program) 3 Compiled Get_Attribute_Single Selects and runs a compiled 1 - 16 Program Selection Set_Attribute_Single program in the drive. Write = PRUN. Read = internal value available over PROFIBUS only (not available over RS-232). Data Type BOOL INT INT EXAMPLES of Acyclic BNU Commands Type 3 and 4 (xx indicates "don't care") · Execute Program 24 ACK = 3 (execute Gemini command) = 3 hex BNU = 2 (Program) = 002 hex BDA = 24 = 1C hex This object is an integer parameter so BKD = 30 02 xx xx 00 1C xx xx · Check Motion ACK = 4 (read command status) = 4 hex BNU = 1 (Start Move) = 001 hex Send to Gemini drive in BKD = 40 01 xx xx xx xx xx xx So return value from Gemini drive BKD = 40 01 xx xx xx 01 xx xx BDA = 01 hex = 1 = so the motor is currently moving. Chapter 2. Implementing Gemini PROFIBUS-DP 25 PZD (10 Bytes) Cyclic Command Messages PZD STW ZSW PAD (8 BYTES) PED (8 BYTES) 0 1 2 3 4 5 67 Gemini to Master (Input bytes 10 bytes maximum) STW (required by PROFIBUS - 2 bytes) Status Word Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 2 Bytes Positive direction end-of-travel limit hit Negative direction end-of-travel limit hit Moving New position acknowledgment (bit toggles whenever a new position is received from the master in the PED) Home successful In Target Zone Fieldbus operating Position error Alarm warning (indicates a bit is set in TASX) E-stop (Enable pin) At velocity Continuous (1) / Preset (0) Drive fault Drive enabled Absolute (1) / Incremental (0) Drive ready PAD (8 bytes, data is sent MSB first) Available options (configured by FBPIC, see page 29) # Attribute 0 Zero word 1 Actual Position 2 Actual Speed 3 Inputs 4 Outputs 5 Position Error Description Two-byte placeholder Sends back the actual position of the motor as read by the TPE command for the GV6-PB and TPC for the GT6-PB. Sends back the actual speed of the motor as read by TVELA for GV6-PB and TVEL for GT6-PB. Sends back the current state of the inputs as read by the TIN command. Sends back the current state of the outputs as read by the TOUT command. Sends back the position error (only valid for GV6-PB). Bytes 2 bytes 4 bytes 4 bytes 2 bytes 2 bytes 2 bytes 26 6K and Gemini PROFIBUS Guide Master to Gemini (Output bytes 10 bytes maximum) ZSW (required by PROFIBUS - 2 bytes) Control 2 Bytes Bit 15 Kill Bit 14 Home in negative direction Bit 13 Home in positive direction Bit 12 Direction negative Bit 11 Direction positive Bit 10 Teach 0 Position Bit 9 Absolute (1) / Incremental (0) Bit 8 * Enable drive (DRIVE1) and open brake Bit 7 * Enable drive (DRIVE1) and brake closed Bit 6 Mode continuous Bit 5 Pause (1) / Continue (0) Bit 4 Stop Bit 3 PED update toggle Bit 2 ** Kill and disable drive Bit 1 ** Drive disable (remove motor power) Bit 0 Reset * The brake output must be defined as a general-purpose output (OUTFNC7-A) for these commands to work correctly. If the brake is used as a fault output (OUTFNC7-F), the brake will open for both Bit 7 and Bit 8. Regardless, the DRIVE1 is still executed. ** Bit 1 will only remove motor power; the fault outputs will not be asserted. If a fault output is required as part of the disable process, Bit 2 should be used. PED (8 bytes, data is sent MSB first) Available options (configured by FBPOC, see page 30) # Attribute Description Bytes 0 Zero word Two-byte placeholder 2 bytes 1 Position (D) Go to new position 4 bytes 2 Speed (V) 4 bytes 3 Acceleration (A) 4 bytes 4 Outputs (OUT) Set outputs, OUT.1=LSB 2 bytes Note: If D changes, a GO is also issued. If V or A changes and TAS.1=1, a GO is issued. Note: Bit 3 needs to toggle for data to be read. Chapter 2. Implementing Gemini PROFIBUS-DP 27 Command Descriptions The following is a list of all the PROFIBUS specific commands. For a complete listing of Gemini commands see the Gemini Series Programmer's Reference. ERROR (Error Checking Enable) .....................See page 29 FBMASK (Fieldbus I/O Mask) ............................See page 29 FBPIC (Fieldbus Process Input Control)...........See page 29 FBPOC (Fieldbus Process Output Control) ........See page 30 FBADDR (Fieldbus Address) ..............................See page 28 [FBS] (Fieldbus Status)....................................See page 30 OUTFNC (Output Function)................................See page 11 TASX (Transfer Extended Axis Status)..............See page 31 TCS (Transfer Configuration Status) .................See page 31 TFBS (Transfer Fieldbus Status) .......................See page 32 ERROR Error Checking Enable Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup Product Rev <a_><!>ERROR<b><b>...<b><b> (32bits) GV6-PB 1.70 n/a GT6-PB 1.70 b=0 (disable), 1 (enable), or X (don't change) 0 ERROR: *ERROR0000_0000_0000_0000_0000_0000_0000_0000 [ASX], ERRORP, INFNC, LH, LS, S, TASX, TER, TRGFN A new bit assignment is added for the ERROR command, bit #19. See FBS on page 30 for the event causing the error condition. To clear the error event, first resolve the cause, and then issue the ERROR.19-0 command followed by the ERROR.19-1 command. Error bit 19 is edge sensitive to error events. Bit # 19 Function Fieldbus Error Branch Type JUMP FBADDR Fieldbus Address Type: Syntax: Units: Range: Default: Response: See Also: Communication Setup <!>FBADDR<i> i = fieldbus address i = 0-125 0 FBADDR: *FBADDR3 Product Rev GV6-PB 1.70 GT6-PB 1.70 NOTE: This command does not take effect until after you cycle power to the drive or issue a RESET command. Use the FBADDR command to report the controller's current node address assignment and set the node address via software. The new value is saved into nonvolatile memory, and becomes effective after the controller is reset. Network configuration of node address is not supported. This command cannot report the hardware configuration setting. In order to set the node address via software, the hardware configuration method must be disabled (default from factory). Setting FBADDR0 is required to return to the hardware configuration method. See Node Address on page 18. 28 6K and Gemini PROFIBUS Guide Example: Assume controller was assigned node address 1 out of reset: >FBADDR *FBADDR1 >FBADDR3 >FBADDR *FBADDR3 ; Set node address to 3 ; New network setting will take effect after unit is ; reset! FBMASK Fieldbus I/O Mask Type: Syntax: Units: Range: Default: Response: See Also: I/O Setup <!>FBMASK <b>,<b>,<b>,<b>,<b>,<b>,<b>,<b> n/a b=0 (Gemini control only), 1 (Gemini or Fieldbus control) 1111_111 FBMASK: *FBMASK0000_000 FBPOC Product Rev GV6-PB 1.70 GT6-PB 1.70 Use FBMASK to prevent an output from being changed by fieldbus. Note: Outputs must be configured as general-purpose type outputs to be changeable over the fieldbus (see the Gemini Series Programmer's Reference OUTFNC command). Example: FBMASK0010000 ; Only output #3 can be changed by fieldbus Response for FBMASK: *FBMASK0010_000 FBPIC Type: Syntax: Units: Range: Default: Response: See Also: Fieldbus Process Input Control Communications Setup <!>FBPIC<i>,<i>,<i>,<i> n/a i = 0 to 5 0 FBPIC: *FBPIC 0,0,0,0 FBPOC, TCS Product Rev GV6-PB 1.70 GT6-PB 1.70 NOTE: This command does not take effect until after you cycle power to the drive or issue a RESET command. The FBPIC command defines the data sent back to the master in the PAD. See the PAD for more details (page 26). If the data is too long (more than 8 bytes), a configuration error occurs (reported with TASX bit #7 and TCS), and the fieldbus interface is disabled. Example: FBPIC1,3,4 FBPIC0,0,3,4 ; This places 1 Actual Position, 3 Input status, and 4 ; output status. Actual Position uses 4 bytes, Input ; status uses 2 bytes, and output status uses 2 bytes. ; This totals the 8 bytes of data. ; This sends back Input data and output data in bytes 4-5 ; and 6-7. Bytes 0-3 are left blank by the two 2-byte ; place holders. Chapter 2. Implementing Gemini PROFIBUS-DP 29 FBPOC Fieldbus Process Output Control Type: Syntax: Units: Range: Default: Response: See Also: Communications Setup <!>FBPOC<i>,<i>,<i>,<i> n/a i = 0 to 4 0 FBPOC: *FBPOC 0,0,0,0 FBPIC, FBMASK, TCS Product Rev GV6-PB 1.70 GT6-PB 1.70 NOTE: This command does not take effect until after you cycle power to the drive or issue a RESET command. The FBPOC command defines the data sent by the master. See the PED for more details (page 27). If the data is too long (more than 8 bytes), a configuration error occurs (reported with TASX bit #7 and TCS), and the data contained in the PED is ignored. Example: FBPOC1,2 FBPOC0,0,1 ; This receives the Position command and the Velocity ; command. Position uses 4 bytes and Velocity uses 4 bytes. ; This receives the Position command and places it in ; bytes 4-7. Bytes 0-3 are left blank by the two 2-byte ; place holders. [ FBS ] Type: Syntax: Units: Range: Default: Response: See Also: Fieldbus Status Communication Setup See below n/a n/a n/a n/a ER.19, TFBS Product Rev GV6-PB 1.70 GT6-PB 1.70 Use the FBS command to assign the fieldbus status to a binary variable or for use in a comparison command. Example: IF(FBS.4=b1) ;Branch based on the status of FBS bit 4 The Fieldbus Status register bits are defined as follows: Bit # Function (1=Yes, 0=No) Description 1 TIMEOUT 1,2 2 CHECKSUM FAULT 1,2 Watchdog timed out. Controller has lost communication with fieldbus card Fieldbus card failed hardware check on boot-up 3 HWD CFG MODE 0 - Configuration set via software, 4 ONLINE 1,3 1 - Configuration set via hardware Controller is connected and data exchange is possible 5 -32 RESERVED 1 If any of these error conditions occur (bit #1 = 1, bit #2 = 1, or bit #4 transitions from 1 to 0), the motion controller will perform a Kill (K command) on all axes and set error status bit #19 (ER, TER). Extended Axis Status bit #27 is also set. If error-checking bit #19 is enabled with the ERROR command (ERRORxxxxxxxxxxxxxxxxxx1) the controller will also branch to the ERRORP program. NOTE: Upon initialization, bit #4 is set to 0; this is not a fault. Once the drive is online (bit #4 = 1), a transition of bit #4 from 1 to 0 (bit#4 = 0) will cause a fault. 2 Error event is latched. Reset the controller to clear the error. 3 Error event is recoverable. 30 6K and Gemini PROFIBUS Guide OUTFNC Output Function Type: Syntax: Units: Range: Default: Response: See Also: Output <!>OUTFNC<i>-<c> i = output #,c = function identifier (letter) i = 1-7, c = A-I (see programmer's reference) OUTFNC1: *OUTFNC1-A PROGRAMMABLE OUTPUT - STATUS OFF INFNC, OUT, OUTLVL, POUTA, SMPER, TAS, TASX, TOUT Product Rev GV6-PB 1.70 GT6-PB 1.70 A new identifier is added for the OUTFNC command: Identifier I Function Description FIELDBUS Error: Output activates when TASX bit #27 is set for FIELDBUS error. Note: Outputs must be configured as general-purpose type outputs to be changeable over the fieldbus (see the Gemini Series Programmer's Reference OUTFNC command). Outputs must also be enabled for control with the FBMASK command. Example: OUTFNC1-i ;assign output 1 as a FIELDBUS Error output TASX Type: Syntax: Units: Range: Default: Response: See Also: Transfer Extended Axis Status Communication Setup <a_><!>TASX n/a n/a n/a TASX: *TASX 0001_0000_0000_0000_0000_0000_0000_0000 DCLRLR, DRIVE, RESET, TAS, TCS, TER Product Rev GV6-PB 1.70 GT6-PB 1.70 A new bit assignment is added for the TASX command, bit #27. See FBS on page 30 for the event causing the condition. To clear the status bit the drive must be reset or power must be cycled. Bit # 27 Function Fieldbus Error To Clear the status Bit RESET or cycle power TCS Type: Syntax: Units: Range: Default: Response: See Also: Transfer Configuration Status Communication Setup <a_><!>TCS Fault/Warning Code n/a n/a TCS: *TCS 46 DMTR, TASX Product Rev GV6-PB 1.70 GT6-PB 1.70 Two new error assignments have been added for the TCS command. See FBPIC and FBPOC on page 29-30 for the event causing the condition. To clear the error, the FBPIC or FBPOC must be redefined and a RESET must occur. Code Fault/Warning Drive Type Condition -32158 Fault -32168 Fault GV6-PB GT6-PB GV6-PB GT6-PB Too many Bytes in FBPOC Too many Bytes in FBPIC Method to clear Redefine FBPOC Redefine FBPIC TASX Bit Set Bit 27 Bit 27 Chapter 2. Implementing Gemini PROFIBUS-DP 31 TFBS Type: Syntax: Units: Range: Default: Response: See Also: Transfer Fieldbus Status Communication Setup <!>TFBS<.i> i = system status bit number 1-32 n/a TFBS: TFBS.4: *1 (unit online or link ok, yes) *TFBS0001_0000_0000_0000_0000_0000_0000_0000 ER.19, [FBS] Product GV6-PB GT6-PB Rev 1.70 1.70 The TFBS command provides information on the 32 fieldbus status bits. The TFBS command reports a binary bit report. Response for TFBS: *TFBS0001_0000_0000_0000_0000_0000_0000_0000 Bit#1...bit#32 For bit description, see FBS on page 30. Configuration Example NOTE: The commands below do not take effect until after you execute a RESET command, or cycle power to the drive. Enter these commands in a live communication session with the Gemini drive. (Use Motion Planner's Terminal window as your interface tool.) FBADDR5 FBPOC1,0,4 FBPIC1,2 RESET ; Set the node address to be 5 ; Mast sends position command in PED bytes 0-3, ; and output control in bytes 6-7 ; Drive returns actual position in PAD bytes 0-3, ; and actual velocity in bytes 4-7 ; Reset the drive, so the fieldbus settings will ; take effect NOTE: The commands below take effect immediately. Therefore, you may execute them in a live communication session with the Gemini drive, or place them in a "power-up program" (i.e., a program that is to be identified with the STARTP command as the program to be executed on power-up or reset). OUTFNC1-A ; Define output #1 as a general-purpose (g-p) output OUTFNC5-A ; Define output #5 as a g-p output OUTFNC7-A ; Define output #7 (brake) as a g-p output FBMASK1000101 ; Allow fieldbus to alter outputs #1, #5, and #7 ERROR.19=B1 ; Enable fieldbus error-checking (bit #19) 32 6K and Gemini PROFIBUS Guide AAPPENDIX A Gemini PROFIBUS CE Compliance IN THIS CHAPTER · CE Compliance ......................................................................34 · Installation Instructions ........................................................34 Appendix A: Gemini PROFIBUS CE Compliance 33 CE Compliance The Gemini family of products is designed to meet the requirements of global regulatory agencies. Gemini products, when installed in accordance with instructions in the appropriate Hardware Installation Guide, are compliant with CE directives. This appendix gives instructions for additional steps necessary for installing the Gemini PROFIBUS Option into a CE compliant system. Installation Instructions Gemini Drive Installation Instructions 1. Follow the standard installation and configuration instructions in your Gemini drive's Hardware Installation Guide. 2. Follow additional installation instructions for CE compliance in Appendix C Regulatory Compliance of your drive's Hardware Installation Guide. Gemini PROFIBUS Option Installation Instructions 1. Install PROFIBUS cabling and associated hardware in accordance with instructions in PROFIBUS Guideline No. 2.112, Installation Guidline for PROFIBUS-DP/FMS, available from the PROFIBUS Internet site at www.profibus.com 2. Consult your PROFIBUS Master's guide for additional requirements for the Master installation. 34 6K and Gemini PROFIBUS Guide BAPPENDIX B Gemini Dimensions IN THIS CHAPTER · Gemini Drive Dimensions....................................................36 · Gemini Panel Layout Dimensions ......................................39 Appendix B: Dimensions 35 Gemini Drive Dimensions OW 3.50 (88.9) FH 1.38 (35.0) 3x clearance for #8 or M4 mounting screws 0.58 0.16 (14.7) (4.1) 6.00 (153.0) 5.40 (138.0) 8.0 (203.2) 7.75 (196.9) 7.0 (177.8) 0.88 (22.2) 1.00 (25.4 ) Dimensions (Shorter Enclosure) Product GV6-L3n-PB OW Overall Width inches (mm) 3.88 (98.6) FH Fin Height inches (mm) 0.38 (9.5) GV6-U3n-PB 3.88 (98.6) 0.38 (9.5) GV6-U6n-PB 4.50 (114.3) 1.00 (25.4) GV6-U12n-PB 4.50 (114.3) 1.00 (25.4) GT6-L5-PB GT6-L8-PB 3.88 (98.6) 4.50 (114.3) 0.38 (9.5) 1.00 (25.4) Dimensions in inches (mm) 36 6K and Gemini PROFIBUS Guide 2.25 (57.2) 5.75 (146.1) 3.50 (88.9) 1.38 (35.0) 3x clearance for #8 or M4 mounting screws 0.58 0.16 (14.7) (4.1) 6.00 (153.0) 5.40 (138.0) 9.9 (251.5) 9.63 (244.5) 8.9 (226.1) 0.88 (22.2) Dimensions GV6-H20n-PB 1.00 (25.4 ) Dimensions in inches (mm) Appendix B: Dimensions 37 Back of flange masked from paint 5.69 (144.6) 3.82 (97.1) 2.44 (62) 3x clearance for 1/4" or M6 mounting screws 0.83 0.23 (21) (5.7) 12.88 (327) 12.500 (317.5) 11.40 (289.6) 8.49 (215.7) 7.68 (195) 6.53 (165.7) 1.190 (30.23) 2.50 (63.5) Dimensions GV6-H40n-PB Back of flange masked from paint Dimensions in inches (mm) 38 6K and Gemini PROFIBUS Guide Gemini Panel Layout Dimensions Panel Layout: GV6-L3n-PB GV6-U3n-PB GV6-U6n-PB GV6-U12n-PB GT6-L5-PB GT6-L8-PB NOTE: Provide proper spacing to maintain minimum clearance between drives. 1.00 (25.4 ) Minimum Clearance 1.00 (25.4 ) Minimum Clearance 1.00 (25.4 ) 1.00 (25.4 ) Minimum Clearance NOTE: Provide proper spacing to maintain minimum clearance between drives. Panel Layout Dimensions Shorter Enclosure 0.50 (12.7) Minimum Clearance 1.00 (25.4 ) Minimum Clearance Appendix B: Dimensions 39 NOTE: Vertical spacing between drives: 8 in. (200 mm) for GV6-H40n-PB operating at full power; 6 in. (150 mm) for GV6-H20n-PB operating at full power; 4 in (100 mm) otherwise. Panel Layout: GV6-H20n-PB GV6-H40n-PB NOTE: Provide proper spacing to maintain minimum clearance between drives. 0.50 (12.7) Minimum Clearance 1.00 (25.4 ) Minimum Clearance Dimensions in inches (mm) 1.00 (25.4 ) Panel Layout Dimensions Taller Enclosure 0.50 (12.7) Minimum Clearance NOTE: Provide proper spacing to maintain minimum clearance between drives. 2.00 (50.8 ) Minimum Clearance 0.50 (12.7 ) Minimum Clearance 40 6K and Gemini PROFIBUS Guide