US 4,683,531 AGrant
Polling Method for Data Processing System
Issue Date:1987-07-28
•5 Claims
•8 Drawing Sheets
Abstract
A method for polling a plurality of remote processing units includes establishing a table of active and inactive remote processing units, sequentially polling each of the active processing units, at the conclusion of polling the active processing units, polling an inactive processing unit after which all of the active processing units are again polled. This sequence is repeated until all the active and inactive processing units have been polled. If in polling a processing unit, a response to the poll message indicates a change of status of the polled processing unit has occurred, the table is accordingly updated to reflect the current status of the processing unit.
Metadata
Assignee
- NCR Corporation
Inventors
- Russell K. Kelch
- Don C. Finfrock
- Donald J. Girard
- Daniel B. Seevers
- Barry D. Briggs
- Gene R. Mathes
Application Information
Application Number:US 6272533
Filing Date:1984-07-02
Priority Date:1984-07-02
Art Unit:232
Classifications
IPC:
G06F 1322
Field of Search:
340364370825.08;825.22200 MS File;900 MS File90
Patent Drawings (8 sheets)
Description
Background of the Invention
The present invention is directed to a data processing system which includes a central or master controlled processor and a number of remote processors and, more particularly, it relates to a method and apparatus for polling both active and inactive remote processors as part of the data processing system.
With the cost of microprocessor chips dropping, their use in relatively low-cost data processing systems are increasing. In modern data terminal devices, microprocessors are incorporated in keyboards, displays, printers, etc. These devices are associated with the functional operation of the terminal device. Terminals are used in some business environments which require that certain of the operating devices such as a printer, keyboard and display may be added to the terminal or removed from the terminal at various times during the day in accordance with business conditions. Prior polling systems such as taught by U.S. Pat. No. 3,766,530, U.S. Pat. No. 3,866,175 and U.S. Pat. No. 4,071,908 set up groups of active remote devices which are then polled by the master processor. But if other remote devices are added to the communication network or removed, the polling system is unable to pick up the change in the polling sequence. It is therefore a principal object of this invention to provide a polling sequence which detects the removal or the addition of a remote processing device from the communication network. It is a further object of this invention to provide a high-speed polling sequence of both active and inactive remote processing devices associated with a communication network.
Summary of the Invention
These and other objects of the invention are fulfilled by providing a polling sequence in which a table of all the remote processing devices associated with a central processing device is set up for identifying each of the remote processing devices as being an active or inactive device. The central processing device will initiate a polling sequence by polling each of the active devices listed in the table. At the conclusion of polling all the active devices, the first inactive device listed on the table is polled after which all the active devices are again polled. At the conclusion of the polling of the active devices, the next inactive device in the table is polled. This sequence is repeated enabling the central processing device to poll all of the active/inactive devices in a very short time. If during the polling sequence, an active device becomes inactive or an inactive device becomes active, the polling of the devices using this polling system allows the central processor to make changes in the poll table at the time that such changes are found so that the polling of the devices will continue in the above-cited sequence.
Brief Description of the Drawing
Additional advantages and features of the present invention will become apparent and fully understood from reading the following description, taken in conjunction with the annexed drawings, in which;
FIG. 1 is a schematic diagram of a multi-point data processing system including a central processor device connected to a plurality of data terminal devices in which the present invention may be used;
FIG. 2 is a schematic diagram of a communication bus of each of the data terminals of FIG. 1 showing the microprocessor device arrangement of the communication controller located therein;
FIG. 3 is a functional block diagram of each of the microprocessor devices found in the data processing system;
FIGS. 4A and 4B taken together disclose a detailed block diagram of the microprocessor device of FIG. 3.
FIG. 5 is a flow chart of the overall polling sequence between the microprocessor device in the controller and the microprocessor devices in the various operating devices of the terminal device;
FIG. 6 is a detailed flow chart for the polling sequence step of FIG. 5 in which the acitve/inactive microprocessor devices are polled;
FIG. 7 is a detailed flow chart for the polling sequence of the last active/inactive microprocessor device;
FIG. 8 is a schematic diagram of the poll/select message;
FIG. 9 is a schematic diagram of the poll table stored in the RAM memory unit of the controller microprocessor device; and
FIG. 10 is a schematic diagram of an address message transmitted between the mircroprocessor device of the controller and the microprocessor devices of the operating devices of the terminal device.
Detailed Description of the Invention
Referring to FIG. 1, there is shown a schematic diagram of a typical multi-point data processing system forming a local area communication network which may include a central processor 20 and a plurality of data terminal devices 22 connected to the processor 20 by a serial communication bus 24 and a serial sub-system transfer bus 26 on which data is transmitted between the processor 20 and the terminal devices 22 in a manner that is well known in the art. As shown in FIG. 2, the data appearing on the serial buses 24 and 26 are inputted into a communication interface unit or controller 28 in each of the terminal devices 22. Included in the controller 28 are a pair of microprocessor devices 30, 32 interconnected by a serial communication bus 34. For a complete description of the communication network of the controller 28, reference should be made to the copending patent application "High Speed Data Transmission System" by Houser et al, Ser. No. 627,310, now U.S. Pat. No. 4,669,044 filed on even date and assigned to the NCR Corporation. As is well known in the art, the controller 28 functions to control the transmission of data between the central processor 20 and the various remote operating devices associated with the terminal device 22 such as a printer 36, a keyboard 38, a CRT display 40, and a UPC scanner 42. Associated with each of the operating devices is a microprocessor device 44 which functions in the same manner as microprocessors 30 and 32. The microprocessor device 30 controls the transmission of data between the controller 28 and the central processor 20 (FIG. 1), while the microprocessor device 32 controls the transmission of data over the serial bus 46 between the controller 28 and the microprocessor devices 44 associated with each of the operating devices 36-42 inclusive. The microprocessor devices 30, 32 and 44 referred to herein may comprise an Intel 8051 microprocessor chip which is commercially available from the Intel Corporation of Santa Clara, Calif. A description of the Intel 8051 microprocessor chip may be found in the publication "MCS-51 Family of Single Chip Microcomputer User's Manual" published by the Intel Corporation in July, 1981.
Referring now to FIG. 3, there is disclosed a functional block diagram of the microprocessor devices 30, 32 and 44. Included in each of the microprocessor devices is a central processing unit (CPU) 50 which is operated by clock signals from an oscillator and timing circuit 52 which in turn receives a reference frequency signal from an external clock (not shown). The processing unit 50 has access over data bus 54 to a 4,096 byte program memory block 56, a 128 byte RAM memory block 58, a two 16 bit timer/event counter block 60, a 64K byte bus expansion control block 62, a programmable I/O control block 64 and a programmable serial port block 66 for either microprocessor communications or I/O expansion.
Referring now to FIGS. 4A and 4B taken together, there is shown a detailed block diagram of the microprocessor devices 30, 32 and 44. Included in each of the microprocessor devices is a 4K.times.8 ROM memory unit 70 (FIG. 4B) for program storage, which may be internal or external to the microprocessor devices 30, 32 or 44, a 128 byte internal RAM memory unit generally indicated by the numeral 58 (FIG. 4A) which includes a general purpose register 73, four banks of eight 8-bit registers 74 and a plurality of special function registers 76. Included in the special function registers 76 (FIG. 4A) is an accumulator (ACC) 78, an 8-bit stack pointer register (SP) 80, a high-order data pointer (DPH) 82, a low-order data pointer (DPL) 84, a timer/counter mode register (TMOD) 86 in which are stored the data bits that select which operation each timer/counter will perform, four timer/counter registers (THI) 88, (THO) 90, (TLI) 92 and (TLO) 94, and a timer/control register (TCON) 96 for controlling the operation of the timer/counter registers 88-94 inclusive. Further included in the microprocessor device is a program control section 98 (FIG. 4B) which controls the sequence in which the instructions of the program stored in the ROM 70 are executed and an arithmetic/logic unit 102 (FIG. 4A) for performing arithmetic operation in a manner that is well known in the art. The microprocessor device includes four ports in which port zero 104 (FIG. 4A) is used for data transfer and port three 100 contains the transmit/receive lines connected between the microprocessor device 32 in the controller 28 and the remote microprocessor devices 44 associated with the operating devices of the terminal device 22.
Referring now to FIG. 5, there is disclosed a flow chart of a polling sequence between the microprocessor device 32 (FIG. 2) and the microprocessor devices 44 each associated with one of the remote operating devices 36-42 inclusive. Prior to the start of a polling sequence, the microprocessor device 32 will have transmitted a status or configuration message to each of the microprocessor devices 44 associated with the devices 36-42 inclusive (FIG. 2). This occurs at power-up or when the system is reset. If a microprocessor device 44 is active, that is, is present and in an operating mode, the microprocessor device 32 will establish a poll table 106 (FIG. 9) in the RAM general purpose register 73 (FIG. 4A) in which the binary bits FE are stored at an address of a microprocessor device 44 which is present and active. If a device is inactive, the binary bits 00 are stored.
If the microprocessor device 32 attempts to poll but fails to communicate with a microprocessor device 44, the binary bits FF are stored in the table. The microprocessor device 32 will again try to poll the device. If after two failures in a row to reach the device, the binary bits 00 are stored in the table 106. If a polled microprocessor device 44 responds after the first re-try operation, the binary bits FE are stored in the table. After establishing the table 106, the microprocessor device 32 will check (block 108) (FIG. 5) for a select buffer (not shown) to see if any data has been received from the central processor 20 which is to be transmitted to an active microprocessor device 44 listed in the table 106. The select buffer is located in an external RAM memory unit connected to the microprocessor device 32. If the buffer contains data, the program stored in the ROM memory unit 70 (FIG. 4B) will send (block 110) a select message 115 (FIG. 8) to see if the microprocessor device 44 is available to receive a message. The construction of the message 115 (FIG. 8) is the same for either a poll or select message with the code 02 representing a poll message and 04 representing a select message. The program will check (block 116) if the device is busy in accordance with the response message received from the polled device. If the polled microprocessor device 44 is busy, the program will again check the select buffers to see if there is any data to be transmitted to a listed active device. If the device is not busy, the microprocessor device 32 will send a data message 112 (FIG. 10) to the microprocessor device 44 (block 118) which includes a four byte message identification field 114 and at least one byte data field 117, free the select buffer to receive further data from the remote processor 20 and check to see if further data has been received and stored in the select buffer.
If no further data has been received from the control processor 20, the program will start polling the microprocessor devices 44 by going to the poll table 106 (FIG. 9) and retrieve (block 120) (FIGS. 5 and 6) the poll address of the first microprocessor device 44 listed in the table. The program will check (block 122) (FIG. 6) to see if the device is an active device. If it is, the program will exit (block 124) (FIG. 6) this sequence and send (block 126) (FIG. 5) the poll message 115 (FIG. 8) to the active device asking if the device has any data to be sent to the remote processor 20. If at the time of polling, the polled device has no data to send to the remote processor 20 (FIG. 1) indicated by transmitting an idle message (block 128) to the microprocessor device 32 (FIG. 5), the program will loop back and again start the polling sequence by checking (block 108) to see if there is a select buffer containing data to be transmitted to one of the active devices.
If the microprocessor device 32 receives a message for the central processor 20 in response to its poll message, the program will transmit (block 130) (FIG. 5) the received message from the active device to the central processor 20 and again check (block 108) to see if there is a select buffer present. The program will continue polling the active devices (block 122) (FIG. 6) until the pointer in one of the registers 74 in the RAM memory unit 58 (FIG. 4A) points to a device address in the general purpose register 73 which is not active. The program will check (block 136) (FIG. 6) to see if it is the last active device listed in the poll table 106 (FIG. 9). If it is not, the program will get the next active device address (block 120) in the poll table. If the device is the last active device in the poll table 106, the program will poll (block 138) the address of the next inactive device after polling the last active device.
In polling an inactive microprocessor device, the program will start (block 140) (FIG. 7) by sending the poll message 115 (FIG. 8) (block 142) and start (block 144) a 256 msec timer (not shown). The program will then check for a response (block 146) to the poll message. If it fails to get a response before the 256 msec timer times out, it will check (block 148) if the time out is the first time out. If it is the first time out, it will repeat sending the poll message (block 142). If no response is received before the second time out, the program will check (block 150) to see if the polled device is an active device. If it is not, it will exit (block 152) back into the polling sequence. If the device is an active device, the program will update the poll table 106 (FIG. 9) by replacing the code designation FE with 00. If the polled device responds (block 146) within the first or second time out, the program will check the identity of the device (block 156). If it is an active device, it will exit (block 152) back into the polling sequence. If it is an inactive device, it will update the poll table 106 by replacing the code designation 00 with FE. Upon returning to the polling sequence, the program will check (block 158) (FIG. 6) to see if it is at the end of the poll table. If it is not, it will repeat the polling sequence of the active devices (FIGS. 5 and 6).
When the program reaches the end of the poll table 106 after polling the last inactive microprocessor device 44, it will start a timing sequence in counters 88 through 92 (FIG. 4A) inclusive to produce a 15 millisecond time-out. This time period allows the active operating devices of the terminal device 22 such as a keyboard to complete its operating cycle which may produce data required for transmission to the remote processor 20. After checking (block 160) (FIG. 6) for the presence of a time-out, and finding that a time-out has occurred, the program will restart the timer (block 162) and start again polling the table 106 of active devices and the next inactive device. This process will continue until all of the active and inactive microprocessor devices 44 have been polled.
The following comprises a detailed program listing for the polling sequence shown in FIGS. 5, 6 and 7. The actual machine codes and instructions shown relate to the Intel 8051 microprocessor chip in the embodiment described, however the techniques employed herein may be extended to other processors. Definition of the various machine codes and instructions may be obtained from, for example, the publication entitled "8051 User Manual," which was published by Intel Corporation in 1982.
While the invention has been described in detail and with reference to specific embodiments thereof, it will be understood by those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention. For example, the RAM memory unit 58 (FIG. 4A) and the ROM memory unit 70 (FIG. 4B) may be either internal or external or both to the microprocessor devices 30, 32 or 44. Therefore, it is to be understood that the present invention is not to be limited beyond that as required by the appended claims.
Claims
We claim:
1. A method for polling during a processing operation a plurality of active and inactive remote processing units interconnected in a communication network with a master processing unit having a memory comprising the steps of: (a) sequentially transmitting a status message from the master processing unit to each of the remote processing units prior to the start of the processing operation; (b) transmitting a response message to the master processing unit from a remote processing unit that is active in response to receiving the status message; (c) establishing in the memory a table of first and second bytes of binary signals in accordance with the response received to the status message in which each first byte of binary signals represents an active remote processing unit that has transmitted a response message to the master processing unit and each second byte of binary signals represents an inactive remote processing unit in the communication network that has not transmitted a response message to the master processing unit; (d) sequentially transmitting a polling message to each active remote processing unit in the order listed in the table; (e) at the conclusion of transmitting a polling message to the last active remote processing unit listed in the table, transmitting a polling message to the first inactive remote processing unit listed in the table; (f) after transmitting a polling message to the first inactive remote processing unit, repeating step (d); (g) at the conclusion of transmitting a polling message to the last active remote processing unit listed in the table, transmitting a polling message to the next inactive remote processing unit listed in the table; (h) repeating steps (d), (e), (f) and (g) until all of the active and inactive remote processing units listed in the table have been polled; (i) generating first and second time-out periods by the master processing unit at the start of transmitting a polling word to an inactive processing unit; (j) storing a third byte of binary signals in the poll table representing the inactive device polled if the inactive device does not respond within the first time-out period; and (k) changing the third byte of binary signals representing the inactive processing unit polled to said first byte of binary signals upon receiving a response message from the inactive processing unit polled to the transmission of the polling word within said second time-out period.
2. The method of claim 1 which further includes the steps of generating said first and second time-out periods by the master processing unit at the start of transmitting a polling word to an active processing unit; storing said third byte of binary signals in the poll table if the active device does not respond within the first time-out period; and changing the third byte of binary signals representing the active processing unit polled to said second byte of binary signals representing an inactive processing device upon not receiving the response to the transmission of the polling message within the second time-out period.
3. The method of claim 1 which further includes the steps of generating a third time-out period by the master processing unit after all of the active and inactive remote processing units listed in the table have been polled; checking to see if the third time-out period has elapsed; and repeating the polling of the active and inactive remote processing units listed in the table upon finding the third time-out period has elapsed.
4. The method of claim 1 in which said first byte of binary signals is FE and said third byte of binary signals is FF.
5. The method of claim 4 in which the second byte of binary signals is 00.
Patent Citations (4)
Non-Patent Literature (1)
- IBM Technical Disclosure Bulletin, vol. 20, nr. 2, Jul. 1977, New York, R. W. Farr et al., "Dynamically Optimized Polling System", pp. 773-774.