Operator Interface Tech Note 36 - TNOI36
Crimson® supports DeviceNet connectivity when the appropriate DeviceNet Module or DeviceNet
Option Card is used with the following Red Lion Controls products: CR3000 Human Machine Interface (HMI) (with module), Data Station Plus (DSP) (with option card), G310 HMI (with option card), Graphite® Controller (with module), Graphite HMI (with module), Modular Controller (with option card), and ProducTVity Station™ (PTV) (with option card). This document is NOT intended to provide a detailed description of DeviceNet. Instead, it briefly introduces DeviceNet and describes the concepts required to understand and properly configure Crimson to support DeviceNet connectivity.
CR3000 HMI (with module), DSP (with option card), G310 HMI (with option card), Graphite Controller (with module), Graphite HMI (with module), Modular Controller (with option card), and
ProducTVity Station (PTV) (with option card)
This document describes how to configure Crimson to support DeviceNet connectivity between a
G310 HMI and an Allen Bradley 1756-ControlLogix Programmable Logic Controller (PLC). Setting
up communication between the previously identified Red Lion products and other DeviceNet capable industrial devices is similar.
Crimson 3.1, Crimson, 3.0, or Crimson 2.0
Required Operating System:
Microsoft Windows 2000, or above
DeviceNet is a low-level network that uses Controller Area Network (CAN) technology to provide communication between a range of industrial devices, from simple devices such as sensors and actuators to high-level devices such as controllers and HMIs.
DeviceNet is a connection-based network. In this context, the term connection refers to a communication path between two or more devices; not the physical (cable) connection to the DeviceNet network. A connection must be established between two devices before data transfer can occur.
There are two types of connection defined by the DeviceNet specification. Each has different characteristics and is suited to a specific type of communication:
•I/O Connection – Dedicated data transfer between a producer and one or more consumers. The format of the data is known or implied by the connection.
•Explicit Messaging – Generic multi-purpose messaging connection; typically used for command and response message commands.
Each connection type has an extensive number of parameters that can affect the characteristics of the communication path. In many Master/Slave communications scenarios, a defined set of connections and their associated parameter settings exist under the collective name Predefined Master/Slave Connection Set. Many of the steps involved in creating and configuring a connection of this type have been eliminated, simplifying network configuration.
Predefined Master/Slave Connection Set
The DeviceNet specification details a number of connections that facilitate data transfer between a Master and its Slave devices. The following DeviceNet connection types are supported by the G310 HMI:
•I/O Bit-Strobe Connection - An I/O connection over which Bit-Strobe I/O command and response messages are transferred. The Bit-Strobe command is broadcast by the Master device and is simultaneously received by all Slave devices. The command message contains a single bit of information for each Slave on the network. Each Slave device is required to respond with a Bit-Strobe response message. A Bit-Strobe response message can contain up to 8 bytes of information.
•I/O Poll Connection - An I/O connection over which Poll command and response messages are transferred. The Poll command is transmitted by the Master and is directed to a single Slave device. The Slave device, in turn, responds with a Poll response message. Both the Poll command and Poll response messages can contain any number of bytes.
•I/O Data Connection - The I/O Data connection is part of the Predefined Master/Slave Connection Set but is included for devices which support creating I/O data connections via the UCMM (Unconnected Message Manager).
Level of Support
The G310 HMI provides Group 2 Server level support: a UCMM-capable device that is configured to act as a Slave for the Predefined Master/Slave connection set.
Two hardware options are available, depending upon which Red Lion product is being used. To use DeviceNet on the G310 HMI, Enhanced Modular Controller, DSP, or PTV platforms, a DeviceNet Option Card must first be installed. This option card provides the hardware necessary to support the CAN physical layer specification, as required by the DeviceNet standard. Refer to Figure 1 for a high-level connectivity diagram that is representative of how an option card is connected in a DeviceNet network.
To use DeviceNet on the CR3000 HMI, Graphite Controller, or Graphite HMI platforms, the DeviceNet Module must first be installed. This module provides the hardware necessary to support the CAN physical layer specification, as required by the DeviceNet standard.
Once installed, the option card or module must be configured. Configuration is a two-stage process. First, the option card or module is selected in Crimson. Then, the appropriate driver is configured to run on the newly created DeviceNet Interface Port. The steps required to properly configure the option card and module are described in the next section.
Installing/Configuring the DeviceNet Option Card or DeviceNet Module
1. Install the DeviceNet Option Card or DeviceNet Module, as appropriate, using the instructions provided with each device.
2. Start Crimson.
3. Click on File>New to create a new Crimson database and select the appropriate Red Lion platform.
4. If configuring a DeviceNet Option Card: Refer to Figure 2 and go to the Navigation Pane and select Option Card; the Communications - Option Card popup appears. Select the Pick button; the Option Card popup appears. Select DeviceNet Option Card from the Options list and click the OK button; Figure 4 appears and DeviceNet Option Card is appended at the end of the tree shown in the Navigation Pane.
If configuring a DeviceNet Module: Refer to Figure 3 and go to the Navigation Pane and select Slot 1; the Communications - Comms Modules - Slot 1 popup appears. Under Module Selection, click on the Pick button; the Module popup appears. Select DeviceNet Module from the Options list and click the OK button; Figure 4 appears.
Configuring the Driver
Once the option card or module has been installed and set up, the appropriate driver needs to be selected and configured. The remainder of this document describes how to configure Crimson to support a G310 HMI equipped with a DeviceNet Option Card and an Allen Bradley 1756-ControlLogix PLC using RSLogix5000 and RSNetWorx, for DeviceNet operation. All other models are configured in the same manner.
1. Referring to Figure 4, go to the Navigation Pane and select DeviceNet Interface; the Communications - Option Card-DeviceNet Interface popup appears.
2. Go to Driver Selection and click on the Pick button; the Driver Picker for DeviceNet Port popup opens.
3. Select DeviceNet Predefined Group 2 Server and click on the OK button; Figure 5 appears.
4. Referring to Figure 5, set the appropriate Node Address, I/O Poll Size, and Baud Rate.
5. Make sure the Data Format setting is set to: Swap Bytes In Word.
6. Use File>Save to save the configuration settings. Driver selection and configuration are now complete.
Create Gateway Blocks
1. Referring to Figure 6, go to the Navigation Pane and select the DeviceNet device from the tree. Using the Add Gateway Block button on the right hand pane, add two Gateway Blocks; one for Read Data and one for Write Data.
2. Select the first Gateway Block and click the Pick button at the right.
3. Set the block for I/O Polled Command Data, starting at element PollC 00000.
NOTES: 1. The I/O Polled Size is determined by the settings in both the DeviceNet Master and the registered .EDS file for the G310 HMI. Changing these settings is addressed in the Automatic Update of the EDS File section. Please refer to this section before setting up the PLC.
2. For 16-bit support, select Word as Word. For 32-bit support, select Word as Long. The latter is recommended as DeviceNet uses 32 bits integer addressing.
4. Referring to Figure 7, set the Block Size to 4, and the Direction to G310 VGA to Device. This will be the Read Data block.
5. Select the second Gateway Block and set it up for I/O Polled Response Data 00000, with a Block Size of 4, and the Direction set to G310 VGA to Device. This will be the Write Data Block. Note that the Navigation Pane shows both gateway blocks once completed.
NOTE: Read and Write are from the G310 HMI point of view. This means the Master can send
data in Block A, so the G310 HMI can read data. On the other hand, the Master can only pull data from block B, so the G310 HMI can only write data.
The addressing scheme available is:
BitC – Identifies the I/O Bit-Strobe command data (Master to Slave).
BitR – Identifies the I/O Bit-Strobe response data (Slave to Master).
PollC – Identifies the I/O Poll command data (Master to Slave).
PollR – Identifies the I/O Poll response data (Slave to Master).
DataC – Identifies the I/O Consumed Data (Master to Slave).
DataP – Identifies the I/O Produced Data (Slave to Master).
1. Close the Communications module and access the Data Tags - Read_DNet_D module, as shown in Figure 8.
2. Create tags to read and write each value from the DeviceNet network, as shown in the Resource Pane. These tags will be Internal Integers. In this example, we have defined four reading and four writing tag integer values to communicate with the ControlLogix PLC.
3. Navigate back to the Communications section as shown in Figure 9 and assign the tags to the Gateway Blocks. Select the polled memory location at the left, and drag and drop or double-click the tag on the right to map it.
Configure the User Interface
1. Referring to Figure 10, insert each data tag on the display.
2. Change the Write tags to Data Entry so you can change the data value in the PLC.
3. Save the database and download to the G310 HMI.
Automatic Update of the EDS file (Electronic Data Sheet)
DeviceNet nodes use an Electronic Data Sheet to describe the communications parameters available to each device on the DeviceNet network. By design, each DeviceNet Master can handle a maximum of 124 Input words and 123 Output words. In the default EDS file for the G310 HMI, the Input and Output data sizes are set at 16 bytes each. This equates to four words of data input and four words of data output. These values can be set higher, but it is important to note that if the default values are set higher, they might conflict with other DeviceNet implementations.
Crimson provides an EDS file generator tool to create a file that matches your G310 HMI settings. This file can also be used to configure the Master. To generate an EDS file, refer to Figure 11 and do the following:
1. Enter the Communications module, go to the Navigation Pane, and select the DeviceNet Interface. Under the Electronic Data Sheet, select Yes in Synchronize and choose the path and name where the file should be saved using the Browse button.
2. Saving the database using the File>Save command will synchronize and update the EDS file.
Each time EDS parameters are modified, the EDS file will need to be re-registered within RSNetWorx for DeviceNet. These changes will also need to be reflected in the following locations:
•RSNetWorx master node Scanlist, Input Table, and Output Table
•ControlLogix PLC DeviceNet Scanner configuration
NOTE: Inputs and Outputs are with respect to the Master. Therefore, inputs refer to data sent from the Slave and read by the Master.
Configuring the RSNetWorx for DeviceNet Software
RSNetWorx for DeviceNet is used to set up and manage a DeviceNet network. To begin the configuration, launch RSNetWorx for DeviceNet from your development PC.
Start a new network by selecting: File>New>DeviceNet Configuration.
Register the EDS file generated by Crimson (as described in the previous section of this document) by selecting: Tools>EDS Wizard>Register an EDS file(s). The Rockwell Software EDS Wizard Options screen shown in Figure 12 appears; select the Register an EDS File(s) option and click the Next button.
The EDS Wizard Registration screen shown in Figure 13 appears. Select Register a single file, and browse to the location where you previously saved the G310 HMI .EDS file. Click the Next button once the desired location has been specified.
The Wizard’s EDS File Installation Test Results screen shown in Figure 14 appears. Verify that the .EDS file validation was successful (signified by the green check mark) and click the Next button.
The Wizard's Change Graphic Image screen shown in Figure 15 appears. If desired, select a new image file to represent the G310 HMI. Click the Next button when finished (or to skip this step).
The Wizard’s Final Task Summary screen shown in Figure 16 appears. Review the EDS registration, and finish the process by selecting the Next button.
Select the DeviceNet Master by navigating in the tree on the Right-click side. Navigate to: DeviceNet>Category>Communication Adapter>1756-DNB/A. Select the appropriate Major Rev and drag it into the network workspace at the right.
Select the G3 Slave by navigating in the tree on the left. Navigate to: DeviceNet>Vendor>Red Lion Controls>Generic Device. Select the G3-SERVER and drag it into the network workspace at the right.
Configure the Master to add the Slave device to the scanlist, as shown in Figure 17. Right-click the DNB module and select properties. From the Scanlist tab, select the G3-SERVER from the Available Devices pane, and add it to the Scanlist pane. Select the Edit I/O Parameters button.
Ensure that the Strobed or Change of State boxes are not selected. In the Polled section, verify that the Input and Output sizes are 16 bytes. These must match the I/O Poll Size selections previously specified for the G310 HMI. In DeviceNet networks, 4 bytes constitute a full word. Therefore the 16 bytes selection represents 4 full words of addressable 32-bit data.
Select the Input tab, as shown in Figure 18. Verify that the four words of G3-SERVER data are mapped to YourDNBSlot:I.Data[0…3]. From the Output tab, verify that the four words are mapped to YourDNBSlot:O.Data[0…3].
Apply the changes, and save your RSNetWorx for DeviceNet configuration.
Configuring the Allen Bradley ControlLogix PLC
Allen Bradley ControlLogix PLCs are programmed using RSLogix 5000 programming software. To begin the DeviceNet configuration, launch RSLogix 5000 from your development PC.
Create a ControlLogix program containing a valid DeviceNet Scanner, as shown in Figure 19. In this application a 1756-DNB was used.
Configure the DeviceNet Scanner to be address 0. Make sure to set up the 32-bit Input and Output memory spaces for a size of 32 (to match the configurations previously made for the G310 HMI and RSNetWorx for DeviceNet.)
Select the RSNetWorx tab, and navigate to the RSNetWorx for DeviceNet configuration that you previously created, as shown in Figure 20. Open the configuration from here and download it to the network.
In the Main Task tree, open the Main Routine Ladder Logic file. Create a rung of ladder to enable the DeviceNet network. The required output is always: Local:YourDNBSlot:0.CommandRegister.Run
Create a few rungs by taking the DeviceNet Input data, Local:2:I.Data[0…3], and adding 1 to them. Store the results in Local:2:O.Data[0…3]. Based on the configuration of the G310 HMI, if values are changed on the G310 MHI Write tags, the Read tags will display the respective values, plus one.
Save and download this configuration to the ControlLogix PLC.
Wiring The DeviceNet Network
Please note that all DeviceNet networks require the use of a termination resistor at the two end nodes on the network. This resistor is typically a ¼ watt 120-ohm resistor. It is recommended that the resistor is installed between the CAN H (white wire) and CAN L (blue wire) terminations of the DeviceNet connection.
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement