Process Control Tech Note 07
This Technical Note should be used with the Red Lion Controls Product Bulletin DLCN, which covers the operation of the Dual Loop Controller/Data Acquisition Module w/ DeviceNet. Both the Product Bulletin and this Technical Note assume the reader has a basic understanding of the operation of the DLC Dual Loop Controller as well as DeviceNet.
NOTE: The DLCN Product Bulletin is an addendum to the standard DLC bulletin and describes the use of the DeviceNet connection to the DLCN. This document should be used in conjunction with the DLC Bulletin.
Installing the EDS File
Before you can begin commissioning your DeviceNet network in RSNetWorx, you must install the EDS file for the DLCN Dual Loop Controller/Data Acquisition Module w/ DeviceNet. This file can be found on the Red Lion Controls web site. http://www.redlion.net/
From the main page, click on Support. Once in the Support page, click on the Downloads link and select DeviceNet EDS Files. By clicking on the download link downloading will begin.
To install the EDS file in RSNetWorx, select the menu command Tools >EDS Wizard. When the EDS Wizard window appears to continue on to the Options page (Figure 1).
Click Next and select “Register a single file” (Figure 2). Click the Browse button to select the EDS file you wish to register. Once the file has been selected, click Next.
By clicking Next again, the software will search the EDS file for errors. If errors are found, the software will not allow you to register it. Click Next and choose the icon you wish to associate with the DLCN. The software will list the available icons. Click Next again and verify the EDS file you wish to register. Click Finish to complete the installation.
Configuration refers to both hardware and data configuration of both the Master and the Slave. The DeviceNet Master must know what slave devices are allocated to it and the amount of data it can expect to exchange with the DeviceNet Slave.
For the purpose of this Tech Note, it is assumed the user has already created the network in RSNetWorx and has the DLCN installed on the network. For more information on creating a network in RSNetWorx, see the help files built into the software or consult the RSNetWorx software manual.
The only hardware configuration needed at installation is DIP switch set up on the DLCN. Both the MAC ID and the baud rate are set via dip switches. Both the MAC ID and the baud rate must match what has been set up in the Master Configuration. See page 1 of Product Bulletin DLCN for DIP switch configuration.
RSNetWorx has a Class Instance Editor which can be used to change attribute values in the DLCN card using an Explicit Message. Explicit Message is typically used during set up to set up default values in the DLCN property registers. Once set up, Explicit messages are typically not used for data exchange between the PLC and the DLCN. See the DLCN Product Bulletin.
EXAMPLE: To change the Process Value in Attribute 3, highlight the DLCN on the network screen and select the menu command Device>Class Instance Editor. (Figure 3)
In the Data Address data entry fields, enter the Class, Instance and Attribute number for the attribute you wish to change or monitor. In this case, the values are as follows: (See page 3 of the DLCN data sheet for a list of Attributes)
Class = 100(64h), Instance = 1(1h), Attribute = 3(3h)
Be sure to check which Radix you will be entering. The values in the Product Bulletin are decimal. The Example in Figure 3 shows the values in Hex.
Next, select the Service Code for the task you wish to perform. If you wish to change the Process Value attribute value, select Set Single Attribute from the pull-down list. Next, enter the value you wish to write to this attribute and click Send. Again, pay close attention to the Radix being displayed. In figure 3 the value is decimal. You may check that your value has been written by changing the service code to Get Single Attribute and clicking Send. The value currently stored in Attribute 3 of the DLCN will be displayed in the Received Data/Output field. Check that it matches the value you wrote to the card previously.
The two main areas of concern in the Master configuration are the I/O parameters and the mapping of data both produced and consumed by the DLCN to the appropriate PLC data table registers.
To view and edit the Master Configuration properties, double-click on the Master from the network screen. Once the properties window is opened, select the Scan List tab. (Figure 4)
Select the DLC DeviceNet unit from the list and click on Edit I/O Parameters. (Figure 5)
Once the connection type and byte sizes of the RX and TX data have been established, the next step is to determine where the data being produced by the DLCN (RX or input data) is to be stored in the PLC data tables and where the data being consumed by the DLCN (TX or output data) is coming from in the PLC data tables. This step is referred to as data mapping.
The importance of this step cannot be overstated. If the data map in the DeviceNet Master does not match that of the PLC logic, none of the logic functions will work properly. Much thought should be put into how the data from the network should be mapped to the scanner. Since one of the great advantages of DeviceNet is its versatility, care should be taken when designing the data table to account for future expansion of the network. It is a good idea to have a mapping strategy that will make it easier to work within the future, such as, matching the word number in the data map to the MAC ID of the node which the data corresponds to. Simple planning can make the data mapping go smoothly and cause fewer problems in the future. In many cases though, the location of this data in the data table has already been established by the person doing the PLC programming and when the actual network is configured in the field, the data must be mapped to the established data table locations for the system to work properly.
The Allen Bradley SLC PLC with the 1747-SDN DeviceNet Master uses a direct data transfer between the DeviceNet Master and the processor. Since the DeviceNet Master resides in a slot of the PLC rack it has both an input and output discrete file associated with it in the processor data tables. The PLC takes care of this automatically when you do the I/O configuration in RSLogix. Both the input and the output discrete files have 32 words reserved for data. The M1 and M0 data files are also used with the DeviceNet Master and the SLC processor. Each scanner in the rack has its own M1 file with 150 words reserved for input data and an M0 file with 150 words reserved for output data. These M files are not actual data tables in the processor, they reside in the DeviceNet Master. To use this data in the PLC logic, a copy command should be set up to move this data from it’s home in the DeviceNet Master to an established data table in the processor. Typically, the Integer files (N) are used for this purpose.
It is important to note that the first word (word 0) of the input and output discrete files are reserved for communication between the processor and the master. You may not map data to these words.
RSNetWorx has two options for data mapping. The first is Automapping, where RSNetWorx maps the data automatically. The second mapping option is advanced. With Advanced mapping, the data is mapped to a memory location the user chooses. The user also has the ability to break up the data into four segments and map each segment separately.
To Automap the I/O Data
1. Select the Input tab from the configuration screen (Figure 6). From this menu, the input data only will be mapped.
2. Choose the device(s) you want to map.
3. Select the Options key and choose the type of alignment you want to use. (Figure 7) Note: This only affects the mapping when more than one node is automapped.
4. Back in the Input menu, choose the data file you want the data to map to and the start word.
5. Select AutoMap. RSNetWorx will display the data map and where the data of each device is mapped.
6. Select the Output tab from the configuration menu and follow the same procedure to map the output data of each device. (Figure 8)
To Map Using the Advanced Option
1. Select the Input tab from the configuration screen (See Figure 6). From this menu, the input data only will be mapped.
2. Select the device(s) you want to map.
3. Select the Advanced key (See Figure 9)
4. In the Map From menu, choose the data message type and the byte and bit location you want to start mapping. Byte 0, Bit 0 would begin mapping at the beginning of the 6 bytes of input data. If the data were being broken into segments these values indicate the start of each segment.
5. In the Map To menu, choose the data file you want to map the data to. Choose the word and bit
location you want to begin at.
6. Choose the bit length (6 bytes X 8 bits/byte = 48 bits max) of the data you want to map. It is important to note the total bit length cannot exceed the total bit length of the data message. If the data message is broken up into segments, the sum of the segment bit lengths cannot exceed the total bit length of the data message.
7. Select Apply Mapping.
8. Select the Output tab from the configuration screen and follow the same procedure to map the output data of each device.
Download the Scan List to the Scanner
1. Select the Scan List tab from the configuration screen.
2. Click Download to download the scan list to the scanner. NOTE: The scanner must be in the program mode for this step.
Figure 10 shows what the Master Input and Output data tables may look like if they are mapped to the Discrete files of the PLC. Although the PAXCDC30 data is highlighted in each example, the DLCN is shown mapped to the Discrete Input file words 1 and Discrete Output files words 1 and 2.
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