Digital Analog Tech Note 05 - TNDA05
Abstract
This document describes how to configure PAXCDC30 communications with an Allen Bradley 1747-SDN Scanner Card.
Products
PAX Meters with PAXCDC30 option card installed.
Use Case: Configuring a PAXCDC30
This Technical Note is intended to be used along with the Red Lion Controls Product Bulletin PAXCDC2-D, which covers the operation of the PAXCDC30 – DeviceNet Communications Option Card. Both the Product Bulletin and this Technical Note assume the reader has a basic understanding of the operation of the PAX meter as well as DeviceNet.
Installing the EDS File
Before you can begin commissioning your DeviceNet network in RSNetWorx, you must install the EDS file for the PAXCDC DeviceNet Communications Option Card. This file can be found on this page: https://redlioncontrols.zendesk.com/hc/en-us/articles/360004257831-DeviceNet-EDS-Files Select the EDS Files for PAXCDC30 DeviceNet Card. By clicking this link, downloading will begin.
To install the EDS file in RSNetWorx, select the menu command Tools >EDS Wizard. When the EDS Wizard window appears, continue on to the Options page (Figure 1).
Figure 1.
Click Next and, referring to Figure 2, select “Register a single EDS File”. Click the Browse button to select the EDS file you wish to register. Once the file has been selected, click Next.
Figure 2.
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 PAXCDC30. 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
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 PAXCDC30 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.
Slave Configuration
The only hardware configuration needed at installation is DIP switch set up on the PAXCDC30 card. 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 Product Bulletin PAXCDC2-D for DIP switch configuration.
RSNetWorx has a Class Instance Editor, which can be used to change attribute values of the PAXCDC30 card. An example of attributes that may be changed are the Polling Flags. The Polling Flags are used by the PAXCDC30 card to determine which PAX registers are to be updated in the PAXCDC30 DeviceNet. The user will want to only update those registers they are interested in monitoring. The fewer the number of registers being updated, the faster the response time of the PAX. For further details on this, see Product Bulletin PAXCDC2-D, pages 2 and 3.
Example
To change the polling flags in Attribute 3, reffing to Figure 3, highlight the PAX 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 3 Polling Flags. In this case, the values are as follows: (See page 2 of the Product Bulletin PAXCDC2-X)
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 Polling Flags 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 PAXCDC30 card will be displayed in the Received Data/Output field. Check that it matches the value you wrote to the card previously.
Master Configuration
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 PAX to the appropriate PLC data table registers.
To view and edit the Master Configuration properties, double-click on the Master from the network screen. Referring to Figure 4, Once the properties window is opened, select the Scan List tab.
Figure 4.
Select the PAX DeviceNet unit from the list and click on Edit I/O Parameters.
Figure 5.
Referring to Figure 5, the PAXCDC30 card supports both Polled and Strobed type connections. The correct number of bytes should already be set. RSNetWorx will extract this information from the EDS file and automatically enter the values in the RX Size and TX Size Field. Choose which connection type you wish to use. If no EDS file has been registered, you must manually enter the number of bytes for RX and TX. See “SUPPORTED CONNECTIONS” on page 2 of the PAXCDC2-D Product Bulletin for an explanation of how these connections function and the proper RX and TX sizes for each.
If you select Polled as the connection type, there will also be a field called “Poll Rate”. The choices available to fill this field are:
1. Every Scan
When Every Scan is selected, the master will poll the PAXCDC30 every scan of the network. This the default selection and the most commonly used.
2. Background
When Background is selected, the master will only poll the PAXCDC30 every X number of scans rather than every scan. When set to Background, the value set in the “Foreground to Background Poll Ratio” will determine which scan the PAXCDC30 will be polled. This value is set under the Module tab of the Master Properties. This value should only be used when the information from the PAXCDC30 card does not need to be updated in the PLC data tables every scan or you need to save bandwidth.
Data Mapping
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 PAXCDC30 (RX or input data) is to be stored in the PLC data tables and where the data being consumed by the PAXCDC30 (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 in to 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 with in 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 data mapping options. The first is Automapping, 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.
AutoMapping the I/O Data:
1. Refer to Figure 6 and select the Input tab from the configuration screen. From this menu, the input data only will be mapped.
Figure 6.
2. Choose the device(s) you want to map.
3. Referring to Figure 7, select the Options key and choose the type of alignment you want to use.
NOTE: This only affects the mapping when more than one node is automapped.
Figure 7.
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. Refer to Figure 8 and select the Output tab from the configuration menu and follow the same procedure to map the output data of each device.
Figure 8.
Mapping Using the Advanced Option:
1. Refer back to figure 6, select the Input tab from the configuration screen. From this menu, the input data only will be mapped.
2. Select the device(s) you want to map.
3. Click the Advanced button.
Figure 9.
4. Referring to Figure 9, 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. The PAXCDC30 data is highlighted in each example.
Figure 10.
Figures 11 and 12 show the PLC discrete input and discrete output data tables. Compare each of these to the data mapping in Figure 10.
Figure 11.
Figure 12.
Disclaimer
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.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement