NETWORK INTERFACE BOARD SYSTEM

Abstract: A network interface board (21) for communication between a personal computer (12) and a network bus (24) connecting to programmable logic controller (222) and the machines being controlled. The board includes mailbox registers (31) for storing messages from the network; and includes a queue of alarm message which the computer can access.

Description: NETWORK INTERFACE BOARD SYSTEM IB DESCRIPTION Reference to Related Applications This application is related to 20 applications filed concurrently herewith, entitled "Network Communications System" (Our Docket No. 01P044) ; "Ladder Sequence Controller" (Our Docket No. 401P045) ; "Peer- To-Peer Register Exchange Controller for PLCs" 25 (Our Docket No. 401P0 6) ; and, "High-Speed Press Control System" (Our Docket No. 401P047) . The contents of these applications are incorporated herein by reference. Technical Field 30 This invention relates generally to an interface between a network of industrial 35 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. Background of the Invention Programmable logic controllers or programmable controllers are used to control the operations of punch presses, screw 10 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 15 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 20 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 25 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 30 several machines travel uses serial transmission of data at baud rates of from 35 62.5K baud to 500K baud depending upon the distance between PLCs and central processor. The order in which the communications occur on the communications network has been defined to require proper sequences of originator address, destination address, register READ and WRITE indications, register addresses and the number of registers to be read or written to. The network 10 communications also defines the times at which each PLC can transmit and receive messages over the network communications lines in a particular manner to avoid loss of communications while assuring that each PLC 15 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 20 the communications network through a simple interface circuit card, and the software program within the PLC the driving force for following the communications network protocol in sending and receiving information. This 25 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 30 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 features substantially to simplify the transfer of information between the PLC and the network interface module. Connecting 5 the PLC to a network interface module still requires a central processor software to perform extra functions beyond its normal control and processing duties. For example, a network interface module passes alarm messages 10 through 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 15 communications network to the PLC at any time including when the PLC is busy acting upon the information it requested from a distant PLC. Moreover, the network interface module furnishes transfer leads to the central 20 processor that are non-standard to currently available personal computers such as the IBM PC compatible desktop units. Summary of the Invention 25 The invention furnishes a network interface presenting expansion port signals and connector for commercially available computers such as the IBM PC compatible units. The interface board (card) also simplifies 30 programming of the personal computer. The network interface board also furnishes a mailbox for messages from the communications 35 network, and provides a queue of alarm messages that the computer can access in any sequence it desires. The interface board through use of a direct memory address (DMA) arrangement has address locations defined for the foregoing asynchronous access to the personal computer. The alarm messages can be of any one of three types identified as an alarm, fault 10 and warning. Related to an automatic welding machine, an alarm message can mean that the electrodes have gone beyond their proper working position and although they still may operate, they should be changed. A fault message would indicate a broken SCR failing to 15 conduct any current to the electrodes. A warning would indicate that the automatic welder was approaching a problem condition. Coupled with the message registers, the network interface board provides an 20 alarmed queue that comprises a dedicated portion of RAM memory sufficient to stack up to 20 alarm messages of each of the three types. The microprocessor then can access these alarm messages in any order desired to 25 service them in accordance with the overall system operation. Brief Description of the Drawinσs Figure 1 is a block diagram 30 indicating the connections of a network board between a personal computer and the communications network; Figure 2 is a diagrammatic block diagram of the registers provided on the 5 network interface card for transferring information between the microprocessor and communications network; Figure 3 is a schematic block diagram of the commercially available 10 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 15 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; 20 Figure 7 is an isometric view of a network interface module 31 (see also Figure 1) ; Figure 8 is a view of the registers of the network interface module of Figure 7; 25 Figure 9 shows the method of interconnecting two networks via two network interface modules; and Figure 10 shows the three alarm queues. 30 Description of the Preferred Embodiment 35 Figure 1 shows a system including a computer 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 invention is mounted in computer 11 into an empty board or card slot in the computer via edge connector 29. 10 The network is a high-speed industrial communication 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 1 5 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. 20 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 25 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. 30 Further, the system allows a personal computer 11 to rapidly acquire real- 35 time production data from programmable controllers. This data can be parts counts, machine operating times, temperatures, statistical information, and other 5 programmable controller information. Once the production data has been acquired by the NIB 21, the 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 II. Because NIB 21 mounts in the computer, the board 21 allows 15 the 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 provide 0 information about the operation 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 indicae when the board is transmitting data to the device connected to the RS-422 port. A yellow RX-1 LED flashes to indicate when the board is 30 receiving data from the device connected to the RS-422 port. 35 In addition to the RS-422 port and the opto line 19, NIB 21 includes an edge connector 29 which is the communication link between the NIB 21 and the computer 11. The 5 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 11, for example, to 1 0 access the network through the board 21. This port can be configured for different modes of operation. The opto port 23 is used to connect the board 21 to the network 10. This is done !5 via the network connector cable 24 which plugs into the port on the board and into a "Tee" connector 41 on the network cable, see Figure 5. Mounted on NIB 21 is a DIP switch 0 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. 0 The application software 16 is on a disk insertable into the disk drive 11A of computer 11. Part of usable software may be 5 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 link 19 may be 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 0 the communication network 10. The opto link 19 is connected such as through a suitable opto junction box 23. The mailbox memory registers 25 on the network interface card 21 are shown in 5 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 o 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. As shown in Figure 2, the message E) 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 0 store register data that will be sent to a remote device. The reply register is used to store incoming data, other than alarm 5 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, 5 acknowledging and resetting of the alarm messages. The setup and interrupt controls are used for set-up parameters such as band rate, network size and RS-422 port parameters. - Importantly, the NIB 21 has three 10 separate alarm queues. Three priorities of alarms, faults and warnings can be received from programmable controllers (PLCs) and interpreted by the personal computer 11. The personal computer 11 can display the alarms, 15 acknowledge the alarms, store the alarm information, or take supervisory action based on the alarms received. An example of the operation of the mailbox registers of Figure 2 is as follows: 20 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 25 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 initially 30 set up with the proper network communication parameters, as is known. 35 When an unsolicited alarm message is received, the alarm control registers will then control viewing, acknowledging and resetting of alarm messages. The computer 5 will acknowledge the alarm message and set the applicable acknowledge registers in the alarm control section of the mailbox. Once the alarm message is acknowledged, the alarm control register will cause that particular 10 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 15 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. 20 Alarm messages are similar to write messages except that alarm messages send a constant value (alarm code) rather than variable data from a storage register. The receiving device can be programmed to respond to various alarm 2 5 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 3 0 stored alarm message contains the alarm code, the network route from the device that send 35 the alarm and (optionally) some additional alarm data. The three alarm queues are called Warnings, Alerts and Faults. Having three 5 separate queues allows the alarm messages 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. ιo However, the manner in which each type is responded to depends on how the user program is designed. Each of the three alarm queues has a register address, allowing the processor to 15 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 five 20 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 four registers can provide additional data from the initiating device. Not only 2 does a write rung allow more information to be sent to the queue than an alarm rung, the data is dynamically definable, ϊhat is, the alarm "code* information may be loaded into the processor register based on real-time I/O 30 status and other real-time conditions. With an alarm rung, the alarm code is fixed when the ladder program is developed. 35 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. 5 When an alarm is received in one of the alarm queues, the change flat for that queue is set to its new count. Each alarm change has a selected flag location. For example, the locations 10 could be given s: Fault Queue 2H Alert Queue 3H Warning Queue 4H The user program can be designed to 15 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 20 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 2 5 Alarm Change flag. 2. The user program checks the Alarm Count location for the appropriate queue to determine the number of alarm messages there. 30 3. The user program selected which message (1 to 20) in the queue to view. It 35 places this number in the Alarm Select location. 4. The user program places the view command opcode in the Alarm Command 5 location. 5. The user program sets the Go Flag (2 OH) to a non-zero value. 6. When the Go Flag is cleared, the selected message is available for viewing. 10 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 15 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. 2 0 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 2 Queue. 2. The user program places the acknowledge command opcode in a designated Alarm Command location. 3. The user program puts a value 30 in a designated Acknowledge Register that determines which register in the initiating device the alarm code is sent back to. 35 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. 5 Alarm messages remain in the alarm queues until they are cleared by the user program. When an alarm queue is full, the NIB 21 will accept no more alarm messages for that queue. 10 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. 15 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. 20 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. 25 4. The NIB 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 3 0 Clear All Alarm opcode in the Alarm Command location. 35 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. 5 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 Flag location 10 contains the address of the last 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. I B 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 0 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 register will not change the 5 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. 0 The NIM 31 manages network communication, relieving the user program of these tasks. As will be explained, the NIM 31 5 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 5 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 10 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. 15 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 20 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 25 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 30 in relation to the other NIMs on the network. The NIM has two RS-422 COMM ports to which the programmable controllers or other 35 devices are connected. These port numbers are combined with the NIM address number to identify the devices for network communication. 10 15 20 25 30 35

Claims: C £IE£ 1. A computer interface board for facilitating communication between a personal 5 computer and a communications network including programmable logic controllers connected in the network to control the operation of machines operating in a cycle mode, mailbox registers in said board for 10 storing messages from the communications network, alarm registers in said interface board accessible in any desired sequence by said computer. 15 2. An interface board as defined in Claim 1, wherein said interface board includes terminal means for providing connections to the computer, and port means for providing direct access to the 20 communication networks. 3. An interface board as defined in Claim 1, wherein said alarm register provides alarm queues comprising stacked alarm 2 message. 4. An interface board as defined in Claim 1, wherein said interface board includes an opto port for connection to said 30 network. 35 5. An interface board as defined in Claim 1, including an input-output port for connecting to a programmable logic controller by direct cable connection. 6. An interface board as defined in Claim 1 having separate alarm queues having at least three priorities of alarm, faults and warnings. 10 15 20 25 30 35

Inventors: GANS STEVEN J, SACKMANN DAVID J, WIEGL EDWARD H, GANS, STEVEN, J., SACKMANN, DAVID, J., WIEGL, EDWARD, H.
Applicants: SQUARE D CO, SQUARE D COMPANY
Application year: 1989
Main classification: G06F15
IPC codes: G05B19, G06F13