DeviceNet Chapter3
DeviceNet Chapter3
DeviceNet Chapter3
DEVICENET LABS
Lab Overview:
The labs are basically broken into two main sections. The first series of labs will take
you through a step by step series of tasks which will demonstrate how you would set up a
complete DeviceNet system (including ladder logic) from the ground up. The second set
of labs will focus on troubleshooting and solving control problems without step-by-step
instruction.
The basic task in setting up a DeviceNet system is to relate an actual physical input, such
as the green start button on the redistation, to a desired output reaction, such as the
turning on the red light on the redistation. In the real world you are not going to simply
push buttons and turn on lights, you will have many different control tasks to accomplish.
For example, you may have a part go by a photoeye which causes a diverter on a transfer
line to swing open. However, the manner in which you accomplish the control tasks will
be just the same as the manner in which we push the button and turn on the light in the
lab.
The ultimate goal of the first series of labs is to set up a network of a scanner and the 3
I/O devices in your lab station and then be able to press the green start button on the
redistation and see the red light go on. Once you have accomplished that you will be able
to expand the control tasks to the other devices on the network.
Lab Worksheet:
Use this worksheet as you go through the lab to help you understand the flow of data
through the system. As you go through the labs you will be instructed to fill in the
various sections of the worksheet.
1
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
1) The following section describes what’s in the coordinated demo. Read the following
section and refer to your demo box to verify your demo matches the description.
The following table lists the components in the demo box and their catalog numbers:
2
Component (clockwise on drawing) Catalog number
Trunk line 1485R-P1M5-C
with female field-installable connector 1485-P1T5-N5
with male field-installable connector 1485-P1T5-M5
2) The next section describes the hardware in the demo box. Read the section to become
more familiar with the products in the demo.
3
• A 1794-ADN FLEX I/OTM adapter connected to an analog output
module and a discrete input module.
Adapter node number = 02
3) Examine the cabling connection from the 1756-DNB DeviceNet scanner, and the
1770-KFD serial to DeviceNet interface, to the demo box.
Once you have completed a review of the hardware you are ready to start configuring the
system.
4
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
The first thing you will need to do when setting up your DeviceNet system is to assign
node addresses to all the devices on the network. The node addresses assigned are totally
up the user. Once assigned though, the node addresses will define the locations of
specific items of data in the DeviceNet map table. For example, if you assign the
redistation the node address 15, then you will have to find out where in the DeviceNet
map table the information for node 15 is stored if you wish to use the redistation
information. The only caveat to remember is to leave node 63 available for the
commissioning of devices (commissioning a device means you assign it a node address).
Some nodes power up by default as node 63. The only way to change their node address
is to set them up on the network and have the software assign a new address to the
device. If you have multiple devices which power up as node address 63, then you will
have to put them on the network one at a time and assign them a new unique address so
you can then put the next device on the network.
In this lab we will assign node addresses for the 1794-ADN flex I/O adapter and the
Series 9000 photoeye.
1) Examine the front of the 1794-ADN adapter. Note the pushwheels which allow you
to set the node address. Set the node address to 2 (02).
The 1794-ADN adapter is an example of a device which has hardware on it to allow you
to set the node address manually. The next device we will configure, the series 9000
photoeye, is an example of a device which powers up as node address 63 by default. In
order to set the node address for this device we will have to go online with it and set the
node address using the DeviceNet Manager software.
5
4) Select the “Online” icon.
5) A list of the available drivers in RSLinx will appear. Select the 1770-KFD
DeviceNet driver.
6
The following prompt will appear.
6) Select “OK” to go online. This prompt is there to warn you that your offline file may
not match the online network configuration. In order to make your offline file match
the online network you should upload the network, or download the offline file.
The software will begin browsing the network for devices. When it is finished your
screen should look like the one below.
This icon will toggle to
indicate you are online.
7
NOTE
Note the five nodes from the demo setup are shown. Also note the photoeye at node 63.
As stated in the demo overview, the photoeye will be set to node 7 for these labs. Since
we have verified we are communicating properly to the photoeye (and other nodes) we
can commission the photoeye.
9) Select “Node Commissioning” from the submenu. The following screen will appear.
10) Select the “Browse” button. The following screen will appear.
8
11) Select the “1770-KFD” in the left pane. The nodes will appear on the right.
12) Select the photoeye at node 63 and select the “OK” button. The folowing window
will appear.
13) Set the node address to “7” and select the apply button. When the node is
commissioned you will get a “Node 7 Commissioned” message on the bottom of the
window.
14) Select the “Exit” button to close the “Node Commissioning” window.
Notice that the photoeye still shows up as node 63. Remember, RSNetworx only does a
browse when you request it (to reduce unnecessary network traffic, especially when
remote networks are involved).
Notice that the Photoeye now shows up at node 7. Also note that a “missing’ photoeye
shows at node 63. The software will not automatically remove a missing device, since it
cannot tell the difference between a device you purposely removed from the network, and
a device which is unintentionally missing from the network. The software requires you
to manually remove any device which you no longer wish to appear on the network.
9
16) Select the photoeye at node 63 and press the delete key to manually remove the
device from the network configuration
The node adresses for the other devices are set. We now have all our nodes on the
network and node numbers assigned. This completes the node commissioning lab.
10
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
Once you have all your nodes on the network you will want to configure the nodes to
behave in the manner you desire. For example, you will want to set up the photoeye to
operate in dark mode or light mode. In dark mode the output will go on if the light beam
is broken (dark). In light mode the output will go on if the light beam is present (light).
In this lab we will configure the Photoeye and the I/O attached to the 1794-ADN adapter
(the flex I/O). We will also take a look at the redistation configuration. Before we start
our configuration. Let’s set the properties for our DeviceNet project.
1) Select “File” from the main menu and then Select “Properties”. The following screen
will appear.
The name field displays the current default file name of the project. This field will
display the name of the file we select to save the project to. You can change this name by
performing a “file -> save as” operation and selecting a new file name.
11
2) Enter the description “DeviceNet class project”.
3) When you have entered the information select the “OK” button.
4) Select the save icon from the toolbar to save the project.
We now have a new project created We are ready to start configuring devices. Let’s start
with the redistation.
The redistation is a simple device, consisting of two buttons and a light. As such there
really is not much to configure for a device like this other than setting the node address
and the baud rate. The redistation has a single dipswitch bank to configure the device.
The dipswitch bank is located inside the box. We will not open the device in the lab, we
will just take a look at what the dipswitches are used for.
5) Refer to the picture below (taken from DeviceNet manager software. This
information is also in the redistation manual).
12
Note that for this device there are only two things you can configure other than the node
address and baud rate, the output fault rate and output flash rate. If we wished to change
the settings for the device we would open it up and change the dipswitches appropriately.
We are now going to configure the photoeye. The photoeye has no dipswitches. All
configuration for the photoeye is done through the software. In order to configure the
photoeye we simply need to select it from network Browse window.
6) Double-click on the photoeye (node 7). The photoeye configuration window will
appear.
The general tab allows you to enter a name and description for the photoeye. It also
displays information about the module such as the node address and revision.
8) Select the “EDS I/O Defaults” tab. The following window will appear.
13
EDS default
is for 1 byte
of strobed
data to be
returned to
the scanner
The EDS I/O defaults define the default configuration for the device in terms of how
much, and what data, the device will exchange with the scanner. By default, the
photoeye will send 1 byte of data to the scanner when it receives the strobe request. If
you are unsure of what is contained in the 1 byte you can simply select the “EDS based
Help” button for “Input/Rx”.
9) Select the button labeled “Input/Rx” in the “EDS Based Help” section of the
“strobed” area. The following window will appear.
We now know that the output of the photoeye will be returned in bit 0 and the margin in
bit 1. Let’s take a look at the parameters for the photoeye.
11) Select the “Parameters” tab. If you get a prompt to upload the configuration select
“Yes” The following screen appears.
14
The lock
means the
parameter is
read only
Note that there are three parameters associated with this device, and that two are read
only. Currently, this device is in light operate mode. Light operate means the photoeye
will turn on its output when it detects the light beam. If you look at the second
parameter, Output, you will note that it’s current value is “on”. Let’s monitor the output
live and see how the photoeye behaves.
12) Select the “Start Monitor” button to start monitoring the photoeye live.
Note that the current setting for the output is on. That is because the photoeye is set to
light operate and the photoeye is seeing the reflected light beam.
13) Place your hand in between the photoeye and the reflector so that the light beam is
blocked. Note that the output now says “off”.
Let’s set the photoeye to dark operate mode and see what happens.
15) Select the “Operate Mode ” parameter and then select the “Modify Parameter” button.
17) Select the “Download to Device” button to store the new setting to the photoeye.
15
18) Select the “OK” button to close the window.
20) Notice how now the output is off while the photoeye detects the light beam.
21) Place your hand between the photoeye and the reflector and examine the output
status.
Let’s assume for our application we want the photoeye to operate in light operate mode.
23) Change the photoeye back to light operate mode (remember to download the setting
to the device).
The last device we will configure is the flex I/O. The flex I/O is the most complicated
device in our lab station because a single flex I/O adapter could interface to over 100
devices. The number and types of devices depend on the specific I/O modules used. In
our lab station we have an analog output module (1794-OE4) and a discrete input module
(1794-IB16). Let’s configure the flex I/O.
25) Double-click on the flex I/O adapter (node 2) in the network Who window. The
following screen will appear.
16
You can enter a name and description for the device on the General tab. The bottom of
the window displays important information about the device. The first thing we will do is
clear memory to remove any existing configuration information which may be in the flex
adapter.
26) Select the “Control” tab. Select “Yes” to the prompt to upload from the device
28) Select the “Module Configuration” tab. The following screen appears.
Notice the list of modules in the module configuration area. The first thing we will do is
configure the module in slot 1.
29) Select the “Slot 0” button to open the configuration screen of the analog output
module.
17
The software defaults to the maximum sizes for read (1) and write (14) words which the
module will support. We need to determine how many words we wish to map for our
application. Let’s refer to the manual (pub number 1794-6.5.2) for the flex analog
modules and look at the data mapping inside the module. The following table is copied
from chapter 5 of the manual, which addresses how to communicate on DeviceNet.
There is one possible word we can read and it contains some diagnostic information
about the module. That sounds like a good idea to get, so we will set our read size to 1
18
word. If we examine the write words we can see that only the first 6 words are used
when communicating on DeviceNet. The first four words are used to send the actual data
values to the outputs of the module. The next word contains the enable bits (OE= output
enable) for the 4 analog outputs. The 6th word contains some configuration settings which
will allow us to set the module to use 4-20 mA or 0-10 V, etc. We are going to manually
set the outputs to use 4-20 MA, so we don’t need to write the 6th word. Therefore, we
will set our write size to 5 words. Note that when you decide whether to set the
configuration manually, or include the configuration word as part of the information
being sent on DeviceNet you are making the following tradeoffs:
30) Before entering the sizes, note that channel selections are grayed out.
Now let’s configure the outputs to use 4-20 mA. Note that the “Channel Selection”
options were all set to “Not configured” and were grayed out (you cannot change them).
This is because by default the module expects the configuration data to be downloaded
over DeviceNet. Once we told the module we are going to enter it (by setting the output
size of the module to 5), the channel selections became active.
33) Set all 4 channels to 4-20 mA (by selecting 4-20 mA from the dropdown listbox).
At this point we could configure the 1794-OB16 also. Since it is a simple discrete
module we will use the default settings.
Note that there is additional configuration which can be done to tell the flex I/O what to
do in the event of a mode change on the scanner.
For example, the “Run Æ Fault” setting tells the outputs what to do in the event of a fault
while the scanner is in RUN mode.
36) Change the RUN Æ Fault setting to “Hold Outputs in Last State”
The rest of the settings are OK, so we have completed our configuration of the flex I/O.
19
38) Select “Yes” to the prompt to download the changes to the device.
We have completed the Configuring Devices lab. At this point we have assigned all our
devices node addresses and added them to the network, and then configured each device
to behave how we desire. The next step will be to add the devices to the scanners scan
list (the list that identifies which devices the scanner will communicate to).
20
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
Now that all our devices are on the network and configured, we need to set up the scanner
to communicate with the devices. We identify which devices we wish a particular
scanner to communicate with by entering the devices into that scanners scan list. Once
the devices are in the scan list we then map the information being exchanged between the
scanner and device to specific locations in the scanners memory. The location we
identify for a particular piece of data in the DeviceNet scanner’s memory will correlate
directly to an address in the PLC which will be used when writing a ladder logic
program.
Notice the scanner is at node 0. Let’s give the node a more descriptive name.
1) While the mouse is over node 0 press the right mouse button. A dropdown menu
will appear.
21
3) Change the device information to match the window shown below.
The next thing we will do is identify which slot in the ControlLogix chassis the particular
DeviceNet scanner we are interested in resides (A ControlLogix chassis can have
multiple DeviceNet scanners in it).
22
The available devices on the network are listed on the left and the devices currently in the
scanlist are on the right (none in our case). Since we wish to enter all the devices into the
scanlist all we have to do is select the double right arrow button.
9) Select the double right arrow button to move all the devices into the scanlist.
Now that we have identified which devices we wish to scan, we need to tell the scanner
which memory locations to use for the data being exchanged with each device (map the
devices).
23
Note the “Mapped” column. All of the devices have a “No” to indicate they are not
mapped. So far, we have told the scanner to communicate to the three devices, but we
have not told the scanner what memory areas to use when exchanging data with the
devices. The process of identifying which memory locations will be used to exchange
data with a particular device is known as mapping. We could assign any available
memory location in the scanner to communicate to a particular device, or we can just let
the software automatically pick the memory locations for us by using the auto map
feature.
The software also allows us to select what word to start mapping from. We are going to
map starting with the first word (word 0) so you can leave the “Start Dword” setting as it
is.
There are several ways we can map the nodes as defined by the setting for “Options”.
Note the three choices for “Data Alignment”. The scanner will allow you to map
devices on a byte, word, or double-word boundary. The mapping starts with the lowest
node number and each device is mapped consecutively until all the devices are mapped.
24
The “Byte Align” method will map devices as efficiently as possible down to the byte
level, which means that it may put multiple devices in the same word. For example, node
7 may use the first 8 bits (byte) of word 2 and node 15 may use the second 8 bits of word
2. If you are not concerned with using memory in the most efficient manner you may
wish to map the devices such that only one device will occupy any word, or double word
(Dword). ControlLogix processor memory uses double words (32 bits). Therefore, if you
did not want more than one device to occupy a memory location in the ControlLogix
processor, you would map using the “Dword Align” option. If you map on a Dword
boundary, using the previous example, if node 7 used the first 8 bits of DWord 2, then
node 15 would not be mapped to the second 8 bits of DWord 2, rather it would be
mapped to the first 8 bits of DwWrd 3. The remaining bits in words 2 and 3 would be
unused. Let’s map our devices such that we do not have any devices sharing a DWord.
12) Select “Dword align” to align the devices at double word boundaries (the
ControlLogix system uses double words) then select “OK”.
13) Select all the devices and then select the “Automap” button. your screen should now
appear as follows.
Note the bottom of the screen shows the memory locations in the ControlLogix system
that the various devices will use. In our case, the photoeye inputs will show up in the
ControlLogix processor in word 2 (a double word) for slot 5 at bits 0-7 .
25
The numbers in the map table (i.e. 2,7, and 15) represent the node number that is using
the particular address location. The address location is identified on the left (i.e. I:5.2[L).
In our case, the scanner is using the first 8 bits of word I:5.2 to store the inputs coming
from the photoeye, node 7. The address I:5.2 means inputs (I), for slot 5 (5), word 2 (2).
When we write our ladder program in the ControlLogix processor we will reference this
address location if we want to examine inputs from the photoeye.
Note the “L” and “M” to the right of the address. L stands for “Least significant word”
and M stands for “Most significant word”. Since the ControlLogix system uses 32 bit
words, it takes 2, 16 bit words from the scanner to make up 1, 32 bit word in the
ControlLogix processor. Therefore, you will see the addresses on the left on 2 lines, one
for the first part of the word (the L) and one for the second part of the word (the M).
If you remember from the lab overview we want to be able to push the green button on
the redistation and have the red light go on. Now that we have mapped the devices we
can record the memory locations which are being used to communicate with the
Redistation. The Redistation is node 15. Therefore, if you look at the map table on your
screen, you will see that the redistation uses input addresses I:5.3/00 to I:5.3/07. Write
this address range on line 1 of your worksheet on the first page of the lab.
At this point we have only looked at the input map. Let’s map the outputs.
15) Select all the devices and then select the “Automap” button. The following screen
will appear.
26
Notice that there is no space reserved for node 7, the photoeye, because we are not
sending any outputs to it.
If you are not satisfied with the memory locations the Auto map feature selects you can
always change them. Let’s move the redistation from word 3 to word 4.
16) Select the redistation (node 15) from the node list.
17) Select the “Advanced” button. The following screen will appear.
This screen will allow you to manually map the device to any unused location.
18) In the “Map To” frame, change the value in the “Dword” field to 4.
19) In the “Map To” frame, verify the value in the “Bit” field is 0.
21) Select the “Close” button. Notice how the redistation now shows up in the map table
in Dword 4 (low word).
Let’s record the output information for the redistation. Remember, we ultimately want to
turn on the redistation light. As you can see from the map table, the redistation uses
addresses O:5.4/00 to O:5.4/07. Record this address range on line 2 of your worksheet.
27
We have completed our scanlist entry and mapping. Let’s download the information to
the scanner.
24) Make sure the “All Records” radio button is selected and then select the “Download”
button to save the scan list to the scanner.
25) When the scan list is saved select the “OK” button.
We now have all our devices in the scan list and mapped to specific memory locations.
The next thing we need to do is identify the exact input and output addresses which
reference the specific items we are interested in so we can write the ladder logic.
28
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
At this point we have a working DeviceNet network with a scanner, 3 I/O devices, and a
computer interface. The last thing we need to do is write a ladder program to monitor
and control the devices. However, before we can write the ladder program we must
understand exactly where each item we are interested in is located in memory. For
example, if we reference our worksheet (or the map table) we can see that the inputs
coming from the redistation are located in I:5.3/00 to I:5.3/07. However, at this point we
don’t know which of the eight bit locations (00-07) represent the green start button. We
need to refer to the documentation for a specific device to determine the exact data
locations we are interested in.
1) Examine the information below which is published as part of the redistation manual.
29
The I/O layout for the Redistation is displayed. Note that the redistation uses 1 byte (8
bits) of output data and 1 byte of input data. For our control task, we are interested in
which bit represents the green start button and which bit (or bits) represent the light. If
we look at the input data we can see that bit 1 represents the state of the green start
button, and that the bit will be a “1” when the button is pressed. There is no secret to
knowing this information, it is simply how the manufacturer designed the device to work.
The only way to know this is to have done it before, or refer to the documentation on the
device.
2) Write a “1” on line 3 of your worksheet to identify the start button bit and write a
“1” to identify the on state.
If we examine the output information we can see that bits 0 and 1 are used to control the
state of the light. If we want to turn on the light we will have to set bit 0 to 1 and bit 1 to
0.
3) Write “0&1” on line 4 of your worksheet to identify the light bits and write “bit 0=1,
bit 1=0” to identify the on state.
We now have all the information we need to write the ladder logic.
30
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
LAB 6: Creating the Processor File and Writing the Ladder Logic
The last thing we have to do to complete the control system is to create a project in the
ControlLogix processor and enter the ladder logic rungs needed to control the devices.
We will start by creating a project in the ControlLogix processor.
We are going to create our project offline. When you create a new ControlLogix project
you will need to do it offline and then download it to the Controller. In a ControlLogix
31
system, you must identify all the modules you wish to communicate with in the project.
The only way you can add modules to your project is to do it offline. Once you have
your project created, and all modules identified, you can download the project to the
controller and work online while creating or editing the ladder logic program.
2) Select “File” from the main menu and then select “New” from the dropdown menu.
The following window will appear.
3) Set the parameters in the window to match the ones shown below (note we are going
to use the controller in slot 1).
4) Select the “OK” button. The screen will now appear as shown.
32
We are now ready to add modules to our project. The only module which is required for
our lab is the DeviceNet scanner. Let’s add the scanner.
5) With the mouse over the “I/O Configuration” folder in the project window, press the
right mouse button.
6) Select “New Module” from the popup menu. The following screen appears.
33
7) Select the “1756-DNB” module and select the “OK” button.
8) Fill in the “Module Properties” window to match the one shown below.
Note – make sure you select “Disable Keying” so that the software does not look for
an exact firmware match from the module (we go through many firmware revisions
here in the class).
9) Select the “Finish” button. Note that the DeviceNet scanner now shows up under the
“I/O Configuration” folder in slot 5.
We have now created the project and added the DeviceNet scanner. Let’s download the
project and go online.
10) Select “Communications” from the main menu and then select “Configure” from the
dropdown menu. The following screen will appear.
34
11) Make sure the AB_KT-1 driver is selected (this is the DH+ driver for the 1784-
KTXD cards we have installed in our computers) and the path is set to 0,3,1,1 as
shown in the screen above.
The ControlLogix system makes use of the concept of communications “paths”. These
paths identify how a device can communicate to, or through, a ControlLogix system. In
our case the path can be broken down as follows:
0 – Use DH+
3 – Communicate with node 3 on the network (channel A of the DH/RIO module).
1 – Go through the module and out onto the ControlLogix backplane
1 – Go over to slot 1 (A processor is in slot 1)
We have now set up the software to communicate over DH+ to the ControlLogix chassis
and then to the processor in slot 1.
13) Select “Communications from the main menu and then select “Download” from the
dropdown menu. Respond to any prompts as necessary to download the project.
Once the project is downloaded you will notice the gears icon on the upper middle of the
screen will rotate to signify you are online with active communications. We are now
ready to create our ladder program.
14) Double-click on the “Main Routine” Listing under the “Tasks” folder in the project
window.
The main routine will appear in the program window. Your screen should now look like
the following.
35
Notice that an edit rung appears in the window. We are now ready to add the rung which
will allow us to push the start button and have the light go on.
15) Drag an XIC from the instruction toolbar and drop it on the left side of the edit rung.
Note that when you are in proper position a green dot will appear on the rung to tell
you it is OK to drop the instruction.
XIC
We now have an XIC instruction which tells the processor to examine an input bit to see
if it goes on. Next, we have to tell the processor which input bit we are interested in.
Let’s go to our worksheet to find out where the start button is addressed.
If we look at line 3 we see that the start button is bit 1. If we combine that with line 1,
which says that the redistation uses memory locations I:5.3/00-I:5.3/07, we know that the
start button is at I:5.3/01.
36
16) Write “I:5.3/01” on line 5 of the worksheet.
Do the same thing for the light using lines 4 and 2 of the worksheet. You should get
“O:5.4/00” and “O:5.4/01”.
The final thing we need to do is resolve the exact address we wish to use in the
ControlLogix program. Since a ControlLogix processor can communicate to many
DeviceNet scanners, and the scanners do not have to be in the same chassis as the
processor, the ControlLogix scanner needs a way to tell “which DeviceNet scanner in slot
5” is being referred to. In our case it is the scanner in the same chassis, so a “Local”
designation is added to the address. Additionally, a ControlLogix processor can
exchange different types of data with a module. For example, input data from the
scanner module could be actual inputs which represent the data coming from devices on
the network, or it could be status information about the scanner module itself. In our
case, we are interested in the actual input data, so a “Data” designation is added to the
address. One other thing the ControlLogix does is swap the slot and I/O designation in
the address. Therefore, instead of I:5, the address will show 5:I. If we put it all together
and use the DeviceNet information from line 5 of our worksheet and add in the
ControlLogix items, our ControlLogix address for the start button is
“Local:5:I.DATA[3].1”.
Do the same for the light address. You should come up with “Local:5:O.DATA[4].0”
and “Local:5:O.DATA[4].1”.
For those of you who are used to the PLC-5, or are completely new to ControlLogix, this
addressing may seem a bit confusing at first. Once you get an opportunity to use the
ControlLogix system a little bit the addressing will come easily. Basically, an address
like “Local:5:I.DATA[4].0” simply says “the first bit in the fourth input data word
coming from the module in slot 5 of the local chassis”.
20) Double-click on the “?” in the address area above the XIC instruction. A dropdown
listbox will appear.
37
21) Select the down arrow in the listbox to display the following window.
22) Select the “Controller Scoped Tags” button. The window should now appear as
follows.
You are looking at a list of tags which are available in the controller. The ControlLogix
system makes use of tags when referencing data locations. There is no I/O image table
like there is in a PLC-5. At this point we are attempting to add an address for the XIC
instruction. We want to reference the start button, which we know is at
“Local:5:I.DATA[3].1” from our worksheet.
As discussed earlier, there are different types of input data which can come from a
module. In our case we are interested in the actual data.
26) Select the down arrow next to the address to display the bit selections.
27) Select bit 1. The address should now show above the XIC instruction.
38
28) Press the <enter> key to accept the address. The instruction should now appear as
shown.
OTL
30) Use the steps described above to select the first bit address (Local:5:O.DATA[4].0)
to be used for the output side. Your rung should now look like the following.
Note from our worksheet that we need to turn on bit 0. However, we must also make
sure that bit 1 is off. We will add an output branch to our rung and add an instruction
(output unlatch) to turn off bit 1.
31) Drag and drop a branch on the output side of the rung.
Branch
39
32) Drag the right side of the branch to the opposite side of the OTE so that a path exists
around the OTE. Your rung should now appear as follows.
33) Drag and drop an OTU (output unlatch) on to the new branch.
OTU
34) Set the address for the OTU (which means unlatch, or turn off, the bit) to the bit
which we need to turn off, “Local:5:O.DATA[4].1”.
35) Move the mouse over the “e’s” to the left of the rung and press the right mouse
button.
36) Select “Accept Pending Rung Edit” to accept the rung into the program. Your rung
should now look like the following.
We’re almost there! There is just one last thing you have to do for the ControlLogix
DeviceNet scanner. You have to put the scanner module itself in Run mode. You can
control the mode of the ControlLogix scanner separately from the processor mode. You
can manually set the scanner run mode bit or control it in ladder logic. We will set it
manually.
40
37) Double-click on the “Controller Tags” entry in the project window.
39) Expand the tag name column so you can see the complete tag name. Your screen
should show the tags as shown below.
We are going to send a command to the scanner (go to run mode), not actual output data.
Therefore, we will expand the “Local:5:O.CommandRegister” tag and not the “.DATA”
tag.
41) Expand the tag name field again, if necessary, to display the full tag name. Your
screen should show the tags as shown below.
Notice the first command register is “Run”. We need to set this tag to a “1” to put the
scanner in Run mode.
We are ready to test our system. All we have to do now is put the processor in Run mode
and push the green start button.
43) Use the keyswitch to put the processor in slot 1 in Run mode.
41
44) Press the green start button. The red light should go on.
Congratulations! This may have seemed like a lot of work to simply press a button and
turn on a light. In reality you did a lot more. You have the system set up so that you can
now add logic to perform control functions on any device with minimal additional work.
For example, we will now add a rung which will cause the light to blink when the
photoeye light is blocked.
45) Double-click on “Main Routine” in the project folder to display your ladder logic.
47) With the mouse over the “End” marker to the left of the last rung, press the right
mouse button.
49) Add a second rung to your program (refer to the steps to add the first rung if needed)
which matches the rung shown below.
Notice that the output bits used are the same as in our first rung. The only difference is
we latched them in a different state (both on) to tell the light to blink. This is directly
from the information provided on the redistation. The input address reflects the address
we mapped the photoeye to.
51) Place your hand between the reflector and Photoeye and verify that the light starts to
blink.
That’s it. You are now a DeviceNet guru (or maybe a junior guru). This completes the
core DeviceNet lab session. For those of you finished early or who want an additional
challenge, see the Bonus section which follows.
42
BONUS – if you are done early and want an additional challenge, add a rung which will
turn off the light when the Stop button is pushed (use latches, OTL, and unlatches, OTU,
on the outputs as necessary instead of OTE or OTU).
SUPER BONUS – if you are really bold, see if you can send different values to the
voltmeter based on the setting of the 4 position selector switch. The voltmeter is wired to
the first analog output on the 1794-OE4. The selector switch is wired to the first 4 inputs
of the 1794-IB16. You can set your own values to send to the meter.
43
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
In this lab you will configure a DeviceNet system based on the requirements listed in the
class. There will be no step by step instuctions given to you. Use your newly acquired
DeviceNet knowledge to configure a system and have it perform as described in the class.
When you have configured the system as described in the class you have completed the
lab. Inform the instructor when you are finished so your system can be checked.
44
ROCKWELL AUTOMATION CORE NETWORKS TRAINING
DEVICENET LABS
In this lab the instructor will introduce problems into your DeviceNet system. You will
use your newly acquired DeviceNet expertise to diagnose and solve the problem. For
each problem you will be given a bit of information provided by the “simulated”
equipment operator (the instructor) as to what the problem is. Troubleshoot the system
and inform the instructor when you have solved the problem.
45
SCANNER ERROR CODES
Error Details
Code
70 SDN failed duplicate node check. Another node on
the network has the same node number.
72 The slave node is no longer responding on the
network. The node number blinks after the error
code.
73 The assign keys in the scan list do not match the
vendor type or code of the slave at this node number.
The node number blinks after the error code.
Note: the assign keys can be disabled in the scan list
75 No scan list is active
77 The transmit or receive size in the scan list does not
match what the slave device expects. The node
number blinks after the error code.
78 The slave whose node number blinks after this error
code has never responded to communications from
the scanner.
79 The scanners duplicate node transmission was not
acked. Could be a network wiring problem or no
other device on the network.
80 The processor is in program mode or the run bit in
the command register is not set.
81 The processor is in program mode or the fault bit in
the command register is set.
46
SCANNER ERROR CODES
Error Details
Code
83 Slave device is returning an error response.
Normally happens if the device does not support the
kind of connection being requested (COS, etc.)
84 Scanner is initializing the network communication.
Happens after power up and clears automatically after
the scanner communicates to each device.
86 Idle data being produced in Run mode. The scanner
has received data from a slave in the past, but is now
getting 0 bytes from the slave.
90 The processor is in program mode or the disable bit
in the command register is set.
91 The scanner is bus-off, which means that there were
significant communication errors on the network.
92 No +24 VDC network power to scanner
95 Flash update of scanner, scan list or module
configuration in progress.
97 The processor is in program mode or the HALT bit in
the command register is not set.
E9 The 1747-SDN has been flushed from the command
register. Cycle power to recover.
47
Slave Device Network LED Definitions
48