Communication control apparatus

Abstract: A communication control apparatus comprises a transmission control section (11) for successively reading out words forming the transmission frame every once from a transmitting RAM (12) in the case of transmission, a receiving control section (21) for writing the words forming the receiving frame every once in the case of receipt to a receiving RAM (22), an automatic transmitting timing setting section (17), (18), (19), (1A) for repeating the above-described operation correspondingly to the number of frames every unit time in the case of transmission and receipt, and a plurality of transmission and receipt address base registers (15), (25) and transmission and receipt data base registers (16), (26) for storing therein a top address and a word length of the transmitting RAM (12) and the receiving RAM (22) every each transmitting and receiving frame.

Description: FIELD OF THE INVENTION The present invention relates to communication control apparatuses for connecting a host control unit and an I/O control unit to each other in a manner of series communication and, more particularly, to a communication control apparatus for controlling communication between an NC control unit in a numerical control apparatus and a servo-amplifier unit and a main-spindle amplifier unit. BACKGROUND OF THE INVENTION A conventional communication control apparatus employs a general-purpose communication control LSI, to execute serial transmission and reception under software control. Conventionally, a memory for storing transmit data and receive data is provided on the outside of the communication control LSI. However, there are many cases where the communication control LSI is formed by a communication control LSI which incorporates or builds therein a small-capacity RAM for storing therein the transmit data and the receive data, because the capacity of the transmit data and the capacity of the receive data are limited correspondingly to a particular application. A system arrangement which realizes the serial communication between the host control unit and the I/O control unit by the use of the above-described communication control LSI is shown in Fig. 10 of the attached drawings. Fig. 10 is a view showing an arrangement of the conventional communication control apparatus. In Fig. 10, the reference numeral 1 denotes a host control unit; 2, an I/O control unit; 3, a serial-communication transmitting control section for various units; 4, a receiving control section of serial communication for various units; 5, a transmitting address counter for various units; 6, a transmitting data counter for various units; 7, a receiving address counter for various units; 8, a receiving data counter for various units; 9, a transmitting RAM for various units; 10, a receiving RAM for various units; 51, a host CPU of the host control unit 1; and 52, an I/O CPU of the I/O control unit 2. Further, the reference numeral 701 denotes a data bus for connecting the transmitting RAM 9 for various units and the CPUs 51 and 52 for various units to each other; 702, a data bus for connecting the receiving RAM 10 for various units and the CPUs 51 and 52 to each other; 703, a command and status control line for connecting the CPUs 51 and 52 for various units and the transmitting control section 3 to each other; and 704, a command and status control line for connecting the CPUs 51 and 52 for various units and the receiving control section 4 to each other. Operation will next be described. Using bus 701, the host CPU 51 writes the transmit data to the transmitting RAM 9, which is arranged within the host control unit 1. Then the transmitting control section 3 reads the transmitting data in terms of one word units and, on the basis of the values in counters 5 and 6, serially transmits the transmitting data. The serial data transmitted from the host control unit 1 are inputted to the receiving control section 4 on the side of the I/O control unit 2, and are successively written to the receiving RAM 10, on the basis of the values in counters 7 and 8. The written data are read by the I/O CPU 52. The same is applicable in a reverse direction. A conventional communication control apparatus in which the transmission process takes place similarly to the arrangement shown in figure 10 is disclosed by the document Electronics Design, vol. 32, no. 15, July 1984, NJ, USA, p. 155-166, Madan P. et al, 1 Bit-oriented coprocessor resolves incompatibilities of small and large networks. Furthermore, if the above-described communication control system is applied to a numerical control apparatus, the communication control system takes an arrangement illustrated in Fig. 11. In the numerical control apparatus illustrated in Fig. 11, the data communication, and the preparation, analyzing and processing of the data communication, typically takes place between a servo amplifier unit 803 and the main-spindle amplifier unit (not shown), and an NC control unit 800. Generally, in such system, the communication speed is raised to shorten a communication cycle, by the addition of a motion control CPU 806 capable of processing the data at a high speed, because of the demands for operating the NC machine tool at high speed and high accuracy. Typically, when data is to be transmitted, a base register 15 receives a top or head address for a first frame and the subsequent addresses of the transmitted data frame are identified by an address counter 13, which inputs to the transmit RAM 10. The count of the data for each frame is determined on the basis of a base value of register 16 and a count from that value counter 14, serving as an input to control 11. A similar arrangement for storing plural frames of data on the basis of a head address on register 25 and a count therefrom in counter23, together with a data base value in resister 26 and a counted value from operation of counter 24 is found to control the serial reception by receive RAM 22 and receive control 21. The above-described motion control CPU 806 has principal or main processing which includes: 1 ○ initial processing: initializing the processing of the serve amplifier unit 803 and the main-spindle amplifier unit; 2 ○ background processing: the preparation of transmit data and the analysis of received data to and from the servo-amplifier unit 803 and the main-spindle amplifier unit; 3 ○ servo-interruption processing: timing of the transmission to the servo-amplifier unit 803 and the main-spindle amplifier unit and reception from the servo-amplifier unit 803 and the main-spindle amplifier unit. As another reference technical literature relating to the invention, there are "Receiving Unit For Serial Data" disclosed in Japanese Patent Laid-Open No. HEI 2-52543 and "Multi-Channel Multi-Frame Receiving Circuit" disclosed in Japanese Patent Laid-Open No. HEI 2-177737. The conventional system has the following problems with reference of Fig. 11. First, there is only one transmitting address base register 15 in each unit (800, 803) which indicates a head or top address of the transmit data in the corresponding transmitting RAM 12. Accordingly, in order to transmit a plurality of frames per unit time, it is required that the CPU resets the top address of the transmitting data used in the subsequent transmitting frame at every point in time that transmission is initiated. The reset top address is needed, to execute processing in which the transmitting section for transmitting an actual transmitting frame restarts. This requirement applies a significant processing load on the CPU, and the processing software is complicated. Moreover, there are the following problems. First, in the case where a plurality of frames are received, there is only one top-address retaining register 20 for the receiving RAM 22 for storing therein the receive data. Accordingly, in the case where the number of top receiving data bytes including the receiving frames varies by accident or error on the serial transmitting line, in other words, in the case where a length of the frame received previously is short or long when the plurality of frames are received, the receiving RAM storing addresses of the subsequent receiving data are located at different positions. For this reason, the top position in the receiving RAM of the received frame shifts so that the top position of the received frame must be searched for by software processing. Thus, processing due to the software is complicated, and processing time is lengthened. Further, "Receiving Unit For Serial Data" disclosed in Japanese Patent Laid-Open No. HEI 2-52543 discloses an arrangement in which a plurality of frames are stored in the same memory. In this case, however, data-length information is included in the receiving frame. However, in the case where the data-length information is erroneously recognized by a receiving circuit, the normal receiving operation of a subsequent receiving frame cannot be assured, due to problems with the transmitting line. A further problem involves the interrupt processing which is conducted at the expose of background processing. Specially, in the communication control system in the numerical control apparatus, interruption of the motion-control CPU 806 occurs with a variable cycle. Accordingly, the cycle is shortened in the case where a high speed and a high accuracy are required, and frequency of the servo-interruption processing increases. Accordingly, the time available for generation of the transmitting data and analysis of the receiving data is shortened. SUMMARY OF THE INVENTION It is therefore a first object of the invention to provide a communication control apparatus in which a burden or load of a processing CPU can be reduced, processing by a software can be simplified, and processing time can be shortened. It is a second object of the invention to provide a communication control apparatus in which, notwithstanding the presence of an error in a preceding receiving frame, it is possible to properly receive a subsequent receiving frame. It is a third object of the invention to provide a communication control apparatus in which the servo-interruption time can be shortened in order to improve the control of a servo-motor and a main-spindle motor, and the number of interrupts can be reduced to increase the background processing time. The invention provides a communication control apparatus according to claim 1 and a method of communicating according to claim 11. Further, there is provided a series communication between a host control unit and an I/O control unit, which comprises (1) a plurality of transmitting address base resisters for storing plural transmission-start addresses on a transmitting RAM, and (2) a plurality of transmitting data-base registers for storing plural transmitting data lengths of respective frames. As a result of this structure, once a CPU can prepare transmitting data corresponding to a plurality of frames on the transmitting RAM, subsequent transmission of the plurality of frames can automatically be made without further intervention of CPU processing. Further, there is also provided a series communication between the host control unit and the I/O control unit, which comprises (1) a plurality of receiving address base resisters for storing plural receiving-frame-data storing start addresses on a receiving RAM, and (2) a plurality of receiving data-base registers for storing plural receiving data lengths of respective receiving frames. As a result of this structure, whereby it is possible to receive a plurality of frames without the need for a CPU to identify or confirm the receiving data every frame. The plurality of transmitting address base registers and transmitting data base registers in this invention are arranged such that the plural transmitting RAM top addresses and the plural transmitting data counts are set at the time that transmission begins for every frame. Also, transmitting address counter are loaded before the transmitting data counter before start of transmission of each frame begins. The transmitting address counter and the transmitting data counter are increased and decreased in accordance with the transmitting data demands from the transmission control section. Also, detection of generation of readout addresses of the transmitting RAM and detection of termination of the transmitting frames due to the fact that the transmitting data counter becomes "0" are executed. A transmitting timing setting section sets timings for transmitting the plurality of transmitting frames per unit time. Furthermore, the plurality of receiving address base registers and the plurality of receiving data base registers are arranged such that, similarly to the case of transmission, the receiving RAM top addressees and the number of receiving data counts at start of reception of each frame are set, and are loaded to the receiving address counter and the receiving data counter before the start of receiving of each frame. Similarly to the case of transmission after the start of receiving, the receiving RAM top addressees and the number of receiving data counts at start of receiving are increased and decreased in accordance with a writing demand to the receiving RAM of the receiving data. These are used for the detection of errors in the case where the receiving frame due to the results of generation of the writing addresses to the receiving RAM and the receiving data count is longer or shorter than a predetermined or prescribed value. As described above, according to the invention, the transmission of a plurality of frames can automatically be executed at predetermined timing per unit time (a period of time during which the CPU executes writing of the transmission RAM, reading of the receiving RAM and read and write processing of the register, only one time). Since data of the plurality of receiving frames are automatically written to the receiving RAM simultaneously so that the CPU can confirm the receiving data of the plurality of frames at one time, it is possible to reduce the processing burden or load on the CPU. Further, since the top addresses for writing the receiving RAM are separately provided every receiving frame, even in the case where the number of receiving data words including the receiving frames varies due to an error on the transmission line, the receiving RAM storing addresses for the receiving data on the subsequent receiving frame are predetermined or constant. Accordingly, it is unnecessary to performs a software search the top position of the receiving frame. Thus, the software processing can be simplified. Furthermore, even in the case where the receiving frame length varies due to differences in the application software, since the receiving RAM top address is determined every receiving frame, it is the top storing position every receiving frame. Thus, the receiving data processing of the CPU requires only simple software processing and a high speed processing time can be achieved. Moreover, in the case of the transmission process, since the top address of the transmission RAM is determined every frame regardless of the transmitting frame length, the transmission data processing of the CPU on the basis of the software processing can be simplified and the processing time can achieve high speed. Other objects and features of this invention will become understood from the following description with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing a hardware arrangement of a series transmitting section according to the invention; Fig. 2 is a block diagram showing a hardware arrangement of a series receiving section according to the invention; Fig. 3 is a block diagram showing an arrangement in which the series transmitting section illustrated in Fig. 1 is combined with the series receiving section illustrated in Fig. 2; Fig. 4 is a block diagram showing a hardware arrangement at the time means illustrated in Fig. 1 for storing therein a top address and a data length is formed by an FIFO memory; Fig. 5 is a view showing a relationship between a transmitting (receiving) address data base register in a transmitting RAM and a receiving RAM according to the invention and transmitting (receiving) data base registers; Fig. 6 is a view showing a difference, during a receiving data storing condition with respect to the receiving RAM in a plurality of receiving frames, between a conventional example (A) and the invention (B); Fig. 7 is a block diagram showing a communication system of a general numerical control apparatus; Fig. 8 is a block diagram showing an arrangement in the case where the communication control system according to the invention is applied to a numerical control apparatus; Fig. 9 is a view showing a shunting or replacement concept between transmitting and receiving frames according to the invention; Fig. 10 is a block diagram showing an arrangement of a conventional communication control apparatus; and Fig. 11 is a block diagram showing an arrangement of a communication control system in the conventional numerical control apparatus. DESCRIPTION OF THE EMBODIMENTS Various embodiments of the invention will be described hereinafter. Referring first to Fig. 1, there is shown a series communication transmitting section according to the invention. Fig. 2 is a view of a hardware arrangement of a series communication receiving section according to the invention. The reference numeral 11 denotes a transmitting control section which converts parallel data read out of a transmitting RAM 12 to series data to execute a transmission on line 103 in plural frames; 12, the transmitting RAM; 13, a transmitting address counter for generating read addresses of the transmitting RAM 12 at execution of the series communication; 14, a transmitting data counter for counting the numbers of transmitting data counts every frame; 15, transmitting address base registers (#1 ∼ #3) for retaining a top address in the transmitting RAM 12 for transmitting data in corresponding one of a plurality of frames; 16, transmitting data base registers (#1 ∼ # 3) for retaining the number of transmitting data counts for a corresponding one of a plurality of frames; 17, a register for setting transmitting timing per unit time; 18, a transmitting timing generating section for generating an actual transmitting start signal on the basis of a signal from the transmitting timing setting register 17 and a signal from a timer 19; 19, the timer; 1A, an oscillator; 1B, a transmitting frame number counter for counting the number of frames whose transmission has been completed; and 1C, a transmitting status processing section for informing a condition to the CPU 20. Next, as shown in Fig. 2, the reference numeral 21 denotes a receiving control section for converting received series data on line 103 to parallel data to write the converted data to a receiving RAM 22; 22, the receiving RAM; 23, a receiving address counter for generating a writing address of the receiving RAM 22 at execution of the series receipt; 24, a receiving data counter for counting the number of received data counts every receiving frame; 25, receiving address base registers ( #1 ∼ #3) for retaining a top address in the receiving RAM 22 for receiving data in a corresponding one of a plurality of receiving frames; 26, receiving data base registers (#1 ∼ # 3) for retaining the number of receiving data counts for a corresponding one of a plurality of every receiving frames; 27, a receiving timing status processing section for retaining the timing at which each receiving frame is received, for reference by the CPU 30; 28, a receiving timing latch section for latching a timer value at the time the receiving start signals every receiving frame are received from the receiving control section 21; 29, the timer; 2A, an oscillator; 2B, a receiving frame number counter for counting the number of frames completed in receipt; and 2C, a receiving status processing section for informing a condition to the CPU 30. Fig. 3 is an internal block diagram in the communication control LSI in which the series transmitting section illustrated in Fig. 1 and the series receiving section illustrated in Fig. 2 are combined with each other. The details of Figs. 1 and 2 are omitted. Fig. 4 shows an arrangement in which the transmitting address base registers 15 ( #1 ∼ # 3) illustrated in Fig. 3 are replaced by a transmitting address base storing FIFO memory 41, the transmitting data base registers 16 (#1 ∼ #3) are replaced by a transmitting data base storing FIFO memory 42, the receiving address base registers 25 (#1 ∼ # 3) are replaced by a receiving address base storing FIFO memory 43, and the receiving data base registers 26 (#1 ∼ # 3) are replaced by the receiving data base storing FIFO memory 44. Fig. 5 is a view showing a relationship among each transmitting address base register 15 in the transmitting RAM 12 and the receiving RAM 22, each transmitting data base register 16, each receiving address base register 25 and each receiving data base register 26. Further, Fig. 6 shows the differences between the arrangement of storage of the receiving data with respect to the receiving RAM 22 in the plurality of receiving frames of the conventional example (A) and the arrangement of storage in accordance with the present invention (B). The basic or fundamental operation of the series communication is the same as that of the conventional example. Accordingly, a description of the basic operation will be omitted, and only a portion of the operation relating to the present invention will be described. In the series transmitting section illustrated in Fig. 1, the transmitting address base registers 15 ( #1 ∼ #3) and the transmitting data base registers 16 (#1 ∼ #3) retain a top address of the transmitting RAM 12 in which the transmit data for each of a plurality of successively transmitted frames are located, and the transmitting data length of each such frame. When the CPU 20 applies a starting command to the transmitting control section 11 through the line 101, the transmitting control section 11 increases the transmitting address counter 13 and decreases the transmitting data counter 14 through the line 102, and outputs a readout signal to the transmitting RAM 12, to read out the transmitting data from the transmitting RAM 12. The transmitting control section 11 forms the readout transmitting data into a transmitting frame, and feeds out the transmitting frame through the line 103 as serial transmitting data. The case where it is desired to transmit a plurality of frames actually means a case where the plural transmitting frames are desired to be successively transmitted with a certain time interval. In this manner, it is possible to set the transmit data of the plurality of frames entirely to the transmitting RAM 12 by a single CPU processing. If the transmitting data of the plurality of frames can be transmitted once or at a time as a whole, it is unnecessary to divide the transmitting data into a plurality of separate frames. Accordingly, a case where transmission of the plurality of frames is executed means that the host control unit 1 and the I/O control unit 2 opposed to each other execute transmission at predetermined time intervals. For this reason, the transmission timing setting register 17 and the timer 19 are provided as inputs to timing generator 18 so that it can output a transmitting start signal to the transmitting control section 11 through the line 104 on the basis of the timer value and the value which is beforehand set in the transmitting timing setting register 17 by the CPU 20. Even if a start command is issued by CPU 20 to the transmitting control section 11 through the line 101, the transmitting control section 11 does not start at once. Instead, readout of the transmitting data is commanded by a signal from section 11 on the line 102, but the start of transmission will be delayed until the transmitting timing signal applies on line 104. Here, the transmitting address base register 15 and the transmitting data base register 16 are used in order successively from the #1 registers. After the first transmitting frame is transmitted, address and data information for the #2 registers is loaded to the transmitting address counter 13 and the transmitting data counter 14. Thus, preparation for the next transmission is complete. Since the transmitting control section 11 has already received a start of transmission command through the line 101 from the CPU 20, a subsequent transmitting frame may be transmitted as soon as the subsequent transmitting timing on line 104 is received. The transmitting control section 11 increases the transmitting frame number counter 1B by inserting a signal on line 105 each time a sending of the transmitting frame is completed. Also, the present condition of the transmitting control section 11 is provided to the CPU 20 through the line 106, via the transmitting status processing section 1C. Further, the contents of the transmitting frame number counter 1B are also inputted into the transmitting status processing section 1C. Thus, it is possible for the CPU 20 to identify or confirm what number of frame is transmitted. The transmitting control section 11 decreases the transmitting data counter 14 as transmission starts. If the transmitting control section 11 detects that the count value reaches "0" through the line 107, the transmitting frame is completed. The series receiving section will next be described with reference to Fig. 2. In the case of receiving processing, the receiving control section 21 executes an operation similar to that in the case of transmission through the line 201 as receiving data are inputted into the line 203. However, the receiving processing is different from transmission in that the receiving data are written by control section 21 into the receiving RAM 22. The receiving address counter 23 gives the receiving data writing address to the receiving RAM 22, and the receiving data counter 24 counts the number of receiving bytes via line. However, a receiving count value is referred to only in the receiving control section 21, but receiving is not completed. Although not shown, if the receiving data number for every frame received is known beforehand, a means for storing the number of specified receiving data every receiving frame is provided, whereby the results of the receiving data counter 24 and the means for storing the number of specified receiving data are compared with each other. In this manner, it is possible to detect an abnormality of the receiving frame. The receiving frame having a data number abnormality can be identified, through the receiving status processing section 2C. A signal is outputted on the line 205 every detection of completion of the receiving frame, and the receiving frame number counter 2B counts up. The line 206 is provided for informing the condition of the receiving control section 21 to the CPU 30, and is processed together with a value of the receiving frame number counter 2B by the receiving status processing section 2C. Furthermore, the case of receiving is different from the case of transmission in that a timer value at the time of starting of the specific receiving frame is latched, and the latch information is processed by the receiving timing status processing section 2C. The timing information is capable of being utilized for synchronization between the host control unit 1 and the I/O control unit 2. Specifically, a synchronizing signal is outputted to the line 208 at detection of the specific address added to the top of the receiving frame. For example, it is possible for the signal to apply presetting of a reference timer within the control unit and to apply presetting to the timer 19 of the series transmitting section illustrated in Fig. 1, to synchronize the timer 19 in the series transmitting section with the receiving timing of a certain specific receiving frame. Advantages provided by the plurality of memory means for the plurality of transmitting address bases, the transmitting data bases, the receiving address bases, and the receiving data bases, will next be described with reference to Figs. 5 and 6. First, the transmitting address base indicates a separate top address of the transmitting data for each of the plurality of transmitting frames stored in the transmitting RAM 11, while the receiving address base indicates a separate top address of the receiving data for each of the plurality of receiving frames stored in the receiving RAM 22. This facilitates processing because the top address is decided or determined beforehand when the CPU 20 and 30 write the transmitting data to the transmitting RAM 11 or read out the receiving data from the receiving RAM 22. Subsequently, the transmitting data base indicates the transmitting data length for every predetermined frame, while the receiving data base indicates the receiving data length for every predetermined frame. Here, since there are cases where the transmitting data length and the receiving data length vary depending upon an application and the like, it is desirable for the invention to provide a margin for each frame the RAM region or area. Further, as illustrated in Fig. 6, the conventional example (A) has a problem in that, as there may be an excess or a shortage in the number of receiving data that is included in the receiving frames, the storing position in the receiving RAM 22 for the next receiving frame will shift or slide. For example, when the top position is fixed, as indicated by the dotted line in Fig. 6 (A), an example of data in flame # 1 will overflow into frame #2 while a shortage in flame #1 will cause frame #2 to begin prior to the predetermined top position. According to the invention, however, in the case where the number of received data in a current frame (#2) exceeds the number of received data in a frame #1 received previously, the writing of the subsequent receiving data may be overlapped. Referring to Fig. 6 (B), where the number of receiving data is under, a blank area is formed before the subsequent frame #2. Thus, the top position of the receiving frame #2 does not slide or shift. In the above-described embodiment, as a method of setting the plurality of transmission start addresses, the plurality of transmitting data counts, the plurality of transmission starting addresses and the plurality of receiving data counts, a case where the registers are used is illustrated. However, the method may be arranged by memories such as FIFO memories or the like as illustrated in Fig. 4, because the registers are used in order. Further, since the receiving data counter 24 is used only to judge whether or not the number of receiving data of the receiving frame is a prescribed or specified value, the receiving data counter 24 may be deleted from the arrangement. Furthermore, the synchronizing signal 208 illustrated in Fig. 2 indicates the case where the synchronizing signal is outputted at detection of a specified address of the receiving frame. However, the synchronizing signal 208 may be outputted at receiving a predetermined number of receiving frame, depending upon the number of the receiving frames. An example in which the communication control apparatus described previously is applied to the numerical control apparatus will next be described. As shown in Fig. 7, the numerical control apparatus comprises an NC control unit 800, an operating panel 801, a remote-control machine input-and-output unit 802, a machine tool 890, a servo-amplifier unit 803, and a main-spindle amplifier unit 804. The NC control unit 800 comprises an NC main CPU 805, a motion control CPU 806, a system ROM 807, a working RAM 808, a PLC memory 809, a serial I/O channel 810, an interface 811 for the operating panel 801, a two-port RAM 812, a working RAM 813, a boot strap ROM 814, a programmable logic control unit 815, an interface 816 for the remote-control machine input-output unit 802, an interface 817 for the machine tool 890, a servo-amplifier unit 803, and a serial communication LSI 818 executing communication with the main-spindle amplifier unit 804. The servo-amplifier unit 803 and the main-spindle amplifier unit 804 comprise a serial communication LSI 819, a DSP (digital signal processor) 820, a work RAM 821, a ROM 822, a motor control section 823 for executing control of an AC servo-motor 825 and a main-spindle motor 826, and a motor position detecting section 824 for executing positional detection of an AC servo-motor 825 and a main-spindle motor 826. Fig. 8 is a view for explanation in the case where the above-described communication control system illustrated in Figs. 1 through 3 is applied to the numerical control apparatus. The arrangement illustrated in Fig. 8 is different from the arrangement illustrated in Figs. 1 through 3 only in that the host control unit 2 is changed to the NC control unit 800, and the I/O control unit 2 is changed to the servo-amplifier unit 803, and is the same in other arrangement and function or operation as the arrangement illustrated in Figs. 1 through 3. The above-described communication control system is applied to the numerical control apparatus, whereby, first, servo-interruption processing time can be shortened, the number of interruptions can be reduced, and the background processing time can be increased in order to improve control performance of the servo-motor 825 and the main-spindle motor 826. Secondly, there are many cases where changing in order, addition, connection, demounting and the like of the servo-amplifier unit 803 and the main-spindle amplifier unit 804 are executed. As shown in Figs. 9A, 9B and 9C however, software processing is made easy by simply changing the transmission and receipt address base registers 15 and 25 and the transmission and receipt data base registers 16 and 26 in the transmitting RAM 12 and the receiving RAM 22. Thirdly, boundary searching processing with respect to the subsequent frame due to erroneous receipt of the receiving frame is made unnecessary. Although the invention has been described with respect to specific embodiments for a complete and clear disclosure, the scope of the invention is limited only by the appended claims.

Claims: A communication control apparatus including an I/O control unit (2) connected to a host control unit (1) via serial communication means, comprising: control means (11, 21) for executing transmission and reception of a plurality of data frames between said host and I/O control units (1, 2), storing means (15, 16, 25, 26) for storing top addresses and word lengths of the data frames to be transmitted from a transmitting RAM (12) and to be received by a receiving RAM (22), transmit control means (11) for successively reading out transmission data frames from the transmitting RAM (12) for transmission, receive control means (21) for successively writing received data frames into the receiving RAM (22) during reception, timing means (17, 18, 27, 28) for controlling the repeated operation of transmission and reception of data frames, characterized in that said transmit and receive control means (11, 21) are responsive to timing signals from said timing means (17, 18, 27, 28) to transmit and receive the successive data frames at preset separate time intervals for each data frame, said storing means (15, 16, 25, 26) are adapted to transfer the top addresses and the word lengths of each transmitting and receiving frame to the transmitting and receiving RAMS (12, 22) respectively, wherein at least said transmitting RAM (12) and said receiving RAM (22) are integrated in the same circuit in a two-port arrangement for reading data when forming each of said transmitting frames, and for writing data at the detection of each of said receiving frames. A communication control apparatus according to Claim 1, wherein said storing means comprises a plurality of registers (15, 16, 25, 26), each register being operative for storing therein word lengths and top addresses of said transmitting RAM (12) and said receiving RAM (22) for each of said transmitting and receiving frames. A communication control apparatus according to Claim 1, wherein said storing means comprises a plurality of first-in first-out memories (41 - 44), each said memory being operative for storing therein word lengths and top addresses of said transmitting RAM (12) and said receiving RAM (22) for each of said transmitting and receiving frames. A communication control apparatus according to Claim 1, 2 or 3, further including means (2C) for outputting a synchronizing signal in synchronism with internally generated timing information, for providing synchronisation with the outside. A communication control apparatus according to Claim 1, 2 or 3, wherein said receive control means (21) are operative to generate timer information at detection of a specific receiving address included said receiving frame. A communication control apparatus according to Claim 1, 2 or 3, wherein said receive control means (21) are operative to retain timer information at detection of a specific receiving address within said plurality of receiving frames. A communication control apparatus according to any one of the Claims 1 to 6, wherein said timing means include: transmission start time means (18, 19) for generating said timing signals to define said preset time intervals, said transmit control means (11) automatically transmitting said transmitting frames in succession in accordance with the successive start timing signals from said transmission starting timer means (18, 19), wherein data reading of the corresponding successive receiving frames is executed by said receiving RAM (22) in the corresponding preset time intervals. A communication control apparatus according to any one of the Claims 1 to 7, further comprising means (2B) for retaining receiving status information, said information comprising a number of receiving frames greater than a predetermined number of receiving frames, and means (CPU) for successively retaining automatically the status of said receiving frame received within the preset time intervals by said retaining means (2C). A communication control apparatus according to any one of the Claims 1 to 8, wherein said storing means (26) are connected to receive the word length of each receiving frame beforehand, said apparatus further comprising: count means (24) for counting the number of words in each said receiving frame as actually received; comparing means (CPU) for comparing the content of said fourth means word length to said count means content; and status information retaining means, responsive to said comparing means, for determining an excess or deficiency of the number of receiving words in actual receiving frame. A numerical control machine having a communication control apparatus as defined in any one of the Claims 1 to 9 for executing transmission and reception of data frames between a host control unit (800), a remote-control machine input-output unit (802), said servo-amplifier unit (803) and said main-spindle amplifier unit. A method of communicating between a host control unit (1) and an I/O control unit (2) connected thereto by a serial communication link, comprising: a) determining and storing in a transmission RAM (12) a top address and the word length for each data frame of a plurality of data frames to be transmitted and received between said host and I/O control units, b) successively reading out and transmitting each transmission data frame along with its top address and word length from a transmitting RAM (12), c) successively writing the received data frames and their top addresses and word lengths into a receiving RAM (22) upon reception, characterized by transmitting and receiving the successive data frames at preset separate time intervals for each data frame, the time intervals being determined by timing signals from timing means (17, 18, 27, 28). The method of Claim 11, further including, prior to step (a), assembling data to be transmitted into a plurality of data frames, the assembling being performed in a single CPU processing operation. The method of communicating as set forth in Claim 12, further comprising the steps of: setting a predetermined timing interval for the transmission of each frame; repeatedly identifying the expiration of said intervals during said successive transmission; and wherein said accessing step is conducted at the beginning of each predetermined time interval in response to said identifying step. The method of communicating as set forth in Claim 20, further comprising the step of providing a margin for at least one of the data length of the transmitted frame and the data length of the received frame.

Inventors: MITO JUNICHI, MITO, JUNICHI, Mito, Junichi, c/o Mitsubishi Denki K.K.
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1992
Main classification: G06F13
IPC codes: G06F13, H04L29, G05B19, H04L13