Prévia do material em texto
IndraDrive Fieldbus Setup with RSLogix 5000 including Add-On Instructions for Indradrive control via AB PLCs April 2009 2 This document explains the setup for an Indradrive with a fieldbus communication master. Setup for DeviceNet and Ethernet/IP are described, for both the Indradrive and the Rockwell software. The actual hardware, software and firmware versions used for this document are listed in the appendix. There are many fieldbus capabilities and functions available in the Indradrive, but this document seeks to provide a simple explanation to program simple motion or data transfer. This document is not a complete description of the Indradrive fieldbus capabilities. The Indradrive drive help files and manuals should be consulted for other functions not described here. This document explains two methods of fieldbus communications: direct drive control and data transfer only. With direct drive control, the controller, an AB PLC in this case, issues commands for motion directly to the drive via control and status registers. In data transfer only, the controller merely sends and receives data to and from the drive and the actual motion is handled by the drive itself, (such as with an MLD system). The second half of the manual describes the setup and programming for Add-On Instructions developed to interface to the Indradrive via a fieldbus connection: Ethernet/IP or DeviceNet. These function block closely resemble the motion commands of the Logix system in form and function. For simple, point-to-point motion, these AOIs allow the customer to significantly reduce their control system cost by using a lower cost fieldbus master PLC and the Indradrive. 3 Table of Contents 1 IndraDrive Fieldbus Setup and Diagnostics 4 1.1 IndraDrive DeviceNet Communication Setup 4 1.2 Allen-Bradley DeviceNet Communication Setup 6 1.3 Indradrive Ethernet/IP Communication Setup 7 1.4 Allen-Bradley Ethernet/IP Communication Setup 9 1.5 Indradrive Setup for Direct Drive Control 10 1.6 Allen-Bradley Setup for Direct Drive control 11 1.7 Indradrive/Allen-Bradley Setup for Data Transfer Only 12 1.8 Explicit Messaging 13 1.9 Diagnostic and Troubleshooting 15 1.10 Appendix 16 2 RSLogix 5000 Function Blocks for use with BRC Fieldbus Drives 17 2.1 Introduction 17 2.2 BRCFieldbusDriveComms_In, BRCFieldbusDriveComms_Out 19 2.3 MSOBRC – Motion Servo On 21 2.4 MSFBRC – Motion Servo Off 21 2.5 MAFRBRC – Motion Axis Fault Reset 22 2.6 MAHBRC – Motion Axis Home 22 2.7 MAJBRC – Motion Axis Jog 23 2.8 MASBRC – Motion Axis Stop 24 2.9 MAMBRC – Motion Axis Move 25 2.10 MAWBRC – Motion Arm Watch 26 2.11 MDWBRC – Motion Disable Watch 26 2.12 BRC_Probe 27 2.13 BRC_Probe_Disable 28 2.14 BRC_DistanceAccum 28 2.15 Error Codes 29 3 Step-by-Step Setup Instructions for Single Axis Communications 30 4 Step-by-Step Setup Instructions for CCD Communications 34 4 1 IndraDrive Fieldbus Setup and Diagnostics 1.1 IndraDrive DeviceNet Communication Setup The setup screen for DeviceNet communications is displayed below. It is accessed on the Settings dialog under the Master communication folder. The parameters must be set while the controller is in Parameter Mode. The slave address of the drive (Master communications address) is set here and, by default, corresponds to the address set on the front of the drive. The address can also be set on the front of the drive. The baudrate for this device is also set here and should be set to correspond to the baudrate of the overall DeviceNet network. The other settings can remain as default. Also on this dialog, displayed as read only values, are the Length of Cyclic Real-Time Channel and Length of Cyclic Command Channel. These values represent the size of the Real-time input (AT) data and Real-time output (MDT) data for communication on the network. These values determine what will be entered in the DeviceNet master for the communication data block size for this Indradrive slave. The Real-time input (AT) list holds data sent from the drive to be read by the Master controller as inputs. These are feedback values from the drive such as current drive position, current velocity, etc. The parameters in this list can be customized to the specific application. The parameters displayed here are to be used in the example of direct drive control. The profile type should be selected as “Freely configurable mode.” In Freely configurable mode the first parameter must always be P-0-4078: Field bus: status word. 5 The Real-time output (MDT) list holds data sent to the drive from the Master controller where they are configured as outputs. These are command values to the drive such as Positioning command, Positioning Velocity, etc. The profile type should also be “Freely configurable mode”. In this mode, the first parameter must be P-0-4077: Field bus: control word. The diagrams to the right illustrate the hardware setup and connections. 6 1.2 Allen-Bradley DeviceNet Communication Setup RSNetWorx for DeviceNet is used to configure the DeviceNet network for the AB master DeviceNet scanner. The .eds file for the Indradrive must be registered with RSNetWorx in order to configure the scanner’s scan list. This is done using the EDS Wizard in RSNetWorx. The .eds file for the Indradrive is installed with Indraworks and is located under this directory: C:\ProgramFiles\Rexroth\Indraworks\DeviceDataSheets\Indradrive\DeviceNet\Indradrive_DVN.eds Once the Indradrive is registered, it can be recognized by RSNetWorx and configured. After going online and discovering all the devices on the network, the Indradrive data structure can be configured in the master scanner, in this example, a 1756-DNB scanner. Under the Properties of the scanner, select the Scanlist tab. Move the Indradrive from the Available Devices list to the Scanlist list. Click on “Edit I/O Parameters…”. Check the Polled check box. The Input Size corresponds to the Length of Cyclic Real-Time Channel on the Settings tab of the DeviceNet communication setup in IndraWorks. (See the IndraWorks setup above.) The Output Size corresponds to the size of the Length of Cycle Command Channel. The Poll rate should be set to “Every Scan”. Once these changes are accepted, the following warning, as displayed, may occur. This is due to the fact that the .eds has a generic size set for the input and output size. This warning states that the customer size created is different from the default size. This is normal. Select Yes to close. The scanlist can now be downloaded to the master scanner and setup for the scanner is complete. Once the communications have been established between the Master and Slave, control and status bits are available for the master scanner. One is the Local:2:O.CommandRegister.Run bit which must be set high to communicate on the network. If the bit is not set high E4005 will flash on the drive indicating that there are no communications on the master. Once the CommandRegister.Run bit is set high, the E4005 warning will clear, assuming there are no other faults. (E4005 will also appear due to mismatched data sizes between the master and slave.) 7 1.3 Indradrive Ethernet/IP Communication Setup To start the Ethernet/IP communications setup, right click on HCS02.1…. in Indraworks and select IP Settings. In the following dialog, set the IP addresses and select the check box for “Ethernet/IP as master communication”. A warning is displayed to explain that the drive power must be cycled for the changes to take effect. Cycle power in the drive before continuing. Now, thesetting screen for Ethernet/IP is available under the Master communication folder, under the Axis setup in Indraworks. The communication parameters must be set while the controller is in Parameter Mode. All settings on the Settings tab can remain as default. On the Settings tab, displayed as read only values, are the Length of Cyclic Real-Time Channel and Length of Cyclic Command Channel. These values represent the size of the Real-time input (AT) data and Real-time output (MDT) data for communication on the network. These values determine what will be entered in the Ethernet/IP master for the communication data block size for this Indradrive slave. The Configuration connection point, Assembly connection point (AT) and Assembly connection point (MDT) should be left as default. These values will be entered in the Master controller setup. The Real-time input (AT) list holds data sent from the drive to be read by the Master controller as inputs. These are feedback values from the drive such as current drive position, current velocity, etc. The parameters in this list can be customized to the specific application. The parameters displayed here are to be used in the example of direct drive control. The profile 8 type should be selected as “Freely configurable mode.” In Freely configurable mode the first parameter must always be P-0-4078: Field bus: status word. The Real-time output (MDT) list holds data sent to the drive from the Master controller where they are configured as outputs. These are command values to the drive such as Positioning command, Positioning Velocity, etc. The profile type should also be “Freely configurable mode”. In this mode, the first parameter must be P-0-4077: Field bus: control word. Note: In order to use Ethernet/IP communications on the Indradrive, there are two hardware requirements: 1. The CCD option is necessary to include the Ethernet port for Ethernet/IP communications. (A basic Ethernet/IP control section, without the CCD option is planned for the future.) 2. There must not be any other field bus communication cards on the control section, including DeviceNet and Profibus. 9 1.4 Allen-Bradley Ethernet/IP Communication Setup The Indradrive settings can be set directly in RSLogix 5000, no external software is needed to configure the network. To configure the drive, right click on the Ethernet network under 1756- ENBT/A in the I/O Configuration. The following selection window appears. Select ETHERNET- MODULE – Generic Ethernet Module under the Communications tree. Once the module is selected, you must configure the slave. Enter a unique name and IP Address. The Comm Format can remain at the DINT default value. The Assembly Instance values should match the values in the Indraworks Ethernet/IP Settings tab on the setup screen. The size corresponds to the data size on the same screen. The difference on the AB setup is that it is defined in sets of 32 bits. Simply divide the number of bytes in the Indraworks setup by four and enter that number here. Note: You may have to adjust the Indraworks data size to be a multiple of four in order to have the data sizes match up. You can do this in the Indraworks setup by adding S-0-0000, a dummy parameter, to take up space in the data structure, increasing it to a multiple of four. 10 1.5 Indradrive Setup for Direct Drive Control Data Structure The data communicated between the Master and Slave is scaled and must be adjusted on the Master side. Since the Comm. Format data type in the Master setup is DINT and the data to be transferred is a REAL data type, the data must be modified for communication. An example would be writing a position command from the AB PLC to the drive, to parameter S-0-0282: Positioning command value. The scaling for this parameter can be determined by looking up the attributes of the parameter in the drive help files. In this example, S-0-0282 is a 4 byte, DEC_MV (decimal) type. The units are determined by the Parameter S- 0-0076, inches for this example. To understand how the data is scaled, view parameters S-0- 0077 and S-0-0078. In this case the data is scaled by 10000 such that if 12345 is sent from the AB PLC, it is interpreted as 1.2345 in S-0- 0282 in the Indradrive. The data conversion occurs both ways, as inputs and outputs. The data will need to be scaled in both directions. Operating Mode For most applications that need simple positioning and jogging capabilities, Drive Controlled Positioning, Lagless is used. Other modes are possible, including Velocity, Torque and others. Reference the Drive Help files for more information on Operating Modes. The operating mode can be selected via the Control Word, P-0-4077, that is configured in the fieldbus communications, but since the drive defaults to the Primary mode of operation, select “Drive- controlled positioning, lagless, encoder 1” as displayed below. For this mode of operation, the following parameters were chosen for communication over the fieldbus: 11 The command values are processed in the following manner for drive-controlled positioning: (This diagram and an explanation of this operating mode can be found in the help files under Functional Description > Operating Modes > Drive-Controlled Drive Positioning > ommand Value Adjustment with Drive-Controlled Positioning) as he ters. For simplicity, only the arameters necessary for simple motion are shown here. e e caling and data conversion, necessary for the the lp files: P-0- 078 for the Field Bus Status Word and P-0-4077 for the Field Bus Control Word. C Additional parameters can be added to the Input (AT) and Output (MDT) parameter lists necessary to perform other drive functions or to write to other drive variables outside of t operating mode, such as homing velocity or tuning parame p .6 Allen-Bradley Setup for Direct Drive control 1 Since the drive is controlled via control and status words, there is no setup necessary in th PLC outside of the communications setup. The drive is controlled directly by PLC code. For ease of readability in the PLC code, it is useful to handle the communication and scaling in on program and the actual command code in another. In this manner, user friendly tags can be created and used for motion programming while the s control and status format, is handled elsewhere. The control code is similar to other Fieldbus drive devices in that command values are set in the configured registers (such as a position, velocity and acceleration command) and then a bit in the control word is toggled to initiate the command. A status bit is read back acknowledging command and another status bit is toggled to indicate that the command is complete. For a description of the functionality of the control and status words, refer to the Drive He 4 12 1.7 Indradrive/Allen-Bradley Setup for Data Transfer Only If the Indradrive PLC is going to control the drive, the DeviceNet communications channel can be used for straight data transfer to and from the AB ControlLogix. In this case the two controllers are sharing data between data registers, but that data is used in PLC logic on both sides. (This differs from the drive control setup where the AB PLC is writing directly to the drive motion parameters to control m The p otion.) rofile type for data tran de s l- . used in the program to h there. sfer only is Operating mo neutral. In this mode, P-0-4078 i not required to be the first element of the Real-time input (AT) as it is in the Drive control setup. P-0- 4077 is still required for the Rea time output (MDT) in both modes In this example, Global Registers are old data. These data containers are referenced in the Indralogic program for use In this example, the fullpath can be seen. The Value 54321, in Indralogic variable outDeviceNet_0 is written to the drive parameter P-0- 1370 (left). P-0-1370 is included as the first element in the Real-time Input (AT) list (above). In the scan list of the DeviceNet Scanner, the AT data block has been configured for the first 48 bytes of the input data starting with 2:I.Data[0] (below). This corresponds to Local:2:I.Data[0] in the ControlLogix controller tag list (below, left). Finally, the tag Local:2:I.Data[0] is moved into the ControlLogix variable inDeviceNet_0 (below, middle). 13 1.8 Explicit Messaging xplicit messaging is available to read and write to drive parameters outside of the polled I/O cyclic basis but is useful for reading or setting non-time- criti Con sed to execute an e here). the g e in Element blank and the Source Length as zero. se… tton and select the DeviceNet communication module. In the Path entry, type a comma after ix, ress for the eNet E data list. This data is not updated on a cal data. The setup is the same for both Drive control as well as Data Only mode. DeviceNet: The MSG instruction in the trolLogix is u explicit message read or write. The message type is CIP Generic. The Service Type is Get Attribute Single for a read command and Set Attribut Single for a write command. The Class is always 64. The Instance is the SERCOS address. For S parameters, enter the address directly, (S-0-0051 is displayed For P parameters, add 32678 to parameter number. For example, if you wish to access parameter P-0- 1370, enter 34138 for the Instance field. The Source Element is the ta address for a write command and th Source Length is the length of the tag Destination field and leave the Source For the Communications tab, only the path needs to be entered. Click the Brow bytes. For a read command, enter a tag in the bu the DeviceNet module name, add the slot address that the DeviceNet module occupies in the ControlLog type another comma and then type the DeviceNet node add Indradrive. In the example below, the DeviceNet Module sits in slot 2 of the ControlLogix rack and the Indradrive address on the Devic network is 5. 14 Ethernet IP: The Ethernet/IP setup is the same fo ation tab of the essag nication tab is ifferent for the Ethernet/IP ommun rowse… r the Configur M e instruction configuration. Below, a write to P-0-1370 is demonstrated here. The Commu d c ications as compared to the DeviceNet setup. Click the B button and select the drive directly from the list. There is no other configuration necessary. 15 1.9 Diagnostic and Troubleshooting Indradrive DeviceNet LED meaning: There are two LEDs at the front of the optional module "CO"; with master communication eviceNet" their displays have the significances described below. displays the status of the "DeviceNet Identity Object". "D LED Display "Module Status" (H4) The LED display "module status" (H4) Behavior of LED "H4" Significance/status LED off no control voltage available e es gre n overable Fault" verable Fault" isplays the network status of the DeviceNet master ommunication. "H5" LED flashes green/red device self test activ LED flash e device "Standby" LED permanently lit green device "Operational" LED flashes red device "Major Rec LED permanently lit red device "Major Unreco LED Display "Network Status" (H5) The LED display "network status" (H5) d c Behavior of LED Significance/status LED off device "Offline" nection to master to master e para s: diagnostic message, for the current tatus of the DeviceNet master communication. * In some cases, depending on the Ethernet network and configuration, it may be necessary to et the gateway address in the Indradrive. In these cases, the ControlLogix will generate a LED flashes green "Online" but no con LED permanently lit green "Online" and connection LED flashes red Polled I/O connection "Timed Out" LED permanently lit red critical connection error For further diagnostics, se meter P-0-4073, Field bu s ** s communication fault ((Code 16#fd02) Error: unknown type.) This fault may be generated by other network problems as well. 16 1.10 Appendix aworks 07V14.0166 0 (CPR 7) instructions) tions) ardwa adrive Control Section (DeviceNet): CSH01.1C-DN-ENS-EN1-NNN-NN-S-NN-FW B DeviceNet Scanner – Revision 4.005. 20(config instructions ftware: So Indr RSNetWorx for DeviceNet 7.00.0 EDS file: Indradrive Revision 1.001 RSLogix5000 V16.03.00 (CPR 9) (for configuration RSLogix5000 V17.00.00 (CPR 9 SR 1) (for function block instruc re: H Indr Indradrive Control Section (Ethernet/IP): CSH01.2C-NN-ENS-EN2-CCD-NN-S-NN-FW Firmware – FWA-INDRV*-MPH05V16-D5-1-NNN-NN -S-NN-FW Indradrive Control Section (CCD Slave): CSB01.2C-S3-ENS-NNN-NN Firmware – FWA-INDRV*-MPB05V16-D5-1-NNN-NN 1756-DN 1756-L61 ControlLogix5561 Controller – Revision 16. 1756-L61 ControlLogix5561 Controller – Revision 17.2 (AOIs) 1756-ENBT/A 10/100 Mbps Ethernet Bridge – Revision 4.1 17 2 RSLogix 5000 Function Blocks for use with BRC Fieldbus Drives .1 Introduction se function blocks is to give the user a friendly way to program simple ingle-a n. ossible, the nication manager nction block to handle the control and status data rocessing between the drive and the PLC. There is an input ommunication function block and a separate output ommunication function block. These communication nction blocks read and write from/to a drive data structure ithin the AB PLC. This User-Defined structure is named RC_Axis_Fieldbus. It resembles the Axis_Servo data tructure used by the AB PLC for AB SERCOS or analog ervo drives. The individual motion control blocks that comma e in the S xecuted, the logic in the block checks C_Axis_Fieldbus assigned to that drive. OBRC function block sets true the bit usDriveComms_Out function block, in the CmdDriveOn bit and in turn, ield bus: control word in the hese function blocks are for use in an IndraDrive that has been setup as direct drive controll 2 The purpose of the s xis motion with an Allen-Bradley PLC that resembles the commands of the AB PLC motion control structure. As is the case with most fieldbus control devices, a control word consisting of individual bits is used to command the device as well as control data words consisting of real data type commands such as a commanded position, velocity or acceleratio Similarly, a control status word consisting of individual status bits from the drive as well as status words, indicate the current position, velocity or torque of the drive. Rather than leaving this data to the programmer to interpret and program, these function blocks handle the drive communications internally. The function blocks are written to emulate, as much as p motion commands used in the RSLogix 5000 programming software. Certain functionality must be different due to the control structure and the blocks are not exact replicas due to the Add-On Instruction structure in RSLogix 5000 and other drive firmware differences. As an example, here are the corresponding commands for the Motion Servo On function block, one the left, the Allen- Bradley software command and on the right, the equivalent block for BRC fieldbus drives. The function blocks use a commu fu p c c fu w B s s nd the drive write to the Axis data structure and then the communication function block react to the chang Axis data structure by turning on/off the appropriate bits in the drive. As an example of the control process, consider the M power on the drive. When the MSOBRC function block ise the current status of the drive from the instance of the BR If the correct conditions are met to enable the drive, the MS CmdDriveOn in the axis data structure. The BRCFieldB which is monitoring this axis data structure, reads the change turns on bit 15 in the drive control word which is tied to P-0-4077: F Indradrive. OBRC command: a command to T ed. (See Part I: Chapter 5) In addition, the communication data and operating modes must be configured in a certain manner for the blocks to operate correctly. This information is detailed below. 18 The function blocks are open to modification by the user and could be modified by the user to control the drive in other operating modes. The user is responsible for the use of thes function blocks and the application in the user’s application. Bosch Rexroth Corporation makes no guarantee for their operation. While the function blocks closely resemble the motion of their respective A e B function blocks, complete uniformity is not guaranteed. Care should be taken hen executing motion blocks and calling blocks before others are completed. The behavior of s se cks or when developing new programs. w the MxxBRC blocks does not necessary match the Mxx blocks from Allen-Bradley in these case due to the different control methods of the drives and the limited communication abilities of fieldbus drives. Adequate testing should be performed when translating existing programs to u these function blo 19 2.2 BRCFieldbusDriveComms_In, BRCFieldbusDriveComms_Out These two function blocks are the communication andlers between the drive and PLC. They translate the RC_Axis_Fieldbus data on the AB PLC side and the rive data parameters on the Indradrive side. RCFieldbusDriveComms_In handles the inputs to the LC from the drive. BRCFieldbusDriveComms_Out andles the outputs from the PLC to the drive. onsequently, to achieve the best scan performance, ie PLC scan before the motion commands are issued and BRCFie n the output or the next named declarations, it is importa e h order, to the AB PLC and appear, as this cas nd S-0-0084 (Torque Feedback) are combined in 0] and Indradrive1:1.Data[0] is used as the mmunications function block. in turn, takes that data and populates the axis It is important that the correct data is put in the correct location in the function block or data will not be transferred to the correct axis coming from and sent to the AB PLC. Since the data for these parameters are REAL data types, but are transmitted as DINT type, a scaling ratio is needed to interpret the data on both ends. These parameters will match the h B d B P h C BRCF ldbusDriveComms_In should be called first in the ldbusDriveComms_Out should be called after all motion function blocks. This will allow for the PLC to read the input data from the drive, process the motion functio blocks (MSOBRC, MAMBRC, etc.) and update image back to the drive all in one scan of the AB PLC. The top declaration for each function block is the instance for that function block. One set of these input and output communications blocks are needed for each IndraDrive. The next declaration, AxisStructure, points to the Axis data structure for that drive. Each unique Indradrive in the system will have one unique Axis data structure, here named BRCAxis1. F nt to align the correct data from the driv to the correct position in the function block. The mapping of data in the drive becomes important here. Below, seven 32 bit words in the Real- time input (AT) configured in the drive are boxed. Notice that P-0-4078 and S-0-0084, bot 16 bit words, combine into one 32 bit word. These seven double words are transmitted, in configured in the data points Indradrive1:I.Data[0…6]. In e, the data in P-0-4078 (Status Word) a one 32 bit word, transmitted to Indradrive1:I.Data[ input variable for the StatusWords_Torq input of the drive input co The BRCFieldbusDriveComms_In function block, structure accordingly. structure variable. The position, velocity and acceleration scaling parameters are used to scale the data 20 drive scaling parameters listed below. The values to enter into the BRCFieldbusDriveComms inverse of th parameter. For instance, if the linear scaling expo for the positioning scaling to enter is 1/10-4 or 100 Position Scaling – S-0-0078 Velocity Scaling – S-0-0046 Acceleration Scaling – S-0-0162 function blocks for the scaling represents the e exponent represented in the drive nent in the drive, S-0-0078 equals -4, the value 00. 21 2.3 SOBRC – Motion Servo On he MSOBRC function block enables the servo dr e. A rising edge trigger on the function block input will send the enable signal to the drive if the drive is in the proper mode to be enabled. As soon as the function block is executed, the EN enable bit is set. Once the function block has set the appropriate bits to enable the drive, it will wait for a status update that the drive has indeed been enabled. At that point, the DN done bit will be set high. Once the Done bit has been set, it will remained set until the next execution of the function block. If the drive is not ready to be enabled the ER error bit will be set. The error codes are listed in section 2.15 below. Here are the actions on the Axis Structur status bits: M T iv e Axis Status Bits Motion Status Bits None DriveEnableStatus TRUE that the drive has indeed been disabled. At that point, the DN done bit will be set riate status bits in the Axis Struct updated. Once the Done bi l rem ined set until the next execution of the function block. If the drive do r bit will be set. The error codes are listed in section he Axis Structure status bits: xis Status Bits ServoActionStatus TRUE 2.4 MSFBRC – Motion Servo Off The MSFBRC function block disables the servo drive. A rising edge trigger on the function block input will remove the enable signal to the drive. As soon as the function block is executed, the EN enable bit is set. Once the function block has set/reset the appropriate bits to disable the drive, it will wait for a status update high and the approp ure will be t has been set, it wil a es not complete the command the ER erro 2.15 below. Here are the actions on t A Motion Status Bits E MoveStatus FALSE DriveEnableStatus FALSE JogStatus FALSE HomingStatus FALSE StoppingStatus FALSE ServoActionStatus FALS 22 2.5 AFRBRC – Motion Axis Fault Reset The MAFRBRC function block sends a reset ommand to the servo drive. A rising edge trigger on the nction block input will execute the C500 Reset ommand. As soon as the function block is executed, the N enable bit is set. Once the function block has set the ppropriate bits to reset any existing faults, it will wait for a tatus update that no Class 1 or Class 2 errors exist. If all errors are cleared, the DN done bit will e set. Once the Done bit has been set, it will remained set until the next execution of the nction block. If the drive does not complete the command and errors are not reset, the ER error it will be set. The error codes are listed in section 2.15 below. Here are the actions on the Axis tructure status bits: Axis Status Bits M c fu C E a s b fu b S Motion Status Bits PhysicalAxisFault FALSE None 2.6 will assume at the homing event. As soon as the function block is executed, the EN enable bit and IP i e home statu received ess complete bit and the N done bit areset. The PC process complete bit remains set until the enable input of the nction block is cleared, at which time the PC bit will be cleared as well. The DN bit remains set n error occurs during the command, the ER error it is set. The error codes are listed in section 2.15 below. Here Structur MAHBRC – Motion Axis Home The MAHBRC function block sends a home command to the servo drive. The type of home move and similar parameters are set up directly in the IndraDrive. A rising edge trigger on the function block input will execute the C600 – Drive-controlled homing procedure command if the Homing Mode is set to 0 – Active or the function block will execute a C300 – Command Set absolute measuring if the Homing Mode is set to 1. The Home Position is the position that the drive n process bit are set. Once the Home com is completed and th s is mand from the drive, the IP in process bit is cleared and the PC proc D fu until the next execution of the function block. If a b are the actions on the Axis e status bits: Axis Status Bits Motion Status Bits omingStatus TRUE Status FALSE oveStatus FALSE ppingStatus FALSE ming. at the homing event. The units are None H Jog M Sto HomingMode: BOOL: 0 – Active Homing, 1 – Absolute Ho HomePosition: REAL: The position assigned to the drive defined in the drive setup. NOTE: If Active Homing is used, the axis must be enabled or a fault will be generated. If Absolute Homing is used, the axis must be disabled or a fault will be generated. 23 2.7 C – M tion xis J g process bit is egins and rror occurs during the command, the ER error bit is et. The error codes are listed in section 2.15 below. ere are the actions on the Axis Structure status bits: MAJBR o A o The MAJBRC function block sends a jog command to the servo drive. As soon as the function block is executed, the EN enable bit is set and remains set until the rung is false. If the Jog move is successfully initiated the DN done bit is set. The IP in set once the jog command b remains set until the command is reset by another motion command, a MASBRC axis stop command, a shutdown command or a drive fault condition. If an e s H Axis Status Bits Motion Status Bits JogStatus TRUE omingStatus FALSE None H MoveStatus FALSE StoppingStatus FALSE ve setup. nits defined by drive setup. d in units defined by drive setup. in units defined by drive setup. ts defined by drive setup. on in combination with the set Direction. If d by the IndraDrive parameter settings specifyi clockwise or counter-clock wise as positive. If the Direction is set to Positive but a Speed l an zero is commanded, negative velocity will occur. If the Direction is set to Negativ ed, negative velocity will occur. If the Directio Negat e and Speed ss tha zero is tive v Direction: DINT: 0 – Positive, 1 – Negative, as defined in the dri Speed: REAL: Velocity of the jog command in u Accel_Rate: REAL: Acceleration of the jog comman Decel_Rate: REAL: Deceleration of the jog command Jerk: REAL: Jerk of the jog command in uni The sign of the Speed will determine the directi both are positive, the direction will be positive as define ng ess th e and Speed greater than zero is command n is set to iv a le n commanded, posi elocity will occur. 24 2.8 MASBRC – Motion Axis Stop The MASBRC function block sends a stop ommand to the servo drive. As soon as the function lock is executed, the EN enable bit is set and remains et until the rung is false. If the Jog move is uccessfully initiated the DN done bit is set. The IP in rocess bit is set once the stop command begins and mains set until the command completes or is reset y another MASBRC command, a shutdown command r a drive fault condition. Once the stop command is ompleted the IP in process bit is cleared and the PC process complete bit is set. The PC rocess complete bit remains set until the next false-to-true transition of the motion block at which me the PC bit will be cleared. If an error occurs during the command, the ER error bit is set. erro . Here are the actions on the Axis Structure c b s s p re b o c p ti The r codes are listed in section 2.15 below status bits: Axis Status Bits Motion Status Bits JogStatus FALSE HomingStatus FALSE MoveStatus FALSE StoppingStatus TRUE d in units defined by drive setup. in units defined by drive setup. None Decel_Rate: REAL: Deceleration of the jog comman Jerk: REAL: Jerk of the jog command The Decel Rate determines the deceleration rate for the stop move. This value replaces any previously commanded Decel Rate for any move. I It is important to set the Standstill Window (S-0-0124) to an acceptable value. If the value is too high, the drive may not use the correct deceleration. If the window is set too high, the drive sta l be e last decelera mmanded. Depe ding o der of co ot b tus will be that the drive is in Standstill and the deceleration used wil th tion co n n the or mmands, this may n e the deceleration programmed by this block. Set the Standstill window to a value that reflects the true status of the drive. 25 2.9 MAMBRC – Motion Axis Move The MAMBRC function block sends a move ommand to the servo drive. As soon as the nction block is executed, the EN enable bit is set nd remains set until the rung is false. If the move is uccessfully initiated the DN done bit is set. The IP process bit is set once the move command begins nd remains set until the command completes or is set by another motion command, a shutdown ommand or a drive fault condition. Once the move ommand is completed the IP in process bit is leared and the PC process complete bit is set. The C process complete bit remains set until the next -to-tru ch uring the command, the ER error bit is set. The error co s: c fu a s in a re c c c P false e transition of the motion block at whi time the PC bit will be cleared. If an error occurs d des are listed in section 2.15 below. Here are the actions on the Axis Structure status bit Axis Status Bits Motion Status Bits JogStatus FALSE HomingStatus FALSE MoveStatus TRUE StoppingStatus FALSE l execute: e, or distance of the position move for an d: REAL: Velocity of the position command in units defined by drive setup. Accel_Rate: REAL: Acceleration of the position command in units defined by drive setup. Decel_R omma Jerk: of the osition and in un setup e move type. Motion blocks that are stacked, (one MAMBRC block is called before a previous plete the first block before xecuting the e he .CmdImmed bit of the BRC_Axis_Fieldbus axis data structure etermines th b mdImmed bit is set high, the position commands will be added. or example, a ecuted to 30 degrees and a relative move of 60 egrees is exe lute command completes, the axis will begin a move to 90 egrees as so n command is executed. If the .CmdImmed bit is set low, the mm n this case the a s and then move to 90 degrees. are efore m xx None Move Type: DINT: The type of move the block wil 0 – Absolute 1 – Incremental 2 – Rotary Shortest Path 3 – Rotary Positive 4 – Rotary Negative Position: REAL: End point of the position mov Incremental Move Type. Spee ate: REAL: Deceleration of the position c nd in units defined by drive setup.REAL: Jerk p comm its defined by drive . The Move Type determines the type of motion move that will be executed on the false-to- true transition of the motion block. The block requires another false-to-true transition to change th MAMBRC block is complete) will either combine moves or com e s cond block. T d e ehavior. If the .C F if n absolute command is ex d cuted before the abso d o as the relative move relative co and will execute after the absolute command has completed, in this example. I xis would move to 30 degree C should be taken when mixing MAMBRC motion blocks and calling blocks b others are co pleted. The behavior of the MxxBRC blocks does not necessary match the M blocks from Allen-Bradley in these cases due to the different control methods of the drives. 26 2 MAWBRC – Motion Arm Watch The MAWBRC function block creates a watch on the designated axis to detect the axis crossing a specified position in a specified direction. As soon as the function block is executed, the EN enable bit is set and remains set until the rung is false. If the watch is successfully initiated the DN done bit is set. The IP in process bit is set once the watch is armed and remains set until the position is reached in the correct direction or is reset by another MAWBRC command or a MDWBRC command. Once the .10 osition n ommand, the ER error bit is set. The error codes are listed in section 2.15 below. Here are the ctions on the Axis Structure status bits: Axis Status Bits p is reached in the correct direction the IP in process bit is cleared and the PC process complete bit is set. The PC process complete bit remains set until the next false-to-true transitio of the motion block at which time the PC bit will be cleared. If an error occurs during the c a Motion Status Bits one n to the specified position less than the watch position before ch position. be more than the watch position before atch position. ition. the desi execute re il the rung is false. y below. Here are the actions on Axis Status Bits WatchEventArmedStatus TRUE N WatchEventStatus FALSE TriggerCondition: BOOL: Determines the approach conditio 0 = forward – The position must be the axis crosses the wat 1 = reverse – The position must the axis crosses the w Position: REAL: The value for the watch trigger pos 2.11 MDWBRC – Motion Disable Watch The MDWBRC function block disables a watch on e fungnated axis. As soon as th ction block is d, the EN enable bit is set and mains set unt If the watch is successfull disabled the DN done bit is set. If an error occurs during the command, the ER error bit is set. The error codes are listed in section 2.15 the Axis Structure status bits: Motion Status Bits WatchEventStatus FALSE WatchEventArmedStatus FALSE None 27 2.12 BRC_Probe to the In s same type of functionality as the Allen-Bradley AR – Motion Arm Registration function block. Because of ifferences in hardware and access to variables over the eldbus link, only some functions are available. As soon as e function block is executed, the EN enable bit is set and mains set until the rung is false. If the probe event is successfully initiated the DN done bit is et. The IP in process bit is set once the probe is armed and remains set until probe is triggered the drive, is reset by another BRC_Probe command on the same probe number or is reset by a RC_Probe_Disable command on the same probe number. Once the probe is triggered the IP in rocess bit is cleared and the PC process complete bit is set. The PC process complete bit mains set until the next false-to-true transition of the function block at which time the PC bit will rs during the command, the ER error bit . Here are the actions on the Axis Structure status bits: The BRC_Probe function block provides an interface dradrive probe functionality. This function block provide M the d fi th re s in B p re be cleared. If an error occu listed in section 2.15 below is set. The error codes are Axis Status Bits Motion Status Bits None e trigger position. f. RegEventArmedStatus TRUE RegEventStatus FALSE Position: REAL: The returned value for the signal prob This function block requires the drive probe to be setup in IndraWorks, both in the Signal probe setup dialogs and in the data structure for the fieldbus data transfer. Continuous measurement must be unchecked for this function block. (If the Continuous measurement function is needed, the function block could be modified to accommodate the change.) Depending on the selection of edge the values in the Real-time Input (AT) list will differ. In the example below, the positive edge is selected for use. As a result, S-0-0130: Probe value 1 positive is placed in the AT List in places 7. If the negative edge for Signal Probe 1 was used, S-0-0130 would be replaced with S- 0-0131: Probe value 1 negative edge. No modifications are necessary to the function block itsel 28 2.13 BRC_Probe_Disable ti block disables the probe function for the specified probe number on the designated axis. As soon as the function block is executed, the EN enable bit is set and remains set until the rung i If the probe is successfully disabled the done bit is set. If an error occurs during the comma rro are listed in section 2.15 below. Here a the actions on the Axis Structure status bits: Axis Status Bits The BRC_Probe_Disable func on s false. DN nd, the ER e r bit is set. The error codes re Motion Status Bits RegEventArmedStatus RegEventStatus 2.14 BRC_DistanceAccum distance amount soon as nable b false. If the distance accumulator is uccessfully armed, the DN done and IP in rocess bits are set. There are no error l has lete bit is vel to accumulate before setting the process nitored axis. This is the value of S-0-0103 in the anually, it is not read directly from the drive. d distance as an output, relative to the position at 20 inches and the BRC_DistanceAccum function ches, as the axis travels forward to 25 inches, the s Dist s 20 FALSE None FALSE The BRC_DistanceAccum block monitors travel on a given axis for a specified . It is used to indicate that a set of travel has occurred on the axis. As the function block is executed, the EN it is set and remains set until the rung e is s p conditions for this block. Once the trave been completed, the PC process comp set and the IP in process bit is cleared. Distance: REAL: Specifies the amount of tra complete bit. Modulo: REAL: The modulo value of the mo specified axis. It must be entered m AccumDist: REAL: The value of the accumulate which the function was enabled. As an example, if the axis position is block is enabled with a Distance value of 10 in IP bit would be on, the PC bit off and the AccumDist value would be 5 inches. As the axi traveled to 30 inches, the IP bit would be cleared, the PC bit would be set and the Accum value would be 10 inches. If the axis travels on to 40 inches and the function block remains enabled, the IP bit remains cleared, the PC bit remains set and the AccumDist value become inches. 29 2.15 Error Codes The MxxBRC function blocks share a common error code structure similar to the motion lock error codes of the AB motion function blocks. Each block has a main error code (ERR) and n extended error code (EXERR). Here is a list of the possible errors that a function block might enerate: 4: Servo On State Error - the drive state is AF or AH, the drive needs to be disabled to execute thecommand. 5: Servo Off State Error - the drive state is bb or Ab, the drive needs to be enabled to execute the command. Failed - the drive is not in the correct state to execute the block xtended Error Codes phase 4, bb. 9: Axi continue this command. b a g 12: Servo Message EXERR: - E 03: Invalid Probe number input (must be 1 or 2). 15: Enable input switch error – the drive has not completed the command within the time out period. 16: Device state not correct for action – the drive is not in operation mode, 13: Parameter Out of Range – Invalid parameter value, check Extended Error Code EXERR: - Extended Error Codes 0 - … - Number indicates which parameter is invalid with 0 being the upper most Parameter in the block. 16: Homing In Process Error - the drive is executing a Homing process. fatal error active, clear error to continue. 20: Axis In Faulted State – the axis has a 7 s must be Homed – the axis must be referenced to 30 3 Step-by-Step Setup Instructions for Single Axis ommunications These instructions describe the steps to setting up the Ethernet/IP commun cations to and from an Allen-Bradley PLC and a single Indradrive. If multiple drives exist in the system and are set up as separat bjects in the AB PLC program, this set of instructions would be followed once for each drive in the system. For the system pictured on the right, the setup procedure would be followed three times, once for each drive. e lave axes from the CCD master. For the system pictured on the right, the setup procedure would be preformed once. The CCD, multi-drive setup is described in Part IV below. Press the up arrow once to “2.Comand”, press Enter. . Press the up arrow twice to “2.3 Kom.”, press Enter. . At 2.3.1, press enter and set the IP address. . At 2.3.1, press the up button to 2.3.2, then enter, then At 2.3.2, press the up button to 2.3.3, then enter, then enter the gateway. . Press ESC until the drive returns to the original display. . Cycle power on the control section for the address to be applied. 2. Start a new project in Indraworks, scan for the drive and add it to the project. 3. EIP setu l the t the e com the c C i e o It is possible to use a multiple drive setup which would us the CCD functionality of the Indradrive system. In this case, the Master Indradrive would be setup as one object in the AB PLC and the data would travel to the s 1. Setup the Ethernet address on the drive, via the operator panel on the front of the drive. a. Press Esc and Enter for approx. 10 seconds b. c d e enter the subnet. f. g h Import the .par file _SingleAxis.par from the p fi es. This file includes all set ing necessary to setup Eth rnet I/P network munications to operate with fun tion blocks. 31 and the drive to operational mode (OM or bb) if it is not already. If the AB PLC has yet to be configured, the drive will flash E4005 indica ue limit is zero. This occurs because the torque limit is t I/P communication parameters. Since communications value is zero. 5. to the on device in RSLogix5000. Add one Generic Ethernet Module for each Indradrive used. 6. 7. 8. nications should be coming from the AB PLC is zero. Otherwise, the Ethernet Module and the Indradrive will be in state is accomplished, it is now possible to implement blocks. User-Defined and select r-defined data type file 0. Right click on Add-On Instructions and import the desired motion fu 4. Cycle power on the control section. When the drive is finished booting, comm ting that there is no Ethernet I/P link or the drive will flash E2056 indicating that the torq configured as part of the Etherne have not been established, the Add a Generic Ethernet Module Ethernet communicati In the next dialog, enter a name for that drive, the IP address for that drive and the Assembly Instance data as displayed here: In the Module Properties, enter desired cyclic update of the Ethernet communications to the Indradrive, called the RPI: Download the RSLogix5000 project. At this time, Ethernet commu established with the Indradrive. The error E2056 might flash if the value for the Torque limit the AB PLC will have no errors or warnings on operational mode with no errors. Once this the programming to use the function 9. In the RSLogix5000 project, right click on Import Data Type… Select and import the use BRC_Axis_Fieldbus.L5X. 1 nctions blocks. For all systems, there are two required blocks: BRCFieldbusDriveComms_In.L5X and BRCFieldbusDriveComms_Out.L5X. 32 11. n axis data structure for the Indradrive to the Controller Tags of the AB PLC. In the screen capture displayed below, notice the Input tags which correspond by ouble 12. Ethernet communications for that drive. T e ction blocks for the Indradrive. his would be the code that contains the ll Fieldbus ata structure and the 10 double words e Add a s to the 28 input tes (7 double words) that were configured in step 6 above. The 40 bytes (10 d words) of Output data are also visible. The programming of the ladder logic can now begin. In order to maximize the communication speed it is necessary to organize the ladder logic in the following manner. Call the BRCFieldbusDriveComms_In function block first. The Axis structure variable should be the variable of the data type BRC_Axis_Fieldbus, as declared in Step 11 above. In this case, Indradrive1. For the next 7 function block entries, enter the input double words assigned to the he order is important to the function of the rest of the motion blocks. Next, call the logic for the motion using th motion fun T jog, move and home type commands. If a the logic is called in between the In and Out function blocks, the data flow between devices will be optimized Call the BRCFieldbusDriveComms_Out function block after the motion logic for this Indradrive. As was declared in the Input Comms function block above, add the instance of the BRC_Axis_ d assigned to this drive. Dummy double integers can be added to fill in the remaining data slots. These slots are for optional communication expansion to th drives. 33 13. The drive is now ready to operate with the function blocks. Depending on which function o he ne in Indraworks as part of the permanent drive setup. Similarly, other drive constants must be set such as the gear ratio, tuning parameters, I/O configuration and velocity/position limits must be setup in Indraworks. The function blocks are set to handle cyclic control data that can be manipulated during operation of ot to blocks and the mechanic of your system, further setup in Indraworks may be required t complete the drive configuration. The MAHBRC function block issues a home command to the drive, but the speed and type of homing move must be configured in Indraworks for t drive. The BRC_Probe function block will monitor and operate the probe function of the Indradrive, but the probe configuration must be do the drive. Many of these other settings must be edited in parameter mode and thus are n included in the cyclic data available for communications over Ethernet I/P. If it is desired program this over the Ethernet I/P link, explicit messaging could be used to change these parameters. 34 4 Step-by-Step Setup Instructions for CCD Communications hese instructions describe the steps to setting up the Ethernet/IP communications to and from an Allen-Bradley PLC to a CCD Master Indradrive which in turn communicates to up to 9 more slave Indradrives. In this case, the AB PLC communicates solely to the Master Indradrive and the Master Indradrive, inturn, communicates the data over the CCD link to the slave drives. a. Press Esc and Enter for approx. 10 seconds t 2.3.2, press the up button to 2.3.3, then enter, then enter the gateway. . Press ESC until the drive returns to the original display. e app 2. ster drive and add it to the project. 3. (CCD system mode). Assign the . EIP_CCDMa each of the CCD include all the 5. he b) if it is not already. If the AB PLC has yet to be ting that there is no Ethernet I/P link or the drive it is zero. This occurs because the torque limit is nication parameters. Since communications e is zero. T CCD 1. Setup the Ethernet address on the drive, via the operator panel on the front of the drive. b. Press the up arrow once to “2.Comand”, press Enter. c. Press the up arrow twice to “2.3 Kom.”, press Enter. d. At 2.3.1, press enter and set the IP address. e. At 2.3.1, press the up button to 2.3.2, then enter, then enter the subnet. f. A g h. Cycle power on the control section for the address to b lied. Start a new project in Indraworks, scan for the ma Activate the CCD system in the drive using the Exteral PLC slave drives in the Projecting of Sercos slaves list. 4 For the Master drive, import the .par file ster.par from the setup files. Import the .par file EIP_CCDSlave.par for slave drives. These files settings necessary to setup the Ethernet I/P network communications to operate with the function blocks. Cycle power on the control sections. W master drive to operational mode (OM or b configured, the drive will flash E4005 indica will flash E2056 indicating that the torque lim configured as part of the Ethernet I/P commu have not been established, the valu n the drives are finished booting, command the 35 6. Add a Generic Ethernet Module to the Ethernet communication device in RSL 7. add has one CCD Master and one CCD slave for a total of 14 dou s. 8. 9. ogix5000. Add only one Generic Ethernet Module for each Master CCD Indradrive used. In the next dialog, enter a name for the Master CCD Indradrive, the IP ress for that drive and the Assembly Instance data. For the Input instance there will be 7 double words for each drive on the system. In the display below, the system ble words. For the output instance, each drive will have 10 double word In the Module Properties, enter desired cyclic update of the Ethernet communications to the Indradrive, called the RPI: For the remaining steps, refer to steps 9 – 13 in the Single drive setup as described above. 36 Drive setup Parameters: This is a list of the parameters contained in the setup .par files used for the Ethernet I/P function blocks. The file EIP_Indradrive.par contains all the parameters below. The file ve.par only contains the parameters in bold text. -0-0026 – Configuration List Signal Status Word -0-0027 – Configuration List Signal Control Word peration -0-0033 – Secondary Operation Mode 1 -0-0285 – Secondary Operation Mode 5 rd (bits) d (bits) n list command value 1 n list command value 2 n list command value 3 n list command value 4 n list command value 5 n list command value 6 mmand value 7 value 8 -0-1612 – CCD: configuration list signal control word ignal status word d values master communication actual values EIP_CCDSla S S S-0-0032 – Primary mode of O S S-0-0034 – Secondary Operation Mode 2 S-0-0035 – Secondary Operation Mode 3 S-0-0284 – Secondary Operation Mode 4 S S-0-0286 – Secondary Operation Mode 6 S-0-0287 – Secondary Operation Mode 7 S-0-0328 – Assign List Signal Status wo S-0-0329 – Assign List Signal Control wor S-0-0370 – Data container A: configuratio S-0-0490 – Data container A: configuratio S-0-0491 – Data container A: configuratio S-0-0492 – Data container A: configuratio S-0-0493 – Data container A: configuratio S-0-0494 – Data container A: configuratio S-0-0495 – Data container A: configuration list co S-0-0496 – Data container A: configuration list command P-0-4074 – Field bus: data format P-0-4080 – Field bus: config. list of cyclic actual value data ch. P-0-4081 – Field bus: config. list of cyclic command data ch. P-0-4084 – Field bus: profile type P-0-4088 – Master communication, configuration P-0-1611 – CCD: configuration list signal status word P P-0-1613 – CCD: assignment list s P-0-1614 – CCD: assignment list signal control word P-0-1621 – CCD: configuration list master communication cm P-0-1622 – CCD: configuration list