PLC - Schneider Electric - Quantum Web Embedded Server User Guide
PLC - Schneider Electric - Quantum Web Embedded Server User Guide
Training
Schneider Automation Inc. offers suitable further training on the system.
Hotline
See addresses for Technical Support Centers at the end of this publication.
Trademarks
All terms used in this publication to denote Schneider Automation Inc. products are trademarks of Schneider Automation Inc.
All other terms used in this publication to denote products may be registered trademarks and/or trademarks of the corresponding
corporations. Microsoft and MS-DOS are registered trademarks of Microsoft Corporation. Windows is a brand name of Microsoft
Corporation in the USA and other countries. IBM is a registered trademark of International Business Machines Corporation. Intel is a
registered trademark of Intel Corporation.
Copyright
All rights are reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including copying, processing or by online file transfer, without permission in writing from Schneider Automation Inc. You
are not authorized to translate this document into any other language.
October, 1998
Document Set
The data and illustrations found in this book are not binding. We reserve the right to
modify our products in line with our policy of continuous product development. The
information in this document is subject to change without notice and should not be
construed as a commitment by Schneider Automation, Inc.
Schneider Automation assumes no responsibility for any errors that may appear in
this document. If you have any suggestions for improvements or amendments or
have found errors in this publication, please notify us.
CAUTION
All pertinent state, regional, and local safety regulations must be observed
when installing and using this product. For reasons of safety and to assure
compliance with documented system data, repairs to components should
be performed only by the manufacturer.
Failure to observe this precaution can result in injury or equipment damage.
IBM® and IBM AT® are registered trademarks of International Business Machines
Corp.
Glossary ....................................................................................................... 87
Index ............................................................................................................ 93
Document Scope
This manual will acquaint you with the Quantum Ethernet web embedded server
modules and their parts, tell you how to install them, describe changes you may
make in configuration, review the operation of the modules and provide
maintenance procedures. It also describes how to obtain statistics about the
embedded server module and its controller from the embedded World Wide Web
site. For details regarding the information available on the web site, please refer to
the Web Utility Users Manual, 890 USE 152 00.
This manual is written for an Ethernet user and assumes familiarity with Ethernet
networks. If you are not familiar with Ethernet, please consult your system
administrator before connecting this module to your network.
This manual also assumes that the user is acquainted with Quantum Automation
Series control systems. For information about Quantum products, please refer to
the Quantum Automation Series Hardware Reference Guide, 840 USE 100 00.
The web embedded server module is one of the Quantum series of Ethernet
Modules (NOE). Throughout this manual, any reference to the NOE module is
synonymous with the Ethernet web embedded server module.
Validity Note
For the Ethernet web embedded server module to work properly, you must have
the proper version of other system components. Use the version specified in the
table below or a later version.
Quantum
Embedded Server
Firmware Modsoft Concept ModLink
Version 1.1 2.6 2.1 2.0
Related Documentation
The following manuals may also be helpful. Be sure to order the version specified
or a later version.
The Quantum Ethernet Web embedded server modules make it possible for a
Quantum industrial control system to communicate with devices on an Ethernet
network. For example, the modules can be used to link a Quantum Automation
Series controller to a PC.
Each module contains a World Wide Web server, which allows users to obtain
statistics about the NOE module and its controller from an embedded web site.
The Ethernet network is well supported worldwide, with a wide variety of third party
products and services. TCP/IP is the de facto standard protocol.
The modules may be plugged into any slot in a local Quantum backplane and may
be replaced while the system is running (hot swapped). They come fully configured
and are recognized by the controller as soon as they connect with the backplane.
Note: The web embedded server module must be routed through an Ethernet hub
to function properly. Do not connect it directly to another device.
1.1.2 Models for Fiber Optic and Twisted Pair Cable Systems
Modicon has designed two Ethernet web embedded server modules: one for fiber
optic networks and the other for networks using twisted pair cabling. Both are
covered in this manual.
On the front panel of each Ethernet embedded web server module, you will find an
LED display, a global address label and a cable connector.
LED Display
Removable Door
Kernel
Cable Connector
Link
LED Display
Removable Door
Kernel
Transmit
Cable Connector
Receive
Cable Connector
140
NOE 211 10
Ethernet TCP/IP
Active
Ready Fault
Run Coll
Link
Kernel Appl
Ethernet The Ethernet address or MAC address is assigned at the factory and is recorded
Address Label on a label on the front panel, above the cable connector. This is a unique 48-bit
global assigned address. It is set in PROM. The Ethernet address is recorded on
the label in hexadecimal, in the form 00.00.54.xx.xx.xx.
000054xxxxxx
Internet Protocol The IP address comes from one of three places in the following order:
(IP) Network
Address Label z The configured address
z An address from a BOOTP server
z Derived IP network address
You can use the derived address, which is calculated from the Ethernet address
set by the factory. You can also configure a unique address via Modsoft or
Concept. Throughout this book, these alternatives will be referred to as the derived
IP network address and a user-configured address.
The IP network address has the form xxx.xxx.xxx.xxx, where each group xxx is a
decimal number from 0 to 255. A space is provided for recording this address on
the label inside the front door panel of the module.
If you will be operating on an open network, you should opt for a user-configured
address. Obtain a valid address from your network administrator.
If you will be operating on a local network, you may use the derived IP network
address. However, you should check with your network administrator first to ensure
that this address is not already in use.
To calculate the derived IP network address, convert the rightmost eight digits of
the Ethernet address from hex to decimal. They will take the form 84.xxx.xxx.xxx,
where each group xxx is a decimal number from 0 to 255.
Note: When you have determined which IP network address you will be using,
register it with your system administrator to avoid duplication.
8
Pins
1
For the NOE 211, Schneider Automation recommends that you use Category 5
UTP cabling, which is rated to 100 Mbps, with an RJ-45 connector. You may also
use Category 3 UTP cabling, which is rated to 16 Mbps.
The eight pins are arranged vertically and numbered in order from the bottom to the
top. The RJ-45 pinout used by this module is:
For the NOE 251, you need 62.5/125 micron fiber optic cable with ST-style
connectors. Schneider Automation offers a 3 m cable with connectors (990 XCA
656 09).
This module comes with two fiber cable clasps, tubular plastic tools for installing
the cable.
Included with this manual is a diskette containing two utilities for the Ethernet
module: the Network Options Ethernet Tester utility and the ERRLOG utility.
z establish a connection
z get and clear statistics
z read and write registers
The Network Options Ethernet Tester communicates with the module over the
Ethernet, from an IBM-compatible PC operating with Windows 3.1 or greater and
with WinSock.
Instructions for using the Network Options Ethernet Tester are given in Chapter 6
on page 73.
The source code for the Network Options Ethernet Tester is included on the
diskette.
1.3.2 ERRLOG
This utility allows you to read and clear the crash log from an IBM-compatible PC
communicating with the local Quantum controller via Modbus Plus.
The PC must be equipped with an SA85 Modbus Plus card and software driver.
ERRLOG may be run in a native DOS environment or in a DOS box under
Windows 3.1 or Windows 95.
Instructions for using ERRLOG to read and clear the crash log are given in section
7.1.9 on page 85.
Careful planning of your network can help you achieve optimum performance. You
should consider whether Ethernet meets the demands of your application, which
devices are compatible with your network and how to minimize congestion on the
network.
70000
60000
50000
Total
throughput
registers/ 40000
second
30000
20000
10000
0
2 3 4 5 10 15 20
Concurrent Nodes
Note: This data was measured between Quantum controllers on an otherwise empty LAN
and as such reflects best case operation.
Ethernet network traffic, message length and routing are all variable and can be
unpredictable. This can give rise to congestion and message collisions. When
collisions occur, Ethernet uses a variable delay before retransmitting messages.
Therefore, absolute determinism -- or totally predictable performance -- cannot be
guaranteed on busy Ethernet networks.
1.4.2 Compatibility
Ethernet technology allows devices from different vendors to coexist on the same
network. These devices include hubs, bridges, routers and gateways. However, for
these devices to be compatible they must support the same set of protocols.
Quantum Ethernet modules support Modbus protocol over TCP/IP over Ethernet
protocol. Systems that wish to communicate with Quantum Ethernet web
embedded server modules need to support this protocol stack.
Ethernet The Modbus protocol was chosen for its particular suitability for the real time
Developers Kit control environment. It is a well-known and widely-adopted protocol and is fully
described in the Ethernet Developers Kit. This kit (140 EDK 211 00) helps users
develop Ethernet-based communications to their own host (PC-based) sockets
applications. It contains a Quantum Ethernet module plus documentation and
software tools which fully explain the protocols. The Ethernet Developers Kit is
available from your distributor or local Square D office.
Ethernet and Ethernet web embedded server modules may be installed in a hot standby system,
Quantum Hot but they are not supported at switchover. When control shifts from the primary
Standby controller to the standby, the Ethernet network is not notified. The network
Systems continues to address the Ethernet web embedded server module in the original
primary rack, not the module in the new primary rack.
EMBP Gateway A Quantum Ethernet web embedded server module can exist on the same Ethernet
network as the EMBP Gateway, but it cannot communicate with the EMBP
Gateway because of differences in formatting and network addressing. However,
the MBT Ethernet Bridge can be used with the web embedded server module (refer
to Modbus Plus to Ethernet Bridge Users Guide, 890 USE 151 00).
Segregating The best method to protect Quantum Automation traffic from information systems
Traffic traffic is to provide a completely separate physical network for automation control.
Another method is to use readily available Ethernet devices such as bridges and
routers to logically segment the network, isolating office traffic from control data.
Minimizing Components such as repeaters, bridges, routers and hubs take a finite time to
Delays process each message. If messages pass through many of these devices,
processing delays will accumulate. Delay times are available from device
manufacturers. Check with your network administrator to quantify the effect on
control messages and to determine whether it will be significant for your
application.
Using Switches Ethernet switches can be used to ensure higher network performance. These
newer devices allow each connection to have access to the full 10 Mbps bandwith
instead of having to share the bandwith with all other nodes. They reduce the
timing problems associated with Ethernet collisions and the resulting “back off”
transmission delays. Check with your network administrator to see if your
application would benefit from switching Ethernet devices.
Quantum Ethernet web embedded server modules come fully configured. They are
designed to go straight from the box to the backplane. But before you install your
module, you must verify that:
CAUTION
DUPLICATE ADDRESS HAZARD
The default configuration includes the IP network address. Do not connect this module to
your network until you have ensured that its IP address will be unique on the network.
Failure to observe this precaution can result in injury or equipment damage.
Consult your network administrator to see if any of these conditions apply. If they
do, follow the directions on page 20 for changing the default configuration.
Note: If you will be changing the default configuration, you should stop the
controller, then install the module, then change the configuration before starting the
controller again.
The Ethernet web embedded server module only reads its configuration data at
power-up and when it is reset. Whenever the configuration data is changed, the
module must be reset, either by hot swapping or through a reset command in the
MSTR block (see page 37). Once the module is installed, stopping and restarting
the controller will not reset it.
NOE NOE
Hub
The Ethernet web embedded server module comes fully ready to be installed.
Installation consists of mounting the module on the backplane and connecting the
cable.
Modicon also recommends that you test to be sure your Ethernet cabling is working
properly before connecting it to the Ethernet module. Some suppliers of testing
equipment are listed in Appendix D.
Module
Hooks
I/O Bus
Connector
Tighten the screw at the bottom of the module to fasten it to the backplane. The
maximum tightening torque for this screw is 2-4 in-lbs (.23 - .45 Nm).
Fiber Optic Use 62.5/125 fiber optic cable with ST-style connectors. Modicon sells a 3 m cable
with connectors (990 XCA 656 09).
Remove the protective plastic coverings from the cable ports and the tips of the
cable. Snap one of the fiber cable clasps onto the cable, carefully pressing the
cable through the slot so that the wider end of the clasp is closest to the boot.
The key to installing the cable is to align the barrel, the locking ring and the
connector.
Key Barrel
Arrow Groove
Turn the locking ring to align an arrow with the key. Then align the key with the
keyway. As a result, the locking tab, groove and lock should also be aligned.
Slide the clasp up to the locking ring. Gripping the cable with the clasp, plug the
cable into the lower (receive) cable connector. If it does not connect easily, realign
the key with the arrow and try again.
Connector
Locking Tab
Keyway
Locking Ring
Turn the cable to the right, so that the tab locks securely. You may leave the fiber
cable clasp on the cable for future use, but slide it off the boot of the cable to allow
the module door to close.
Repeat this process with the remaining strand of cable and the upper (transmit)
cable connector.
When connecting the cable to the hub, make sure that the strands are crossed. The
transmit port of one device should be linked to the receive port of the other.
If any of the following conditions apply, you should stop the controller, then install
the module, then change the default configuration before starting the controller
again:
From the Modsoft Configuration Overview screen, select the Cfg Ext pulldown
menu.
Be sure that you have specified sufficient memory resources for the Ethernet
configuration extension in the Cfg. Extension Size field. The first Ethernet module
configured requires 20 words. Each additional module requires an additional 16
words.
From the options, select TCP/IP Setup. You will reach the Ethernet configuration
extension screen.
modsoft
If you are using the configuration extension to change the framing to IEEE 802.3,
do not forget to designate the backplane slot number on the next line. Without the
slot number, the system will not record the change in framing.
Note: If you do not enter the slot number, the system will ignore any other data
you enter on this screen.
A space is provided for recording the IP network address on the label inside the
front door panel.
If you input the address before installing the module or if you hot swap the module,
it will automatically recognize the address you have already specified and will
identify itself accordingly.
CAUTION
DUPLICATE ADDRESS HAZARD
Be sure to register the module’s IP network address with your system administrator to avoid
duplication.
Failure to observe this precaution can result in injury or equipment damage.
Note: If you are using the configuration extension to change the IP network
address, you also must input the backplane slot number. Without the slot number,
the system will not recognize your changes.
Note: If you are using the configuration extension to assign a gateway address
and subnet mask, remember to input a slot number as well. The slot number is
required to activate the configuration extension.
The first Ethernet web embedded server module configured requires 20 words of
memory. Each additional module requires an additional 16 words of memory.
The modules may be placed in any slot in the backplane. They do not have to be
placed next to each other.
Once the Ethernet web embedded server module has been installed in the
backplane and you have consulted your network administrator about whether to
change the IP address or framing or to specify a gateway or subnet mask:
1. Open the Concept project without connecting to the controller. The controller
and I/O should be configured.
2. Set the number of Ethernet modules in the configuration extension.
3. Enter each Ethernet module in the I/O map.
4. Fill in the parameter dialog box for each Ethernet module.
3.1 Introduction
All NOE 2X1 10 Quantum Ethernet web embedded server modules provide the
user with the capability of transferring data to and from nodes on a Modbus Plus or
TCP/IP network through the use of a special MSTR (master instruction). All PLCs
that support networking communication capabilities over Modbus Plus and
Ethernet can use the MSTR ladder logic instruction to read or write controller
information.
3.2.1 Characteristics
Size Three nodes high
PLC z Standard in PLCs that have built-in Modbus Plus capabilities (Modbus Plus
Compatibility functionality only)
z Standard in all Quantum PLCs with Modbus Plus functionality and/or TCP/IP
Ethernet option modules
z Available as a loadable in chassis mount PLCs (Modbus Plus functionality
only)
Opcode BF hex
3.2.2 Representation
z the output from the top node echoes the state of the top input - it goes ON
while the instruction is active
z the output from the middle node echoes the state of the middle input - it goes
ON if the MSTR operation is terminated prior to completion or if an error occurs
in completing the operation
z the output from the bottom node goes ON when an MSTR operation has been
completed successfully
z all outputs are zero indicates four MSTR instructions are already in progress
Top Node The 4x register entered in the top node is the first of several (network dependent)
Content holding registers that comprise the network control block. The control block
structure differs according to the network in use. For the TCP/IP Ethernet network
the control block structure is as follows:
Register Content
Identifies one of ten MSTR operations legal for TCP/IP
Displayed
(1 ... 4 and 7 ... 12).
First implied Displays error status.
Second implied Displays length (number of registers transferred).
Third implied Displays MSTR operation-dependent information.
Fourth implied High byte: Destination index.
Low byte: Quantum backplane slot address of the web
embedded server module.
Fifth implied Byte 4 of the 32-bit destination IP Address.
Sixth implied Byte 3 of the 32-bit destination IP Address.
Seventh implied Byte 2 of the 32-bit destination IP Address.
Eight implied Byte 1 of the 32-bit destination IP Address.
Middle Node The 4x register entered in the middle node is the first in a group of contiguous
Content holding registers that comprise the data area. For operations that provide the
communication processor with data such as a Write operation, the data area is the
source of the data. For operations that acquire data from the communication
processor, such as a Read operation, the data area is the destination for the data.
In the case of the Ethernet Read and Write CTE operations (see sections 3.2.11
and 3.2.12), the middle node stores the contents of the Ethernet configuration
extension table in a series of registers.
Bottom Node The integer value entered in the bottom node specifies the length - the maximum
Content number of registers in the data area. The length must be in the range 1 ... 100.
TCP/IP Ethernet An error in an MSTR routine over TCP/IP Ethernet may produce one of the
Error Codes following errors in the MSTR control block:
An error on the TCP/IP Ethernet network itself may produce one of the following
errors in the MSTR control block:
CTE Error Codes The following error codes are returned if there is a problem with the Ethernet
configuration extension table (CTE) in your program configuration.
Control Block The registers in the MSTR control block (the top node) contain the Read or Write
Utilization information as described in the following table:
Control Block The registers in the MSTR control block (the top node) contain the Get Local
Utilization Statistics information as described in the following table:
Control Block The registers in the MSTR control block (the top node) contain the Clear Local
Utilization Statistics information as described in the following table:
The remote comm processor always returns its complete statistics table when a
request is made, even if the request is for less than the full table. The MSTR
instruction then copies only the amount of words you have requested to the
designated 4x registers.
Control Block The registers in the MSTR control block (the top node) contain the Get Remote
Utilization Statistics information as described in the following table:
Control Block The registers in the MSTR control block (the top node) contain the Clear Remote
Utilization Statistics information as described in the following table:
Control Block The registers in the MSTR control block (the top node) contain the information for a
Utilization Peer Cop Health operation as described in the following table:
Fifth ... Eighth Destination Each register contains one byte of the 32-bit IP
implied address.
Peer Cop The peer cop communications health table (shown below) comprises 12
Communications contiguous register that can be indexed in an MSTR operation as words 0 ... 11.
Health Status Each bit in each of the table words is used to represent an aspect of
Information communications health relative to a specific node on the TCP/IP network:
z The bits in words 0 ... 3 represent the health of the global input communication
expected from nodes 1 ... 64. Since global input is not supported these bits are
set to zero.
z The bits in words 4 ... 7 represent the health of the output from a specific node.
z The bits in words 8 ... 11 represent the health of the input to a specific node.
Type of Word
Bit-To-Network Node Relationship
Status Index
Global
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Input
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Specific
4 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Output
5 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
6 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
7 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
Specific
8 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Input
9 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17
10 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
11 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49
The state of a peer cop health bit reflects the current communication status of its
associated node:
z A health bit is set when data is successfully exchanged with its corresponding
node.
z A health bit is cleared when no communication has occurred with the
corresponding node within the configured peer cop health time-out period.
z All health bits are cleared at PLC start time. The health bit for a given node is
always zero when its associated peer cop entry is null.
z All global health bits are always reported as zero.
Control Block The registers in the MSTR control block (the top node) contain the Reset Option
Utilization Module information as described in the following table:
Control Block The registers in the MSTR control block (the top node) contain the Read CTE
Utilization information as described in the following table:
CTE Display The values in the Ethernet configuration extension table (CTE) are displayed in a
Implementation series of registers in the middle node of the MSTR instruction when a Read CTE
operation is implemented. The middle node contains the first of 11 contiguous 4x
registers. The registers display the following CTE data:
Control Block The registers in the MSTR control block (the top node) contain the Write CTE
Utilization information as described in the following table:
CTE Display The values in the Ethernet configuration extension table (CTE) are displayed in a
Implementation series of registers in the middle node of the MSTR instruction when a Write CTE
operation is implemented. The middle node contains the first of 11 contiguous 4x
registers. The registers display the following CTE data:
Word Meaning
00 ... 02 MAC address
03 Board Status
04 and 05 Number of receiver interrupts
06 and 07 Number of transmitter interrupts
08 and 09 Transmit _ timeout error count
10 and 11 Collision_detect error count
12 and 13 Missed packets
14 and 15 Memory error
16 and 17 Number of times driver has restarted lance
18 and 19 Receive framing error
20 and 21 Receiver overflow error
22 and 23 Receive CRC error
24 and 25 Receive buffer error
26 and 27 Transmit silo underflow
28 and 29 Late collision
30 and 31 Lost carrier
32 and 33 Number of retries
34 and 35 IP address
4.1 Introduction
Each Ethernet web embedded server module contains a World Wide Web server.
Pages on the embedded web site display:
Before you can access the module’s home page, you must learn its full IP address
or URL from your system administrator. Type the address or URL in the Address or
Location box in the browser window which will then bring Schneider’s web utility
home page onto the screen. (See Figure 17.)
Select “Diagnostics and Online Data Editor” from the web utility home page to bring
the Quantum Web utility page onto the screen. (See Figure 18.)
The Quantum web utility page contains hyperlinks to seven pages of data:
5.1 Introduction
If it will be acting as a client -- that is, initiating transactions on the network for its
Quantum controller -- then you must program an MSTR block in ladder logic.
For details about the MSTR block, please refer to Chapter 3 on page 25.
The Ethernet module may also act as a server, responding to requests and
commands from devices on the network for its Quantum controller.
The Network Options Ethernet Tester utility allows you to get and clear statistics
and to read and write registers over the network, using a Windows-based PC.
You may also create your own program using the Ethernet module as a server. For
guidance in creating your own program, refer to Appendix B on page 65.
Note: In its capacity as server, the Ethernet module can only accept 20
connections at any one time. If a new connection is attempted and the server has
already reached its limit, it will terminate the least used connection in order to make
room for the new one.
Clear statistics
Get statistics
Write register
Read register
Disconnect
Connect
Create new connection
From the initial menu, select File and choose New from the options in the pulldown
menu or click on the new connection button in the toolbar.
Type the module’s IP network address or host name in the box provided. Click the
OK button. This dedicates a connection from your PC to the designated Ethernet
module and brings you to the main menu.
(module address)
(module address)
(module address)
To activate the connection, select Management and choose Connect from the
pulldown menu or click on the connect button in the toolbar.
When you are ready to disconnect, select Management and choose Disconnect
from the pulldown menu or click on the disconnect button in the toolbar.
You may establish several connections with the same module or with other
modules by selecting New from the File pulldown menu or by clicking on the create
new connection button in the toolbar. Each connection has its own window within
the main window. The Window pulldown menu gives you options for arranging
connection windows and allows you to select one. The options available on the
pulldown menus and toolbar in the main window apply to the selected connection.
After disconnecting from one module, you may reassign its dedicated connection
by selecting Management and choosing Set IP Address from the pulldown menu.
Type the new IP network address or host name in the box provided.
To get statistics from the Ethernet module, select Messages and choose Get
Statistics from the pulldown menu or click on the get statistics button in the
toolbar.
The polling interval is the number of seconds between transactions. Type a polling
interval in the box provided and click OK. Complete statistics for the module will be
printed in the window for this connection.
Similarly, to clear statistics, select Messages and choose Clear Statistics from the
pulldown menu or click on the clear statistics button in the toolbar.
Type a polling interval in the box provided and click OK. The first line in the
statistics, total transaction count, indicates how many transactions have been
completed.
To change the polling interval without interrupting communication with the Ethernet
module, select Messages and choose Poll Interval. Type the new polling interval
in the box.
The Network Options Ethernet Tester will provide the following statistics:
z MAC Address.
z Receive Interrupts and Transmit Interrupts. The number of times the PCNET
controller chip has generated interrupts.
z Transmit timeout errors. The number of times the transmitter has been on the
channel longer than the interval required to send the maximum length frame of
1519 bytes. This is also known as a babble error.
z Collision errors. The number of collisions detected by the Ethernet chip.
z Missed packet errors. The number of times a received frame was dropped
because a receive descriptor was not available.
z Memory errors. The number of times an Ethernet controller chip experienced
an error accessing shared RAM. A memory error will cause a restart.
z PcNet restart count. The number of times the Ethernet controller chip was
restarted due to fatal runtime errors, including memory errors, transmit buffer
errors and transmit underflow.
z Framing error. The number of times an incoming frame contained a non-
integer multiple of eight bits.
z Overflow errors. The number of times the receiver has lost part or all of an
incoming frame, due to an inability to store the frame in memory before the
internal FIFO overflowed.
z CRC errors. The number of times a CRC (FCS) error was detected on an
incoming frame.
z Receive buffer errors. The number of times a receive buffer was not available
while data chaining a received frame.
z Transmit buffer errors. The number of times the end packet flag on the current
buffer was not set and the Ethernet controller did not own the next buffer. A
transmit buffer error causes a restart.
z Silo Underflow. The number of times a packet was truncated due to data late
from memory. A Silo Underflow will cause a restart.
z Late Collision. The number of times a collision was detected after the slot time
of the channel had elapsed.
z Lost Carrier. The number of times a carrier was lost during a transmission.
z Transmit retries. The number of times the transmitter has failed after 16
attempts to transmit a message, due to repeated collisions.
These statistics also may be obtained from the MSTR block. Refer to the Ladder
Logic Block Library User Guide for details.
To read registers, select Messages and chose Read Registers from the pulldown
menu or click on the read register button in the toolbar.
Type in a polling interval, the first 4x register you want to read and the number of
registers to read. The polling interval is the number of seconds between
transactions. When typing the 4x register number, omit the leading 40 or 400, as in
Figure 23 above.
Click OK. The register values will be displayed in the window for this connection.
Five values will be listed in each row, with the number of the first register at the
beginning of the row.
To write registers, select Messages and choose Write Registers from the
pulldown menu or click on the write register button in the toolbar.
Type in a polling interval, the first register you want to write, the number of registers
to write and data to be written to those registers. The polling interval is the number
of seconds between transactions. When typing the 4x register number, omit the
leading 40 or 400, as in Figure 24 below.
If you select the Increment Write Data box, the value of the data you have entered
will be increased by one with each transaction. The write data will be displayed in
the window for this connection.
To change the polling interval without interrupting communication with the Ethernet
module, select Messages and choose Poll Interval. Type the new polling interval
in the box.
If you try to read or write registers and an error occurs, the NOE Tester will display
a Read Request Error or Write Request Error. The error codes correspond with
MSTR block error codes. For more information, refer to the Ladder Logic Block
Library User Guide.
140
NOE 211 10
ETHERNET TCP/IP
Active
Ready
Run
Link
The Run indicator will flash. The Coll LED also may flash, indicating that collisions
are occurring on the Ethernet network. Such collisions are normal.
If a fault has occurred, the normal LEDs may be extinguished or other indicators
may light. This section will discuss errors reported by the Active, Ready, Coll,
Link, Kernel, Appl and Fault indicators.
For each type of error, try the suggested remedies in the order given. If no remedy
suggested here overcomes the error, consult your Schneider Automation customer
representative.
Certain error codes are recorded in the MSTR block. For instructions on how to
read and interpret those codes through Modsoft, please refer to MSTR Function
Error Codes on page 28.
Troubleshooting 1. Make sure the Ethernet web embedded server module and the controller are
installed properly. Verify that the controller is functioning.
If the controller is not functioning, replace it. If neither the new controller nor the
Ethernet module will function, replace the backplane.
2. Make sure that no more than two network option modules -- including NOE,
NOM, NOP and CRP 811 modules -- have been installed in the backplane with
a 140 CPU 113 or 213; no more than six network option modules with a 140
CPU 424, 434 or 534.
3. Check the version of the controller executive. You must have version 1.1 or
greater to support the Ethernet web embedded server module. Earlier versions
do not recognize the module.
4. Replace and return the faulty Ethernet web embedded server module.
Troubleshooting 1. Make sure that power has been applied to the backplane.
2. Replace and return the faulty Ethernet web embedded server module.
Troubleshooting 1. Make sure that the cable has been installed correctly and the module is
functioning properly.
2. Verify that the hub is working properly.
In either case, download a new software image, using the procedure on page 61.
140
NOE 211 10
ETHERNET TCP/IP
Active
Fault
Link
Appl
The Fault LED will flash briefly following an error as the module attempts to
recover. The Fault indicator will remain on only when the error log is full (the error
log has space for 1023 entries). In that case, the module will be unable to recover.
Use the ERRLOG utility to clear the error log, as described on page 57.
140
NOE 211 10
ETHERNET TCP/IP
Active
Ready
Coll
Troubleshooting 1. Make sure the cable has been installed properly and is working properly.
2. Verify that the Ethernet hub is functioning properly.
140
NOE 211 10
ETHERNET TCP/IP
Active
Ready
Run Coll
Link
If the Coll LED is flashing, the module is reporting collisions on the Ethernet
network. While such collisions are normal, the frequency of the flashes is an
indication of the volume of traffic on the network. The flashes may be so frequent
that the LED appears to be shining steadily. Heavy traffic will slow communications.
If response time is important to your application, you should consider segmenting
your network to reduce the frequency of collisions.
You may read the error log while the controller is running or stopped, using the ER-
RLOG utility. However, if you plan to clear the error log, you must stop the controller
first. During the program, ERRLOG will ask you whether you want to stop the con-
troller. If you respond yes, it will stop and restart the controller for you.
CAUTION
PROCESS INTERRUPTION
Do not stop the controller unless it is safe to stop the operations it is controlling. When a
controller is stopped, all operations under its control will also stop.
Failure to observe this precaution can result in injury or equipment damage.
To read the error log, at the DOS prompt in the appropriate directory, type:
where <routing path> is the Modbus Plus address of the Quantum PLC
<slot> is the slot number of the Ethernet web embedded server module.
[/ny] is optional and specifies the Modbus Plus adapter number to use, y.
The default is 0.
Example ERRLOG 49 1
This is the minimum command. It will display the error log of the Ethernet web
embedded server module in slot 1 of the controller at Modbus Plus address 49.
This will display the error log of the Ethernet web embedded server module in slot 4
of the controller at Modbus Plus address 49.50. It will display debug information,
use software interrupt 5d and use Modbus Plus adapter number 1. The output will
be redirected to a file named TRACE.OUT.
Next, it will list the number and date of the Quantum Ethernet web embedded
server firmware version.
Then, for each entry in the error log, ERRLOG will display the following information:
For hardware exceptions, the file name and line number will be replaced by the
hardware exception vector number in decimal.
If you have requested debug messages, ERRLOG will also display the Modbus
messages and responses between the controller and the PC.
Record the information in the entry and report it to your Schneider Automation
customer representative.
If you do not want to clear the log, enter the default N. If you want to clear the log,
type Y. If you enter Y, ERRLOG will ask:
Again, enter Y or N. Remember that the controller must be stopped before you can
clear the log.
If you enter Y, ERRLOG will stop the controller and clear the log. Then it will
prompt:
You may replace your Ethernet web embedded server module while the controller
is running. However, you should first make sure that the IP network address of the
replacement module will be unique on your network.
The new Ethernet module will inherit any configuration changes you had made. If
the original Ethernet module was given a user-configured address, the new module
will assume that address. If you will be using the default address, check with your
system administrator to ensure that address is not already in use on your network.
To hot swap the module, simply disconnect the cable and remove the old module
from the backplane. Then insert the new module in the slot and reconnect the
cable.
If you are replacing the module because it failed, be aware that you may have lost
several transactions. These transactions are not captured in memory and cannot
be recovered by the new module.
From time to time, Schneider Automation may release improved versions of the
Quantum Ethernet embedded server firmware. These new software images may
be downloaded through Modsoft using the following procedure.
Now you must specify which PLC is controlling the Ethernet web embedded
server module and the backplane slot (head) number for that module.
4. Modsoft will prompt you for the filename of the executive. It is referring to the
new software image. Load the diskette with the file in the floppy drive and type
the drive designation and filename in the space provided, separated by a
colon, ie. a:\filename.ext.
5. Restart the controller.
Communication Ports
Ethernet ports transmit and receive Modbus commands encapsulated in TCP/IP protocol:
TCP/UDP system port number 502 used with ASA protocol_id of 0
NOE 211 10 1 10BASE-T Ethernet network (RJ-45) port
NOE 251 10 1 10BASE-FL Ethernet network (ST-style) port
Power Dissipation 5W
Bus Current Required 1A
Operating Conditions
Temperature 0 to 60°C
Humidity 0 to 95% Rh noncondensing @ 60°C
Altitude 15,000 ft (4500 m)
10-57 Hz @ 0.0075 mm d.a.
Vibration
57-150 Hz @ 1 g
Storage Conditions
Temperature -40 to +85°C
Humidity 0 to 95% Rh noncondensing @ 60°C
Free Fall 1 m unpackaged
Shock 3 shocks / axis, 15 g, 11 ms
B.1 Introduction
This appendix describes the design of the sample TCP/IP application named
Network Options Ethernet Tester (NOET). The NOET application is a multiple
document interface windows application that verifies the installation of the
Quantum Ethernet TCP/IP module and also serves as a sample application for
developers.
B.2 References
B.3 Overview
z Calls the window socket function send to transmit the request to the remote
node.
z Calls the window socket function recv to receive the response from the remote
node.
z Calls the window socket function closesocket to close the connection and
release the socket.
The winsock.lib import library provided by the installation is used to link the window
socket calls.
The sample application was developed with Microsoft Visual C++, version 1.52.
The sample application uses Microsoft Foundation Class. The initial application
was generated by the Visual C++ application wizard.
9. CReadDlg. The CReadDlg class is the dialog class for determining the
registers to read. It is derived from the CDialog class. The declaration is in the
readdlg.h file, and the implementation is in the readdlg.cpp file. Both of these
files were generated by The Visual C++ class wizard.
10. CWriteDlg. The CWriteDlg class is the dialog class for determining the
registers to write and the write data. It is derived from the Cdialog class. The
declaration is in the writedlg.h and the implementation is in the writedlg.cpp file.
Both of these files were generated by The Visual C++ class wizard.
11. CAboutDlg. The CAboutDlg class is the dialog class for about. Both the
declaration and its implementation are in the sam_app.cpp file.
The CSample_doc (the document class) contains the user data used by the
CSample_View class. The user data consists of the remote node’s IP address, the
transaction type and its associated values. The different transaction types are read
register, write register, clear statistics, and get statistics. In addition to the
transaction type and the associated values, the document class also contains the
poll interval.
A user modifies the user data via a menu or tool bar. The CSample_doc processes
the menu or tool bar window command message by invoking the corresponding
dialog. The state of the various menu items and tool bar buttons depends on the
connection state between the application and the remote node. The
CSample_View class maintains the connection state, and hence sets the state of
the menu items and tool bar buttons.
The CSample_View allocates and sets the socket attributes. The attributes it sets
are given in the following table.
The window socket interface provides the WSAAsyncSelect function which notifies
the window of network events. The member function tcpip_setsocket_options calls
WSAAsyncSelect function. The different events are given by the following table.
Event Description
FD_READ A socket can read data
FD_WRITE A socket can write data
FD_OOB A socket can read out of band data
FD_CONNECT A connect response has been received
FD_CLOSE The connection has been closed
z Invoke Identifier. This two byte field associates a request with the response.
The client application picks the invoke identifier, and server returns the same
invoke identifier in the response.
z Protocol Type. This two byte field identifies the protocol type. Currently, the
only protocol supported is Modbus.
z Command Length. This two byte field is the size of the rest of the message.
z Destination Identifier. This one byte field is reserved for future use.
The Modbus message follows the header. The message does not contain the
address field, instead, the first byte is the Modbus function code.
The data structure for the header is declared in modbus.h and the CSample_View
encode_header function encodes the header. The member functions
encode_clear_stats, encode_read_stats, encode_read_rq, and encode_write_rq
encode the corresponding Modbus messages.
B.8 Timers
If the remote node is an IP address, or if it’s a name that has been resolved, then
CSample_View tcpip_connect_rq function is called to initiate a connect request to
the remote node. The listen port for the connect request is five hundred and two,
and is defined by the constant MBAP_LISTEN_PORT in modbus.h. If
tcpip_connect_rq succeeded in initiating a connect request, then tcpip_connect_rq
changes the transmit state to CONNECTING, otherwise it changes the transmit
state to IDLE.
The window sockets DLL generates a FD_CONNECT event which indicates if the
connect request succeeded or failed. CSample_View OnTcpIpConnect function
processes the FD_CONNECT event. If the connect request succeeded,
OnTcpIpConnect changes the transmit state to CONNECTED, otherwise it
changes the state to IDLE.
The receive state machine (which is described below) processes the response to a
request. When the receive state machine has completed receiving the response, it
changes the transmit state machine from the TX_DONE state to the WAIT_TO_TX
state.
The receive state machine receives a response to a transaction by first reading the
header, determining the size of the rest of the message, and then reading the body
of the message. The different states of the receive state machine are as follows.
The receive state machine maintains a variable which is the number of bytes
received. Initially the receive state machine is in the RX_HEADER state, and the
number of bytes received is zero.
If upon return, the number bytes received is the same size as the header size, then
the header has been received. OnTcpIpRead sets the number of bytes received to
zero, and the receive size is obtained from the header. These two values will be
used the next time rx_msg is called. OnTcpIpRead also obtains the transaction
identifier and the protocol type from the header. If the transaction identifier
matches the transmit request identifier and the protocol type is MODBUS, then
OnTcpIpRead changes the receive state to RX_BODY. However if either
transaction identifier does not match or the protocol is not MODBUS, then
OnTcpIpRead changes the receive state to DUMP_BODY.
If upon return the number of bytes received is the same as the receive size, then
OnTcpIpRead has read the response to a transaction. OnTcpIpRead saves the
results and invalidates the client area which causes the results to be display.
OnTcpIpRead also changes the transmit state to WAIT_TO_TX, and resets the
state receive state machine by setting the state to RX_HEADER and the number of
bytes received to zero. It then returns.
If upon return the number of bytes received is the same as the receive size, the
OnTcpIpRead has completed reading the message. Since this message does not
correspond to an transaction, the only processing OnTcIpRead performs is
resetting the receive state machine.
The member function rx_msg calls the window socket recv function to read data.
The recv function either returns a non negative number that is the number of bytes
read or it returns an error. If the number bytes read is zero, then the connection no
longer exits, and rx_msg closes the socket, and sets the transmit state to IDLE. If
the recv function returns the error indicating that no receive data is available, then
rx_msg just returns. For any other recv function error, rx_msg closes the socket,
and sets the transmit state to IDLE.
CSample_View m_display member indicates the display type. The different types
of the displays and the CSample_View member functions for showing the display
are as follows.
1. Displaying the connection state. The different connection states displayed are
IDLE, RESOLVING NAME, and CONNECTING. ConnPaint member function
displays the connection state.
2. GetStatsPaint member function displays the results of a get statistics request.
3. ClearStatsPaint member function displays the results of a clear statisitics
request.
4. ReadRegPaint member function displays the results of a read register request.
5. WriteRegPaint member function displays the results of a write register request.
MFC architectual framework calls CSample_View OnDraw member function to
process the window WM_PAINT message. OnDraw examines m_display member
variable and calls the corresponding member function described in the previous
paragraph. Whenever CSample_View needs to display a result, it calls Cview
Invalidate function which causes a WM_PAINT message.
CSample_View is derived from MFC CScrollView class. This class handles the
scroll logic. To perform the scroll logic, CScrollView requires the size of the
document. It is informed of the document size via its SetScrollSizes member
function.
C.1 Introduction
For more information, consult the Modbus Protocol Reference Guide (PI-MBUS-
300).
The header is seven bytes long and includes the following fields:
len [2 bytes] the len field is a byte count of the remaining fields and
includes the dst_id and data fields
data [n bytes] this is the service portion of the Modbus pdu, mb_pdu
and is defined below
The service portion of the Modbus Application Protocol, called mb_pdu, contains
two fields:
The size and content of the data field are dependent on the value of the function
code.
Here are the values for a sample mbap_pdu for reading a register:
00 01 00 00 00 06 01 03 00 00 00 01
inv_id 00 01
proto_id 00 00
len 00 00
dst_idx 01
func_code03
data 00 00 00 01
Data access Read/write both discrete and analog data values from PLC register files.
Online Services make relatively minor alterations to ladder logic programs with a highly
programming controlled introduction of these changes into the executing program.
Image download/ Image download services support the downloading of a ladder logic control
upload program to the PLC. Image upload services support the uploading of a ladder logic
control program from a PLC to PC host for archival/backup purposes.
Configuration Configuration services allow the user to define parameter values which affect the
PLC’s register files, I/O map, communication port configuration and scan attributes,
to name a few.
Device execution The class of service allows the user to start/stop the PLC scan execution. These
state control services require the user to be in an application login context which is obtained
through other Modbus services.
The Modbus Application Protocol PDU is transmitted over a TCP/IP Ethernet stack.
Both Ethernet II and IEEE 802.3 framing will be accommodated. Ethernet II
framing is the default.
*the snap hdr (sub network access protocol) allows the older style
Ethernet protocols to run on the newer IEEE 802.2 interface. The
ethertype parameter indicates the service, ex. ip or arp. IP has a value
0x800.
The mbap_pdu is the Modbus Application Protocol whose messages are received
at a well-known port. The current maximum size of the mbap_pdu for this class of
services in 256 bytes.
len[2 bytes] the len field is a byte count of the remaining fields and
includes the dst_id and data fields.
data[n bytes] this is the service portion of the Modbus pdu, mb_pdu, and is
defined below
The service portion of the Modbus Application Protocol, called mb_pdu, contains 2
fields:
data[n bytes] this field is function code dependent and usually contains
information such as variable references, variable counts, and data offsets.
The size and content of the data field are dependent on the value of the function
code.
C.3.1 Broadcast/Multicast
Although broadcast and/or multicast are supported by both IP network address and
IEEE 802.3 MAC address, the Modbus Application Protocol does not support either
broadcast or multicast at the application layer.
[1] ANSI/IEEE Std 802.3-1985, ISO DIS 8802/3, ISBN - 0-471-82749-5, May 1988
[2] ANSI/IEEE Std 802.2-1985, ISO DIS 8802/2, ISBN 0-471-82748-7, Feb 1988
[4] RFC 791, IP (Internet Protocol) DARPA Internet Protocol Specification, Sep
1981
[5] RFC826, An Ethernet Address Resolution Protocol (ARP), David Plummer, NIC
Sep 1982
[6] RFC1042, A Standard for the Transmission of IP Datagrams over IEEE 802.2
Networks, Postel & Reynolds, ISI, Feb 1988
[7] RFC 792, ICMP (Internet Control Message Protocol) DARPA Internet C Control
Message Protocol Specification, Jon Postel, Sep 1981
[8] RFC951, BOOTSTRAP PROTOCOL (BOOTP), Bill Croft and John Gilmore ,
September 1985
[9] RFC783, The Trivial File Transfer Protocol (TFTP) rev 2, K.R. Sollins MIT, June
1981
API Application Program Interface. The specification of functions and data used by one
program module to access another; the programming interface that corresponds to
the boundary between protocol layers.
ARP Address Resolution Protocol. A network layer protocol used to determine the
physical address which corresponds to the IP address for a host on the network.
ARP is a sub-protocol which operates under TCP/IP.
bridge A device that connects two or more physical networks which use the same
protocol. Bridges read frames and decide whether to transmit or block them based
on their destination address.
default gateway The IP address of the network or host to which all packets addressed to an
unknown network or host are sent. The default gateway is typically a router or other
device.
DNS Domain Name System. A protocol within TCP/IP used to find IP addresses based
on host names.
field A logical grouping of contiguous bits that convey one kind of information, such as
the start or end of a message, an address, data or an error check.
frame A group of bits which form a discrete block of information. Frames contain network
control information or data. The size and composition of a frame is determined by
the network technology being used.
framing types Two common framing types are Ethernet II and IEEE 802.3.
FTP File Transfer Protocol. A networking protocol used to exchange files between
stations on a network or over the Internet.
gateway A device which connects networks with dissimilar network architectures and which
operates at the Application Layer. This term may refer to a router.
hostname A domain name given to a specific computer on a network and used to address that
computer.
hub A device which connects a series of flexible and centralized modules to create a
network.
ICMP Internet Control Message Protocol. A protocol within TCP/IP used to report errors
in datagram transmission.
IP Internet Protocol. A common network layer protocol. IP is most often used with
TCP.
IP Address Internet Protocol Address. A 32-bit address assigned to hosts using TCP/IP.
IO Map An area in the controller configuration memory used to map input and output
points. Previously called traffic cop.
layer In the OSI model, a portion of the structure of a device which provides defined
services for the transfer of information.
MAC Address Media Access Control address. The hardware address of a device. A MAC address
is assigned to an Ethernet TCP/IP module in the factory.
network Interconnected devices sharing a common data path and protocol for
communication.
OSI model Open System Interconnection model. A reference standard describing the required
performance of devices for data communication. Produced by the International
Standards Organization.
PING Packet Internet Groper. A program used to test whether a destination on a network
can be reached.
port An access point for data entry or exit within a host using TCP services.
protocol Describes message formats and a set of rules used by two or more devices to
communicate using those formats.
repeater A device that connects two sections of a network and conveys signals between
them without making routing decisions or filtering packets.
router A device that connects two or more sections of a network and allows information to
flow between them. A router examines every packet it receives and decides
whether to block the packet from the rest of the network or transmit it. The router
will attempt to send the packet through the network by the most efficient path.
server Provides services to clients. This term may also refer to the computer on which the
service is based.
stack The software code which implements the protocol being used. In the case of the
NOE modules it is TCP/IP.
STP Shielded Twisted Pair. A type of cabling consisting of several strands of wire
surrounded by foil shielding, twisted together.
subnet A physical or logical network within an IP network, which shares a network address
with other portions of the network.
switch A network device which connects two or more separate network segments and
allows traffic to be passed between them. A switch determines whether a frame
should be blocked or transmitted based on its destination address.
TCP/IP A protocol suite consisting of the Transmission Control Protocol and the Internet
Protocol; the suite of communications protocols on which the Internet is based.
UDP User Datagram Protocol. A protocol which transmits data over IP.
UTP Unshielded Twisted Pair. A type of cabling consisting of insulated cable strands
which are twisted together in pairs.
Winsock The Microsoft implementation of the Windows Sockets networking API based on
the Berkeley UNIX Sockets interface for supporting TCP/IP.
A configuration extension
requires backplane slot number 21
address lables 8
requires framing type 21
assigning screen view 21
default Gateway address 22 configuring the module
IP network address 22
with Concept 24
subnet mask 22 with Modsoft 20
connectors
fiber optic 10
B twisted pair 10
backplane crash log
mounting module to 17 how to read and clear 57
bandwith of
Ethernet switches 14
broadcast addressing 82 D
default configuration
changing 20
C verifying 15
cable downloading a new exec 61
fiber optic 18
twisted pair
pinout 10 E
compatibility
EMBP Gateway
protocol stack 13 compatibility 13
Concept ERRLOG
configuring the module 24
description 11
configuration how to use 57
custom requirements 11
set up before installation 16, 20
errors
default responding to 53
changing 20 Ethernet
complete 3
vs Modbus Plus
predictability 12 H
Ethernet address
label 8 hot standby systems
set by factory 8 NOE module compatibility 13
Ethernet Developers Kit 13 hot swap 3, 60
EtherNet framing type hub
selecting 21 NOE module connection to 16
Ethernet Home Page 42
Ethernet hub
NOE connection to 16
I
troubleshooting 56 installation 3, 17
Ethernet networks 3 Internet Explorer 41
local IP network address
may use default IP network address custom 8
8, 16 obtaining 22
open setting in configuration extension 22
custom IP network address required default 8
8, 16 label 8
Ethernet switches 14
Ethernet TCP/IP modules
address labels 8 L
fiber optic connector 10 labels
fully configured 3, 16 Ethernet address 8
hot swap 3 IP network address 8
installing 17 LED display 7
LED display 7
twisted pair connector 10
twisted pair model M
view 5 mask
subnet 22
Modbus Application Protocol (MBAP) 77
F Modsoft
fiber cable clasps 10 configuring the module with 20
how to snap onto cable 18 module
using to attach cable 19 resetting 22
fiber optic cable
how to connect 19
fiber optic connector 10
framing type
Ethernet II
default 16
IEEE 802.3
requires configuration change 16
required in configuration extension 21
setting 21
P
performance
reducing traffic
guidelines 13