Note : Les descriptions sont présentées dans la langue officielle dans laquelle elles ont été soumises.
1339710
NETWORK INTERFACE BOARD HAVING MEMORY
MAPPED MAILBOX REGISTERS INCLUDING ALARM
REGISTERS FOR STORING PRIORITIZED ALARM MESSAGE
FROM PROGRAMMABLE LOGIC CONTROLLERS
Technical Field
This inventlon relates generally to an interface between a
network of industrial
, . . .~,
~.,.
1339710
programmable logic controllers and a general
purpose processor and particularly relates to
interface boards for furnishing the interface
between a personal computer and the network of
industrial programmable logic controllers.
Backqround of the Invention
Programmable logic controllers or
programmable controllers are used to control
the operations of punch presses, screw
machines and automatic welders. Each
programmable logic controller or PLC receives
information on the operation of the punch
press or screw machine on sensors and controls
the operation of the punch press or screw
machine through valves and switches. The PLC
thus controls the operation of the punch press
or screw machine from placing material into a
work location, effecting the work on the raw
material and removing the finished part from
the work location.
Several of these PLCs can be
connected to one another over communication
lines to integrate the manufacture of parts
through an entire factory. For example, from
a central controller, raw material can be
passed through several different machines and
processes in completing the manufacture of
goods. The communication lines across which
the control and status information of the
several machines travel uses serial
transmission of data at baud rates of from
1~3971~
62.5K baud to 500K baud depending upon the distance between the
PLCs and central processor.
The order in which the communications occur on the
communications network has been deflned to require proper
sequences of originator address, destination address, register
READ and WRITE indicatlons, reglster addresses and the number of
registers to be read or written to. The network communlcations
also defines the times at which each PLC can transmlt and receive
messages over the network communications llnes ln a particular
manner to avoid loss of communlcations while assurlng that each
PLC has the ability to transmit necessary information within
certain intervals. All of these communications definitions
generally are referred to as the communications protocol.
Previously, the PLC was connected to the communications
network through a simple interface circuit card, and the software
program withln the PLC was the driving force for following the
communications network protocol ln sending and receiving
information. This required much of the PLC's attention and
subtracted from the time available for the central processor to
act upon the information it received.
Network interface modules connecting the PLCs to the
communications network exist to handle the protocol in
transferring information between the PLCs and the network. These
network interface modules, however, fail to provide substantial
features to simplify the transfer of information between the PLC
and the network interface module. Connecting the PLC to a
network interface module still requires the central processor
software to perform e~tra functions beyond its normal control and
.." .,
.
1339710
processing duties. For example, a network interface module
passes alarm messages from the communications network to the PLC
directly as if it were a command to write or read information
into a desired register. The network interface module also
passes unsolicited messages directly from the communications
network to the PLC at any time including when the PLC is busy
acting upon the information lt requested from a dlstant PLC.
Moreover, network lnterface modules furnlsh the means to transfer
lnformatlon to a central processor that ls non-standard to
1~ currently available personal computers such as the IBM* PC
compatible desktop units.
Summary of the Invention
The invention furnlshes a network lnterface presenting
expanslon port slgnals and connector for commercially avallable
computers such as the IBM* PC compatlble units. The interface
board (card) also simplifies programmlng of the personal
computer. The network lnterface board also furnlshes a mallbox
for messages from the communlcatlons
~=~
1339710
network, and provides a queue of alarm messages
that the computer can access ln any sequence lt
deslres. The lnterface board through use of a
dlrect memory address (DMA) arrangement has
address locatlons deflned for the foregolng
asynchronous access to the personal computer.
The alarm messages can be of any one
of three types ldentlfled as an alarm, fault
and warnlng. Related to an automatlc weldlng
machlne, an alarm message can mean that the
electrodes have gone beyond thelr proper
worklng posltlon and although they stlll may
operate, they should be changed. A fault
message would lndlcate a broken SCR falllng to
conduct any current to the electrodes. A
warning would lndlcate that the automatlc
welder was approachlng a problem condltlon.
Coupled wlth the message reglsters,
the network lnterface board provldes an alarmed
queue that comprlses a dedlcated portlon of RAM
memory sufflclent to stack up to 20 alarm
messages of each of the three types. The
mlcroprocessor then can access these alarm
messages ln any order deslred to servlce them
ln accordance wlth the overall system
operatlon.
1~39~10
5a
Therefore, according to one aspect of the invention, there
is provided a network interface board for facilitating
communication between a personal computer having a memory space
and a plurality of programmable logic controllers connected in
a communication network which is arranged ln a bus configuration
for controlling machines, said network interface board
comprising: (a) terminal means (29) for connecting sald network
interface board (21) to said personal computer; (b) port means
(23) for connectlng said network interface board to said
communication network; (c) mailbox memory means (25) connected
to said port means and to said terminal means, for reading and
writing messages through said terminal means by said personal
computer and through said port means by said programmable logic
controllers; (d) reply register means in said mailbox memory
means for storing messages received from said programmable logic
controllers and for sending said received messages to said
personal computer; (e) write register means in said mailbox
memory means for storing and sending messages from said personal
computer to said programmable logic controllers; (f) control
register means in said mailbox memory means for setting routes
and addresses of said programmable logic controllers to
selectively send messages stored in said write register means to
said programmable logic controllers; (g) alarm register means in
said mailbox memory means for storing alarm messages received
from said programmable logic controllers and for sending said
alarm messages to said personal computer; (h) address mapping
means for mapping said reply register means, said write register
means, and said alarm register means into the memory space of
C
1339710
5b
said personal computer, said personal computer directly accessing
said replay register means, said write register means, and said
alarm register means in a predetermined sequence; and wherein
said alarm messages include fault messages, alert messages, and
warning messages, and further wherein said alarm register means
include separate, prioritized alarm queues, each alarm queue for
respectively storing said fault messages, said alert messages,
and said warning messages.
0 Brief Description of the Drawinqs
Figure 1 is a block diagram indicating the connections of
a network board
1339710
between a personal computer and the communications network;
Figure 2 is a diagrammatic block diagram of the registers
provided on the network interface card for transferring
information between the microprocessor and the communications
network;
Figure 3 is a schematic block diagram of the commercially
available components and their interconnections effecting the
interface card of the invention;
Figure 4 is an isometric view of the network interface card
of the invention;
Figure 5 is a view showing the connection from the network
interface card to the network cable;
Figure 6 is another view of the network interface card
showing the output ports and the terminal connection;
Figure 7 is an isometric view of a network interface module
31 (see also Figure l);
Figure 8 is a view of the registers of the network interface
module of Figure 7;
Figure 9 shows the method of interconnecting two networks
via two network interface modules; and
Figure 10 shows the three alarm queues.
Description of the Preferred Embodiment
Figure 1 shows a system including a computer 11 and a
monitor 12 for communicating with a communications network 10
connected to control a number of industrial devices such as punch
presses, welders, etc. A network interface board (NIB) 21 of the
,r
133~710
invention is mounted in computer 11 into an empty board or card
slot in the computer 11 via edge connector 29.
The network is a high-speed industrial communlcation system.
The network has a bus configuration with a single twinaxial cable
serving as the network communication pathway (see Figures 1 and
3). Programmable controllers (PLCs) and other devices such as
computers, printers, D-LOG modules and CRT programmers are
connected to the network through NIB 21 and network interface
modules (NIMs) 31 to be discussed in detail below.
A computer 11 with the NIB 21 can monitor programmable
controllers on the network and provide supervisory control. When
it recognizes a need for control action, the computer 11 can
communicate instructions to the programmable controllers. For
example, the computer could detect a materials shortage situation
and instruct a remote programmable controller to start conveyors
to move material from an alternate site.
Further, the system allows a personal computer 11 to rapidly
acquire real-time production data from programmable controllers.
This data can be parts counts, machine operating times,
temperatures, statistical information, and other programmable
controller information. Once the production data has been
acquired by the NIB 21, the personal computer can prepare
management reports, pass the data to another computer, or
initiate real-time control action through the programmable
controllers.
The network interface board (NIB) 21 mounts in a long
expansion slot of an IBM Compatible Personal Computer 11.
Because NIB 21 mounts in the personal computer, the board 21
8 1339~10
allows the personal computer to connect to the network without
the extra rack and power supply which would be required if a NIM
were used.
The NIB 21 has four light-emitting diode (LED) indicating
lights which provlde information about the operatlon of the
board. The LEDs are designated Network, Active, TX1 and RX1 and
are located as shown in Figure 6.
A yellow "network" LED illuminates to indicate activity on
the network. A green LED indicates the operational status of the
board. A yellow TX-1 LED flashes to indicate when the board is
transmitting data to the device connected to the RS-422 port 22.
A yellow RX-1 LED flashes to indicate when the board is receiving
data from the device connected to the RS-422 port 22.
In addition to the RS-422 port 22 and the opto line 19, NIB
21 includes an edge connector 29 whlch is the communication link
between the NIB 21 and the computer 11. The computer 11
communicates to the NIB 21 through the board's edge connector in
parallel mode, rather than through a serial RS-422 port.
The RS-422 port 22 allows a device other than the computer
ll, for example, a personal computer, programmable logic
controller, CRT programmer or printer to access the network
through the board 21. This port can be configured for different
modes of operation.
The opto-isolated port 23 is used to connect the board 21
to the network 10. This is done via the network connector cable
24 which plugs into the port 23 on the board and into a "Tee"
connector 41 on the network cable, see Figure 5.
133971~
Mounted on NIB 21 is a DIP switch unit having four
individual switches 39. These switches are set to determine
which address range in the computer's memory is assigned to NIB
21 functions.
In addition to network interfacing, the NIB 21 supports
programming software. With this software, the computer can be
used to program and monitor a processor or data log module either
by direct cable connection or over the network as shown in Figure
3.
The application software 16 is on a disk insertable into the
disk drive llA of computer 11. Part of usable software may be
in the form of firmware (ROMs or EPROMs) plugged into NIB 21.
The mailbox registers 25 on NIB 21 will be described below.
An opto-isolated link 19 is positioned in board 21 in
communication port 23 to enhance reliability in the face of
disturbances on the'communication lines from voltage surges such
as induced or developed as a result of operating the presses and
welders connected to the communication network 10. The opto-
isolated link 19 is connected as such through a suitable opto
function box 23.
The mailbox memory registers 25 on the network interface
card 21 are shown ln Figure 2. The network interface board 21
furnishes mailbox 25 for unsolicited messages from the
communications network, and provides alarm messages in a queued
format which the computer 11 can access in any sequence. The
interface card 21 provides a direct memory access (DMA)
arrangement having address locations defined for asynchronous
access by the personal computer and an interface card.
10 13~971q
As shown in Figure 2, the message control registers of
mailbox 25 are used to set up command routes, remote address and
the byte count of the message block which is used in the Read and
Write operations.
The write register buffer is used to store register data
that will be sent to a remote device. The reply register is used
to store incoming data, other than alarm messages, received by
the network interface board 21. The alarm message buffer is used
to store the incoming alarm messages. The alarm control is used
to control the viewing, acknowledging and resetting of the alarm
messages. The setup and interrupt controls are used for set-up
parameters such as baud rate, network size and RS-422 port
parameters.
Importantly, the NIB 21 has three separate alarm queues.
Three priorities of alarms, faults and warnings can be received
from programmable controllers (PLCs) and interpreted by the
personal computer ll. the personal computer 11 can display the
alarms, acknowledge the alarms, store the alarm information, or
take supervisory actlon based on the alarms received.
An example of the operation of the mailbox registers of
Figure 2 is as follows: Assume an alarm message is received that
signals that welder electrodes have gone beyond their proper
working position and should be changed.
This message would be received at the network interface card
24 and mailbox 25 in the alarm message buffer.
Note, of course, that the network interface card 21 set up
and interrupt control registers, as shown in Figure 2, are
" ~
11 1339710
initially set up with the proper network communication
parameters, as is known.
When as unsolicited alarm message is received, the alarm
control registers will then control viewing, acknowledging and
resetting of alarm messages. The computer will acknowledge the
alarm message and set the applicable acknowledge registers ln the
alarm control section of the mailbox. Once the alarm message is
acknowledged, the alarm control reglster will cause that
particular message to be reset or cleared.
If it is necessary to send a message to the various devices,
for example to devices that originate an alarm, that message will
be stored in the write register buffer. The message control
buffer will then be used to set up the route, the remote address
and the byte count of the message block to be sent out. The
reply register buffer may be used to store all incoming messages
to the NIB 21. Alarm messages are similar to write messages
except that alarm messages send a constant value (alarm code)
ratherthan variable data from a storage register. The receiving
device can be programmed to respond to various alarm codes in an
appropriate manner.
As shown in Figure 10, an area of memory is set aside as
three alarm queues. Each alarm queue can store 20 alarm messages
in the order in which they are received. Each stored alarm
message contains the alarm code, the network route from the
device that sent the alarm and loptionally) some additional alarm
data.
The three alarm queues are called Warnings, Alerts and
Faults. Havlng three separate queues allows the alarm messages
; ,~-.d&
12 1339710
to be categorized in different levels. Generally, Warnings are
considered the least serious kind of alarm, Alerts are more
serious, and Faults are the most serious. However, the manner
in which each type is responded to depends on how the user
program is designed.
Fach of the three alarm queues has a register address,
allowing the processor to direct alarm messages to the
appropriate queue.
Messages can be placed in an alarm queue via alarm commands
or write commands. When a write command is used, up to six
registers of data can be written to a message location in an
alarm queue. The first register serves as the alarm code, while
the other five registers can provide additional data from the
initiating device. Not only does a write rung allow more
information to be sent to the queue than an alarm rung, the data
is dynamically definable. That is, the alarm "code" information
may be loaded into the processor register based on real-time I/O
status and other real-time conditions. With an alarm rung, the
alarm code is fixed when the ladder program is developed.
The user program can utilize opcodes to view an alarm,
acknowledge an alarm (to the device that sent it), and clear the
alarm from the queue.
When an alarm is received in one of the alarm queues, the
change flag for that queue is set to its new count.
Each alarm change has a selected flag location. For
example, the locations could be given as:
Fault Queue 2H
Alert Queue 3H
13 1339710
Warning Queue 4H
The user program can be designed to poll for a flag change
or be interrupted by a flag change. The program can then view
the error code and take other appropriate action.
To view an alarm, the user program selects which alarm in
the queue it wishes to see and copies the alarm data to a buffer
where it can be viewed. Following is the procedure for viewing
an alarm message. Refer to Figure 10.
1. The user program detects an Alarm Change flag.
2. The user program checks the Alarm Count location for
the appropriate queue to determlne the number of alarm messages
there.
3. The user program selected which message (1 to 20) in
the queue to view. It
C
1~3~713
places this number in the Alarm Select
location.
4. The user program places the
view command opcode in the Alarm Command
location.
5. The user program sets the Go
Flag (240H) to a non-zero value.
6. When the Go ~lag is cleared,
the selected message is available for viewing.
LO Routing information for this message is
available in the Message Route Buffer.
If the application requires it, the
user program can acknowledge the alarm (send
the alarm code back to the originating
device).
When a write rung has been used to
send a group of registers as an alarm message,
only the first register is written back to the
initiating processor as an acknowledgment.
The procedure for acknowledging an
alarm message is as follows:
1. The user program sets the
number of the alarm message to be acknowledged
in the Fault Queue, Alert Queue or Warning
Queue.
2. The user program places the
acknowledge command opcode in a designated
Alarm Command location.
3. The user program puts a value
in a designated Acknowledge Register that
determines which register in the initiating
device the alarm code is sent back to.
133~710
16
4. The user program sets the Go
Flag to a non-zero value.
5. The NIB 21 clears the Go Flag
when the message has been acknowledged.
Alarm mes~ages remain in the alarm
queues until they are cleared by the user
program. When an alarm gueue is full, the NIB
21 will accept no more alarm messages for that
queue.
lo Alarm messages can be cleared
individually (usually after being viewed) with
the Clear command. There is also a command
for simultaneously clearing all three alarm
queues.
Following is a procedure for
clearing individual alarms.
1. The user program sets the
number of the alarm to be cleared in the Alarm
Select location.
2. The user program places the
clear command opcode in the Alarm Command
location.
3. The user program sets the Go
Flag to a non-zero value.
4. The NI8 21 board clears the Go
Flag when the message has been cleared.
To clear all alarms, the following
procedure may be used.
1. The user program places the
Clear All Alarm opcode in the Alarm Command
location.
133~9710
2. The user program sets the Go
Flag to a non-zero value.
3. The NIB 21 clears the Go Flag
when all the alarm queues have been cleared.
Devices on the network can write
data into the processor equivalent (mailbox)
registers contained on the NIB 21. This
allows the NIB 21 to receive unsolicited data.
A Register Change ~lag location
lo contains the address of the }ast register to
be written to. If a block of registers is
written to, the Register Change Flag location
contains the lowest register number of the
block.
By monitoring the Register Change
Flag, the user program need not poll all 512
registers to detect a change. The NIB 21
board can also be configured to generate an
interrupt to the personal computer whenever a
mailbox register is written to.
Register addresses in the Register
Change Flag are only cleared on power-up and
restart by NIB 21. Repetitive writes to the
same mailbox regi~ter will not change the
address in the Register Change Flag after the
first write. However, each write to the
mailbox registers will generate an interrupt
to the computer 11, if this interruption
condition is enabled.
The NIM 31 manages network
communication, relieving the user program of
these tasks. As will be explained, the NIM 31
18 1333710
can flag the user program when a reply, alarm
condition or unsolicited message is received.
An additional RS-422 port 22 is provided in
each NIM 31, see Figure 3, which allows a
second device to access the network through
the NIM. That is, each NIM 31 can support two
devices. Note that only the NIMs 31 are
connected to the network 10. The PLCs and the
devices (see Figure 1) are connected through
the NIMs 31 to the network line 24.
Refer now to Figures 1, 7 and 9.
The NIM 31 allows two devices (programmable
controllers, CRT programmers, computers,
printers, etc.) to connect to the network.
Since a maximum of 100 network interfaces
modules NIMs 31 can be connected to a single
network and since each NIM 31 can connect two
devices to the network, a network can have a
maximum of 200 devices. However, even more
devices can communicate by connecting multiple
networks together as indicated in Figure 9.
The network interface module NIM 31
mounts in a register slot of a programmable
controller I/O rack assembly. The NIM 31 has
a two-digit thumbwheel for setting a network
address number between 00 and 99. This
address number identifies the NIM module, and
the devices connected to it, and also sets the
communication priority that the NIM module has
in relation to the other NIMs on the network.
The NIM has two RS-422 COMM ports to
which the programmable controllers or other
133971~
19
devices are connected. These port numbers are
combined with the NIM address number to
identify the devices for network
communication.