+ All Categories
Home > Documents > Connecting to the MC³ from DeviceNet via...

Connecting to the MC³ from DeviceNet via...

Date post: 18-Mar-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
19
Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 1 3/12/04/Lars Connecting to the MC³ from DeviceNet via DNI Using DeviceNet as a transport between MC³ controllers and PLC’s offers cost savings, improved diagnostic capabilities, better accuracy and tighter control. The configuration described in this document is widely in use, and fully supported by Merrick Industries. A single DeviceNet network replaces numerous analog and digital I/O modules, eliminates analog signal calibration and ensures data integrity. Once the network is in place, adding I/O points and variable for monitoring is a matter of configuration rather than pulling cables and buying new I/O modules. INTRODUCTION It is possible to exchange status and variables between MC³ controllers and DeviceNet scanners, using a 1761-NET-DNI (DNI) module from Allen-Bradley (A-B). It replaces both analog and digital I/O. Full Floating Point accuracy is maintained for variables. Up to 10 variables and 80 I/O points can be configured. Newer versions of Merrick’s MC³ controller support A-B DF-1 Serial Communications (DF-1) and exposes a standardized Common Interface Table (CIT), compatible with the A-B “Common Interface File” (CIF) specification. PCCC functions 1 (PLC2 Unprotected Read, 485CIF Read), 8 (PLC2 Unprotected Write, 485CIF Write) and 6 (PLC-2 Diagnostic Status) are supported. The DNI has a DeviceNet interface one side and an Allen-Bradley DF-1 interface on the other. An MC³ controller can be connected to the DNI using the existing RS-232 interface on the DNI and the existing RS-232 interface on the MC³ controller. The information in this document applies to the following MC³ firmware versions: Firmware Used for Released Comm Ver 20.10.EX.F Belt Feeder 03/28/02 1 20.20.EX (All) Belt feeder 04/17/03 2 24.10.EX.H and later Pressurized Coal Feeder 08/02/02 1 30.00.EX.C and later Loss-In-Weight 04/25/02 1 30.10.EX.E and later Enhanced Loss-In- Weight 2 40.10.EX.A and later Impact Flow Meter 04/14/03 2 90.10.EX.Y and later MasterSet 01/02/03 2 Other Merrick firmware releases may also support DF-1 communications. The DNI maintains a serial conversation with one MC³, using DF-1, and then exposes a Read Table and a Write Table to a DeviceNet Scanner. These tables are sub-sets of the CIT. Data tables are transferred between the MC³s and the DeviceNet host PLC. The positioning and content of the data elements in the tables must be tracked all the way from the internal MC³ register database to the data structures in the PLC. This is done in several steps: Between the MC³ register database and the MC³ CIT. Some of this mapping is fixed, and some is configurable. Between the MC³ CIT and the Read and Write Tables in the DNI. This is entirely configured in the DNI. In this case we used the free ENI Utility from A-B. Between the DNI tables exposed to DeviceNet and the Scanner Table in the PLC. This is done with a DeviceNet configuration software package. In this example, we used Allen- Bradley’s RSNetworx for DeviceNet. Between the Scanner Table in the scanner and the final data structures in the PLC. This is done with PLC programming methods. In this example, we use a PLC-5, so the Scanner Tables are transferred to Integer Files (N10 and N11) using BTW and BTR instructions.
Transcript
Page 1: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 1 3/12/04/Lars

Connecting to the MC³ from DeviceNet via DNI Using DeviceNet as a transport between MC³ controllers and PLC’s offers cost savings, improved diagnostic capabilities, better accuracy and tighter control. The configuration described in this document is widely in use, and fully supported by Merrick Industries. A single DeviceNet network replaces numerous analog and digital I/O modules, eliminates analog signal calibration and ensures data integrity. Once the network is in place, adding I/O points and variable for monitoring is a matter of configuration rather than pulling cables and buying new I/O modules.

INTRODUCTION It is possible to exchange status and variables between MC³ controllers and DeviceNet scanners, using a 1761-NET-DNI (DNI) module from Allen-Bradley (A-B). It replaces both analog and digital I/O. Full Floating Point accuracy is maintained for variables. Up to 10 variables and 80 I/O points can be configured. Newer versions of Merrick’s MC³ controller support A-B DF-1 Serial Communications (DF-1) and exposes a standardized Common Interface Table (CIT), compatible with the A-B “Common Interface File” (CIF) specification. PCCC functions 1 (PLC2 Unprotected Read, 485CIF Read), 8 (PLC2 Unprotected Write, 485CIF Write) and 6 (PLC-2 Diagnostic Status) are supported. The DNI has a DeviceNet interface one side and an Allen-Bradley DF-1 interface on the other. An MC³ controller can be connected to the DNI using the existing RS-232 interface on the DNI and the existing RS-232 interface on the MC³ controller. The information in this document applies to the following MC³ firmware versions: Firmware Used for Released Comm Ver 20.10.EX.F Belt Feeder 03/28/02 1 20.20.EX (All) Belt feeder 04/17/03 2 24.10.EX.H and later Pressurized Coal Feeder 08/02/02 1 30.00.EX.C and later Loss-In-Weight 04/25/02 1 30.10.EX.E and later Enhanced Loss-In-

Weight 2

40.10.EX.A and later Impact Flow Meter 04/14/03 2 90.10.EX.Y and later MasterSet 01/02/03 2

Other Merrick firmware releases may also support DF-1 communications. The DNI maintains a serial conversation with one MC³, using DF-1, and then exposes a Read Table and a Write Table to a DeviceNet Scanner. These tables are sub-sets of the CIT. Data tables are transferred between the MC³s and the DeviceNet host PLC. The positioning and content of the data elements in the tables must be tracked all the way from the internal MC³ register database to the data structures in the PLC. This is done in several steps: • Between the MC³ register database and the MC³ CIT. Some of this mapping is fixed, and

some is configurable. • Between the MC³ CIT and the Read and Write Tables in the DNI. This is entirely configured

in the DNI. In this case we used the free ENI Utility from A-B. • Between the DNI tables exposed to DeviceNet and the Scanner Table in the PLC. This is

done with a DeviceNet configuration software package. In this example, we used Allen-Bradley’s RSNetworx for DeviceNet.

• Between the Scanner Table in the scanner and the final data structures in the PLC. This is done with PLC programming methods. In this example, we use a PLC-5, so the Scanner Tables are transferred to Integer Files (N10 and N11) using BTW and BTR instructions.

Page 2: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 2 3/12/04/Lars

For 16 bit scanners (i.e. A-B 1771-SDN or 1747-SDN), Control/Status bits and Integer numbers are organized in 16 bit words. Variables, such as “Feedrate” and “Total” are organized as IEEE 32 bit floating point numbers (REALs), located in two consecutive 16 bit words (INTs). For PLC's that don't support floating point numbers, it is possible to split variables into two 16 bit integers, one containing the integer part and one containing the fractional part multiplied by 10,000 (four implied decimal places). For 32 bit scanners (i.e. A-B 1788-DNBO and 1784-SDN), Control/Status bits and Integer numbers are organized in 16 bit words packed into 32 bit integers (DINTs), two at a time. Parameters are organized as IEEE 32 bit floating point numbers, each located in a DINT. Since REALs are encoded differently than INTs and DINTs, they have to be copied in and out of the Scanner Table to Floating Point variables to be useful in PLC calculations. For 16 bit scanners, two scanner elements, which typically are represented as INTs, must be copied into one REAL and vice versa. In the A-B world this has to be done using COP instructions. MOVs will not work.

Configuration example We used one PLC, two DNIs and two MC³ controllers. A “Read All, Write some” approach was taken, meaning that as much information as possible was to be uploaded from the MC³, and just enough was to be downloaded the MC³. The PLC was I/O configured to accept the DeviceNet scanner. Some logic was added to send and receive data to and from the Scanner Table, to safeguard communications integrity and to extract and insert the REALs. The Scanner was configured to accept the DNI interfaces on DeviceNet and to exchange data with the Read and Write Tables in the DNIs The DNIs were configured to exchange data with the CIT in the MC³ controllers. Since the MC³ responds to only three DF-1 messages, this configuration is critical. In this example, the DNI thinks it is communicating with a Micrologix PLC, accessing the N7 table. N7 is the “PLC-2 Compatible” or CIF file for Micrologix. The A-B Knowledgebase article G16610 sheds some light into this matter. The MC³ controllers were configured to accept and expose data for control and monitoring using DF-1. Note the 24V power required for driving the DeviceNet components. The 1771-SDN scanner does not provide 24V.

DNI

Laptop PC (Config)

24V

DeviceNet

PLC 5/11 1771 SDN

PCMK

Merrick MC³ 20.10.EX.F

Merrick MC³ 20.10.EX.F DNI

DH+

Page 3: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 3 3/12/04/Lars

Equipment for testing and programming purposes: • Laptop PC, DELL Inspiron 7000.

MS Windows 2000 Professional, SP2. A-B RsLogix5 for PLC programming, ver 3.22.00.00. A-B RSNetworx for DeviceNet for Scanner and DNI configuration, ver. 4.12.00. A-B RSLinx for communications. 2.41.00 A-B DNI Utility. 2.001.

• PLC-5/11 in chassis with power supply A-B Scanner, 1771-SDN

• DeviceNet cabling • PCMCIA card for Data Highway Plus A-B 1784-PCMK • 24V Power Supply. • 2 DeviceNet Interface A-B 1761-NET-DNI Series B FRN 2.01 • 1761-CBL-PM02 from A-B used for configuring the DNIs. • 2 MC³ to DNI cables, Merrick P/N N42372-1 NOTE! You can’t use A-B’s cable 1761-CBL-

PM02, although you can use that cable to make a suitable cable. • 2 MC³ controllers, both 20.20.EX.A.

Test Procedure We have found that a Bottom-Up solution is the best way of working this test. The procedure, then, goes like this: 1. Configure the MC³ controllers to communicate using DF-1 on Serial Port 2. 2. Connect the DNIs and the power supply to the DeviceNet network. 3. Configure the DNIs, using the A-B DNI Utility. 2.001. 4. Connect the DNIs to the MC³’s and verify that communication statistics and data are OK. 5. Connect the Scanner to the DeviceNet network and configure the Scanner, using RSNetworx

for DeviceNet. 6. Write PLC logic to retrieve the Scanner Table data and insert and extract REALs.

Configuring the MC³ Configuring the MC³ controllers include setting up communications parameters, register tags, warnings, faults and external inputs and outputs. In this test case, we want to watch the Zero Tracking parameter in the MC³ along with the “standard values”, such as Feedrate and Total. MC³ warnings and faults are user preference qualified, associated with any logical I/O point in the MC³. This configuration is done regardless if communications is used or not. Any logical inputs you want to control from the PLC must be mapped to an external input. In the same way, logical outputs must be mapped to external outputs for monitoring purposes. The following menu references and screen shots were taken using the MC³ 20.20.EX.A Belt Feeder Controller application. The “MC³ 20.20.EX Weigh Feeder Controller Operation and Maintenance Manual, Version A” (O&M) is available at the Merrick Web Site: http://www.merrick-inc.com/mct/2020A_OM.pdf.

Page 4: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 4 3/12/04/Lars

Setting the MC³ communications parameters To get to the Communications screen from the main screen, touch Action Menu, Settings Menu, enter the password, Inputs & Outputs and finally Comm Settings. DF-1 runs on COM 2. In this example, we use 19200 baud, 8 data bits, 1 stop bit and no parity. These parameters must agree with the settings in the DNIs serial port. See O&M, page 66. Touching the Comm 2 Numeric button takes you to

the DF1/DNI Params screen. Set the parameters as follows: Parameter Value Comment Prtr/0 DF1/1 1 1 Selects DF1 (as opposed to printer). DF1 Timeout 20.0 The MC³ times incoming, legal DF1 telegrams, and turns on the “DF1

Timeout” logical output if this time expires. You typically let this output qualify a Warning. Also, this will turn off all External Inputs.

DF1 Uses BCC 0 The DNI uses CRC checksum (as opposed to BCC). Write Prot 3071 BFF hex. All registers write protected except Primary Setpoint. Word Order 4095 FFF hex. All REAL variables have reversed word order. This has to

be found by trial and error. The PLC-5 and SLC-5 PLC’s have the floating point words backwards. (As opposed to the ControlLogix family of PLC’s).

Int/Frac FP 0 Floating Point transfer is supported. Integer/Fraction is not needed. Tag Reg 1 353 Internal MC³ Register Number for the "Zero Tracking Load" variable.

This will make the value show up in the "Tag 1 R value" position. Tag Reg 2 0 Use 0 for unused tags Tag Reg 3 0 Tag Reg 4 0 Tag Reg 5 0 Obviously, to be able to tag other internal MC³ registers, you need to have the register specification for the specific MC³ application you are using. If you extend the size of the write table, you can write to the "Tag Reg x" parameters from the PLC. This allows for multiplexing of the parameters in the "Tag x R Value" positions.

Configuring Warnings and Faults Warnings and Faults are qualifiers to logical inputs and outputs, normally set by the user. Warnings are considered to require attention. Faults are considered to be fatal for the feeder operation, and the controller will attempt to stop the feeder. See O&M, page 55. In this example the warnings and faults are set up according to the following table: Logical I/O Qualifier Comment HPAD Overload Fault Invalid Load Cell Signal HPAD Underload Fault Invalid Load Cell Signal Blt Drive Fail Fault Signal from the belt motor VFD, connected to an MC³ input. Hi Setpoint Warning Setpoint above upper limit. To detect floating point transfer

problems. Hi Belt Load Warning Too much material on the belt DF1 Comm Lost Warning No valid DF-1 telegram has been received for 20 seconds. Load Simulator Warning Don't run the feeder for real with the Load Simulator turned

Page 5: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 5 3/12/04/Lars

on! Blt Drive Ovrld Warning Signal from the belt motor drive, connected to an MC³ input.

The qualifiers are set up in the Digital Inputs (O&M Page 55) and Digital Outputs (O&M Page 59) screens. With the settings above, the Warnings and Faults screens look like this. The state of the checkmark is transferred to the Warnings [18] and Faults [19] word in the CIT. The bit order is the same as the displayed order of the screen. It is important to note that the bits in the Warnings and Faults registers reflect the state of the checkmark, not the dot. In this warning screen, both are on for the logical input "Load Simulator". Bit 3 of the Warnings register is on. If the "Load Simulator" input is turned off, then the dot goes away, but the checkmark stays until the warning is ACK'd, either on this screen or by the "Clear Warnings Command" bit in the Control

[44] register. Note that the order of display is not configurable. It is derived from the order of logical outputs and logical inputs in the Digital Inputs and Digital Outputs screens. If you add or remove a warning or fault qualifier to a logical input or output, the order may change.

Configuring External Inputs and Outputs Logical inputs and outputs can be mapped in three ways: 1. To a physical input or output. In this example the logical input 'Belt Drive Overload' is mapped

to Rack 1 Input 3, which, in turn, is connected to the Overload output of the belt motor VFD. The physical output Rack 1 Output 5 is mapped to the logical output 'Drive Enable'. The output is then connected to the Start input of the belt motor VFD.

2. To an external input or output. In this example, the 'Run Permission' logical input is mapped to External Input 1. This allows the PLC to start and stop the feeder through the External Inputs register, CIT Word 45, bit 0.

3. Unused Logical Inputs are typically connected to the Physical Inputs 'Always On' or 'Always Off'.

The PLC controls inputs to the MC³ as bits in the 'External Inputs' register, CIT Word 45. They are then mapped to Logical Inputs in the MC³. Note that the External Inputs are numbered 1 - 16. Bits in the 'External Inputs' word are numbered 0 - 15 in the PLC. In this example, we use 5 inputs. Two are physical connections from the VFD to the MC³, one is a physical connection to the emergency stop circuit (Feeder Block), and two are inputs controlled from the PLC (Run Permission, Load Simulator). This is how the inputs have to be mapped in the MC³: Logical Physical W/F Bits in the PLC Run Permission External Input 1 N11:2, 6 bit 0 Load Simulator External Input 2 W N11:2, 6 bit 1 Feeder Block Rack 1 Input 1 N10:26, 54 bit 0 Belt Drive Ovrld Rack 1 Input 2 W N10:26, 54 bit 1 Belt Drive Fail Rack 1 Input 3 F N10:26, 54 bit 2 The physical inputs for Rack 1 can be monitored in the PLC, CIT Word 41, which are found in N11:26 for MC³ #1 and N11:52 for MC³ #2. Digital output mapping:

Page 6: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 6 3/12/04/Lars

Physical Logical W/F Bits in the PLC Rack 1 Output 4 Fdr Drv Enable N10:27, 55 bit 3 External Output 1 Fault N10:2, 30 bit 0 External Output 2 Warning N10:2, 30 bit 1 External Output 3 Ready N10:2, 30 bit 2 External Output 4 Good Feedrate N10:2, 30 bit 3 External Output 5 Hi Belt Load W N10:2, 30 bit 4 External Output 6 Hi Setpt W N10:2, 30 bit 5 External Output 7 HPAD Overload F N10:2, 30 bit 6 External Output 8 HPAD Underload F N10:2, 30 bit 7

Setting up the setpoint source The MC³ Setpoint Method should be set to Serial. See O&M, Page 27. The setpoint is taken from the PLC’s F8:20 or F8:21 in this example. See Write PLC logic on page 16.

Page 7: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 7 3/12/04/Lars

MC³ - CIT Format The format of the data structure exposed to communications is the same for DF-1, Modbus ASCII and Modbus RTU. The first 16 words are in place for legacy reasons and should not be used. However, reading and displaying words 8 - 15 can sometimes be useful for troubleshooting purposes. Words 16 - 43 are read only and intended for monitoring. For performance reasons, read a section, starting with word 16, and as far along as you need. The performance penalty for extending the read area length is small; however, you may find that you run out of space in the scanner table if you have many MC³’s on your DeviceNet segment. If you need to conserve scanner table space, first determine how many variables you really need. Typically, for a belt feeder, this would be Feedrate and Subtotal. If this is the case, you can read from word 16 – 23. You will then have to enter the MC³ register number for Feedrate in Tag 1 RegNo (251 for 20.20.EX.A) and for Subtotal in Tag 2 RegNo (181 for 20.20.EX.A). The Tag X RegNo values can be set in the MC³ by going to Action Menu, Settings Menu, enter the password, Inputs & Outputs, Comm Settings, Comm 2 Numeric. Words 44 - 67 can be written to. Note that the "Tag n W value" (n = 1...5) refers to the same internal MC³ register as the "Tag n R value". The "Tag n RegNo" is the internal MC³ register number corresponding to the values red from or written to. This Tagging scheme is in place to enable you to get to any variable within the MC³. You must have the Register Specification for the application and version you are working with. There is a risk here. You can easily crash the MC³ if you, for example, write a value of zero to a variable used in a divide operation. The only remedy in this case is to Ram Reset the MC³. You will then have to enter all the MC³ parameters again. If you have WinMerik, which can be used to upload and download MC³ parameters with a PC; it is a good idea to upload before you start writing to internal MC³ variables. Words 60 to 67 are also accessible in the MC³ DF1/DNI Params screen. See “Setting the MC³ communications parameters” on page 4. If you write to them from the DNI, the values set in that screen will be overwritten. Words 60 to 67 are "sticky" and will survive power cycling. Word formatting and write protection properties are set in words 60 - 62. It is a good idea to have all tagged registers write protected (4095, 0xFFF in word 60) until the floating point transfer method has been checked out. It is possible to transfer an invalid floating point number into a variable that is used in actual calculations, rendering a MC³ software fatal exception. The following table lists all transitions from the MC³ CIT table to N10 and N11 in the PLC in this example. Note that this is example specific.

Page 8: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 8 3/12/04/Lars

CIT Word

Ln Contains Data format Bit (Note 2)

DNI table Element

Comment ScannerTable word MC #1

ScannerTable word MC #2

PLC5 Table MC #1

PLC5 Table MC #2

0 8 Physical I/O Backwards Compatibility 8 8 Logical I/O Backwards Compatibility 16 1 Status R 0 See Note 1 below for bit info R 1 R 29 N10:1 N10:29 17 1 External Outputs R 1 R 2 R 30 N10:2 N10:30 18 1 Warnings R 2 R 3 R 31 N10:3 N10:31 19 1 Faults R 3 R 4 R 32 N10:4 N10:32 20 2 Tag 1 R Value 0 (0001) R 4,5 R 5,6 R 33,34 F8:0 F8:10 22 2 Tag 2 R Value 1 (0002) R 6,7 R 7,8 R 35,36 F8:1 F8:11 24 2 Tag 3 R Value 2 (0004) R 8,9 R 9,10 R 37,38 F8:2 F8:12 26 2 Tag 4 R Value 3 (0008) R 10,11 R 11,12 R 39,40 F8:3 F8:13 28 2 Tag 5 R Value 4 (0010) R 12,13 R 13,14 R 41,42 F8:4 F8:14 30 2 Feedrate 5 (0020) R 14,15 R 15,16 R 43,44 F8:5 F8:15 32 2 Weight 6 (0040) R 16,17 R 17,18 R 45,46 F8:6 F8:16 34 2 Speed Info 7 (0080) R 18,19 Speed, if available, or SCR out R 19,20 R 47,48 F8:7 F8:17 36 2 Subtotal 8 (0100) R 21,22 R 21,22 R 49,50 F8:8 F8:18 38 2 Total 9 (0200) R 23,24 R 23,24 R 51,52 F8:9 F8:19 40 1 App/Ver R 24 App # in hi byte, Ver (ASCII) in low R 25 R 53 N10:25 N10:53 41 2 Phys Inputs R 25 Note 7 R 26 R 54 N10:26 N10:54 42 1 Phys Outputs R 26,27 Note 8 R 27,28 R 55,56 N10:27,

28 N10:55, 56

44 1 Control W 0 See Note 1 below for bit info W 1 W 5 N11:1 N11:5 45 1 External Inputs W 1 W 2 W 6 N11:2 N11:6 46 2 Primary Setpoint 10 (0400) W 2,3 W 3,4 W 7,8 F8:20 F8:21 48 2 Sec. Setpoint 11 (0800)

Page 9: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 9 3/12/04/Lars

CIT Word

Ln Contains Data format Bit (Note 2)

DNI table Element

Comment ScannerTable word MC #1

ScannerTable word MC #2

PLC5 Table MC #1

PLC5 Table MC #2

50 2 Tag 1 W Value 0 (0001) 52 2 Tag 2 W Value 1 (0002) 54 2 Tag 3 W Value 2 (0004) 56 2 Tag 4 W Value 3 (0008) 58 2 Tag 5 W Value 4 (0010) 60 1 Write Protect Bits Set for write protection. See note 3 61 1 Word Order Bits Set to reverse. See note 4 62 1 Int/Frac Bits Set for Int/Frac. See note 5 63 1 Tag 1 RegNo MC³ register number 64 1 Tag 2 RegNo 65 1 Tag 3 RegNo 66 1 Tag 4 RegNo 67 1 Tag 5 RegNo

Page 10: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 10 3/12/04/Lars

Note 1 This is the bit assignment for words 16 and 44, corresponding to the first words read

and written by the DNI.

Bit Word 16 Function Word 44 Function Comment 0-6 See note 6 DNI’s Mac Address 0 – 63. The DNI writes its MAC

address to these bits. 7 Integrity bit echo Integrity bit The MC³ will echo this bit from word

44 to word 16. 8 Clear Warnings

Done Clear Warnings Demand Used by PLC to clear all warnings. Set

the bit in word 44, and wait for the bit in word 16 to set. Then clear the bit in word 44.

9 Clear Subtotal Done Clear Subtotal Demand Same scheme as for Clear Warnings 10 Lock Touchpad

Done Lock Touchpad Demand Disables all touch-buttons on the MC³

A DF-1 Timeout will re-enable them. 11 Reserved Reserved Planned for Register Download 12 Pacing flag Low Feedrate Deviation. Used for

pacing functions, whereby other feeders in the system will follow a “starving” feeder.

13 Not Serial Setpoint MC³ will ignore sent setpoint. Set when the Setpoint Method is something else than Serial.

14 MC³ in menu Used for Tampering monitoring. This bit is on whenever the MC³ menu system is entered.

15 MC³ recalibrated Recalibration ACK In place for historical reasons. Set when any calibration procedure is accepted or any parameter is changed. Reset with a Low-to-high transition of Recalibration ACK.

Note 2. This column defines the bit weight for the corresponding variable in the format words

60, 61 and 62. Example: Tag 2 Read and Write values both are governed by bit one (with bit weight 0002 Hex) in the format words 60, 61 and 62. In this way, Write Protection, Word Order and Integer/Fraction representation is individually settable for every numerical variable in the data map.

Note 3. The write protection property should be set when an MC³ register is tagged for monitoring only. When writing to words that are write protected, the corresponding Tag n W value changes accordingly, but the corresponding MC³ register (Tag n R Value) is unaffected. This is useful for testing data transfers to the MC³ before they are implemented, or when you need to change a variable only at certain instances.

Note 4. The Word Order Bit, when set, reverses the order of the two words that contains value information. To correctly transfer floating-point values to and from PLC’s, these bits may have to be set.

Note 5. The Integer/Fraction bits are used when the device using the data does not support floating-point numbers. With the corresponding Word Order bit cleared, the first word will carry the Integer part, and the second the fractional part, multiplied with 10000. (4

Page 11: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 11 3/12/04/Lars

implied decimal places). Note that for a negative value, both the integer and fractional parts are negative.

Note 6. Bits 0 - 3 are used to signal problems with Tag Register Numbers as follows: Bit 0 Attempt to write to a conditionally write-protected MC³ register while the “Extended

Access” logical input is OFF. Bit 1 Attempt to write to a write-protected register. Bit 2 Attempt to write to a non-existing register. Bit 3 Attempt to read from a non-existing register. Zero returned. Note 7 Rack 1 input 1 in bit 0, Rack 1 input 2 in bit 1 etc. Rack 2 input 1 in bit 4…. Note 8 Rack 1 output 1 in 42 bit 0… Rack 1 output 8 in 42 bit 7, Rack 2 output 1 42 bit

8…Rack 2 output 2 in 42 bit 15, Rack 3 output 1 in 43 bit 0 etc.

Configuring the DNI To fully understand the inner workings of the DNI, refer to A-B’s DeviceNet Interface User Manual, publication1761-6.5. The file name on the A-B website (http://www.ab.com/manuals/) is 1761-um005a-en-p.pdf. There are two different configuration methods available: 1. From the serial port of the DNI, using a PC and a free utility from A-B called “DNI Utility

2.001” for this, you need a serial port on the PC and an A-B 1761-CBL-PM02 Series B or C cable. The name of the DNI utility package on the A-B website is dniinstl.exe.

2. From DeviceNet, using RSNetworx for DeviceNet and some means of access through RSLinx. This method is not described here.

In this example, we will configure two DNIs to Mac Addresses 3 and 4. They will read from MC³ CIT words 16 – 43 (28 words) and write to MC³ CIF File words 44 – 47 (4 words). The DNIs will think they are connected to a Micrologix PLC, exchanging data with the N7 file. N7 is the Micrologix CIF File, meaning that the DNI will use PLC2 Unprotected Read and Write messages.

DNI Utility Method The DNI must be powered (nominally 24V DC).The power is provided by the DeviceNet cable. It is possible, but not recommended, to use the 12V DC available for Tacho hook-up on the MC³. Stop any application that uses the serial port (such as RSLinx). Connect the 1761-CBL-PM02 Series B or C cable between the PC and the DNI and start the DNI Utility. This is what you will see.

Now, click the button. The DNI Configure Port Dialog appears.

Page 12: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 12 3/12/04/Lars

Select RS232/DF1 Port and click OK. The DF1 Configuration Dialog appears Select the appropriate Com port, and Baud Rate of 19200. That is the DNI default baud

rate and also the preferred baud rate for the MC³ serial port. Click OK. The screen reverts to its original state, with one difference. The lower right corner looks like this:

Click the button. If the DNI comes right out of

the box, the set up dialog appears, and it looks like this You can now change the parameters for the DNI. The two DNIs used in this example will have all parameters identical, except the Node Address.

Parameter Settings Comment DeviceNet Autobaud Enable

Checked Typically, any DeviceNet device that supports DeviceNet Autobaud will have it enabled. Normally, the scanner will determine the baud rate.

Explicit Message Timeout

0 Set to 0. We will not use Explicit messaging here. See DNIMAN, section 3.3.

DF1 Autobaud Not checked Autobaud on the serial port is not supported

Page 13: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 13 3/12/04/Lars

Parameter Settings Comment Enable Data Rate 19200 Must correspond with the MC³ COM2 baud rate setting.

See “Setting the MC³ communications parameters” on page 4

Substitute Destination Address

64 Disabled

Connected Devices Micrologix 1000

Polling Enabled Checked This will enable the exchange of data with the MC³ Polling Delay 330 ms This is based on the typical MC³ internal update time Heartbeat Multiplier 1 How often the DNI toggles the “Heartbeat bit” Input/File Type Integer File Number 7 Word Offset 16 and 44 This is where the DNI starts to read and write,

respectively. See “MC³ - CIT Format” on page 7. Size (words) 28 and 4 The input size is the full 28 words. The output size is just

4 words. We are only passing Control/DNI, External Inputs and Primary Setpoint to the MC³

Split Point 28 and 4 Must be the same as Size (words) When you are done, the screen should look like this for the first DNI. The only difference between the first and second DNI is the Node Address. It is 4 for the second DNI.

Click Save to DNI to update the DNI configuration, then Save to File. It is a good idea to save all configuration files for further reference. The two DNI configuration files we saved are available at http://www.merrick-inc.com/mct/MC3DNIDN.

Page 14: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 14 3/12/04/Lars

Connect the DNIs to the MC³’s and Verify If the DNI configuration is successful, it will immediately attempt to communicate with the MC³. You can see the Tx/Rx LED on the DNI blink. Disconnect the serial cable from the PC you used to configure the DNI. Locate the COM2 serial port on the MC³. It is the only DB9-S (Female) connector on the bottom (CPU) board in the card stack. There are two versions of the board, new and old. This is what the new board looks like. COM2 is in the lower left.

This is what the Old board looks like. Here, there is a cable connected to COM2. The cable you used for configuration (A-B 1761-CBL-PM02 Series B or C) unfortunately has a female DB-9 connector, so you need a Male-To-Male plug. The plug must have pins 2 and 3 crossed and pin 5 straight through. Merrick makes a direct cable. The part number is N42372-1. Cycle the MC³ power and push Action Menu, Diag Display, DF1 Diag.

You should see “rtgms”, “ttgms”, “rACKs” and “tACKs” increment. If not, refer to Troubleshooting tips on page 18

Page 15: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 15 3/12/04/Lars

Configuring the Scanner A detailed description of Scanner configuration is beyond the scope of this document. The RSNetworx configuration file is available on http://www.merrick-inc.com/mct/MC3DNIDN. If your DNIs are correctly configured and connected to the 1771-SDN scanner, browsing the

network from RSNetworx should give you a network image like this. We used a KFD module to gain access to DeviceNet. There is a method to do this through the PLC5 (SDNP Driver) but that method is very slow, if at all functional. It helps to set up the PLC Interface addresses fields in RSNetworx. This is one of the tabs in the Scanner Properties window. It has no functional implications, but it makes the rest of the screens more understandable. In this example we are only using Block Transfer 62 data. The Input scanner table is copied to N10:0 and the output scanner table is copied from N11:0 Set up the I/O parameters for the two DNIs. We typically use Polled, polling every scan. Watch out for Word/Byte confusion. This screen uses bytes, rather than words. We use 28 words in the Read table and 4 words in the Write table, corresponding to 56 and 8 bytes, respectively.

We used auto mapping to map first DNI 3 and then DNI 4. Your summary page should look something like this. We used the B scanner. The A03 entry in this screen shot is bogus.

Page 16: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 16 3/12/04/Lars

Write PLC logic The Allen-Bradley publication1771-5.14 is very helpful for understanding the scanner operation. The PLC logic in this example consists of three parts:

Copy the scanner input table to N10, and the output table to N11. This is done with BTW and BTR instructions

Copy the segments of N10 that contains Floating Point variables into F8. Also copy the two Feedrate Setpoints, (F8:20, F8:21) to their place in N11, so they can be written to the MC³:

Page 17: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 17 3/12/04/Lars

Make sure that the communication is working. First check all relevant bits in the scanner’s module status word (rung 6), then set up watchdogs for the Integrity Bit Echo. The DNI toggles the corresponding command bit every time it writes to the MC³. The MC³, then, echoes it back. If it stops toggling in the PLC, there is a problem. In this example, we used the scanner channel B. There is a major gotcha in the Module Command Word, N11:0. Channel B will not scan until you set bit 2. If you use channel A, you have to set bit 0.

If the two MCx_VALID bits are both on, you have successfully set up DeviceNet communication with the MC³ controllers. You now have complete control to start and stop the feeder, set the setpoint, monitor all essential parameters, see status, warnings and faults. The RSLogix5 file for this example is available in http://www.merrick-inc.com/mct/MC3DNIDN. There are symbols and descriptions for all variables, I/O points, warnings and faults.

Page 18: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 18 3/12/04/Lars

Troubleshooting tips Setting up industrial networks can sometimes be a daunting task. In this example, four mapping layers are involved, along with two different communication protocols. Fortunately, there are excellent troubleshooting tools available.

Look at the LED's on the New MC³ CPU board. The LED indicators 1 and 2 on the new MC³ CPU board are connected to the serial Receive Data and Transmit Data, respectively. They should be constantly blinking, in sync with the green TX/RX LED on the DNI.

Check data in the CIT Screen against data in the PLC. The CIT can be inspected in the MC³, by touching Action Menu, Diag Display, DF-1 Diag, Dat. Note that the values are only updated on valid DF-1 telegrams. If no telegrams have been received, most values are zero. As you can see, the layout follows the CIT exactly. All integer value are presented in hexadecimal format except the Tag register numbers. The 'e' format for the floating points can help troubleshooting FP

transfers. You are reading from all rows to the left, and writing to the first three rows on the right in this example. If you succeed with the integrity bit, you should see bit 7 in the Sts/DNI and Ctl/DNI toggle.

Check error counters in the Communication Diagnostic screen. Communications status and statistics can be inspected in the MC³, by touching Action Menu, Diag Display, DF-1 Diag. The screen looks like this. In this shot, out of 19813 successful exchanges, there was one lost to a break detected UART error. This caused a NAC to be transmitted, followed by an ENQ from the DNI.

Label Meaning rxlen Length, in bytes, of the last incoming telegram lalen Length, in bytes, of the last outgoing telegram cCRC CRC16 value calculated out of the incoming telegram. Hex. tCRC CRC16 value received in the incoming telegram. Hex. Should be the same as cCRC. mxtim DF-1 timeout in 100 ms ticks. Set in MC³ communication parametes. unita Unit Address. Should be Zero for DF-1 Point-To-Point. ints Comm events counter. Counts all incoming and outgoing bytes rxchs Received bytes counter. txchs Transmitted bytes counter rtgms Received, complete telegrams counter ttgms Transmitted telegrams counter rENQs Received ENQ’s. The DNI will send an ENQ telegram to make the MC³ repeat the last

response. Used when bit or CRC errors occur.

Page 19: Connecting to the MC³ from DeviceNet via DNImerrick-inc.com/wp-content/uploads/2011/10/mc3dniplc5.pdf · 2011-12-07 · Connecting to the MC³ from DeviceNet via DNI Using DeviceNet

Connecting to the MC³ from DeviceNet via DNI Copyright © 2004 Merrick Industries, Inc. All rights reserved

http://www.merrick-inc.com/mct/mc3dniplc5.pdf Page 19 3/12/04/Lars

Label Meaning tENQs Transmitted ENQ’s. The MC³ will send an ENQ telegram to make the DNI repeat the

last command. Used when bit or CRC errors occur. rNAKs Counter for Received NAKs. Negative Acknowledgements are received when the DNI

encounters errors in responses. tNAKs Counter for Transmitted NAKs. Negative Acknowledgements are transmitted when the

MC³ encounters errors in commands. rACKs Counter for Received ACKs. Acknowledgements are received when the DNI receives a

correctly formatted response. tACKs Counter for Transmitted ACKs. Acknowledgements are transmitted when the MC³

receives a correctly formatted command. NotMe Counter for Received telegrams intended for other nodes. Normally Zero, since this is

a Point-to-point protocol. rxe Counter for Erroneous Received telegrams. Any telegram received with an error other

than a UART error increments this counter. rxuae Received bytes with UART errors counter. UART errors include Parity, Overrun and

Framing errors. rxlua Last encountered UART error. See note 1. rxcse Received telegrams with CRC16 error counter rxfme Received telegrams with format error counter rxlfm Last format error encountered. See note 2. rxcme Non-supported command received counter timee Comm timeouts counter addr Starting data byte in CIT in received command. Should toggle between 32

(corresponding to CIT word 16) and 88 (corresponding to CIT word 44). size Number of data bytes in received command. Should toggle between 56 and 8 cmd DF-1 command received. Should toggle between 1 (PLC-2 Unprotected Read) and 8

(PLC-2 Unprotected Write). subf Not used in DF-1 retST DF-1 Exception Code. Zero of no problems. 51 (hex) for CIT addresses outside legal

limits. Note that the legal limits are different for telegrams 1 and 8. gpcXX Internal debugging. May or may not be present. The meaning varies. RX Beginning part of the received telegram. Bytes in hex format TX Beginning part of the transmitted telegram. Bytes in hex format. Note 1 This is the UART status register, bit encoded. Bit 0: Not Used. Bit 1: Overrun error. Bit 2: Parity error. Bit 3: Framing error. Bit 4: Break detected. Note 2 Format errors have a decimal numerical value: 11 MC³ Receiver buffer overrun - more than 255 bytes in telegram. 12 Something else than STX, ENQ, NAK or ACK following the initial DLE in a telegram.

Use the integrity bit. The DNI will toggle the integrity bit (CIT word 44, bit 7) every time it writes data to the MC³. Monitor the integrity echo bit (CIT word 16, bit 7). If they stop toggling, communications has failed, and appropriate steps can be taken. The integrity bit can be monitored in the MC³ Data Table screen.


Recommended