WO2010073352A1 - データ通信システムおよびデータ通信装置 - Google Patents

データ通信システムおよびデータ通信装置 Download PDF

Info

Publication number
WO2010073352A1
WO2010073352A1 PCT/JP2008/073645 JP2008073645W WO2010073352A1 WO 2010073352 A1 WO2010073352 A1 WO 2010073352A1 JP 2008073645 W JP2008073645 W JP 2008073645W WO 2010073352 A1 WO2010073352 A1 WO 2010073352A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processing unit
slave station
reception
station
Prior art date
Application number
PCT/JP2008/073645
Other languages
English (en)
French (fr)
Inventor
真人 中村
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to CN200880132547.XA priority Critical patent/CN102265557B/zh
Priority to DE112008004237.3T priority patent/DE112008004237B4/de
Priority to JP2010543688A priority patent/JP4948651B2/ja
Priority to US13/131,293 priority patent/US8725827B2/en
Priority to KR1020117014326A priority patent/KR101314992B1/ko
Priority to PCT/JP2008/073645 priority patent/WO2010073352A1/ja
Priority to TW098101184A priority patent/TWI402678B/zh
Publication of WO2010073352A1 publication Critical patent/WO2010073352A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/42Loop networks
    • H04L12/427Loop networks with decentralised control
    • H04L12/433Loop networks with decentralised control with asynchronous transmission, e.g. token ring, register insertion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/4026Bus for use in automation systems

Definitions

  • the present invention relates to a data communication system and a data communication apparatus that perform data communication between a master station and a slave station by a token passing system using Ethernet (registered trademark).
  • communication systems are configured by connecting field devices such as PLCs (Programmable Logic Controllers), inverters, and thermometers, and various processes are performed while data communication is performed between field devices.
  • field devices such as PLCs (Programmable Logic Controllers), inverters, and thermometers
  • a token passing method using a LAN (Local Area Network) standard such as Ethernet (registered trademark) technology is employed in order to guarantee the real-time property of data communication performed between field devices.
  • LAN Local Area Network
  • Ethernet registered trademark
  • the frame length used for data transfer is shortened.
  • a short frame in which the bit error has occurred is retransmitted. This makes it possible to reduce the amount of data to be retransmitted and increase the efficiency of data transfer.
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a data communication system and a data communication apparatus that efficiently perform data communication by improving noise resistance while guaranteeing real-time performance. Further, in the case of the token passing system, an object is to obtain a data communication system and a data communication apparatus that can perform data communication particularly efficiently.
  • the present invention provides a data communication system in which data communication between a master station and a plurality of slave stations is performed by a token passing system using Ethernet (registered trademark).
  • the master station is transmitted from the slave station with a communication processing unit that performs data transmission / reception with each slave station as a first data transmission / reception process by circulating a token frame with each slave station.
  • Connected to an arithmetic processing unit that arithmetically processes incoming data and generates data to be transmitted to the slave station, and data transmission / reception performed between the arithmetic processing unit and the communication processing unit is a second data transmission / reception process.
  • a data transmission / reception processing unit for performing data transmission / reception to / from the data transmission / reception processing unit.
  • the token frame is circulated with each slave station and the data reception process for receiving data from each slave station is performed as a retry process.
  • the token frame is circulated with each slave station without performing the third data transmission / reception process, and data is received from each slave station. In this case, a retry process is performed, and the third data transmission / reception process is performed after the retry process.
  • the token when retry processing of data reception processing is performed with each slave station, the token is transmitted without performing the third data transmission / reception processing between the slave station and the communication processing unit. Since the data is received from each slave station by cycling the frame, it is possible to improve the noise resistance and efficiently perform data communication while guaranteeing the real-time property of data transmission and reception between the master station and the slave station There is an effect that it becomes possible.
  • FIG. 1 is a diagram illustrating a configuration of a data communication system according to the first embodiment.
  • FIG. 2 is a block diagram showing the configuration of the PLC.
  • FIG. 3 is a sequence diagram showing a processing procedure of the data communication system according to the first embodiment.
  • FIG. 4 is a sequence diagram showing a processing procedure of a conventional data communication system.
  • FIG. 5 is a diagram illustrating a configuration of a communication processing unit that switches the type of retry processing according to user settings.
  • FIG. 6 is a sequence diagram illustrating a processing procedure of the data communication system according to the second embodiment.
  • FIG. 7 is a sequence diagram illustrating a processing procedure of the data communication system according to the third embodiment.
  • FIG. 8 is a diagram illustrating an example of the configuration of the reception state information table.
  • FIG. 1 is a diagram illustrating a configuration of a data communication system according to the first embodiment.
  • FIG. 2 is a block diagram showing the configuration of the PLC.
  • FIG. 3 is a
  • FIG. 9 is a diagram illustrating a configuration of the communication processing unit of the master station according to the fourth embodiment.
  • FIG. 10 is a diagram illustrating a configuration of a slave station according to the fourth embodiment.
  • FIG. 11 is a sequence diagram illustrating a processing procedure of the data communication system according to the fourth embodiment.
  • FIG. 12 is a diagram for explaining data communication via the switching hub.
  • FIG. 13 is a diagram showing a memory configuration of the data communication system according to the fifth embodiment.
  • FIG. 14 is a diagram illustrating the configuration of the communication processing unit of the slave station according to the fifth embodiment.
  • FIG. 15 is a diagram illustrating a configuration of a communication processing unit of the master station according to the fifth embodiment.
  • FIG. 16 is a sequence diagram illustrating a processing procedure of the data communication system according to the fifth embodiment.
  • FIG. 17 is a diagram for explaining cyclic data division processing.
  • FIG. 18 is a diagram illustrating a determination circuit when all the divided frames are received.
  • FIG. 19 is a diagram illustrating a determination circuit when a part of the divided frames cannot be received.
  • FIG. 20 is a diagram for explaining the reset processing of the determination circuit.
  • FIG. 21 is a diagram illustrating the configuration of the communication processing unit of the master station according to the sixth embodiment.
  • FIG. 22 is a diagram illustrating the configuration of the communication processing unit of the slave station according to the sixth embodiment.
  • FIG. 23 is a sequence diagram illustrating a processing procedure of the data communication system according to the sixth embodiment.
  • FIG. 24 is a diagram illustrating a configuration of the communication processing unit of the master station when the number of TF repetition transmissions is changed.
  • FIG. 25 is a diagram illustrating a configuration of the communication processing unit of the master station when the number of TF repetition transmissions is changed for each station.
  • FIG. 1 is a diagram illustrating a configuration of a data communication system according to the first embodiment.
  • the data communication system 100 includes a master station M and a plurality of slave stations SL1 to SLn (n is a natural number).
  • n is a natural number.
  • a master station M and each of the slave stations SL1 to SLn are connected on a transmission path (bus), and perform data communication with each other via the transmission path.
  • the data communication system 100 realizes cyclic communication using a token passing method using a LAN standard such as Ethernet (registered trademark) technology, and the stations (master station M, slave stations SL1 to SLn). Data communication (Ethernet (registered trademark) frame transmission / reception) is performed. This guarantees real-time performance of data communication (data transmission / reception timing) performed in the transmission path.
  • a LAN standard such as Ethernet (registered trademark) technology
  • the master station M and slave stations SL1 to SLn are field devices that require real-time data communication.
  • the master station M and the slave stations SL1 to SLn are data communication devices that realize cyclic communication using a token passing system.
  • the master station M is a network unit disposed in a PLC (Programmable Logic Controller) 10 described later, and performs data communication with the slave stations SL1 to SLn.
  • Each of the slave stations SL1 to SLn is disposed in a peripheral device (not shown) such as an IO device or a digital / analog converter, and sends an operation instruction or the like from the master station M to these peripheral devices.
  • the data of the PLC 10 is transmitted from the master station M to the slave stations SL1 to SLn. Then, each of the slave stations SL1 to SLn operates the peripheral device using the data from the master station M. Further, each of the slave stations SL1 to SLn sends data acquired from the peripheral device to which each slave station is connected to the master station M.
  • the PLC 10 performs a predetermined calculation using data from the slave stations SL1 to SLn, and generates data to the slave stations SL1 to SLn. Then, the generated data is transmitted from the master station M to the slave stations SL1 to SLn.
  • the data communication system 100 operates by repeating data communication processing performed between the master station M and the slave stations SL1 to SLn.
  • the data communication system 100 it is set in advance in which order the token frames (hereinafter referred to as TF) flow between the slave stations SL1 to SLn.
  • TF token frames
  • the communication device each slave station SL1 to SLn or the master station M
  • receives the TF it recognizes that the own station has acquired the transmission right and, if necessary, the data of the own station.
  • TF is issued and the next transmitting station is designated.
  • each station performs this operation, and the TF circulates in the data communication system 100, thereby avoiding the congestion state of the frame on the transmission path and ensuring the real-time property of the data communication.
  • the master station M recognizes that it has received data from the slave stations SL1 to SLn by receiving TF, and executes data reception processing (firmware processing) and the like.
  • Firmware processing (hereinafter referred to as F / W processing) is processing related to data transmission / reception within the master station M. After executing the F / W process, the master station M starts data transmission to the slave stations SL1 to SLn, thereby timing data communication with the slave stations SL1 to SLn.
  • the master station M performs reception processing at each data reception timing from each of the slave stations SL1 to SLn instead of receiving TF, the received data of all the slave stations SL1 to SLn are processed together. Compared to the time required for this, extra time is required for DMA (Direct Memory Access) transfer in the master station M, and the performance deteriorates. On the other hand, in the present embodiment, the efficiency of data transmission / reception is improved by collectively processing the reception data of all the slave stations SL1 to SLn. In addition, the master station M according to the present embodiment can perform another process until the TF returns after the TF is issued, so that the processing efficiency of the entire system is improved.
  • DMA Direct Memory Access
  • FIG. 2 is a block diagram showing the configuration of the PLC.
  • the PLC 10 has a CPU (Central Processing Unit) 1 and a master station M which are arithmetic processing units.
  • the master station M includes a data processing unit 2, a communication processing unit 3M, and a memory 4.
  • the master station M is configured using, for example, an ASIC (Application Specific Integrated Circuit) or a microcomputer.
  • ASIC Application Specific Integrated Circuit
  • the CPU 1 is connected to the master station M and performs data communication with the master station M.
  • the CPU 1 transmits data to be transmitted to the slave stations SL1 to SLn (data for controlling peripheral devices, etc.) to the data processing unit 2 of the master station M. Further, the CPU 1 receives data from the slave stations SL1 to SLn received by the master station M from the data processing unit 2.
  • the data processing unit (data transmission / reception processing unit) 2 of the master station M performs data relay (second data transmission / reception processing) between the CPU 1 and the communication processing unit 3M.
  • the data processing unit 2 sends data from the CPU 1 to the communication processing unit 3M, and sends data from the communication processing unit 3M to the data processing unit 2.
  • the data processing unit 2 of the master station M divides the data from the CPU 1 into data (packets) of a predetermined size and sends it to the communication processing unit 3M.
  • the data processing unit 2 integrates data from the communication processing unit 3M into data of a predetermined size and sends the data to the CPU 1.
  • the communication processing unit 3M performs data transmission / reception processing (first data transmission / reception processing) with the slave stations SL1 to SLn and data transmission / reception processing (third data transmission / reception processing) with the data processing unit 2.
  • the communication processing unit 3M collects the data sent from the slave stations SL1 to SLn and DMA-transfers them to the data processing unit 2.
  • the communication processing unit 3M includes a transmission buffer 31 and a reception buffer 32.
  • the communication processing unit 3M stores data from the CPU 1 in the transmission buffer 31, and transmits the data to each of the slave stations SL1 to SLn via the transmission buffer 31. Further, the communication processing unit 3M stores data from the slave stations SL1 to SLn in the reception buffer 32 and transmits the data to the CPU 1 side via the reception buffer 32.
  • the memory 4 stores data sent from the CPU 1 to the data processing unit 2 and data sent from the communication processing unit 3M to the data processing unit 2.
  • the data stored in the memory 4 is read by the communication processing unit 3M at a predetermined timing when the CPU 1 is given a read permission, and at a predetermined timing when the read permission is given from the communication processing unit 3M. Read by CPU1.
  • the communication processing unit 3 In the PLC 10, data from the CPU 1 is sent to the data processing unit 2 and stored in the memory 4. After the read permission is given from the CPU 1, the communication processing unit 3 ⁇ / b> M reads the data in the memory 4. At this time, the communication processing unit 3M requests the data processing unit 2 to read data. As a result, the data processing unit 2 divides the data in the memory 4 into data of a predetermined size and sends the data to the communication processing unit 3M. The communication processing unit 3M transmits the data from the data processing unit 2 to the slave stations SL1 to SLn via the transmission buffer 31.
  • data from the slave stations SL1 to SLn is stored in the reception buffer 32.
  • Data in the reception buffer 32 is DMA-transferred to the data processing unit 2 and stored in the memory 4.
  • the CPU 1 reads the data in the memory 4.
  • the data processing unit 2 integrates the data in the memory 4 into data of a predetermined size and sends it to the CPU 1.
  • FIG. 3 is a sequence diagram showing a processing procedure of the data communication system according to the first embodiment.
  • a case where there are two slave stations SL1 and SL2 in the data communication system 100 will be described. Further, a case will be described in which TF from the master station M is first sent to the slave station SL1, and then TF is sent from the slave station SL1 to the slave station SL2.
  • One of the features of the processing procedure of the data communication system 100 of the present embodiment is that TF transmission to the slave station SL1, data transmission from the slave station SL1 to the master station M, TF transmission to the slave station SL2, and slave station
  • One cycle of communication processing including data transmission from SL2 to master station M and TF transmission from slave station SL2 to master station M is repeated two cycles.
  • the communication processing unit 3M of the master station M transmits TF (first time) to the slave station SL1 (ST1).
  • the slave station SL1 performs a data transmission process to the master station M (ST2).
  • Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST3).
  • the slave station SL1 sends a TF to the slave station SL2 (ST4).
  • the slave station SL2 When the slave station SL2 receives TF, it performs data transmission processing to the master station M (ST5). Data from slave station SL2 is sent to communication processing unit 3M as data s2 (ST6). When the data transmission process to the master station M is completed, the slave station SL2 sends a TF to the master station M (ST7).
  • the communication processing unit 3M of the master station M When the communication processing unit 3M of the master station M receives the data s1 and the data s2, it stores them in the reception buffer 32.
  • the data s1 of ST3 is normally received by the communication processing unit 3M, and the data s2 of ST6 is not normally received by the communication processing unit 3M due to noise or the like (when data corruption or data loss occurs). Will be described.
  • the communication processing unit 3M of the master station M of the present embodiment receives the TF (first time) from the slave station SL2, the communication station 3M sends the TF (not shown) to the slave station SL1 regardless of whether the data s1 and the data s2 are normally received. (Second time) is transmitted (ST8). In other words, the communication processing unit 3M does not determine whether or not the data s1 and s2 have been normally received, and does not perform reception processing (F / W processing described later) in the master station M of the data s1 and s2. The next TF is transmitted to the slave station SL1.
  • the slave station SL1 When the slave station SL1 receives the TF, it performs data transmission processing to the master station M (ST9). Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST10). When the data transmission process to the master station M is completed, the slave station SL1 sends a TF to the slave station SL2 (ST11).
  • the slave station SL2 When receiving the TF, the slave station SL2 performs a data transmission process to the master station M (ST12). Data from slave station SL2 is sent to communication processing unit 3M as data s2 (ST13). When the data transmission process to the master station M is completed, the slave station SL2 sends a TF to the master station M (ST14).
  • ST10 and ST13 show a case where the communication processing unit 3M normally receives the data s1 and s2.
  • the data s1 and s2 received at ST10 and ST13 are stored in the reception buffer 32 together with the data s1 and s2 received at ST3 and ST6.
  • the communication processing unit 3M When the communication processing unit 3M receives TF (second time) from the slave station SL2, the communication processing unit 3M performs data reception processing (ST15). Specifically, the communication processing unit 3M determines whether or not the data s1 and s2 stored in the reception buffer 32 are normally received data. When the communication processing unit 3M determines that at least one normal data is received from each slave station (slave station SL1, SL2), the data s1, s2 from each slave station SL1, SL2 Are collectively transferred to the data processing unit 2 (ST16, ST17). This makes it possible to transfer data at a higher speed than when data from each slave station is transferred to the data processing unit 2 one by one.
  • the communication processing unit 3M may transfer only normal data to the data processing unit 2 or transfer DMA to the data processing unit 2 It is not necessary to do. Thereafter, the communication processing unit 3M makes a data read request to the data processing unit 2.
  • the data processing unit 2 transmits the data in the memory 4 to the communication processing unit 3M (ST18). Data from the data processing unit 2 is sent to the communication processing unit 3M as data m.
  • the data m from the data processing unit 2 is stored (transmission data set) in the transmission buffer 31 of the communication processing unit 3M (ST19). Then, communication processing unit 3M performs data transmission processing to slave stations SL1 and SL2 (ST20). From the transmission buffer 31, data m is broadcast and transmitted to the slave stations SL1 and SL2 (ST21 and ST22).
  • the communication processing unit 3M When the communication processing unit 3M completes the data transmission processing to the slave stations SL1 and SL2, the communication processing unit 3M sends a TF to the slave station SL1 (ST23). When receiving TF from the communication processing unit 3M, the slave station SL1 transmits TF to the slave station SL2 (ST24). When slave station SL2 receives TF from slave station SL1, slave station SL2 transmits TF to communication processing unit 3M (ST25). Thereafter, when the communication processing unit 3M receives the TF from the slave station SL2, the data communication system 100 transmits data from the master station M to the slave stations SL1 and SL2, and thereafter the processes of ST1 to ST25 are repeated.
  • the communication processing unit 3M performs the data reception process after repeating the communication process described above for two cycles.
  • the above communication process is always retried once without performing the F / W process.
  • the retry time at this time is a communication process for one cycle, and this retry time is a loss time caused by the retry process.
  • the data communication system 100 performs the retry process in a short time.
  • the data communication system 100 can efficiently recover data communication in a short time even when a method that is weak against noise resistance such as Ethernet (registered trademark) is used.
  • FIG. 4 is a sequence diagram showing a processing procedure of a conventional data communication system.
  • FIG. 4 shows a processing procedure when the data communication system 100 of the present embodiment performs the same processing as that of the conventional data communication system.
  • the data communication system 100 here performs the same processing as ST1 to ST7 shown in FIG. 3 as the processing of ST31 to ST37.
  • the communication processing unit 3M After the slave station SL2 sends TF (first time) to the communication processing unit 3M (ST37), the communication processing unit 3M stores the data s1 and s2 in the reception buffer 32.
  • the data s1 of ST33 is normally received by the communication processing unit 3M and the data s2 of ST36 is not normally received by the communication processing unit 3M due to noise or the like will be described.
  • communication processing unit 3M Upon receiving TF (first time) from slave station SL2, communication processing unit 3M performs data reception processing (data normality determination and transfer processing to data processing unit 2) (ST38). Specifically, communication processing unit 3M performs DMA transfer of data s1 and data s2 to data processing unit 2 (ST39, ST40). At this time, although the data s2 cannot be normally received due to noise or the like, reception processing (DMA transfer or the like) is performed by the communication processing unit 3M. Thereafter, the communication processing unit 3M makes a data read request to the data processing unit 2.
  • the data processing unit 2 transmits the data in the memory 4 to the communication processing unit 3M (ST41). Data from the data processing unit 2 is sent to the communication processing unit 3M as data m.
  • the data m from the data processing unit 2 is stored (transmission data set) in the transmission buffer 31 of the communication processing unit 3M (ST42). Then, communication processing unit 3M performs data transmission processing to slave stations SL1 and SL2 (ST43). From the transmission buffer 31, data m is broadcast and transmitted to the slave stations SL1 and SL2 (ST44, ST45).
  • the communication processing unit 3M When the communication processing unit 3M completes the data transmission processing to the slave stations SL1 and SL2, the communication processing unit 3M sends a TF to the slave station SL1 (ST46).
  • the same processing as ST9 to ST25 described in FIG. 3 of the first embodiment is performed.
  • the processing of ST47 to ST63 shown in FIG. 4 corresponds to the processing of ST9 to ST25 shown in FIG.
  • the communication processing unit 3M receives the TF from the slave station SL2
  • the data communication system 100 transmits data from the master station M to the slave stations SL1 and SL2, and then the processes of ST31 to ST63 are repeated.
  • retry processing is performed by cyclic communication using the token method, and whenever data s1, s2 is transmitted from the slave stations SL1, SL2 (every time TF is received).
  • Reception processing (ST38), transmission data set processing (ST42), and the like are performed.
  • the retry processing of the conventional data communication processing includes F / W processing related to data transmission / reception in the master station M such as data reception processing (ST38) and transmission data set processing (ST42) by the communication processing unit 3M. It is included.
  • ST38 to ST52 are performed as retry processing.
  • the time for retry processing becomes longer.
  • the capacity of data transmitted / received between stations (between nodes) increases, the F / W processing takes time, so the retry time becomes longer.
  • the conventional retry process requires a longer time than the data communication process of the present embodiment shown in FIG.
  • the F / W processing when the communication processing unit 3M has the transmission buffer 31 and the reception buffer 32 and the F / W processing is performed with the settings left to the user, the F / W processing often takes time. Further, as the bandwidth of the transmission path is improved (for example, improved from 10 Mbps to 100 Mbps, and improved from 100 Mbps to 1 Gbps), the influence of the performance of F / W processing on the performance of the data communication system 100 increases.
  • the retry process in the data communication process of FIG. 3 and the retry process in the data communication process of FIG. 5 is a diagram illustrating a configuration of a communication processing unit that switches the type of retry processing according to user settings.
  • the communication processing unit 3M that switches the type of retry processing according to user settings includes an instruction input unit 33 and a setting switching unit 35 in addition to the transmission buffer 31 and the reception buffer 32.
  • the instruction input unit 33 includes a mouse, a keyboard, buttons, and the like, and receives an instruction (an instruction for designating the type of data communication processing) input from the user.
  • the instruction input unit 33 receives an instruction for specifying the retry process shown in FIG. 3 and a process for specifying the retry process shown in FIG.
  • the instruction input unit 33 sends an instruction externally input by the user to the setting switching unit 35 as a setting instruction for data communication processing.
  • the setting switching unit 35 switches data communication processing based on the retry processing setting instruction sent from the instruction input unit 33.
  • Ethernet registered trademark
  • data communication in the data communication system 100 is performed using other communication methods. Also good.
  • the retry process may be performed twice or more.
  • the number of retry processes performed in the data communication system 100 is set in advance based on a user instruction from the instruction input unit 33 or the like.
  • the set number of retries (the number of token frame consecutive transmissions) is stored in a data storage unit (not shown) in the communication processing unit 3M. As a result, it is possible to easily perform the number of retry processes desired by the user.
  • the data s1 and s2 in the master station M are transmitted regardless of whether the data s1 and s2 are normally received. Since the master station M transmits TF (second time) to the slave station SL1 without performing reception processing, it is possible to perform data communication recovery processing in a short time. Therefore, efficient data communication can be performed.
  • Embodiment 2 a second embodiment of the present invention will be described with reference to FIG.
  • data m is retransmitted from the master station M to the slave stations SL1 and SL2 during the retry process.
  • FIG. 6 is a sequence diagram showing a processing procedure of the data communication system according to the second embodiment.
  • Data communication system 100 of the second embodiment performs the same processing as ST1 to ST7 shown in FIG. 3 as the processing of ST71 to ST77.
  • the communication processing unit 3M After the slave station SL2 sends TF (first time) to the communication processing unit 3M (ST77), the communication processing unit 3M stores the data s1 and the data s2 in the reception buffer 32.
  • the case where the data s1 of ST73 is normally received by the communication processing unit 3M and the data s2 of ST76 is not normally received by the communication processing unit 3M due to noise or the like will be described.
  • the communication processing unit 3M performs data transmission processing to the slave stations SL1 and SL2 regardless of whether or not the data s1 and data s2 have been normally received (ST78).
  • the communication processing unit 3M transmits data to the slave stations SL1 and SL2 using the data m stored in the transmission buffer 31.
  • the data m stored in the transmission buffer 31 is the same data as the data m transmitted from the communication processing unit 3M to the slave station SL1 before transmitting the first TF from the communication processing unit 3M to the slave station SL1. is there. From the transmission buffer 31, data m is broadcast and transmitted to the slave stations SL1 and SL2 (ST79 and ST80).
  • the communication processing unit 3M When the communication processing unit 3M completes the data transmission processing to the slave stations SL1 and SL2, the communication processing unit 3M sends a TF to the slave station SL1 (ST81).
  • the same processing as ST9 to ST25 described in FIG. 3 of the first embodiment is performed.
  • the processing of ST82 to ST98 shown in FIG. 6 corresponds to the processing of ST9 to ST25 shown in FIG.
  • the communication processing unit 3M receives the TF from the slave station SL2
  • the data communication system 100 transmits data from the master station M to the slave stations SL1 and SL2, and then the processes of ST71 to ST98 are repeated.
  • the data communication process of FIG. 3, the data communication process of FIG. 4, and the data communication process of FIG. 6 may be properly used according to the state in the data communication system 100. . Also in this case, similar to the data communication system 100 of the first embodiment, the type of communication processing is switched by the communication processing unit 3M illustrated in FIG. An instruction for designating any of the data communication processes shown in FIGS. 3, 4, and 6 is input to the instruction input unit 33.
  • the data m from the master station M to the slave stations SL1 and SL2 may be repeatedly transmitted over a plurality of times.
  • the master station M may transmit the data m at the time of retry to the slave stations SL1 and SL2 a plurality of times, or may transmit the data m at the normal time to the slave stations SL1 and SL2 a plurality of times.
  • data is transmitted from the master station M to the slave stations SL1 and SL2 during the recovery process.
  • Noise resistance can be improved.
  • Embodiment 3 a third embodiment of the present invention will be described with reference to FIGS.
  • the master station M receives the data s1 and s2
  • any of the data communication processing (ST8 to ST14) shown in FIG. 3 and the data communication processing (ST38 to ST52) shown in FIG. Is determined by the communication processing unit 3M of the master station M, and the data communication processing is switched.
  • the data communication system 100 switches the type of data communication processing according to the state in the data communication system 100 (the reception state of the data s1 and the data s2).
  • FIG. 7 is a sequence diagram showing a processing procedure of the data communication system according to the third embodiment.
  • Data communication system 100 of the third embodiment performs the same processing as ST1 to ST7 shown in FIG. 3 as the processing of ST101 to ST107.
  • the communication processing unit 3M After the communication processing unit 3M receives the TF (first time) from the slave station SL2 (ST107), the communication processing unit 3M confirms the reception state (arrival state) of the data s1 and the data s2 (ST108). Specifically, the communication processing unit 3M determines whether or not the data s1 and s2 received from the slave stations SL1 and SL2 are normally received data using, for example, FCS (Frame Check Sequence). In other words, the communication processing unit 3M normally transmits the data sent from the slave stations SL1 and SL2 until it receives the token frame addressed to itself (ST101 to ST107) after issuing the token frame. It is determined whether it is received or a frame is missing on the transmission path.
  • FCS Frae Check Sequence
  • the communication processing unit 3M selects either the data communication process shown in FIG. 3 or the data communication process shown in FIG. 4 based on the determination result (ST109). In other words, when the communication processing unit 3M receives a TF from the slave station SL2, the communication processing unit 3M issues a TF to the slave station SL1, or receives data s1 and s2 from the slave stations SL1 and SL2 in the master station M. Decide what to do.
  • the communication processing unit 3M selects the data communication process (F / W process) shown in FIG. 4 when determining that all data has been normally received in one cycle of the data communication process.
  • This information table is an information table (hereinafter referred to as a reception state information table) in which the determination result of whether or not the data received from each slave station is normal is registered for each data reception.
  • the reception status information table is stored in the memory 4 of the master station M.
  • the memory 4 is a memory shared with the slave stations SL1 to SLn.
  • the CPU 1 (application) transmits and receives data as data read / write to the memory 4. For this reason, data transmission from the master station M to the slave stations SL1 to SLn and data transmission from the slave stations SL1 to SLn to the master station M are performed by the CPU 1 in the transmission area on the memory 4 arranged in each station. This is done by writing. Then, the CPU 1 overwrites the memory 4 with the latest data so that the latest data is stored in the memory 4. Therefore, the latest data is stored in the reception state information table stored in the memory 4 of the master station M.
  • FIG. 8 is a diagram showing an example of the configuration of the reception status information table.
  • the reception status information table 101 information indicating whether or not the data received by the master station M from the slave stations SL1 to SLn is normal is registered for each reception time of each data.
  • the communication processing unit 3M adds a new number of times ((x + 1)) to the reception status information table 101. And the data from each of the slave stations SL1 to SLn at this time is registered.
  • the communication processing unit 3M selects either the data communication process shown in FIG. 3 or the data communication process shown in FIG. 4 based on the reception state information table 101.
  • the reception state information table 101 if the data from each of the slave stations SL1 to SLn is registered with “OK” any number of times, the communication processing unit 3M selects the data communication process shown in FIG.
  • the communication processing unit 3M selects the data communication processing (retry processing) shown in FIG.
  • the communication processing unit 3M resets the information in the reception state information table 101 when determining that all data has been normally received in one cycle of data communication processing. Further, the communication processing unit 3M resets information in the reception state information table 101 when the data communication processing shown in FIG. 4 is selected.
  • the communication processing unit 3M selects the type of data communication processing
  • the communication processing unit 3M sends an instruction to the setting switching unit 35 to perform data communication by the selected data communication processing.
  • the setting switching unit 35 switches data communication processing based on an instruction sent from the communication processing unit 3M.
  • FIG. 7 shows a case where the data s1 and s2 received in ST103 and ST106 are normal. For this reason, the communication processing unit 3M selects the data communication process shown in FIG. Thereby, in data communication system 100, the processes of ST110 to ST124 are performed as the data communication process shown in FIG. The processing of ST110 to ST124 corresponds to the processing of ST38 to ST52 shown in FIG.
  • the communication processing unit 3M After the slave station SL2 sends TF (second time) to the communication processing unit 3M (ST124), the communication processing unit 3M confirms the reception status of the data s1 and data s2 received this time (ST125). Based on this confirmation result, communication processing unit 3M selects either the data communication process shown in FIG. 3 or the data communication shown in FIG. 4 (ST126).
  • FIG. 7 shows a case where the data s1 received in ST120 is normal and the data received in ST123 is not normal. Therefore, the communication processing unit 3M selects the data communication process shown in FIG. Thereby, in data communication system 100, the processes of ST127 to ST133 are performed as the data communication process shown in FIG. The processing of ST127 to ST133 corresponds to the processing of ST8 to ST14 shown in FIG.
  • the communication processing unit 3M registers and resets information in the reception state information table 101. Then, the communication processing unit 3M performs the data communication process shown in FIG. 3 or the data shown in FIG. 4 based on the determination result of whether or not the data s1 and s2 received this time are normal and the reception state information table 101. Select one of the communication processes. And the process which performs the data communication between the master station M and slave station SL1, SL2 by the selected data communication process is repeated.
  • the communication processing unit 3M is based on the reception state of the data s1 and s2.
  • the number of retries described in (1) may be set. In this case, if the data s1 and s2 are normally received, the retry count is set to 0 and the retry process is not performed.
  • the communication processing unit 3M sets the number of retries a small number of times (for example, once) when the error part of the data s1 and s2 received from the slave stations SL1 and SL2 is less than a predetermined number, and receives from the slave stations SL1 and SL2.
  • the communication processing unit 3M may set the number of transmissions of the data m described in the second embodiment based on the reception state of the data s1 and s2.
  • the master station M transmits data to the slave stations SL1 and SL2 and receives the data s1 and s2 and then checks the reception state and determines the next process has been described.
  • the reception status may be confirmed or the next process may be determined later.
  • Embodiment 4 FIG. Next, a fourth embodiment of the present invention will be described with reference to FIGS.
  • the master station M when the master station M receives the data s1 and s2, the master station M instructs the number of times that the slave station transmits data (the number of repetitions of data transmission). At this time, the master station M determines the number of times of data transmission for each slave station according to the state in the data communication system 100 (the reception state of the data s1 and the data s2).
  • FIG. 9 is a diagram illustrating a configuration of a communication processing unit of the master station according to the fourth embodiment.
  • the communication processing unit 3M has a transmission count setting unit 37 in addition to the transmission buffer 31 and the reception buffer 32.
  • the transmission number setting unit 37 sets the number of times data is transmitted to each of the slave stations SL1 and SL2 based on the reception state of the data s1 and s2.
  • the communication processing unit 3M transmits the information on the number of transmissions (data transmission number) of the slave stations SL1 and SL2 set by the transmission number setting unit 37 in the TF and transmits the information to the slave stations SL1 and SL2.
  • FIG. 10 is a diagram illustrating a configuration of a slave station according to the fourth embodiment. Since the slave stations SL1 and SL2 have the same configuration, the configuration of the slave station SL1 will be described here. As illustrated in FIG. 10, the slave station SL1 includes a data input / output unit 7 and a communication processing unit 70S.
  • the communication processing unit 70S performs data transmission / reception processing with the master station M.
  • the communication processing unit 70S includes a transmission buffer 71, a reception buffer 72, and a data transmission number control unit 73.
  • the communication processing unit 70S stores data from the data input / output unit 7 in the transmission buffer 71 and transmits the data to the master station M via the transmission buffer 71. Further, the communication processing unit 70S stores data from the master station M in the reception buffer 72 and transmits the data to the data input / output unit 7 via the reception buffer 72.
  • the data transmission count control unit 73 controls the number of data transmissions to the master station M based on the received TF. For example, when the number of data transmissions to the master station M is set to 2 in the TF, the data transmission number control unit 73 repeats data transmission to the master station M twice.
  • the data input / output unit 7 is connected to peripheral devices (not shown) such as IO devices and digital / analog converters, and sends operation instructions from the master station M to these peripheral devices. In addition, data from the peripheral device is sent to the data input / output unit 7. Data sent from the peripheral device to the data input / output unit 7 is sent to the master station M via the communication processing unit 70S.
  • FIG. 11 is a sequence diagram showing a processing procedure of the data communication system according to the fourth embodiment.
  • Data communication system 100 of the fourth embodiment performs the same processing as ST1 to ST7 shown in FIG. 3 as the processing of ST141 to ST147.
  • the communication processing unit 3M After the slave station SL2 sends TF (first time) to the communication processing unit 3M (ST147), the communication processing unit 3M confirms the reception state of the data s1 and the data s2 (ST148). Then, the communication processing unit 3M determines whether the data s1 and s2 received from the slave stations SL1 and SL2 are normally received data.
  • the communication processing unit 3M performs a data reception process at the master station M when the data s1 and s2 received from the slave stations SL1 and SL2 are normally received data.
  • the communication processing unit 3M is the data from which the transmission count setting unit 37 has normally received the data s1 and s2.
  • the number of times (repetition count) for transmitting data to each of the slave stations SL1 and SL2 is set based on the determination result and the state (error amount) of the received data s1 and s2 (ST149).
  • the transmission count setting unit 37 transmits data to the slave station that has received the data a small number of times (for example, 0 times or once). Set the number of times.
  • the transmission count setting unit 37 sets the data transmission count for a small number of times (for example, twice) to the slave station when the error part of the data s1 and s2 received from the slave stations SL1 and SL2 is less than a predetermined amount. To do.
  • the transmission count setting unit 37 sets the number of times of data transmission to the slave station many times (for example, 3 times) when the error part of the data s1 and s2 received from the slave stations SL1 and SL2 is larger than a predetermined amount. To do. In addition, when the data s1 and s2 cannot be received from the slave stations SL1 and SL2, the transmission count setting unit 37 sets the number of times of data transmission to the slave station that has failed to receive data (for example, four times). . In the present embodiment, a case will be described in which the transmission count setting unit 37 sets the number of times of data transmission to the slave station SL1 to two and sets the number of times of data transmission to the slave station SL2 to one.
  • the communication processing unit 3M puts information on the number of transmissions for each slave station set by the transmission number setting unit 37 (twice for the slave station SL1 and once for the slave station SL2) in the TF to be sent next. Then, communication processing unit 3M transmits this TF to slave station SL1 (ST150).
  • the communication processing unit 70S of the slave station SL1 receives the TF from the master station M.
  • the data transmission count control unit 73 of the slave station SL1 sets the number of data transmission processes to the master station M based on the TF from the master station M. Here, since the slave station SL1 is set to perform data transmission twice within the TF, the data transmission count control unit 73 sets the data transmission count to two.
  • slave station SL1 performs a data transmission process (first time) to master station M (ST151).
  • Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST152).
  • communication processing unit 3M performs data transmission processing (second time) to master station M (ST153).
  • Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST154).
  • slave station SL1 sends TF to slave station SL2 (ST155). In this TF, information on the number of transmissions for each slave station set by the transmission number setting unit 37 of the master station M is entered.
  • the communication processing unit 70S of the slave station SL2 receives the TF from the slave station SL1.
  • the data transmission count control unit 73 of the slave station SL2 sets the number of data transmission processes to the master station M based on TF.
  • the data transmission number control unit 73 sets the data transmission number to one.
  • slave station SL2 performs data transmission processing to master station M (ST156).
  • Data from slave station SL2 is sent to communication processing unit 3M as data s2 (ST157). Since the number of times of data transmission from the slave station SL2 is set to one in TF, the communication processing unit 70S sends a TF to the master station M when the data transmission process to the master station M (first time) is completed ( ST158).
  • the communication processing unit 3M When the communication processing unit 3M receives the TF from the slave station SL2, the communication processing unit 3M performs a data reception process (ST159). At this time, the communication processing unit 3M may perform data reception processing at the master station M only when the data s1 and s2 received from the slave stations SL1 and SL2 are normally received data. In this case, if the data s1 and s2 received from the slave stations SL1 and SL2 are not normally received data by the communication processing unit 3M, the data communication system 100 performs the processes of ST149 to ST158 again.
  • the communication processing unit 3M DMA-transfers the data s1 and s2 from the slave stations SL1 and SL2 to the data processing unit 2 together (ST160 and ST161). Thereafter, communication processing unit 3M makes a data read request to data processing unit 2, and performs the processes of ST18 to ST25 described in FIG. 3 of the first embodiment.
  • the communication processing unit 3M receives the TF from the slave station SL2, the data communication system 100 transmits data from the master station M to the slave stations SL1 and SL2, and then performs the processing of ST141 to ST161 and ST18 shown in FIG. The processing of ⁇ ST25 is repeated.
  • the transmission number setting unit 37 sets the number of times data is transmitted to each slave station SL1, SL2.
  • the number of times data is transmitted to each slave station SL1, SL2 is set in advance by the user May be.
  • the communication processing unit 3M illustrated in FIG. 9 is configured to have the function of the instruction input unit 33 illustrated in FIG.
  • the number of times data is transmitted to each of the slave stations SL1 and SL2 may be set based on the reception status of the data s1 and s2 received in the past (statistical information calculated using the history of the reception status). .
  • FIG. 12 is a diagram for explaining data communication via the switching hub.
  • the transmission count setting unit 37 sets the number of transmissions corresponding to the noise occurrence rate for each slave station by setting the number of times data is transmitted to each slave station SL1, SL2 based on the statistical information of the reception state. be able to.
  • the transmission count setting unit 37 determines whether the data s1 and s2 received from the slave stations SL1 and SL2 are normally received data using FCS, for example.
  • the number-of-transmissions setting unit 37 stores this determination result, and based on the stored determination result, statistical information (such as a noise occurrence rate) regarding the data reception state (whether it is normal reception). create. Then, the transmission count setting unit 37 sets the number of times data is transmitted to each of the slave stations SL1 and SL2 based on the created statistical information. In this case, the transmission count setting unit 37 may set the number of times of data transmission to each of the slave stations SL1 and SL2 based on statistical information in the reception state before receiving TF from the slave station SL2.
  • the transmission count setting unit 37 is based on the number of slave stations with which the master station M performs data communication, the time required for data communication with each slave station, the time required for data processing performed in the master station M, and the like.
  • the number of data transmissions to each slave station SL1, SL2 may be set.
  • the case where data is transmitted from the master station M to the slave stations SL1 and SL2 and the reception status is confirmed and the number of transmissions is set after the data s1 and s2 are received has been described. After that, the reception status may be confirmed and the number of transmissions may be set.
  • the fourth embodiment since the number of times of transmitting data to each slave station SL1, SL2 is set based on the reception state of data s1, s2, it is appropriate according to the reception state of data s1, s2. Recovery processing can be performed. Therefore, efficient data communication can be performed.
  • Embodiment 5 a fifth embodiment of the present invention will be described with reference to FIGS.
  • the cyclic data is divided, and a sequential number (sequential number), an end flag (last information), and data storage range information are added to the divided cyclic data.
  • Data management when updating the cyclic data sent from the other station to its own memory, it is determined whether or not all the cyclic data has been received based on the sequential No and the end flag.
  • cyclic data can be received, it is expanded in the memory of the local station.
  • the data storage range information is the data length of the divided cyclic data and the address for storing in the memory, and each station stores the cyclic data at a position in the memory according to the data storage range information.
  • Cyclic communication used in the FA field or the like is a communication method in which a plurality of stations connected to a transmission path share data of other stations.
  • each station has a shared memory (memory for storing data common to all the stations) shared by other stations.
  • the shared memory of each station is configured by a transmission area and a reception area, and each station stores data acquired by the own station in the transmission area, and stores data from other stations in the reception area.
  • Each station transmits the data in the transmission area of its own station to the reception area of the shared memory of the other station at a predetermined cycle. This makes it possible to share common data between stations (cyclic data guarantee for each station).
  • FIG. 13 is a diagram showing a memory configuration of the data communication system according to the fifth embodiment.
  • the shared memory provided in the master station M is indicated by a shared memory 80X
  • the shared memories provided in the slave stations SL1 to SL3 are indicated by shared memories 81X to 83X, respectively.
  • FIG. 13 shows a case where there are three slave stations SL1 to SL3 in the data communication system 100.
  • the shared memory 80X of the master station M has a transmission area 80a for storing data of the own station (master station M) as master station data, and a reception area for storing data transmitted from the slave station SL1 as slave station data (1).
  • the shared memory 81X of the slave station SL1 stores a reception area 81a for storing data transmitted from the master station M as master station data, and stores data of the own station (slave station SL1) as slave station data (1).
  • a transmission area 81b, a reception area 81c for storing data sent from the slave station SL2 as slave station data (2), and a reception area 81d for storing data sent from the slave station SL3 as slave station data (3) Have.
  • the shared memory 82X of the slave station SL2 stores the reception area 82a for storing data sent from the master station M as master station data, and stores the data of its own station (slave station SL2) as slave station data (2).
  • a transmission area 82c, a reception area 82b for storing data sent from the slave station SL1 as slave station data (1), and a reception area 82d for storing data sent from the slave station SL3 as slave station data (3) Have.
  • the shared memory 83X of the slave station SL3 stores the data transmitted from the master station M as the reception area 83a for storing the data as master station data, and stores the data of the own station (slave station SL3) as the slave station data (3).
  • a transmission area 83d, a reception area 83b for storing data sent from the slave station SL1 as slave station data (1), and a reception area 83c for storing data sent from the slave station SL2 as slave station data (2) Have.
  • cyclic communication when one transmission right is acquired (TF reception), the transmission area data (cyclic data) of the local station is divided into frames, and the divided frames (hereinafter, referred to as divided frames may be referred to as “divided frames”). Is sent to other stations. At this time, the other station needs to receive all the divided frames from the station that has acquired the transmission right and update them to the latest cyclic data. In other words, when the transmission right is acquired, all the cyclic data must be updated, and only a part of the cyclic data is not allowed to be updated. Conventionally, when only a part of cyclic data can be received from a station that has acquired the transmission right, it was necessary to retransmit (continuous transmission) the cyclic data that could not be received.
  • a sequential number and an end flag are added to the divided frames and transmitted.
  • the cyclic data it is determined whether all the divided frames have been received based on the sequential No and the end flag, and the cyclic data is updated when all the divided frames have been received. .
  • FIG. 14 is a diagram illustrating the configuration of the communication processing unit of the slave station according to the fifth embodiment. Since the slave stations SL1 to SL3 have the same configuration, the configuration of the communication processing unit 70S of the slave station SL1 will be described here.
  • the communication processing unit 70S of the slave station SL1 according to the fifth embodiment includes a transmission buffer 71, a reception buffer 72, a division processing unit 61, and an assembly processing unit 62.
  • the division processing unit 61 divides cyclic data into divided frames, and the assembly processing unit 62 determines whether all the divided frames have been received.
  • the division processing unit 61 includes a data division unit 75, a sequential number assigning unit 76, and an end flag setting unit 77.
  • the data division unit 75 divides the cyclic data into frames when transmitting the cyclic data stored in the transmission area 81b of the shared memory 81X to another station.
  • the data dividing unit 75 divides the cyclic data when the slave station SL1 receives the TF and obtains the data transmission right.
  • the sequential number assigning unit 76 assigns a sequential number to each of the cyclic data (frames after division) divided by the data dividing unit 75.
  • the end flag setting unit 77 gives an end flag to the last divided frame of the cyclic data divided by the data dividing unit 75.
  • FIG. 15 is a diagram illustrating a configuration of a communication processing unit of the master station according to the fifth embodiment.
  • the communication processing unit 3M of the master station M according to the fifth embodiment based on the sequential numbers and end flags assigned to the cyclic data sent from the other stations (slave stations SL1 to SL3), It is determined whether or not the click data has been received. If all the cyclic data has been received, the cyclic data is expanded in the shared memory 80X of the local station.
  • the communication processing unit 3M includes a transmission buffer 31, a reception buffer 32, a division processing unit 61, and an assembly processing unit 62.
  • the assembly processing unit 62 includes an update instruction unit 51 and a register reset unit 53.
  • the update instruction unit 51 includes a determination circuit 52 that determines whether all the divided frames have been received. When the determination circuit 52 determines that all the divided frames have been received, the update instruction unit 51 develops the divided frames in the shared memory 80X.
  • the determination circuit 52 is a register (sequential No register 91 to be described later) for inputting information on whether or not a divided frame corresponding to each sequential number has been received, and information on whether or not an end flag has been added to the divided frame. Is provided (end flag register 92 described later). The determination circuit 52 determines whether all the divided frames have been received based on information input to the sequential No register 91 and the end flag register 92.
  • the register reset unit 53 determines from which station the cyclic data is received based on the SA (source address) given in the cyclic data.
  • SA is frame transmission source information indicating the transmission source of cyclic data. For example, when a post-division frame is received from a station different from the previous station, the register reset unit 53 discards the sequential number and end flag received from the previous station and resets the determination circuit 52.
  • FIG. 16 is a sequence diagram illustrating a processing procedure of the data communication system according to the fifth embodiment.
  • the case where there are two slave stations SL1 and SL2 in the data communication system 100 will be described. Further, a case will be described in which TF from the master station M is first sent to the slave station SL1, and then TF is sent from the slave station SL1 to the slave station SL2.
  • the communication processing unit 3M of the master station M transmits TF to the slave station SL1 (ST191).
  • slave station SL1 performs data transmission processing to master station M (ST192).
  • the communication processing unit 70S of the slave station SL1 divides the cyclic data of the own station stored in the transmission area 81b in the shared memory 81X and transmits the divided data to the master station M.
  • the data transmission from the slave station SL1 to the master station M is repeated a plurality of times (here, two cycles).
  • the data transmission is repeated a plurality of times, and at each data transmission, the cyclic data is divided and transmitted.
  • FIG. 17 is a diagram for explaining cyclic data division processing.
  • the data division unit 75 of the slave station SL1 divides the cyclic data (data s1) stored in the transmission area 81b of the shared memory 81X into data of a predetermined size.
  • the data dividing unit 75 divides the cyclic data into three data (data s1-1, s1-2, s1-3) will be described.
  • the sequential number assigning unit 76 assigns a sequential number to each of the divided frames.
  • the sequential number assigning unit 76 assigns a sequential number “0” to the first divided frame (data s1-1) and assigns a sequential number “1” to the second divided frame (data s1-2). And a sequential number “2” is assigned to the third divided frame (data s1-3). Further, the end flag setting unit 77 assigns an end flag to the last divided frame among the divided frames. Here, since the cyclic data is divided into three, the end flag setting unit 77 gives the end flag “1” to the third divided frame.
  • the communication processing unit 70S of the slave station SL1 transmits the divided frame to which the sequential number and the end flag are assigned to the master station M.
  • Communication processing unit 70S first transmits the first divided frame as data s1-1 to master station M (ST193). Further, the communication processing unit 70S transmits the second divided frame as data s1-2 to the master station M (ST194), and transmits the third divided frame as data s1-3 to the master station M. (ST195).
  • the communication processing unit 70S repeats data transmission similar to ST192 (ST196). Specifically, the communication processing unit 70S performs the first divided frame (data s1-1), the second divided frame (data s1-2), and the third divided frame (data s1- The divided frames are transmitted to the master station M in the order of 3) (ST197, ST198, ST199).
  • the communication processing unit 3M of the master station M When receiving the divided frame from the slave station SL1, the communication processing unit 3M of the master station M extracts the sequential number and end flag given to the divided frame. Then, information corresponding to the sequential No and the end flag is input to the sequential No register 91 and the end flag register 92 of the determination circuit 52.
  • 18 and 19 are diagrams showing a configuration example of the determination circuit and information input to the determination circuit.
  • 18 shows the determination circuit 52 when all the divided frames are received
  • FIG. 19 shows the determination circuit 52 when some of the divided frames cannot be received.
  • the determination circuit 52 includes a sequential No register 91 and an end flag register 92.
  • the determination circuit 52 inputs information to the sequential No register 91 and the end flag register 92, and outputs a determination result as to whether all the divided frames have been received from the slave station SL1.
  • the sequential No register 91 has, for example, 512 registers, and each register corresponds to a divided frame.
  • the end flag register 92 has, for example, 512 registers, and each register corresponds to a divided frame.
  • the first register (No0 recv_Reg) of the sequential No register 91 corresponds to the divided frame of sequential No “0”
  • the second register (No1 recv_Reg) is after the division of sequential No “1”. It corresponds to the frame.
  • the first register (No0 E_Reg) of the end flag register 92 corresponds to the frame after the division of sequential No “0”
  • the second register (No1 E_Reg) after the division of the sequential No “1”. It corresponds to the frame.
  • the update instruction unit 51 extracts all the sequential numbers and end flags given to the divided frame.
  • the update instruction unit 51 extracts sequential numbers “1” to “3” and end flags of sequential numbers “3”.
  • the initial values of the sequential No register 91 and the end flag register 92 are “0”.
  • the update instruction unit 51 inputs “1” to the register corresponding to the extracted sequential number in the sequential number register 91.
  • “1” is input to the registers corresponding to the sequential numbers “1” to “3”.
  • “1” is input to the “No0 recv_Reg” register, the “No1 recv_Reg” register, and the “No2 recv_Reg” register. Since the end flag of sequential No. “3” is extracted, “1” is input to the end flag corresponding to the divided frame of sequential No. “3” in the end flag register 92.
  • the determination circuit 52 when “1” is input to the registers corresponding to all the divided frames in the sequential No register 91 and “1” is input to any one of the end flag registers 92, It is configured to output “1” indicating that all divided frames have been received.
  • the determination circuit 52 shown in FIG. 18 “1” is input to the registers corresponding to all the divided frames. In the determination circuit 52 shown in FIG. 18, “1” is input to the end flag corresponding to the divided frame of sequential No “3”. Therefore, the determination circuit 52 shown in FIG. 18 outputs “1” indicating that all the divided frames have been received.
  • the determination circuit 52 shown in FIG. 19 “1” is not input to the registers corresponding to some of the divided frames. That is, “0” is still input to the register of “No1 recv_Reg”. Therefore, the determination circuit 52 shown in FIG. 19 outputs “0” indicating that all the divided frames have not been received.
  • the divided frames that have been received correctly are stored in the reception buffer 32 of the communication processing unit 3M.
  • Slave station SL1 repeats cyclic data transmission twice. For this reason, the cyclic data is sent to the master station M twice.
  • the update instruction unit 51 extracts all the sequential numbers and end flags assigned to the divided frames. Then, the update instruction unit 51 inputs “1” to the register corresponding to the extracted sequential number. Also, “1” is input to the register corresponding to the extracted end flag. At this time, re-input of “1” to a register to which “1” has already been input may be omitted.
  • the master station M has received at least one divided frame among the divided frames transmitted twice, it is determined that the divided frame has been received.
  • each divided frame is received at least once, it is determined that all the divided frames have been received, and “1” is output from the determination circuit 52.
  • the determination circuit 52 outputs “1”, the update instruction unit 51 determines that all the divided frames have been received from the slave station SL1.
  • the slave station SL1 When the slave station SL1 completes the data transmission process to the master station M, it sends a TF to the slave station SL2 (ST200). Thereby, the communication processing unit 70S of the slave station SL2 transmits the cyclic data as data s2 to the master station M (ST201, ST202). At this time, similarly to the slave station SL1, the slave station SL2 may repeatedly transmit the cyclic data a plurality of times and may divide the cyclic data into divided frames. Thereafter, slave station SL2 sends TF to master station M (ST203).
  • the master station M receives cyclic data from the slave station SL2. At this time, if the cyclic data from the slave station SL2 is a divided frame, the cyclic data is received by the same processing as the divided frame from the slave station SL1. Specifically, the master station M determines that all the divided frames have been received when each divided frame that has been repeatedly transmitted a plurality of times is received at least once. At this time, the determination circuit 52 outputs “1”. When the determination circuit 52 outputs “1”, the update instruction unit 51 determines that all the divided frames have been received from the slave station SL2.
  • the update instruction unit 51 determines that all the divided frames have been received from the slave station SL2 without using the determination circuit 52.
  • the update instruction unit 51 sets a reception permission flag indicating whether or not all the cyclic data has been received. Enter “1”.
  • the reception permission flag is a flag that the master station M has, and is a flag that indicates whether or not data reception processing by the data processing unit 2 is permitted. Data reception processing by the data processing unit 2 is prohibited when the reception permission flag is “0”, and data reception processing by the data processing unit 2 is permitted when the reception permission flag is “1”.
  • the data processing unit 2 monitors the value of the reception permission flag by polling.
  • the data processing unit 2 performs data reception processing when the reception permission flag is “1” (ST204).
  • the divided frames stored in the reception buffer 32 are sent to the data processing unit 2.
  • the communication processing unit 3M performs DMA transfer of the data s1, s2 from the slave stations SL1, SL2 to the data processing unit 2 together (ST205, ST206).
  • the data processing unit 2 inputs “0” to the reception permission flag of the communication processing unit 3M.
  • the communication processing unit 3M waits for the divided frame from the next slave station SL2.
  • the data processing unit 2 may perform the data reception process when the communication processing unit 3M receives all the cyclic data from the slave station SL1. In this case, the data processing unit 2 performs data reception processing when the communication processing unit 3M receives all the cyclic data from the slave station SL2.
  • FIG. 16 illustrates the case where the slave station SL1 transmits cyclic data to the master station M, but the slave station SL1 also transmits cyclic data to the slave station SL2. Further, the slave station SL2 transmits cyclic data to the master station M and the slave station SL1, and the master station M transmits cyclic data to the slave stations SL1 and SL2.
  • FIG. 20 is a diagram for explaining the reset processing of the determination circuit.
  • the communication processing unit 3M of the master station M includes a register reset determination unit 54 in addition to the register reset unit 53 and the determination circuit 52. In the communication processing unit 3M shown in FIG. 15, the register reset determination unit 54 is not shown.
  • the register reset determination unit 54 determines whether or not to reset the sequential No register 91 and the end flag register 92 and sends the determination result to the register reset unit 53.
  • the register reset determination unit 54 includes an SA determination unit 56 and a TF determination unit 57.
  • the SA determination unit 56 determines from which station the cyclic data is received based on the SA in the received cyclic data. If the SA determination unit 56 determines that a post-division frame has been received from a station different from the previous one, it sends a register reset instruction to the register reset unit 53.
  • the TF determination unit 57 determines to which station the TF is based on the received TF destination (token destination information). When the TF determination unit 57 determines that the TF addressed to the own station (master station M) has been received, the TF determination unit 57 sends a register reset instruction to the register reset unit 53.
  • the register reset unit 53 discards the sequential number and the end flag and resets the determination circuit 52 when a register reset instruction is sent from the SA determination unit 56 or the TF determination unit 57. Specifically, “0” is input to all of the sequential No register 91 and the end flag register 92.
  • the register reset determination unit 54 sends a register reset instruction to the register reset unit 53 using the SA determination unit 56.
  • the register reset determination unit 54 sends a register reset instruction to the register reset unit 53 using the TF determination unit 57.
  • the register reset determination unit 54 determines the TF determination even if the master station M and the station sharing the cyclic data are two or more slave stations.
  • a register reset instruction can be sent to the register reset unit 53 using the unit 57.
  • the TF determination unit 57 sends a register reset instruction to the register reset unit 53.
  • the TF determination unit 57 receives the TF of the destination different from the previous time or the TF of the transmission source (token transmission source information) different from the previous time. Then, a register reset instruction is sent to the register reset unit 53.
  • the TF determination unit 57 sends a register reset instruction to the register reset unit 53 when receiving a TF destined for another station.
  • the register reset determination unit 54 includes both the SA determination unit 56 and the TF determination unit 57 has been described.
  • the configuration of the register reset determination unit 54 is different from that of the SA determination unit 56 and the TF determination unit TF. It is good also as a structure provided with either one of the determination parts 57.
  • the station that has received the cyclic data can determine whether or not all the cyclic data has been received based on the sequential number and the end flag.
  • cyclic data transmission / reception is repeated a plurality of times, it is possible to easily determine whether or not all cyclic data has been received. Since cyclic data transmission / reception is repeated a plurality of times, cyclic data transmission retries can be reduced. In addition, since it is possible to easily determine whether or not all the cyclic data has been received, it is possible to easily maintain the real-time property of data sharing.
  • the determination circuit 52 is reset based on TF or SA added in the cyclic data, it is possible to easily determine for each station whether or not all the cyclic data has been received from each station. Become.
  • each station in a data communication system designates the next transmitting station by issuing a TF once after transmitting its own data. That is, in the conventional token method, only the station that has obtained the transmission right by receiving the TF is a rule for data transmission, and therefore, multiple issuing of TFs is not permitted. This is because if the frame of the local station is transmitted while receiving a frame from another station, frame congestion may occur in the transmission path and data loss may occur.
  • the next transmitting station is designated by transmitting TF multiple times.
  • TF transmission / reception is repeated a plurality of times.
  • FIG. 21 is a diagram illustrating a configuration of a communication processing unit of the master station according to the sixth embodiment.
  • the communication processing unit 3M of the master station M according to the fourth embodiment includes a token setting unit 41 in addition to the transmission buffer 31 and the reception buffer 32.
  • the token setting unit 41 of this embodiment sets the number of TF transmissions by the same process as the transmission number setting unit 37 described in the fourth embodiment.
  • the token setting unit 41 instructs the slave stations SL1 and SL2 about the number of token transmissions, and indicates the number of repeated transmissions of TF (number of continuous transmissions of TF) transmitted from the master station M to the slave station SL1. Set.
  • FIG. 22 is a diagram illustrating a configuration of a communication processing unit of a slave station according to the sixth embodiment. Since the slave stations SL1 and SL2 have the same configuration, the configuration of the communication processing unit 70S of the slave station SL1 will be described here. As illustrated in FIG. 22, the communication processing unit 70S of the slave station SL1 according to the sixth embodiment includes a token transmission control unit 74, a transmission buffer 71, and a reception buffer 72.
  • the token transmission control unit 74 controls the number of times to transmit the TF based on an instruction from the master station M (token setting unit 41). Specifically, the token transmission control unit 74 of the slave station SL1 controls the number of transmissions of the TF to be transmitted to the slave station SL2, and the token transmission control unit 74 of the slave station SL2 transmits the TF to be transmitted to the master station M. Control the number of times.
  • the token transmission control unit 74 receives the first TF from the master station M, the token transmission control unit 74 includes a timer (not shown) that measures an elapsed time after receiving the TF. The token transmission control unit 74 starts data transmission after a predetermined time has elapsed after receiving the first (first) TF from the master station M.
  • the token transmission control unit 74 waits for a data transmission process until a predetermined time set in advance elapses.
  • the token transmission control unit 74 measures the time since the reception of the TF, and after the preset time has elapsed, Transmit to station M.
  • FIG. 23 is a sequence diagram showing a processing procedure of the data communication system according to the sixth embodiment.
  • One of the characteristics of the processing procedure of the data communication system 100 according to the present embodiment is that the TF transmission from the master station M to the slave station SL1, the TF transmission from the slave station SL1 to the slave station SL2, and the like are repeated a plurality of times. is there.
  • the token setting unit 41 of the master station M instructs the slave stations SL1 and SL2 to perform three times as the number of token transmissions, and sets the number of token transmissions of the TF transmitted from the master station M to the slave station SL1 to three times. The case will be described.
  • the master station M when configuring the logical ring, instructs the slave stations SL1 and SL2 three times as the number of token transmissions. Specifically, information specifying the number of token transmissions (three times) is put in a setup frame transmitted from the master station M to the slave stations SL1 and SL2. Thereby, the token transmission control unit 74 of the slave stations SL1 and SL2 sets the number of TF transmissions to 3 based on an instruction from the master station M. The token setting unit 41 of the master station M sets the number of token transmissions to the slave station SL1 to 3 times.
  • the communication processing unit 3M of the master station M transmits the first TF (1) to the slave station SL1 (ST171).
  • the token transmission control unit 74 starts a timer and waits for data transmission processing to the master station M (ST174).
  • the communication processing unit 3M of the master station M transmits the second TF (2) to the slave station SL1 at a predetermined interval (ST172).
  • the communication processing unit 3M of the master station M transmits the third TF (3) to the slave station SL1 at a predetermined interval (ST173).
  • the TF is transmitted at a timing according to, for example, IEEE (Institute of Electrical and Electronics Engineers) 802.3u.
  • the token transmission control unit 74 of the slave station SL1 cancels the standby for data transmission when a predetermined time (standby time) set in advance has elapsed after receiving the first TF (1). After receiving the last TF (third TF), the token transmission control unit 74 sets a standby time so as to cancel the standby for data transmission. Thereby, the communication processing unit 70S of the slave station SL1 transmits data to the master station M after receiving the third TF (ST175). Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST176).
  • the slave station SL1 sends the first TF (1) to the slave station SL2 (ST177).
  • the token transmission control unit 74 starts a timer and waits for data transmission processing to the master station M.
  • the communication processing unit 70S of the slave station SL1 transmits the second TF (2) to the slave station SL2 at a predetermined interval (ST178).
  • the slave station SL2 receives the second TF from the slave station SL1.
  • the second TF from the slave station SL1 is recognized as the first TF reception.
  • the token transmission control unit 74 of the slave station SL2 starts a timer and waits for data transmission processing to the master station M (S179).
  • the communication processing unit 70S of the slave station SL1 After transmitting the second TF, the communication processing unit 70S of the slave station SL1 transmits the third TF (3) to the slave station SL2 at a predetermined interval (ST181).
  • the token transmission control unit 74 of the slave station SL2 cancels the standby for data transmission when a predetermined time has elapsed after receiving the first TF (1).
  • the communication processing unit 70S of the slave station SL2 transmits data to the master station M (S180).
  • Data from slave station SL1 is sent to communication processing unit 3M as data s1 (ST182).
  • the slave station SL2 sends the first TF (1), the second TF (2), and the third TF (3) to the master station M (ST183, ST184). , ST185).
  • the TF in the transmission path may be delayed.
  • the slave station SL2 may receive the TF from the slave station SL1 while performing data transmission to the master station M.
  • the token transmission control unit 74 of the slave station SL2 notifies the master station M that TF has been received during data transmission.
  • the token transmission control unit 74 notifies the master station M that the TF has been received during data transmission when receiving the TF addressed to the local station at the timing when the local station is transmitting data.
  • the switching hub 20 such as Ethernet (registered trademark) on the transmission path. For this reason, even if each station transmits TF with the minimum frame GAP (inter-transmission interval), the switching hub 20 cannot always guarantee that frames are transmitted at the reception interval when TF is received. Therefore, in the present embodiment, if the slave stations SL1 and SL2 receive TF during data transmission, the master station M is notified that the TF has been received during data transmission. As a result, the token setting unit 41 of the master station M resets the standby time from the reception of the first TF to the transmission of the data of the own station in the slave station SL2. Specifically, the token setting unit 41 of the master station M sets the standby time to the slave station SL2 so that the standby time from the reception of the first TF to the transmission of the data of the local station is longer than the current setting. Reset it.
  • Ethernet registered trademark
  • the slave station SL2 may reset the standby time itself.
  • the token transmission control unit 74 of the slave station SL2 may change the standby time based on the received TF and the TF that could not be received.
  • information indicating how many times the TF is assigned (added) to each TF in advance. For example, when TF is repeatedly transmitted five times, sequential numbers are assigned to the first to fifth TFs. Specifically, “1” is assigned as the sequential number to the first TF, “2” is assigned as the sequential number to the second TF, and “3” is assigned as the sequential number to the third TF. deep. Further, “4” is assigned as the sequential number to the fourth TF, and “5” is assigned as the sequential number to the fifth TF.
  • the token transmission control unit 74 calculates a new standby time T according to the equation (1).
  • X is the number of TF transmission repetitions
  • Sn is the first TF sequential number received.
  • T t ⁇ (X ⁇ Sn) / (X ⁇ 1) (1)
  • the token transmission control unit 74 waits for the data transmission process for the waiting time t specified by the master station M. If the sequential number of the first received TF is “2”, the token transmission control unit 74 waits for data transmission processing for (3/4) t, and the sequential number of the first received TF is “3”. ”, The token transmission control unit 74 waits for a data transmission process for (2/4) t. If the sequential number of the first received TF is “4”, the token transmission control unit 74 waits for data transmission processing by (1/4) t, and the sequential number of the first received TF is “5”. ”, The token transmission control unit 74 performs data transmission processing with a waiting time of zero. The resetting of the waiting time may be instructed from the master station M to the slave stations SL1 and SL2.
  • the token transmission control unit 74 of the slave station SL1 transmits data as well as the token transmission control unit 74 of the slave station SL2.
  • the master station M is notified that the TF has been received during data transmission.
  • the notification from the slave station SL2 to the master station M that the TF is received during data transmission is after data transmission from the slave station SL2 to the master station M (ST181) and before TF (1) is transmitted ( It may be performed before ST 183) or at the time of data transmission when slave station SL2 next receives TF from slave station SL1.
  • slave stations SL1 and SL2 start data transmission after a predetermined time has elapsed after receiving the first TF.
  • data transmission may be started after a predetermined time has elapsed after receiving the first TF.
  • the token setting unit 41 of the master station M receives the first TF.
  • the waiting time until the data of the own station is transmitted may be reset in the own station.
  • count that each station transmits TF repeatedly may be 2 times, and may be 4 times or more.
  • the number of TF repeated transmissions may be different for each station.
  • FIG. 24 is a diagram illustrating a configuration of the communication processing unit of the master station when the number of TF repetition transmissions is changed.
  • the communication processing unit 3M of the master station M when changing the number of TF repeated transmissions includes a re-token issuing unit 42 and an issuing number determining unit 43 in addition to the transmission buffer 31, the reception buffer 32, and the token setting unit 41. Yes.
  • the re-token issuing unit 42 has a function of re-issuing the TF when the TF disappears (re-token issuing function).
  • the re-token issuing unit 42 determines that the TF has disappeared and reissues the TF.
  • the issue number determination unit 43 includes a monitoring timer 44, a counter 45, a reference value storage unit 46, and a determination unit 47, and determines whether or not the number of times the TF has been reissued exceeds a predetermined value.
  • the monitoring timer 44 measures time, and the counter 45 counts how many times the re-token issuing unit 42 has re-issued TF.
  • the reference value storage unit 46 stores a reference value used when determining whether or not to change the number of TF repetition transmissions.
  • the determination unit 47 calculates the number of TF reissues per unit time based on the time measured by the monitoring timer 44 and the number of TF reissues counted by the counter 45.
  • the determination unit 47 determines whether or not the calculated number of TF reissues per unit time exceeds the reference value stored in the reference value storage unit 46.
  • the determination unit 47 instructs the token setting unit 41 to reset the number of TF transmissions when the number of TF reissues exceeds the reference value stored in the reference value storage unit 46.
  • the token setting unit 41 increases the number of transmissions of the currently set TF in accordance with the instruction from the determination unit 47. For example, the token setting unit 41 sets the TF transmission count to 1 as an initial value, and every time the TF transmission count change instruction is received from the determination unit 47, the TF transmission count is set to 2 times or 3 times. And increase.
  • the reference value storage unit 46 may store a reference value for each set TF transmission count.
  • the reference value storage unit 46 stores a plurality of reference values such as a reference value used when the set number of TF transmissions is one, and a reference value used when the number of transmissions is two. Then, the determination unit 47 obtains the currently set TF transmission count from the token setting unit 41, and compares the currently set TF transmission count with a reference value corresponding to the TF transmission count. To determine whether to increase the number of TF transmissions.
  • the determination unit 47 may instruct the token setting unit 41 to reduce the currently set number of TF transmissions when the calculated number of TF reissues per unit time is smaller than a predetermined reference value. Good. Further, the determination unit 47 may instruct the token setting unit 41 on the number of TF transmissions based on the calculated number of TF reissues per unit time. Further, the determination unit 47 may instruct the token setting unit 41 on the number of TF transmissions based on the calculated number of TF reissues per unit time.
  • the TF is changed according to the change in the transmission environment (number of TF reissues per unit time).
  • the number of transmissions can be adjusted.
  • the number of TF transmissions is reduced to give priority to high-speed communication, and when noise is generated on the transmission line, the number of TF transmissions is increased. Is possible. Accordingly, it is possible to minimize the degree of performance degradation.
  • FIG. 25 is a diagram illustrating a configuration of the communication processing unit of the master station when the number of TF repetition transmissions is changed for each station.
  • the communication processing unit 3M of the master station M when changing the number of TF repeated transmissions for each station includes a lost token determination unit 48 in addition to the transmission buffer 31, the reception buffer 32, and the token setting unit 41.
  • the lost token determination unit 48 has a function of determining which station has issued the TF by confirming to which station the TF has circulated.
  • the lost token determination unit 48 notifies the token setting unit 41 of the station (slave station SL1, SL2 or master station M) that issued the lost TF.
  • the token setting unit 41 changes the number of TF repetition transmissions for the stations (slave station SL1, slave station SL2, master station M) that issued the lost TF.
  • the token setting unit 41 sets the number of TF repetitions corresponding to the number of TF disappearances to one of the slave stations SL1 and SL2 or the master station M.
  • the slave stations SL1 and SL2 are caused to transmit TF by broadcast. Further, an SA (source address) indicating the TF issue source is included in the TF. As a result, the TF having the SA issued from the slave stations SL1 and SL2 is sent to the lost token determination unit 48 of the master station M.
  • the erasure token determination unit 48 can determine which position the TF circulates and disappears at which position by confirming the SA of the TF.
  • 3M may be configured to include a re-token issuing unit 42, an issuance count determining unit 43, and a lost token determining unit 48.
  • the master station M since the master station M sets the number of TF transmissions for each station, efficient data communication according to each station becomes possible. Further, since the master station M sets the number of TF transmissions based on the number of reissued TFs and the number of lost TFs, efficient data communication according to the noise source becomes possible.
  • the data communication system 100 may perform data communication processing by variously combining the data communication processing of the first to sixth embodiments and the conventional data communication processing described in FIG. 4 of the first embodiment.
  • the data communication system 100 may perform the data communication process by combining the data communication process described in the second embodiment and the data communication process described in the fourth embodiment.
  • the data communication system 100 broadcasts the data m to the slave stations SL1 and SL2 (ST79 and ST80 in FIG. 6).
  • communication processing unit 3M sends TF to slave station SL1 (ST150 in FIG. 11).
  • the data communication system 100 may perform the data communication process by combining the data communication process described in the first embodiment and the conventional data communication process described in the fourth embodiment.
  • the communication processing unit 3M receives the data s1 and s2 from the slave stations SL1 and SL2, the processing of ST38 to ST43 (F / W processing of the master station M) in FIG. 11 ST148 to ST158 are performed.
  • the ST109 process (next determination process) of the data communication process described in FIG. 7 of the third embodiment may be performed based on the reception state statistical information described in the fourth embodiment.
  • the communication processing unit 3M selects the data communication process shown in FIG. 3, and if the noise occurrence rate is less than the predetermined value, the communication processing unit 3M The data communication process shown in FIG. 4 is selected. This makes it possible to perform an appropriate recovery process according to the reception state of the data s1 and s2. Therefore, efficient data communication can be performed.
  • the data communication system and data communication apparatus are suitable for data communication between a master station and a slave station.

Abstract

 マスタ局とスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式で行なうデータ通信システムにおいて、マスタ局Mの通信処理部3Mは、スレーブ局SL1,SL2との間でトークンフレームを巡回させてスレーブ局SL1,SL2からのデータを受信する処理をリトライ処理する場合には、演算処理装置との間でデータの送受信を行うデータ処理部2へスレーブ局SL1,SL2からのデータを転送することなくリトライ処理する。

Description

データ通信システムおよびデータ通信装置
 本発明は、マスタ局とスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式で行なうデータ通信システムおよびデータ通信装置に関するものである。
 工場等の製造現場では、PLC(Programmable Logic Controller)、インバータ、温度計などのフィールド機器間を接続することによって通信システムを構成し、フィールド機器間でデータ通信を行いながら種々の処理を行なっている。このような通信システムでは、フィールド機器間で行なわれるデータ通信のリアルタイム性を保証するため、例えばイーサネット(登録商標)技術などのLAN(Local Area Network)規格を用いたトークンパッシング方式が採用されている。ところが、フィールド機器間を接続した通信システムでは、フィールド機器間で転送されるデータがノイズの影響を受けやすい。このため、フィールド機器間でデータ通信を行なう通信システムでは、伝送路の耐ノイズ性を向上させて効率良くデータ送信することが望まれている。
 例えば、特許文献1に記載のデータ通信制御方式では、データ転送に用いるフレーム長を短くしている。そして、データ転送フレームにビットエラーが発生した場合には、ビットエラーの発生した短いフレームを再送信している。これにより、再送信するデータ量を抑えることを可能とし、データ転送の効率を上げている。
特開平09-160851号公報
 しかしながら、上記従来の技術をフィールド機器に適用すると、データ転送の際の処理が増大し、フィールド機器間で行なわれるデータ通信のリアルタイム性がなくなるといった問題があった。特にトークンパッシング方式の場合には、送信権がトークン受信時にしか、フレームを送信できないため、従来の技術をそのまま適用した場合、性能劣化が大きくなってしまうことになる。このため、上記従来の技術をそのままフィールド機器間のデータ通信に適用することはできなかった。
 本発明は、上記に鑑みてなされたものであって、リアルタイム性を保証しながら耐ノイズ性を向上させて効率良くデータ通信を行うデータ通信システムおよびデータ通信装置を得ることを目的とする。また、トークンパッシング方式の場合は、特に効率良くデータ通信を行うことができるデータ通信システムおよびデータ通信装置を得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本発明は、マスタ局と複数のスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式で行なうデータ通信システムにおいて、前記マスタ局は、前記各スレーブ局との間でトークンフレームを巡回させて行なう前記各スレーブ局との間のデータ送受信を第1のデータ送受信処理として行なう通信処理部と、前記スレーブ局から送られてくるデータを演算処理して前記スレーブ局へ送信するデータを生成する演算処理装置に接続するとともに、前記演算処理装置と前記通信処理部との間で行なうデータ送受信を第2のデータ送受信処理として行うデータ送受信処理部と、を有し、前記通信処理部は、前記データ送受信処理部との間で行なうデータ送受信を第3のデータ送受信処理として行うとともに、前記第1のデータ送受信処理のうち前記各スレーブ局との間で前記トークンフレームを巡回させるとともに前記各スレーブ局からのデータを受信するデータ受信処理をリトライ処理する場合には、前記第1のデータ送受信処理を行なった後、前記第3のデータ送受信処理を行なうことなく前記各スレーブ局との間で前記トークンフレームを巡回させて前記各スレーブ局からのデータを受信することによってリトライ処理し、前記リトライ処理の後に前記第3のデータ送受信処理を行なうことを特徴とする。
 本発明にかかるデータ通信システムは、各スレーブ局との間でデータ受信処理のリトライ処理を行なう場合には、スレーブ局と通信処理部との間での第3のデータ送受信処理を行なうことなくトークンフレームを巡回させて各スレーブ局からのデータを受信するので、マスタ局とスレーブ局との間で行なうデータ送受信のリアルタイム性を保証しながら耐ノイズ性を向上させて効率良くデータ通信を行うことが可能になるという効果を奏する。
図1は、実施の形態1に係るデータ通信システムの構成を示す図である。 図2は、PLCの構成を示すブロック図である。 図3は、実施の形態1に係るデータ通信システムの処理手順を示すシーケンス図である。 図4は、従来のデータ通信システムの処理手順を示すシーケンス図である。 図5は、ユーザ設定によってリトライ処理の種類を切替える通信処理部の構成を示す図である。 図6は、実施の形態2に係るデータ通信システムの処理手順を示すシーケンス図である。 図7は、実施の形態3に係るデータ通信システムの処理手順を示すシーケンス図である。 図8は、受信状態情報テーブルの構成の一例を示す図である。 図9は、実施の形態4に係るマスタ局の通信処理部の構成を示す図である。 図10は、実施の形態4に係るスレーブ局の構成を示す図である。 図11は、実施の形態4に係るデータ通信システムの処理手順を示すシーケンス図である。 図12は、スイッチングハブを介したデータ通信を説明するための図である。 図13は、実施の形態5に係るデータ通信システムのメモリ構成を示す図である。 図14は、実施の形態5に係るスレーブ局の通信処理部の構成を示す図である。 図15は、実施の形態5に係るマスタ局の通信処理部の構成を示す図である。 図16は、実施の形態5に係るデータ通信システムの処理手順を示すシーケンス図である。 図17は、サイクリックデータの分割処理を説明するための図である。 図18は、全ての分割後フレームを受信した場合の判定回路を示す図である。 図19は、一部の分割後フレームを受信できていない場合の判定回路を示す図である。 図20は、判定回路のリセット処理を説明するための図である。 図21は、実施の形態6に係るマスタ局の通信処理部の構成を示す図である。 図22は、実施の形態6に係るスレーブ局の通信処理部の構成を示す図である。 図23は、実施の形態6に係るデータ通信システムの処理手順を示すシーケンス図である。 図24は、TFの繰り返し送信回数を変更する場合のマスタ局の通信処理部の構成を示す図である。 図25は、TFの繰り返し送信回数を局毎に変更する場合のマスタ局の通信処理部の構成を示す図である。
符号の説明
 1 CPU
 2 データ処理部
 3M 通信処理部
 4 メモリ
 7 データ入出力部
 10 PLC
 20 スイッチングハブ
 31,71 送信バッファ
 32,72 受信バッファ
 33 指示入力部
 35 設定切替部
 37 送信回数設定部
 41 トークン設定部
 42 再トークン発行部
 43 発行回数判定部
 44 監視タイマ
 45 カウンタ
 46 基準値記憶部
 47 判定部
 48 消失トークン判断部
 51 更新指示部
 52 判定回路
 53 レジスタリセット部
 54 レジスタリセット判定部
 56 SA判定部
 57 TF判定部
 61 分割処理部
 62 組立処理部
 70S 通信処理部
 73 データ送信回数制御部
 74 トークン送信制御部
 75 データ分割部
 76 シーケンシャルNo付与部
 77 エンドフラグ設定部
 80X~83X 共有メモリ
 91 シーケンシャルNoレジスタ
 92 エンドフラグレジスタ
 100 データ通信システム
 101 受信状態情報テーブル
 M マスタ局
 SL1~SLn スレーブ局
 以下に、本発明に係るデータ通信システムおよびデータ通信装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。
実施の形態1.
 図1は、実施の形態1に係るデータ通信システムの構成を示す図である。データ通信システム100は、マスタ局M、1~複数のスレーブ局SL1~SLn(nは自然数)を有している。データ通信システム100では、伝送路(バス)上にマスタ局Mと各スレーブ局SL1~SLnが接続されており、互いに伝送路を介してデータ通信を行なう。
 本実施の形態のデータ通信システム100は、例えばイーサネット(登録商標)技術などのLAN規格を用いたトークンパッシング方式を用いてサイクリック通信を実現し、局(マスタ局M、スレーブ局SL1~SLn)間のデータ通信(イーサネット(登録商標)フレームの送受信)を行なう。これにより、伝送路内で行なわれるデータ通信(データ授受のタイミング)のリアルタイム性を保証する。
 マスタ局Mやスレーブ局SL1~SLnは、データ通信のリアルタイム性が必要なフィールド機器などである。マスタ局M、スレーブ局SL1~SLnは、トークンパッシング方式を用いてサイクリック通信を実現するデータ通信装置である。マスタ局Mは、後述のPLC(Programmable Logic Controller)10内に配設されるネットワークユニットであり、スレーブ局SL1~SLnとデータ通信を行う。スレーブ局SL1~SLnは、それぞれIO機器やデジタル/アナログ変換装置などの周辺機器(図示せず)内に配設されており、これらの周辺機器にマスタ局Mからの動作指示などを送る。
 データ通信システム100では、PLC10のデータがマスタ局Mからスレーブ局SL1~SLnに送られる。そして、各スレーブ局SL1~SLnは、マスタ局Mからのデータを用いて周辺機器を動作させる。さらに、各スレーブ局SL1~SLnは、それぞれが接続されている周辺機器から取得したデータをマスタ局Mに送る。PLC10では、スレーブ局SL1~SLnからのデータを用いて所定の演算を行い、スレーブ局SL1~SLnへのデータを生成する。そして、生成したデータをマスタ局Mからスレーブ局SL1~SLnへ送信する。データ通信システム100は、このようなマスタ局Mとスレーブ局SL1~SLnとの間で行なうデータ通信処理を繰り返すことによって動作する。
 データ通信システム100では、予め何れの順番でトークンフレーム(以下、TFという)がスレーブ局SL1~SLn間を流れていくかが設定されている。データ通信システム100内の通信機器(各スレーブ局SL1~SLnやマスタ局M)は、TFを受信した場合に、自局が送信権を獲得したことを認識し、必要に応じて自局のデータを送信したのちTFを発行して次の送信局を指定する。データ通信システム100では、この動作を各局が実施し、TFがデータ通信システム100内を巡回することによって伝送路上のフレームの輻輳状態を回避し、データ通信のリアルタイム性を保障する。また、マスタ局Mは、TFを受信することによって、スレーブ局SL1~SLnからのデータを受信したことを認識し、データの受信処理(ファームウェア処理)などを実行する。ファームウェア処理(以下、F/W処理という)は、マスタ局M内でのデータの送受信に関する処理である。マスタ局Mは、F/W処理を実行した後、スレーブ局SL1~SLnへのデータ送信を開始することによって、スレーブ局SL1~SLnとの間でデータ通信のタイミングを図る。
 仮に、マスタ局Mが、TFを受信するタイミングではなく各スレーブ局SL1~SLnからのデータ受信タイミングごとに受信処理を実施した場合には、全てのスレーブ局SL1~SLnの受信データをまとめて処理する時間に比べて、マスタ局M内でのDMA(Direct Memory Access)転送に余分な時間がかかり性能が劣化する。一方、本実施の形態では、全てのスレーブ局SL1~SLnの受信データをまとめて処理することによってデータ送受信の効率化を図っている。また、本実施の形態のマスタ局Mは、TFを発行してTFが戻ってくるまでの間に別の処理を実施することが可能となるのでシステム全体の処理効率が向上する。
 図2は、PLCの構成を示すブロック図である。なお、図2では、マスタ局Mと接続されるスレーブ局としてスレーブ局SL1のみを図示している。同図に示すように、PLC10は、演算処理装置であるCPU(Central Processing Unit)1、マスタ局Mを有している。そして、マスタ局Mは、データ処理部2と、通信処理部3Mと、メモリ4とを備えている。マスタ局Mは、例えばASIC(Application Specific Integrated Circuit)やマイコンなどを用いて構成されている。
 CPU1は、マスタ局Mと接続されており、マスタ局Mとの間でデータ通信を行う。CPU1は、スレーブ局SL1~SLnへ送るデータ(周辺機器を制御するためのデータ等)をマスタ局Mのデータ処理部2へ送信する。また、CPU1は、マスタ局Mが受信したスレーブ局SL1~SLnからのデータをデータ処理部2から受信する。
 マスタ局Mのデータ処理部(データ送受信処理部)2は、CPU1と通信処理部3Mとの間のデータ中継(第2のデータ送受信処理)を行なう。換言すると、データ処理部2は、CPU1からのデータを通信処理部3Mに送り、通信処理部3Mからのデータをデータ処理部2に送る。マスタ局Mのデータ処理部2は、CPU1からのデータを所定サイズのデータ(パケット)に分割して通信処理部3Mに送る。また、データ処理部2は、通信処理部3Mからのデータを所定サイズのデータに統合してCPU1に送る。
 通信処理部3Mは、スレーブ局SL1~SLnとの間のデータ送受信処理(第1のデータ送受信処理)や、データ処理部2との間のデータ送受信処理(第3のデータ送受信処理)を行なう。通信処理部3Mは、スレーブ局SL1~SLnから送られてくるデータをまとめてデータ処理部2にDMA転送する。通信処理部3Mは、送信バッファ31と受信バッファ32を備えている。通信処理部3Mは、CPU1からのデータを送信バッファ31に格納し、送信バッファ31を介して各スレーブ局SL1~SLnに送信する。また、通信処理部3Mは、スレーブ局SL1~SLnからのデータを受信バッファ32に格納し、受信バッファ32を介してCPU1側へ送信する。
 メモリ4は、CPU1からデータ処理部2に送られてくるデータや通信処理部3Mからデータ処理部2に送られてくるデータを格納する。メモリ4が格納しているデータは、CPU1から読み出し許可が与えられた場合に所定のタイミングで通信処理部3Mによって読み出され、通信処理部3Mから読み出し許可が与えられた場合に所定のタイミングでCPU1によって読み出される。
 PLC10では、CPU1からのデータがデータ処理部2に送られてメモリ4に格納される。そして、CPU1から読み出し許可が与えられた後、通信処理部3Mは、メモリ4のデータを読み出す。このとき、通信処理部3Mは、データ処理部2にデータの読み出しを要求する。これにより、データ処理部2は、メモリ4内のデータを所定サイズのデータに分割して通信処理部3Mに送る。通信処理部3Mは、データ処理部2からのデータを送信バッファ31を介してスレーブ局SL1~SLnに送信する。
 また、PLC10では、スレーブ局SL1~SLnからのデータが受信バッファ32に格納される。受信バッファ32内のデータは、データ処理部2にDMA転送されてメモリ4に格納される。通信処理部3Mからから読み出し許可が与えられた後、CPU1は、メモリ4のデータを読み出す。このとき、データ処理部2は、メモリ4内のデータを所定サイズのデータに統合してCPU1に送る。
 つぎに、データ通信システム100の処理手順について説明する。図3は、実施の形態1に係るデータ通信システムの処理手順を示すシーケンス図である。以下では、データ通信システム100内のスレーブ局がスレーブ局SL1,SL2の2つである場合について説明する。また、マスタ局MからのTFがまずスレーブ局SL1に送られ、その後スレーブ局SL1からスレーブ局SL2へTFが送られる場合について説明する。
 本実施の形態のデータ通信システム100の処理手順の特徴の1つは、スレーブ局SL1へのTF送信およびスレーブ局SL1からマスタ局Mへのデータ送信と、スレーブ局SL2へのTF送信およびスレーブ局SL2からマスタ局Mへのデータ送信と、スレーブ局SL2からマスタ局MへのTF送信と、を含んだ1サイクルの通信処理を2サイクル繰り返すことである。
 データ通信システム100では、マスタ局Mの通信処理部3Mがスレーブ局SL1へTF(1回目)を送信する(ST1)。スレーブ局SL1は、TFを受信すると、マスタ局Mへのデータ送信処理を行なう(ST2)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST3)。スレーブ局SL1は、マスタ局Mへのデータ送信処理が完了すると、スレーブ局SL2へTFを送る(ST4)。
 スレーブ局SL2は、TFを受信すると、マスタ局Mへのデータ送信処理を行なう(ST5)。スレーブ局SL2からのデータは、データs2として通信処理部3Mに送られる(ST6)。スレーブ局SL2は、マスタ局Mへのデータ送信処理が完了すると、マスタ局MへTFを送る(ST7)。
 マスタ局Mの通信処理部3Mは、データs1やデータs2を受信すると受信バッファ32に格納しておく。ここでは、ST3のデータs1が通信処理部3Mによって正常に受信され、ST6のデータs2がノイズなどによって通信処理部3Mに正常に受信されなかった場合(データ化けやデータの消失が発生した場合)について説明する。
 本実施の形態のマスタ局Mの通信処理部3Mは、スレーブ局SL2からTF(1回目)を受信すると、データs1やデータs2を正常に受信できたか否かに関わらずスレーブ局SL1にTF(2回目)を送信する(ST8)。換言すると、通信処理部3Mは、データs1,s2が正常に受信できたか否かの判定や、データs1,s2のマスタ局M内での受信処理(後述のF/W処理)を行なうことなく、次のTFをスレーブ局SL1に送信する。
 スレーブ局SL1は、TFを受信すると、マスタ局Mへのデータ送信処理を行なう(ST9)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST10)。スレーブ局SL1は、マスタ局Mへのデータ送信処理が完了すると、スレーブ局SL2へTFを送る(ST11)。
 スレーブ局SL2は、TFを受信すると、マスタ局Mへのデータ送信処理を行なう(ST12)。スレーブ局SL2からのデータは、データs2として通信処理部3Mに送られる(ST13)。スレーブ局SL2は、マスタ局Mへのデータ送信処理が完了すると、マスタ局MへTFを送る(ST14)。ST10とST13では、通信処理部3Mがデータs1,s2を正常に受信した場合を示している。ST10やST13で受信したデータs1,s2は、ST3やST6で受信したデータs1,s2とともに受信バッファ32に格納される。
 通信処理部3Mは、スレーブ局SL2からTF(2回目)を受信すると、データの受信処理を行なう(ST15)。具体的には、通信処理部3Mは、受信バッファ32に格納されているデータs1,s2が正常に受信されたデータであるか否かを判断する。そして、通信処理部3Mは、各スレーブ局(スレーブ局SL1,SL2)から少なくとも1つずつの正常なデータを受信していると判断した場合に、各スレーブ局SL1,SL2からのデータs1,s2をまとめてデータ処理部2にDMA転送する(ST16、ST17)。これにより、各スレーブ局からのデータを1つずつデータ処理部2に転送する場合よりも高速にデータ転送することが可能となる。通信処理部3Mは、正常なデータを1度も受信できなかったスレーブ局が存在する場合、正常なデータのみをデータ処理部2にDMA転送してもよいし、データ処理部2へのDMA転送を行なわなくてもよい。この後、通信処理部3Mは、データ処理部2にデータの読み出し要求を行なう。
 CPU1から読み出し許可が与えられていれば、データ処理部2はメモリ4内のデータを通信処理部3Mにデータ送信する(ST18)。データ処理部2からのデータは、データmとして通信処理部3Mに送られる。
 これにより、通信処理部3Mの送信バッファ31にデータ処理部2からのデータmが格納(送信データセット)される(ST19)。そして、通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を行なう(ST20)。送信バッファ31からは、データmがブロードキャストでスレーブ局SL1,SL2に送信される(ST21、ST22)。
 通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を完了すると、スレーブ局SL1へTFを送る(ST23)。スレーブ局SL1は、通信処理部3MからTFを受信すると、TFをスレーブ局SL2に送信する(ST24)。スレーブ局SL2は、スレーブ局SL1からTFを受信すると、TFを通信処理部3Mへ送信する(ST25)。この後、通信処理部3Mがスレーブ局SL2からのTFを受信すると、データ通信システム100では、マスタ局Mからスレーブ局SL1,SL2へデータ送信し、その後、ST1~ST25の処理が繰り返される。
 このように、本実施の形態では、前述の通信処理を2サイクル繰り返した後、通信処理部3Mがデータの受信処理を行なっている。換言すると、データ通信システム100では、F/W処理を行なうことなく、前述の通信処理を必ず1回リトライしている。これにより、スレーブ局SL1,SL2からマスタ局Mへ送られるデータの耐ノイズ性を向上させることが可能となる。なお、このときのリトライ時間は、1サイクル分の通信処理であり、このリトライ時間がリトライ処理によって生じるロス時間となる。これにより、データ通信システム100では、短時間でリトライ処理を行なっている。このように、データ通信システム100は、イーサネット(登録商標)などの耐ノイズに弱い方法を用いた場合であっても、短時間で効率良くデータ通信のリカバリを行なえる。
 ここで、本実施の形態のデータ通信システム100と、従来から用いられていたデータ通信システムとの処理手順の差異を明確にするため、従来用いられていたデータ通信システムの処理手順の問題点を説明する。
 図4は、従来のデータ通信システムの処理手順を示すシーケンス図である。図4では、本実施の形態のデータ通信システム100に、従来のデータ通信システムと同様の処理を行なわせた場合の処理手順を示している。ここでのデータ通信システム100は、ST31~ST37の処理として、図3に示したST1~ST7と同様の処理を行なう。
 スレーブ局SL2が通信処理部3MへTF(1回目)を送った後(ST37)、通信処理部3Mは、データs1,s2を受信バッファ32に格納する。ここでは、ST33のデータs1が通信処理部3Mによって正常に受信され、ST36のデータs2がノイズなどによって通信処理部3Mに正常に受信されなかった場合について説明する。
 通信処理部3Mは、スレーブ局SL2からTF(1回目)を受信すると、データの受信処理(データの正常判定やデータ処理部2への転送処理)を行なう(ST38)。具体的には、通信処理部3Mは、データs1とデータs2をデータ処理部2にDMA転送する(ST39、ST40)。このとき、データs2は、ノイズなどによって正常に受信できなかったにも関わらず、通信処理部3Mによる受信処理(DMA転送など)が行なわれる。この後、通信処理部3Mは、データ処理部2にデータの読み出し要求を行なう。
 CPU1から読み出し許可が与えられていれば、データ処理部2はメモリ4内のデータを通信処理部3Mにデータ送信する(ST41)。データ処理部2からのデータは、データmとして通信処理部3Mに送られる。
 これにより、通信処理部3Mの送信バッファ31にデータ処理部2からのデータmが格納(送信データセット)される(ST42)。そして、通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を行なう(ST43)。送信バッファ31からは、データmがブロードキャストでスレーブ局SL1,SL2に送信される(ST44、ST45)。
 通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を完了すると、スレーブ局SL1へTFを送る(ST46)。以下、データ通信システム100では、実施の形態1の図3で説明したST9~ST25と同様の処理が行なわれる。図4に示したST47~ST63の処理が、図3に示したST9~ST25の処理に対応している。この後、通信処理部3Mがスレーブ局SL2からのTFを受信すると、データ通信システム100では、マスタ局Mからスレーブ局SL1,SL2へデータ送信し、その後ST31~ST63の処理が繰り返される。
 このように、従来のデータ通信処理では、トークン方式を用いたサイクリック通信によってリトライ処理を行なっており、スレーブ局SL1,SL2からデータs1,s2が送信される度(TFを受信する度)に受信処理(ST38)や送信データセット処理(ST42)などを行なっている。このため、従来のデータ通信処理のリトライ処理には、通信処理部3Mによるデータの受信処理(ST38)や送信データセット処理(ST42)などのマスタ局M内でのデータの送受信に関するF/W処理が含まれている。このように、従来のデータ通信処理では、リトライ処理としてST38~ST52が行なわれていた。トークンホールド時間内の内、マスタ局M内のF/W処理(送受信処理等)が占める割合が大きくなると、リトライ処理の時間が長くなる。特に局間(ノード間)で送受信するデータの容量が増えると、F/W処理に時間がかかるのでリトライの時間が長くなる。このように、従来のリトライ処理は、図3に示した本実施の形態のデータ通信処理と比べて長時間を要している。
 特に、通信処理部3Mが送信バッファ31と受信バッファ32を有し、F/W処理をユーザ任せの設定で行なう場合には、F/W処理に時間がかかる場合が多い。また、伝送路の帯域が向上(例えば10Mbpsから100Mbpsへ向上、100Mbpsから1Gbpsへ向上)するにしたがって、F/W処理の性能が、データ通信システム100の性能に与える影響が大きくなる。
 なお、TCP(Transmission Control Protocol)でのリトライ処理によってフレームデータの欠落をリカバリする場合、タイムアウトの時間に数百msecもかかり、リアルタイム性を重視されるフィールドネットワークでの適用が困難である。
 なお、データ通信システム100では、ユーザ設定により、図3のデータ通信処理でのリトライ処理と図4のデータ通信処理でのリトライ処理を切替えて使用してもよい。図5は、ユーザ設定によってリトライ処理の種類を切替える通信処理部の構成を示す図である。同図に示すように、ユーザ設定によってリトライ処理の種類を切替える通信処理部3Mは、送信バッファ31、受信バッファ32に加えて指示入力部33、設定切替部35を有している。
 指示入力部33は、マウス、キーボード、ボタンなどを備えて構成され、ユーザから外部入力される指示(データ通信処理の種類を指定する指示)を受け付ける。指示入力部33へは、図3に示したリトライ処理を指定する指示や図4に示したリトライ処理を指定する処理が入力される。指示入力部33は、ユーザから外部入力された指示を、データ通信処理の設定指示として設定切替部35に送る。設定切替部35は、指示入力部33から送られてくるリトライ処理の設定指示に基づいて、データ通信処理の切替えを行なう。
 なお、図3ではデータ処理部2とCPU1との間のデータ通信についてはその説明を省略しているが、データ処理部2とCPU1は、データ処理部2と通信処理部3Mとの間のデータ通信とは非同期でデータ通信を行なう。
 なお、本実施の形態では、イーサネット(登録商標)を用いてデータ通信システム100内でのデータ通信を行うこととしたが、データ通信システム100内でのデータ通信は、他の通信方法を用いてもよい。
 また、本実施の形態では、マスタ局Mとデータ通信を行うスレーブ局がスレーブ局SL1,SL2の2つである場合について説明したが、マスタ局Mとデータ通信を行うスレーブ局は、1つであってもよいし3つ以上であってもよい。
 また、本実施の形態では、リトライ処理を1度だけ行なう場合について説明したが、リトライ処理は2回以上行ってもよい。データ通信システム100で行なうリトライ処理の回数は、指示入力部33などからのユーザ指示に基づいて予め設定しておく。設定されたリトライ回数(トークンフレーム連続送信回数)は、通信処理部3M内のデータ格納部(図示せず)に格納しておく。これにより、ユーザ所望のリトライ処理回数を容易に行なうことが可能となる。
 このように実施の形態1によれば、スレーブ局SL2からTF(1回目)を受信すると、データs1,s2を正常に受信できたか否かに関わらずマスタ局M内でのデータs1,s2の受信処理を行なうことなく、マスタ局Mがスレーブ局SL1にTF(2回目)を送信するので、短時間でデータ通信のリカバリ処理を行なうことが可能となる。したがって、効率良くデータ通信を行うことが可能となる。
実施の形態2.
 つぎに、図6を用いてこの発明の実施の形態2について説明する。実施の形態2では、リトライ処理の際に、マスタ局Mからスレーブ局SL1,SL2へデータmを再送信する。
 図6は、実施の形態2に係るデータ通信システムの処理手順を示すシーケンス図である。実施の形態2のデータ通信システム100は、ST71~ST77の処理として、図3に示したST1~ST7と同様の処理を行なう。
 スレーブ局SL2が通信処理部3MへTF(1回目)を送った後(ST77)、通信処理部3Mは、データs1やデータs2を受信バッファ32に格納する。ここでは、ST73のデータs1が通信処理部3Mによって正常に受信され、ST76のデータs2がノイズなどによって通信処理部3Mに正常に受信されなかった場合について説明する。
 つぎに、通信処理部3Mは、データs1やデータs2を正常に受信できたか否かに関わらず、スレーブ局SL1,SL2へのデータ送信処理を行なう(ST78)。このとき、通信処理部3Mは、送信バッファ31に格納しておいたデータmを用いてスレーブ局SL1,SL2へのデータ送信を行なう。送信バッファ31に格納しておいたデータmは、通信処理部3Mからスレーブ局SL1へ1回目のTFを送信する前に、通信処理部3Mからスレーブ局SL1へ送信されたデータmと同じデータである。送信バッファ31からは、データmがブロードキャストでスレーブ局SL1,SL2に送信される(ST79、ST80)。
 通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を完了すると、スレーブ局SL1へTFを送る(ST81)。以下、データ通信システム100では、実施の形態1の図3で説明したST9~ST25と同様の処理が行なわれる。図6に示したST82~ST98の処理が、図3に示したST9~ST25の処理に対応している。この後、通信処理部3Mがスレーブ局SL2からのTFを受信すると、データ通信システム100では、マスタ局Mからスレーブ局SL1,SL2へデータ送信し、その後ST71~ST98の処理が繰り返される。
 なお、本実施の形態でも、データ通信システム100では、データ通信システム100内の状態に応じて、図3のデータ通信処理、図4のデータ通信処理、図6のデータ通信処理を使い分けてもよい。この場合も、実施の形態1のデータ通信システム100と同様に、図5に示した通信処理部3Mによって、通信処理の種類を切り替える。指示入力部33へは、図3、図4、図6に示したデータ通信処理の何れかを指定する指示が入力される。
 また、マスタ局Mからスレーブ局SL1,SL2へのデータmは、複数回に渡って繰り返し送信してもよい。例えば、マスタ局Mは、リトライ時のデータmをスレーブ局SL1,SL2に複数回送信してもよいし、通常時のデータmをスレーブ局SL1,SL2に複数回送信してもよい。
 このように、実施の形態2によれば、リカバリ処理の際にマスタ局Mからスレーブ局SL1,SL2へのデータ送信を行なっているので、マスタ局Mからスレーブ局SL1,SL2へ送られるデータの耐ノイズ性を向上させることが可能となる。
実施の形態3.
 つぎに、図7および図8を用いてこの発明の実施の形態3について説明する。実施の形態3では、マスタ局Mがデータs1,s2を受信した際に、図3に示したデータ通信処理(ST8~ST14)と、図4に示したデータ通信処理(ST38~ST52)の何れを行なうかをマスタ局Mの通信処理部3Mが判断し、データ通信処理を切替える。このとき、データ通信システム100は、データ通信システム100内の状態(データs1やデータs2の受信状態)に応じて、データ通信処理の種類を切替える。
 図7は、実施の形態3に係るデータ通信システムの処理手順を示すシーケンス図である。実施の形態3のデータ通信システム100は、ST101~ST107の処理として、図3に示したST1~ST7と同様の処理を行なう。
 通信処理部3Mは、スレーブ局SL2からTF(1回目)を受信した後(ST107)、通信処理部3Mは、データs1やデータs2の受信状態(到達状況)を確認する(ST108)。具体的には、通信処理部3Mは、例えばFCS(Frame Check Sequence)を用いてスレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータであるか否かを判断する。換言すると、通信処理部3Mは、自身がトークンフレームを発行してから自身宛てのトークンフレームを受信するまでの間(ST101~ST107)にスレーブ局SL1,SL2から送られてきたデータを正常にデータ受信しているか、伝送路でフレームが欠落しているかなどを判断する。
 通信処理部3Mは、この判断結果に基づいて、図3に示したデータ通信処理または図4に示したデータ通信処理の何れか一方を選択する(ST109)。換言すると、通信処理部3Mは、スレーブ局SL2からTFを受信した際に、スレーブ局SL1へTFを発行するか、それともスレーブ局SL1,SL2からのデータs1,s2をマスタ局M内で受信処理するかを決定する。
 ここで、通信処理部3Mによるデータ通信処理の選択方法について説明する。通信処理部3Mは、1サイクルのデータ通信処理で全てのデータを正常に受信したと判断した場合、図4に示したデータ通信処理(F/W処理)を選択する。
 一方、通信処理部3Mは、ノイズの発生などによって何れかのデータを正常に受信していないと判断した場合、各データが正常であるか否かを情報テーブルに登録する。この情報テーブルは、各スレーブ局から受信したデータが正常か否かの判定結果を、データの受信回毎に登録しておく情報テーブル(以下、受信状態情報テーブルという)である。受信状態情報テーブルは、マスタ局Mのメモリ4内に格納される。
 ところで、マスタ局Mは、サイクリック通信を行うので、メモリ4はスレーブ局SL1~SLnとの間で共用されるメモリである。PLC10では、CPU1(アプリケーション)が、メモリ4へのデータのリード/ライトとしてデータの送受信を行なう。このため、マスタ局Mからスレーブ局SL1~SLnへのデータ送信や、スレーブ局SL1~SLnからマスタ局Mへのデータ送信は、各局に配置されているメモリ4上の送信エリアにCPU1がデータを書き込むことによって行なわれる。そして、CPU1は、最新のデータがメモリ4に格納されるよう最新のデータをメモリ4に上書きしている。したがって、マスタ局Mのメモリ4が記憶する受信状態情報テーブルには、最新のデータが格納されている。
 図8は、受信状態情報テーブルの構成の一例を示す図である。受信状態情報テーブル101では、マスタ局Mがスレーブ局SL1~SLnから受信したデータが正常であるか否かを示す情報が、各データの受信回毎に登録されている。
 図8では、例えばスレーブ局SL1から受信したデータの情報として、1回目のデータ受信は正常であったことを示す「OK」が登録され、2回目のデータ受信は正常でなかったことを示す「NG」が登録され、x(xは自然数)回目のデータ受信は正常でなかったことを示す「NG」が登録された場合を示している。
 各スレーブ局SL1~SLnからのデータのうち、ノイズの発生などによって何れかのデータを正常に受信できていない場合、通信処理部3Mは、受信状態情報テーブル101に、新たな回数((x+1)回目)を登録し、この時の各スレーブ局SL1~SLnからのデータがそれぞれ正常であるか否かを登録する。
 そして、通信処理部3Mは、受信状態情報テーブル101に基づいて、図3に示したデータ通信処理または図4に示したデータ通信処理の何れか一方を選択する。受信状態情報テーブル101において、各スレーブ局SL1~SLnからのデータが何れかの回数で「OK」を登録されていれば、通信処理部3Mは、図4に示したデータ通信処理を選択する。一方、スレーブ局SL1~SLnの何れかが、全ての回数で「NG」を登録されていれば、通信処理部3Mは、図3に示したデータ通信処理(リトライ処理)を選択する。なお、通信処理部3Mは、1サイクルのデータ通信処理で全てのデータを正常に受信したと判断した場合、受信状態情報テーブル101内の情報をリセットする。また、通信処理部3Mは、図4に示したデータ通信処理を選択した場合に受信状態情報テーブル101内の情報をリセットする。
 通信処理部3Mは、データ通信処理の種類を選択すると、選択したデータ通信処理によってデータ通信を行うよう設定切替部35に指示を送る。設定切替部35は、通信処理部3Mから送られてくる指示に基づいて、データ通信処理の切替えを行なう。
 図7では、ST103とST106で受信したデータs1,s2が正常であった場合を示している。このため、通信処理部3Mは、図4に示したデータ通信処理を選択する。これにより、データ通信システム100では、図4に示したデータ通信処理として、ST110~ST124の処理を行なう。このST110~ST124の処理は、図4に示したST38~ST52の処理に対応している。
 スレーブ局SL2が通信処理部3MへTF(2回目)を送った後(ST124)、通信処理部3Mは、今回受信したデータs1やデータs2の受信状態を確認する(ST125)。通信処理部3Mは、この確認結果に基づいて、図3に示したデータ通信処理または図4に示したデータ通信の何れか一方を選択する(ST126)。
 図7では、ST103とST106で受信したデータs1,s2は正常である。したがって、受信状態情報テーブル101はリセットされている。また、図7では、ST120で受信したデータs1が正常であり、ST123で受信したデータが正常でなかった場合を示している。このため、通信処理部3Mは、図3に示したデータ通信処理を選択する。これにより、データ通信システム100では、図3に示したデータ通信処理として、ST127~ST133の処理を行なう。このST127~ST133の処理は、図3に示したST8~ST14の処理に対応している。
 以下、通信処理部3Mは、スレーブ局SL1,SL2からデータs1,s2を受信して、スレーブ局SL2からTFを受信する度に、受信状態情報テーブル101への情報登録やリセットを行なう。そして、通信処理部3Mは、今回受信したデータs1,s2が正常であるか否かの判断結果や受信状態情報テーブル101に基づいて、図3に示したデータ通信処理または図4に示したデータ通信処理の何れか一方を選択する。そして、選択したデータ通信処理によってマスタ局Mとスレーブ局SL1,SL2との間のデータ通信を行う処理を繰り返す。
 なお、本実施の形態では、図3に示したデータ通信処理(ST8~ST14)と、図4に示したデータ通信処理(ST38~ST52)とを切替えながらデータ通信を行う場合について説明したが、図6に示したデータ通信処理(ST78~ST87)と、図4に示したデータ通信処理(ST38~ST52)とを切替えながらデータ通信処理を行なってもよい。
 また、図3に示したデータ通信処理と、図4に示したデータ通信処理とを切替える場合について説明したが、通信処理部3Mは、データs1,s2の受信状態に基づいて、実施の形態1で説明したリトライ回数を設定してもよい。この場合、データs1,s2を正常に受信できていれば、リトライ回数を0回に設定してリトライ処理を行なわない。通信処理部3Mは、スレーブ局SL1,SL2から受信したデータs1,s2のエラー部分が所定数よりも少ない場合に少数回(例えば1回)のリトライ回数を設定し、スレーブ局SL1,SL2から受信したデータs1,s2のエラー部分が所定数よりも多い場合に多数回(例えば3回)のリトライ回数を設定する。また通信処理部3Mは、データs1,s2の受信状態に基づいて、実施の形態2で説明したデータmの送信回数を設定してもよい。
 また、本実施の形態では、マスタ局Mからスレーブ局SL1,SL2にデータ送信し、データs1,s2を受信した後に、受信状態の確認や次処理判定を行なう場合について説明したが、リトライ処理の後に受信状態の確認や次処理判定を行なってもよい。
 このように、実施の形態3によれば、データs1,s2の受信状態に応じて、データ通信処理の種類を切替えるので、データs1,s2の受信状態に応じた適切なデータ通信処理を行なうことが可能となる。したがって、効率良くデータ通信を行うことが可能となる。
実施の形態4.
 つぎに、図9~図12を用いてこの発明の実施の形態4について説明する。実施の形態4では、マスタ局Mがデータs1,s2を受信した際に、マスタ局Mがスレーブ局にデータ送信させる回数(データ送信の繰り返し回数)を指示する。このとき、マスタ局Mは、データ通信システム100内の状態(データs1やデータs2の受信状態)に応じて、スレーブ局毎にデータ送信させる回数を決定する。
 図9は、実施の形態4に係るマスタ局の通信処理部の構成を示す図である。同図に示すように、通信処理部3Mは、送信バッファ31、受信バッファ32に加えて送信回数設定部37を有している。
 送信回数設定部37は、データs1,s2の受信状態に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定する。通信処理部3Mは、送信回数設定部37が設定した各スレーブ局SL1,SL2の送信回数(データ送信回数)の情報を、TF内に入れてスレーブ局SL1,SL2に送信する。
 図10は、実施の形態4に係るスレーブ局の構成を示す図である。なお、スレーブ局SL1,SL2は同様の構成を有しているので、ここではスレーブ局SL1の構成について説明する。図10に示すように、スレーブ局SL1は、データ入出力部7、通信処理部70Sを有している。
 通信処理部70Sは、マスタ局Mとの間のデータ送受信処理を行なう。通信処理部70Sは、送信バッファ71、受信バッファ72、データ送信回数制御部73を備えている。通信処理部70Sは、データ入出力部7からのデータを送信バッファ71に格納し、送信バッファ71を介してマスタ局Mに送信する。また、通信処理部70Sは、マスタ局Mからのデータを受信バッファ72に格納し、受信バッファ72を介してデータ入出力部7側へ送信する。
 データ送信回数制御部73は、受信したTFに基づいて、マスタ局Mへのデータ送信回数を制御する。例えば、TF内でマスタ局Mへのデータ送信回数が2回に設定されている場合、データ送信回数制御部73は、マスタ局Mへのデータ送信を2回繰り返す。
 データ入出力部7は、IO機器やデジタル/アナログ変換装置などの周辺機器(図示せず)と接続されており、これらの周辺機器にマスタ局Mからの動作指示などを送る。また、データ入出力部7へは周辺機器からのデータが送られる。周辺機器からデータ入出力部7へ送られてくるデータは、通信処理部70Sを介してマスタ局Mへ送られる。
 図11は、実施の形態4に係るデータ通信システムの処理手順を示すシーケンス図である。実施の形態4のデータ通信システム100は、ST141~ST147の処理として、図3に示したST1~ST7と同様の処理を行なう。
 スレーブ局SL2が通信処理部3MへTF(1回目)を送った後(ST147)、通信処理部3Mは、データs1やデータs2の受信状態を確認する(ST148)。そして、通信処理部3Mは、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータであるか否かを判断する。
 通信処理部3Mは、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータである場合、マスタ局Mでのデータの受信処理を行なう。一方、通信処理部3Mは、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータでない場合、送信回数設定部37が、データs1,s2が正常に受信されたデータであるか否かの判断結果や、受信したデータs1,s2の状態(エラー量)に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数(繰り返し回数)を設定する(ST149)。
 具体的には、送信回数設定部37は、スレーブ局SL1,SL2からデータs1,s2を受信できた場合に、データを受信できたスレーブ局に少数回(例えば0回や1回)のデータ送信回数を設定する。また、送信回数設定部37は、スレーブ局SL1,SL2から受信したデータs1,s2のエラー部分が所定量よりも少ない場合に、このスレーブ局に少数回(例えば2回)のデータ送信回数を設定する。また、送信回数設定部37は、スレーブ局SL1,SL2から受信したデータs1,s2のエラー部分が所定量よりも多い場合に、このスレーブ局に多数回(例えば3回)のデータ送信回数を設定する。また、送信回数設定部37は、スレーブ局SL1,SL2からデータs1,s2を受信できなかった場合に、データを受信できなかったスレーブ局に多数回(例えば4回)のデータ送信回数を設定する。本実施の形態では、送信回数設定部37が、スレーブ局SL1にデータ送信させる回数を2回に設定し、スレーブ局SL2にデータ送信させる回数を1回に設定する場合について説明する。
 通信処理部3Mは、送信回数設定部37が設定したスレーブ局毎の送信回数の情報(スレーブ局SL1は2回、スレーブ局SL2は1回)を、次に送るTF内に入れる。そして、通信処理部3Mは、このTFをスレーブ局SL1に送信する(ST150)。スレーブ局SL1の通信処理部70Sはマスタ局MからのTFを受信する。スレーブ局SL1のデータ送信回数制御部73は、マスタ局Mへのデータ送信処理回数をマスタ局MからのTFに基づいて設定する。ここでは、TF内でスレーブ局SL1が2回のデータ送信を行うよう設定されているので、データ送信回数制御部73は、データ送信回数を2回に設定する。そして、スレーブ局SL1は、マスタ局Mへのデータ送信処理(1回目)を行なう(ST151)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST152)。さらに、TFではスレーブ局SL1からデータ送信する回数が2回に設定されているので、通信処理部3Mは、マスタ局Mへのデータ送信処理(2回目)を行なう(ST153)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST154)。スレーブ局SL1は、マスタ局Mへのデータ送信処理(2回目)を完了すると、スレーブ局SL2へTFを送る(ST155)。このTFには、マスタ局Mの送信回数設定部37が設定したスレーブ局毎の送信回数の情報が入れられている。
 スレーブ局SL2の通信処理部70Sはスレーブ局SL1からのTFを受信する。スレーブ局SL2のデータ送信回数制御部73は、マスタ局Mへのデータ送信処理回数をTFに基づいて設定する。ここでは、TF内でスレーブ局SL2が1回のデータ送信を行うよう設定されているので、データ送信回数制御部73は、データ送信回数を1回に設定する。そして、スレーブ局SL2は、マスタ局Mへのデータ送信処理を行なう(ST156)。スレーブ局SL2からのデータは、データs2として通信処理部3Mに送られる(ST157)。TFではスレーブ局SL2からデータ送信する回数が1回に設定されているので、通信処理部70Sは、マスタ局Mへのデータ送信処理(1回目)が完了すると、マスタ局MへTFを送る(ST158)。
 通信処理部3Mは、スレーブ局SL2からTFを受信すると、データの受信処理を行なう(ST159)。このとき、通信処理部3Mは、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータである場合にのみ、マスタ局Mでのデータの受信処理を行なってもよい。この場合、通信処理部3Mが、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータでなければ、データ通信システム100では再度ST149~ST158の処理が行なわれる。
 通信処理部3Mは、各スレーブ局SL1,SL2からのデータs1,s2をまとめてデータ処理部2にDMA転送する(ST160、ST161)。この後、通信処理部3Mは、データ処理部2にデータの読み出し要求を行ない、実施の形態1の図3で説明したST18~ST25の処理を行なう。そして、通信処理部3Mがスレーブ局SL2からのTFを受信すると、データ通信システム100では、マスタ局Mからスレーブ局SL1,SL2へデータ送信し、その後ST141~ST161の処理と図3に示したST18~ST25の処理が繰り返される。
 なお、本実施の形態では、送信回数設定部37が各スレーブ局SL1,SL2にデータ送信させる回数を設定する場合について説明したが、各スレーブ局SL1,SL2にデータ送信させる回数は、予めユーザ設定してもよい。この場合、図9に示した通信処理部3Mは、図5に示した指示入力部33の機能を有する構成とする。
 また、本実施の形態では、送信回数設定部37がデータs1,s2を受信した際のデータs1,s2の受信状態に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定する場合について説明したが、過去に受信したデータs1,s2の受信状態(受信状態の履歴を用いて算出された統計情報)に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定してもよい。
 データ通信システム100では、例えば図12に示すようにスイッチングハブ20を介して各局間のデータ通信が行なわれる。図12は、スイッチングハブを介したデータ通信を説明するための図である。この場合において、所定の伝送路のみでノイズが発生しやすい場合がある。したがって、送信回数設定部37は、受信状態の統計情報に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定すれば、ノイズの発生率に応じた送信回数をスレーブ局毎に設定することができる。
 送信回数設定部37は、例えばFCSを用いて、スレーブ局SL1,SL2から受信したデータs1,s2が正常に受信されたデータであるか否かを判断する。送信回数設定部37は、この判断結果を蓄積しておき、蓄積しておいた判断結果に基づいて、データの受信状態(正常な受信か否か)に関する統計情報(ノイズの発生率など)を作成する。そして、送信回数設定部37は、作成した統計情報に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定する。この場合、送信回数設定部37は、スレーブ局SL2からTFを受信する前に予め受信状態の統計情報に基づいて各スレーブ局SL1,SL2にデータ送信させる回数を設定しておいてもよい。
 また、送信回数設定部37は、マスタ局Mがデータ通信を行うスレーブ局の数、各スレーブ局との間のデータ通信に要する時間、マスタ局M内で行なうデータ処理に要する時間などに基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定してもよい。
 また、本実施の形態では、マスタ局Mからスレーブ局SL1,SL2にデータ送信し、データs1,s2を受信した後に、受信状態の確認や送信回数の設定を行なう場合について説明したが、リトライ処理の後に受信状態の確認や送信回数の設定を行なってもよい。
 このように、実施の形態4によれば、データs1,s2の受信状態に基づいて、各スレーブ局SL1,SL2にデータ送信させる回数を設定するので、データs1,s2の受信状態に応じた適切なリカバリ処理を行なうことが可能となる。したがって、効率良くデータ通信を行うことが可能となる。
実施の形態5.
 つぎに、図13~図20を用いてこの発明の実施の形態5について説明する。実施の形態5では、サイクリック通信を行う際に、サイクリックデータを分割するとともに、分割したサイクリックデータにシーケンシャルNo(シーケンシャルナンバ)、エンドフラグ(最後情報)、データの格納範囲情報を付与してデータ管理する。そして、他局から送られてきたサイクリックデータを自局のメモリに更新する際には、シーケンシャルNoとエンドフラグに基づいて、全てのサイクリックデータを受信できたか否かを判断し、全てのサイクリックデータを受信できた場合に自局のメモリに展開する。データの格納範囲情報は、分割されたサイクリックデータのデータ長とメモリへ格納する際のアドレスであり、各局はデータの格納範囲情報に従ったメモリ内の位置にサイクリックデータを格納する。
 FA分野などで用いられるサイクリック通信は、伝送路に接続された複数の局が互いに他局のデータを共有する通信方法である。このサイクリック通信では、各局は、他の局と共有して使用する共有メモリ(全局で共通のデータを格納するメモリ)を局毎に有している。各局の共有メモリは、送信エリア、受信エリアによって構成しておき、各局は、自局が取得したデータを送信エリアに格納するとともに、他局からのデータは受信エリアに格納しておく。そして、各局は、自局の送信エリアのデータを、所定の周期で他局の共有メモリの受信エリアに送信する。これにより、局間で共通のデータを共有すること(サイクリックデータの局単位保障)が可能となる。
 図13は、実施の形態5に係るデータ通信システムのメモリ構成を示す図である。図13では、マスタ局Mが備える共有メモリを共有メモリ80Xで示し、スレーブ局SL1~SL3が備える共有メモリをそれぞれ共有メモリ81X~83Xで示している。なお、図13では、データ通信システム100のスレーブ局がスレーブ局SL1~SL3の3つである場合を示している。
 マスタ局Mの共有メモリ80Xは、自局(マスタ局M)のデータをマスタ局データとして格納する送信エリア80a、スレーブ局SL1から送られてくるデータをスレーブ局データ(1)として格納する受信エリア80b、スレーブ局SL2から送られてくるデータをスレーブ局データ(2)として格納する受信エリア80c、スレーブ局SL3から送られてくるデータをスレーブ局データ(3)として格納する受信エリア80dを有している。
 また、スレーブ局SL1の共有メモリ81Xは、マスタ局Mから送られてくるデータをマスタ局データとして格納する受信エリア81a、自局(スレーブ局SL1)のデータをスレーブ局データ(1)として格納する送信エリア81b、スレーブ局SL2から送られてくるデータをスレーブ局データ(2)として格納する受信エリア81c、スレーブ局SL3から送られてくるデータをスレーブ局データ(3)として格納する受信エリア81dを有している。
 また、スレーブ局SL2の共有メモリ82Xは、マスタ局Mから送られてくるデータをマスタ局データとして格納する受信エリア82a、自局(スレーブ局SL2)のデータをスレーブ局データ(2)として格納する送信エリア82c、スレーブ局SL1から送られてくるデータをスレーブ局データ(1)として格納する受信エリア82b、スレーブ局SL3から送られてくるデータをスレーブ局データ(3)として格納する受信エリア82dを有している。
 また、スレーブ局SL3の共有メモリ83Xは、マスタ局Mから送られてくるデータをマスタ局データとして格納する受信エリア83a、自局(スレーブ局SL3)のデータをスレーブ局データ(3)として格納する送信エリア83d、スレーブ局SL1から送られてくるデータをスレーブ局データ(1)として格納する受信エリア83b、スレーブ局SL2から送られてくるデータをスレーブ局データ(2)として格納する受信エリア83cを有している。
 サイクリック通信では、1回の送信権を獲得(TF受信)した際に、自局の送信エリアのデータ(サイクリックデータ)をフレーム分割し、分割後のフレーム(以下、分割後フレームという場合がある)を他局に送信する。このとき、他局では、送信権を獲得した局からの分割後フレームを全て受信して最新のサイクリックデータに更新する必要がある。換言すると、送信権を獲得した時点で、全てのサイクリックデータが更新されなければならず、一部のみのサイクリックデータの更新は許されない。従来、送信権を獲得した局から一部のサイクリックデータしか受信できなかった場合、受信できなかったサイクリックデータを再送信(連続送信)する必要があった。
 しかしながら、各局にサイクリックデータの再送信機能を実装させるとデータの受信処理が複雑になり、データ共有のリアルタイム性に悪影響を及ぼす場合がある。そこで、本実施の形態のデータ通信システム100では、分割後フレームにシーケンシャルNoやエンドフラグを付与して送信する。そして、サイクリックデータを受信する際にはシーケンシャルNoとエンドフラグに基づいて、全ての分割後フレームを受信できたかを判断し、全ての分割後フレームを受信できた場合にサイクリックデータを更新する。
 つぎに、本実施の形態に係るマスタ局Mとスレーブ局SL1~SL3の構成について説明する。図14は、実施の形態5に係るスレーブ局の通信処理部の構成を示す図である。なお、スレーブ局SL1~SL3は、同様の構成を有しているので、ここではスレーブ局SL1の通信処理部70Sの構成について説明する。実施の形態5に係るスレーブ局SL1の通信処理部70Sは、送信バッファ71、受信バッファ72、分割処理部61、組立処理部62を有している。分割処理部61は、サイクリックデータから分割後フレームへの分割などを行ない、組立処理部62は、分割後フレームを全て受信できたか否かの判定などを行う。
 分割処理部61は、データ分割部75、シーケンシャルNo付与部76、エンドフラグ設定部77を有している。データ分割部75は、共有メモリ81Xの送信エリア81bに格納しているサイクリックデータを他の局に送信する際に、サイクリックデータをフレーム分割する。データ分割部75は、スレーブ局SL1がTFを受信してデータの送信権を得た際に、サイクリックデータを分割する。
 シーケンシャルNo付与部76は、データ分割部75によって分割されたサイクリックデータ(分割後フレーム)のそれぞれにシーケンシャルNoを付与する。エンドフラグ設定部77は、データ分割部75によって分割されたサイクリックデータのうち最後の分割後フレームにエンドフラグを付与する。
 図15は、実施の形態5に係るマスタ局の通信処理部の構成を示す図である。実施の形態5に係るマスタ局Mの通信処理部3Mは、他局(スレーブ局SL1~SL3)から送られてくるサイクリックデータに付与されているシーケンシャルNoとエンドフラグに基づいて、全てのサイクリックデータを受信できたか否かを判断し、全てのサイクリックデータを受信できた場合に自局の共有メモリ80Xにサイクリックデータを展開する。
 通信処理部3Mは、送信バッファ31、受信バッファ32、分割処理部61、組立処理部62を有している。組立処理部62は、更新指示部51、レジスタリセット部53を備えている。更新指示部51は、分割後フレームを全て受信したか否かを判定する判定回路52を有している。更新指示部51は、判定回路52が分割後フレームを全て受信したと判定した場合に、共有メモリ80Xに分割後フレームを展開する。判定回路52は、各シーケンシャルNoに対応する分割後フレームを受信したか否かの情報を入力するレジスタ(後述のシーケンシャルNoレジスタ91)、分割後フレームにエンドフラグが付与されていたか否かの情報を入力するレジスタ(後述のエンドフラグレジスタ92)を備えている。判定回路52は、シーケンシャルNoレジスタ91やエンドフラグレジスタ92に入力される情報に基づいて、分割後フレームを全て受信したか否かを判定する。
 レジスタリセット部53は、サイクリックデータ内に付与されているSA(ソースアドレス)に基づいて、何れの局からサイクリックデータを受信したかを判定する。SAは、サイクリックデータの送信元を示すフレーム送信元情報である。レジスタリセット部53は、例えば前回とは異なる局から分割後フレームを受信した場合に、前回の局から受信したシーケンシャルNoとエンドフラグを廃棄し判定回路52をリセットする。
 つぎに、実施の形態5に係るデータ通信システム100の処理手順について説明する。図16は、実施の形態5に係るデータ通信システムの処理手順を示すシーケンス図である。なお、ここでは、データ通信システム100内のスレーブ局がスレーブ局SL1,SL2の2つである場合について説明する。また、マスタ局MからのTFがまずスレーブ局SL1に送られ、その後スレーブ局SL1からスレーブ局SL2へTFが送られる場合について説明する。
 データ通信システム100では、マスタ局Mの通信処理部3Mがスレーブ局SL1へTFを送信する(ST191)。スレーブ局SL1は、TFを受信すると、マスタ局Mへのデータ送信処理を行なう(ST192)。このとき、スレーブ局SL1の通信処理部70Sは、共有メモリ81X内の送信エリア81bに格納してある自局のサイクリックデータを分割してマスタ局Mに送信する。また、スレーブ局SL1からマスタ局Mへのデータ送信は、複数回(ここでは2サイクル)繰り返される。このように、本実施の形態のデータ通信システム100では、サイクリックデータの送信を行う際に、データ送信を複数回繰り返すとともに、各データ送信の際にはサイクリックデータを分割して送信する。
 図17は、サイクリックデータの分割処理を説明するための図である。スレーブ局SL1のデータ分割部75は、共有メモリ81Xの送信エリア81bに格納されているサイクリックデータ(データs1)を所定サイズのデータに分割する。ここでは、データ分割部75がサイクリックデータを3つのデータ(データs1-1,s1-2,s1-3)に分割する場合について説明する。データ分割部75が、サイクリックデータを3つのデータに分割すると、シーケンシャルNo付与部76は、分割後フレームのそれぞれにシーケンシャルNoを付与する。シーケンシャルNo付与部76は、例えば、1つ目の分割後フレーム(データs1-1)にシーケンシャルNo「0」を付与し、2つ目の分割後フレーム(データs1-2)にシーケンシャルNo「1」を付与し、3つ目の分割後フレーム(データs1-3)にシーケンシャルNo「2」を付与する。また、エンドフラグ設定部77は、分割後フレームのうち、最後の分割後フレームにエンドフラグを付与する。ここでのエンドフラグ設定部77は、サイクリックデータが3分割されているので、3つ目の分割後フレームにエンドフラグ「1」を付与する。
 スレーブ局SL1の通信処理部70Sは、シーケンシャルNoやエンドフラグの付与された分割後フレームを、マスタ局Mに送信する。通信処理部70Sは、まず1つ目の分割後フレームをデータs1-1としてマスタ局Mに送信する(ST193)。さらに、通信処理部70Sは、2つ目の分割後フレームをデータs1-2としてマスタ局Mに送信し(ST194)、3つ目の分割後フレームをデータs1-3としてマスタ局Mに送信する(ST195)。
 この後、通信処理部70Sは、ST192と同様のデータ送信を繰り返す(ST196)。具体的には、通信処理部70Sは、1つ目の分割後フレーム(データs1-1)、2つ目の分割後フレーム(データs1-2)、3つ目の分割後フレーム(データs1-3)の順番で各分割後フレームをマスタ局Mに送信する(ST197、ST198、ST199)。
 マスタ局Mの通信処理部3Mは、スレーブ局SL1から分割後フレームを受信すると、分割後フレームに付与されているシーケンシャルNoやエンドフラグを抽出する。そして、判定回路52のシーケンシャルNoレジスタ91、エンドフラグレジスタ92に、シーケンシャルNoやエンドフラグに応じた情報を入力する。
 図18および図19は、判定回路の構成例と判定回路に入力される情報を示す図である。図18では、全ての分割後フレームを受信した場合の判定回路52を示し、図19では、一部の分割後フレームを受信できていない場合の判定回路52を示している。
 判定回路52は、シーケンシャルNoレジスタ91、エンドフラグレジスタ92を備えている。判定回路52は、シーケンシャルNoレジスタ91、エンドフラグレジスタ92への情報を入力とし、スレーブ局SL1から全ての分割後フレームを受信したか否かの判定結果を出力する。
 シーケンシャルNoレジスタ91は、例えば512個のレジスタを有しており、各レジスタがそれぞれ分割後フレームに対応している。また、エンドフラグレジスタ92は、例えば512個のレジスタを有しており、各レジスタがそれぞれ分割後フレームに対応している。例えば、シーケンシャルNoレジスタ91の1つ目のレジスタ(No0 recv_Reg)は、シーケンシャルNo「0」の分割後フレームに対応し、2つ目のレジスタ(No1 recv_Reg)は、シーケンシャルNo「1」の分割後フレームに対応している。また、エンドフラグレジスタ92の1つ目のレジスタ(No0 E_Reg)は、シーケンシャルNo「0」の分割後フレームに対応し、2つ目のレジスタ(No1 E_Reg)は、シーケンシャルNo「1」の分割後フレームに対応している。
 マスタ局Mが、スレーブ局SL1から分割後フレームを受信すると、更新指示部51は、分割後フレームに付与されているシーケンシャルNoとエンドフラグを全て抽出する。ここでは、更新指示部51がシーケンシャルNo「1」~「3」と、シーケンシャルNo「3」のエンドフラグを抽出する。
 シーケンシャルNoレジスタ91やエンドフラグレジスタ92の初期値は、「0」である。更新指示部51は、シーケンシャルNoレジスタ91のうち、抽出したシーケンシャルNoに対応するレジスタに「1」を入力する。ここでは、シーケンシャルNo「1」~「3」に対応するレジスタに「1」が入力される。具体的には、「No0 recv_Reg」のレジスタ、「No1 recv_Reg」のレジスタ、「No2 recv_Reg」の各レジスタに「1」が入力される。また、シーケンシャルNo「3」のエンドフラグを抽出したので、エンドフラグレジスタ92のうち、シーケンシャルNo「3」の分割後フレームに対応するエンドフラグに「1」が入力される。
 判定回路52は、シーケンシャルNoレジスタ91のうち、全ての分割後フレームに対応するレジスタに「1」が入力され、かつエンドフラグレジスタ92の何れかのレジスタに「1」が入力された場合に、全ての分割後フレームを受信したことを示す「1」を出力するよう構成されている。
 図18に示した判定回路52では、全ての分割後フレームに対応するレジスタに「1」が入力されている。また、図18に示した判定回路52では、シーケンシャルNo「3」の分割後フレームに対応するエンドフラグに「1」が入力されている。したがって、図18に示した判定回路52からは、全ての分割後フレームを受信したことを示す「1」が出力される。
 図19に示した判定回路52では、一部の分割後フレームに対応するレジスタに「1」が入力されていない。すなわち、「No1 recv_Reg」のレジスタに「0」が入力されたままである。したがって、図19に示した判定回路52からは、全ての分割後フレームを受信していないことを示す「0」が出力される。
 分割後フレームのうち、正しく受信できた分割後フレームは、通信処理部3Mの受信バッファ32に格納しておく。スレーブ局SL1は、サイクリックデータの送信を2回繰り返している。このため、マスタ局Mには、サイクリックデータが2回送られてくる。2回目のサイクリックデータが送られてきた場合も、更新指示部51は、分割後フレームに付与されているシーケンシャルNoとエンドフラグを全て抽出する。そして、更新指示部51は、抽出したシーケンシャルNoに対応するレジスタに「1」を入力する。また、抽出したエンドフラグに対応するレジスタに「1」を入力する。このとき、既に「1」が入力されているレジスタへの「1」の再入力は省略してもよい。
 これにより、マスタ局Mでは、2回送信された分割後フレームのうち少なくとも1回の分割後フレームを受信していれば、分割後フレームを受信したと判断する。そして、各分割後フレームを少なくとも1回ずつ受信した場合に、全ての分割後フレームを受信したと判断され、判定回路52から「1」が出力される。更新指示部51は、判定回路52が「1」を出力すると、スレーブ局SL1から全ての分割後フレームを受信したと判断する。
 スレーブ局SL1は、マスタ局Mへのデータ送信処理を完了すると、スレーブ局SL2へTFを送る(ST200)。これにより、スレーブ局SL2の通信処理部70Sは、サイクリックデータを、データs2としてマスタ局Mに送信する(ST201,ST202)。このとき、スレーブ局SL2は、スレーブ局SL1と同様に、サイクリックデータを複数回繰り返し送信するとともに、サイクリックデータを分割後フレームに分割してもよい。この後、スレーブ局SL2は、マスタ局MへTFを送る(ST203)。
 マスタ局Mは、スレーブ局SL2からサイクリックデータを受信する。このとき、スレーブ局SL2からのサイクリックデータが分割後フレームであれば、スレーブ局SL1からの分割後フレームと同様の処理によってサイクリックデータを受信する。具体的には、マスタ局Mは、複数回繰り返し送信された各分割後フレームを少なくとも1回ずつ受信した場合に、全ての分割後フレームを受信したと判断する。このとき、判定回路52では、「1」が出力される。更新指示部51は、判定回路52が「1」を出力すると、スレーブ局SL2から全ての分割後フレームを受信したと判断する。
 スレーブ局SL2からのサイクリックデータが分割後フレームでなければ、サイクリックデータにシーケンシャルNoが含まれていない。この場合、更新指示部51は、判定回路52を用いることなく、スレーブ局SL2から全ての分割後フレームを受信したと判断する。
 更新指示部51は、全てのスレーブ局SL1,SL2から受信したサイクリックデータに対して判定回路52が「1」を出力すると、全てのサイクリックデータを受信したか否かを示す受信許可フラグに「1」を入力する。受信許可フラグは、マスタ局Mが有するフラグであり、データ処理部2によるデータ受信処理を許可するか否かを示すフラグである。受信許可フラグが「0」の場合にデータ処理部2によるデータ受信処理は禁止され、受信許可フラグが「1」の場合にデータ処理部2によるデータ受信処理は許可される。
 データ処理部2は、受信許可フラグの値をポーリングによって監視している。データ処理部2は、受信許可フラグが「1」の場合にデータ受信処理を行う(ST204)。これにより、受信バッファ32に格納されている分割後フレームがデータ処理部2へ送られる。具体的には、通信処理部3Mは、各スレーブ局SL1,SL2からのデータs1,s2をまとめてデータ処理部2にDMA転送する(ST205、ST206)。データ処理部2は、データ受信処理を完了すると、通信処理部3Mの受信許可フラグに「0」を入力させる。これにより、データ処理部2によるデータ受信処理は禁止され、通信処理部3Mは次のスレーブ局SL2からの分割後フレームを待つことになる。
 なお、データ処理部2は、通信処理部3Mがスレーブ局SL1からのサイクリックデータを全て受信した時点でデータ受信処理を行ってもよい。この場合、データ処理部2は、通信処理部3Mがスレーブ局SL2からのサイクリックデータを全て受信した時点でデータ受信処理を行なう。
 また、図16ではスレーブ局SL1がマスタ局Mにサイクリックデータを送信する場合について説明したが、スレーブ局SL1はスレーブ局SL2へもサイクリックデータを送信する。さらに、スレーブ局SL2は、マスタ局Mとスレーブ局SL1にサイクリックデータを送信し、マスタ局Mはスレーブ局SL1,SL2にサイクリックデータを送信する。
 つぎに、判定回路52のリセット処理(シーケンシャルNoレジスタ91やエンドフラグレジスタ92のリセット)について説明する。図20は、判定回路のリセット処理を説明するための図である。マスタ局Mの通信処理部3Mは、レジスタリセット部53や判定回路52などに加えてレジスタリセット判定部54を備えている。なお、図15に示した通信処理部3Mでは、レジスタリセット判定部54の図示を省略している。
 レジスタリセット判定部54は、シーケンシャルNoレジスタ91やエンドフラグレジスタ92をリセットさせるか否かを判定するとともに、判定結果をレジスタリセット部53に送る。レジスタリセット判定部54は、SA判定部56とTF判定部57を備えている。
 SA判定部56は、受信したサイクリックデータ内のSAに基づいて、何れの局からサイクリックデータを受信しているかを判断する。そして、SA判定部56は、前回とは異なる局から分割後フレームを受信したと判断した場合に、レジスタリセット部53にレジスタのリセット指示を送る。
 TF判定部57は、受信したTFの宛先(トークン宛先情報)に基づいて、何れの局へのTFであるかを判断する。そして、TF判定部57は、自局(マスタ局M)宛てのTFを受信したと判断した場合に、レジスタリセット部53にレジスタのリセット指示を送る。
 レジスタリセット部53は、SA判定部56やTF判定部57からレジスタのリセット指示が送られてきた場合に、シーケンシャルNoとエンドフラグを廃棄し判定回路52をリセットする。具体的には、シーケンシャルNoレジスタ91とエンドフラグレジスタ92の全てのレジスタに「0」を入力する。
 マスタ局Mとサイクリックデータを共有する局が2台以上のスレーブ局である場合、レジスタリセット判定部54は、SA判定部56を用いてレジスタリセット部53にレジスタのリセット指示を送る。
 また、マスタ局Mとサイクリックデータを共有する局が1台のスレーブ局だけである場合、レジスタリセット判定部54は、TF判定部57を用いてレジスタリセット部53にレジスタのリセット指示を送る。
 なお、各局間でのTFの送受信をブロードキャストによって行う場合、マスタ局Mとサイクリックデータを共有する局が2台以上のスレーブ局である場合であっても、レジスタリセット判定部54は、TF判定部57を用いてレジスタリセット部53にレジスタのリセット指示を送ることができる。この場合、TF判定部57は、TF(任意の宛先を有したTF)を受信した場合に、レジスタリセット部53にレジスタのリセット指示を送る。また、各局間でTFを複数回繰り返して送受信する場合には、TF判定部57は、前回とは異なる宛先のTFまたは前回とは異なる送信元(トークン送信元情報)のTFを受信した場合に、レジスタリセット部53にレジスタのリセット指示を送る。換言すると、TF判定部57は、他局を宛先としたTFを受信した場合に、レジスタリセット部53にレジスタのリセット指示を送る。
 なお、本実施の形態では、レジスタリセット判定部54がSA判定部56とTF判定部57の両方を備えている場合について説明したが、レジスタリセット判定部54の構成を、SA判定部56とTF判定部57の何れか一方を備える構成としてもよい。
 このように、実施の形態5によれば、データ通信システム100内で共有するサイクリックデータを他局に送信する際に、サイクリックデータを分割するとともに分割後フレームにシーケンシャルNoとエンドフラグを付与しているので、サイクリックデータを受信した局はシーケンシャルNoとエンドフラグに基づいて全てのサイクリックデータを受信できたか否かを判断できる。これにより、複数回に渡ってサイクリックデータの送受信を繰り返す場合であっても、全てのサイクリックデータを受信できたか否かを容易に判断できる。複数回に渡ってサイクリックデータの送受信を繰り返すので、サイクリックデータの送信リトライを減らすことが可能となる。また、全てのサイクリックデータを受信できたか否かを容易に判断できるので、データ共有のリアルタイム性を容易に維持することが可能となる。
 また、TFやサイクリックデータ内に付与されているSAに基づいて判定回路52をリセットするので、各局から全てのサイクリックデータを受信できたか否かを局毎に容易に判断することが可能となる。
実施の形態6.
 つぎに、図21~図25を用いてこの発明の実施の形態6について説明する。従来、データ通信システム内の各局は、自局のデータを送信した後、TFを1回発行することによって次の送信局を指定していた。すなわち、従来のトークン方式では、TFの受信によって送信権を得た局のみがデータ送信を行う規則であったので、TFの多重発行は許されていなかった。これは、他局からのフレーム受信中に自局のフレームを送信してしまうと、伝送路でフレームの輻輳が発生しデータロスする可能性があるからである。本実施の形態では、各局が自局のデータを送信した後、TFを複数回送信することによって次の送信局を指定する。換言すると、実施の形態6では、データ通信システム100内の局間でTFを送受信する際に、TFの送受信を複数回に渡って繰り返す。
 図21は、実施の形態6に係るマスタ局の通信処理部の構成を示す図である。同図に示すように、実施の形態4に係るマスタ局Mの通信処理部3Mは、送信バッファ31、受信バッファ32に加えてトークン設定部41を有している。
 本実施の形態のトークン設定部41は、実施の形態4で説明した送信回数設定部37と同様の処理によって、TFの送信回数を設定する。トークン設定部41は、論理リングを構成する際にスレーブ局SL1,SL2にトークン送信回数を指示するとともに、マスタ局Mからスレーブ局SL1へ送信するTFの繰り返し送信回数(TFの連続送信回数)を設定する。
 図22は、実施の形態6に係るスレーブ局の通信処理部の構成を示す図である。なお、スレーブ局SL1,SL2は同様の構成を有しているので、ここではスレーブ局SL1の通信処理部70Sの構成について説明する。図22に示すように、実施の形態6に係るスレーブ局SL1の通信処理部70Sは、トークン送信制御部74、送信バッファ71、受信バッファ72を有している。
 トークン送信制御部74は、マスタ局M(トークン設定部41)からの指示に基づいて、TFを送信する回数を制御する。具体的には、スレーブ局SL1のトークン送信制御部74は、スレーブ局SL2へ送信するTFの送信回数を制御し、スレーブ局SL2のトークン送信制御部74は、マスタ局Mへ送信するTFの送信回数を制御する。トークン送信制御部74は、マスタ局Mから1回目のTFを受信すると、このTFを受信してからの経過時間を測定するタイマ(図示せず)を備えている。トークン送信制御部74は、マスタ局Mから1つ目(1回目)のTFを受信してから、予め設定しておいた所定時間が経過した後に、データ送信を開始する。換言すると、トークン送信制御部74は、マスタ局Mから1つ目のTFを受信すると、予め設定しておいた所定時間が経過するまでデータ送信処理を待つ。トークン送信制御部74は、マスタ局Mから1つ目のTFを受信すると、TFを受信してからの時間を測定し、予め設定しておいた所定時間の経過後に、自局のデータをマスタ局Mに送信する。
 図23は、実施の形態6に係るデータ通信システムの処理手順を示すシーケンス図である。本実施の形態のデータ通信システム100の処理手順の特徴の1つは、マスタ局Mからスレーブ局SL1へのTF送信や、スレーブ局SL1からスレーブ局SL2へのTF送信などを複数回繰り返すことである。以下では、マスタ局Mのトークン設定部41がスレーブ局SL1,SL2にトークン送信回数として3回を指示するとともに、マスタ局Mからスレーブ局SL1へ送信するTFのトークン送信回数を3回に設定する場合について説明する。
 データ通信システム100では、論理リングを構成する際にマスタ局Mがスレーブ局SL1,SL2にトークン送信回数として3回を指示しておく。具体的には、マスタ局Mがスレーブ局SL1,SL2に送信するセットアップフレームにトークン送信回数(3回)を指定する情報を入れておく。これにより、スレーブ局SL1,SL2のトークン送信制御部74は、マスタ局Mからの指示に基づいて、TFの送信回数を3回に設定する。また、マスタ局Mのトークン設定部41は、スレーブ局SL1へのトークン送信回数を3回に設定しておく。
 この後、マスタ局Mの通信処理部3Mがスレーブ局SL1へ1回目のTF(1)を送信する(ST171)。スレーブ局SL1は、マスタ局Mから1回目のTF(1)を受信すると、トークン送信制御部74がタイマをスタートさせるとともに、マスタ局Mへのデータ送信処理を待機させる(ST174)。マスタ局Mの通信処理部3Mは、1回目のTFを送信した後、所定の間隔をおいて、スレーブ局SL1へ2回目のTF(2)を送信する(ST172)。さらに、マスタ局Mの通信処理部3Mは、2回目のTF(2)を送信した後、所定の間隔をおいて、スレーブ局SL1へ3回目のTF(3)を送信する(ST173)。TFは、例えば、IEEE(Institute of Electrical and Electronics Engineers)802.3uに従ったタイミングで送信される。
 スレーブ局SL1のトークン送信制御部74は、1回目のTF(1)を受信してから予め設定しておいた所定時間(待機時間)が経過すると、データ送信の待機を解除する。トークン送信制御部74は、最後のTF(3回目のTF)を受信した後に、データ送信の待機を解除するよう待機時間を設定しておく。これにより、スレーブ局SL1の通信処理部70Sは、3回目のTFを受信した後にマスタ局Mへデータ送信を行う(ST175)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST176)。
 スレーブ局SL1は、マスタ局Mへのデータ送信処理が完了すると、スレーブ局SL2へ1回目のTF(1)を送る(ST177)。スレーブ局SL2は、スレーブ局SL1から1回目のTFを受信すると、トークン送信制御部74がタイマをスタートさせるとともに、マスタ局Mへのデータ送信処理を待機させる。ここでは、スレーブ局SL1からスレーブ局SL2への1回目のTFが消失した場合について説明する。この場合、スレーブ局SL2は、スレーブ局SLからの1回目のTF(1)を受信できない。スレーブ局SL1の通信処理部70Sは、1回目のTF(1)を送信した後、所定の間隔をおいて、スレーブ局SL2へ2回目のTF(2)を送信する(ST178)。これにより、スレーブ局SL2は、スレーブ局SL1から2回目のTFを受信する。このとき、スレーブ局SL2は、1回目のTFを受信していないので、スレーブ局SL1からの2回目のTFを1回目のTF受信であると認識する。そして、スレーブ局SL2のトークン送信制御部74は、タイマをスタートさせるとともに、マスタ局Mへのデータ送信処理を待機させる(S179)。
 スレーブ局SL1の通信処理部70Sは、2回目のTFを送信した後、所定の間隔をおいて、スレーブ局SL2へ3回目のTF(3)を送信する(ST181)。スレーブ局SL2のトークン送信制御部74は、1回目のTF(1)を受信してから予め設定しておいた所定時間が経過すると、データ送信の待機を解除する。これにより、スレーブ局SL2の通信処理部70Sは、マスタ局Mへデータ送信を行う(S180)。スレーブ局SL1からのデータは、データs1として通信処理部3Mに送られる(ST182)。スレーブ局SL2は、マスタ局Mへのデータ送信処理が完了すると、マスタ局Mへ1回目のTF(1)、2回目のTF(2)、3回目のTF(3)を送る(ST183、ST184、ST185)。
 伝送路内のTFは、遅延する場合がある、このため、スレーブ局SL2では、マスタ局Mへのデータ送信を行なっている間に、スレーブ局SL1からのTFを受信する場合がある。例えば、マスタ局Mへのデータ送信(ST180)の際に、スレーブ局SL1からの3回目のTF(3)がスレーブ局SL2に届く場合がある。この場合、スレーブ局SL2のトークン送信制御部74は、データ送信中にTFを受信したことをマスタ局Mに通知する。換言すると、トークン送信制御部74は、自局がデータ送信しているタイミングで自局宛のTFを受信した場合に、データ送信中にTFを受信したことをマスタ局Mに通知する。
 データ通信システム100では、伝送路上にイーサネット(登録商標)のようなスイッチングハブ20が存在している場合がある。このため、各局がTFを最小のフレームGAP(送信間間隔)で送信しても、スイッチングハブ20は必ずしもTFを受信した受信間隔でフレーム送信することを保障できない。そこで、本実施の形態では、スレーブ局SL1,SL2がデータ送信中にTFを受信すれば、データ送信中にTFを受信したことをマスタ局Mに通知している。これにより、マスタ局Mのトークン設定部41は、1回目のTFを受信してから自局のデータを送信するまでの待機時間をスレーブ局SL2に再設定する。具体的には、マスタ局Mのトークン設定部41は、1回目のTFを受信してから自局のデータを送信するまでの待機時間が現設定よりも長くなるよう待機時間をスレーブ局SL2に再設定する。
 なお、本実施の形態では、マスタ局Mがスレーブ局SL2の待機時間を再設定する場合について説明したが、スレーブ局SL2が自ら待機時間を再設定してもよい。また、スレーブ局SL2のトークン送信制御部74は、受信したTFと受信できなかったTFに基づいて待機時間を変更してもよい。この場合、予め各TFに何回目のTFであるかを示す情報を付与(付加)しておく。例えば、TFを5回繰り返して送信する場合、1回目~5回目の各TFにシーケンシャルNoを付与しておく。具体的には、1回目のTFにシーケンシャルNoとして「1」を付与し、2回目のTFにシーケンシャルNoとして「2」を付与し、3回目のTFにシーケンシャルNoとして「3」を付与しておく。さらに、4回目のTFにシーケンシャルNoとして「4」を付与し、5回目のTFにシーケンシャルNoとして「5」を付与しておく。
 マスタ局Mから指定されている待機時間(指定待機時間)がtの場合、トークン送信制御部74は、式(1)によって新たな待機時間Tを算出する。ここでのXは、TFの送信繰り返し回数であり、Snは最初に受信したTFのシーケンシャルNoである。
 T=t×(X-Sn)/(X-1)・・・(1)
 したがって、最初に受信したTFのシーケンシャルNoが「1」である場合、トークン送信制御部74は、マスタ局Mから指定されている待機時間tだけデータの送信処理を待つ。また、最初に受信したTFのシーケンシャルNoが「2」である場合、トークン送信制御部74は、(3/4)tだけデータの送信処理を待ち、最初に受信したTFのシーケンシャルNoが「3」である場合、トークン送信制御部74は、(2/4)tだけデータの送信処理を待つ。また、最初に受信したTFのシーケンシャルNoが「4」である場合、トークン送信制御部74は、(1/4)tだけデータの送信処理を待ち、最初に受信したTFのシーケンシャルNoが「5」である場合、トークン送信制御部74は、待機時間0でデータの送信処理を行う。なお、この待機時間の再設定は、マスタ局Mからスレーブ局SL1,SL2に指示してもよい。
 また、スレーブ局SL1は、スレーブ局SL2と同様の構成を有しているので、スレーブ局SL1のトークン送信制御部74も、スレーブ局SL2のトークン送信制御部74と同様に、自局がデータ送信しているタイミングで自局宛のTFを受信すると、データ送信中にTFを受信したことをマスタ局Mに通知する。
 データ送信中にTF受信したことのスレーブ局SL2からマスタ局Mへの通知は、スレーブ局SL2からマスタ局Mにデータ送信を行った後(ST181)であってTF(1)を送信する前(ST183の前)に行ってもよいし、スレーブ局SL2が、次にスレーブ局SL1からTFを受信した場合のデータ送信時に行ってもよい。
 なお、本実施の形態では、スレーブ局SL1,SL2が、1回目のTFを受信した後に予め設定しておいた所定時間が経過してからデータ送信を開始する場合について説明したが、マスタ局Mもスレーブ局SL1,SL2と同様に、1回目のTFを受信した後に予め設定しておいた所定時間が経過してからデータ送信を開始してもよい。また、マスタ局Mがデータ送信している際に、マスタ局Mがスレーブ局SL1,SL2からTFを受信した場合には、マスタ局Mのトークン設定部41が、1回目のTFを受信してから自局のデータを送信するまでの待機時間を自局に再設定してもよい。
 また、本実施の形態では、各局がTFを3回繰り返して送信する場合について説明したが、各局がTFを繰り返して送信する回数は2回であってもよいし4回以上であってもよい。また、TFの繰り返し送信回数は、局毎に異なる回数であってもよい。
 また、TFの繰り返し送信回数は、TFの消失回数などに基づいてマスタ局Mが変更してもよい。図24は、TFの繰り返し送信回数を変更する場合のマスタ局の通信処理部の構成を示す図である。TFの繰り返し送信回数を変更する場合のマスタ局Mの通信処理部3Mは、送信バッファ31、受信バッファ32、トークン設定部41に加えて、再トークン発行部42、発行回数判定部43を備えている。
 再トークン発行部42は、TFが消失した場合にTFを再発行する機能(再トークン発行機能)を有している。再トークン発行部42は、データ通信システム100内で所定時間の間TFが発行されない場合に、TFが消失したと判断してTFを再発行する。
 発行回数判定部43は、監視タイマ44、カウンタ45、基準値記憶部46、判定部47を具備しており、TFを再発行した回数が所定値を超えたか否かを判定する。監視タイマ44は時間を測定し、カウンタ45は再トークン発行部42が何回TFを再発行したかをカウントする。基準値記憶部46は、TFの繰り返し送信回数を変更するか否かを判定する際に用いる基準値を記憶する。判定部47は、監視タイマ44が測定する時間と、カウンタ45がカウントするTFの再発行回数に基づいて、単位時間当たりのTFの再発行回数を算出する。判定部47は、算出した単位時間当たりのTFの再発行回数が、基準値記憶部46で記憶している基準値を超えたか否かを判定する。判定部47は、TFの再発行回数が、基準値記憶部46で記憶している基準値を超えた場合に、トークン設定部41にTFの送信回数を再設定するよう指示する。
 トークン設定部41は、判定部47からの指示に従って、現在設定しているTFの送信回数を増やす。例えば、トークン設定部41は、初期値としてTFの送信回数を1回に設定しておき、判定部47からTFの送信回数の変更指示を受ける度に、TFの送信回数を2回、3回と増やしていく。
 なお、基準値記憶部46は、設定されているTFの送信回数毎に基準値を記憶しておいてもよい。例えば、基準値記憶部46は、設定されているTFの送信回数が1回の場合に用いる基準値、2回の場合に用いる基準値のように、複数の基準値を記憶しておく。そして、判定部47は、現在設定されているTFの送信回数をトークン設定部41から取得し、現在設定されているTFの送信回数と、このTFの送信回数に対応する基準値と、を比較することによってTFの送信回数を増加させるか否かを判断する。
 なお、判定部47は、算出した単位時間当たりのTFの再発行回数が所定の基準値よりも小さい場合に、現在設定しているTFの送信回数を減らすようトークン設定部41に指示してもよい。また、判定部47は、算出した単位時間当たりのTFの再発行回数に基づいて、トークン設定部41にTFの送信回数を指示してもよい。また、判定部47は、算出した単位時間当たりのTFの再発行回数に基づいて、トークン設定部41にTFの送信回数を指示してもよい。
 このように、データ通信システム100では、フレームの伝送環境(ノイズ発生の有無)に変化がある場合であっても、伝送環境の変化(単位時間当たりのTFの再発行回数)に応じてTFの送信回数を調整できる。これにより、伝送路上にノイズが発生していない場合には、高速通信を優先させるためにTFの送信回数を減らし、伝送路上にノイズが発生している場合には、TFの送信回数を増やすことが可能となる。したがって、性能劣化の度合いを最小限に抑えることが可能となる。
 また、マスタ局Mの通信処理部3Mは、消失したTFが何れの局から発行されたTFであるかに基づいて、TFを繰り返し送信させる回数を局毎に変更してもよい。図25は、TFの繰り返し送信回数を局毎に変更する場合のマスタ局の通信処理部の構成を示す図である。TFの繰り返し送信回数を局毎に変更する場合のマスタ局Mの通信処理部3Mは、送信バッファ31、受信バッファ32、トークン設定部41に加えて、消失トークン判断部48を備えている。
 消失トークン判断部48は、TFが何れの局まで巡回したかを確認することによって、どの局が発行したTFが消失したかを判断する機能を有している。消失トークン判断部48は、消失したTFを発行した局(スレーブ局SL1,SL2またはマスタ局M)をトークン設定部41に通知する。これにより、トークン設定部41は、消失したTFを発行した局(スレーブ局SL1、スレーブ局SL2、マスタ局M)に対して、TFの繰り返し送信回数を変更する。このとき、トークン設定部41は、TFの消失回数に応じたTFの繰り返し回数をスレーブ局SL1,SL2、マスタ局Mの何れかに設定する。
 データ通信システム100内では、スレーブ局SL1,SL2にTFをブロードキャストで送信させる。さらに、TF内にTFの発行元を示すSA(ソースアドレス)を含めておく。これにより、スレーブ局SL1,SL2から発行されたSAを有したTFは、マスタ局Mの消失トークン判断部48へ送られる。消失トークン判断部48は、TFのSAを確認することによって、TFが何れの位置を巡回し、何れの位置で消失したかを判断することが可能となる。
 なお、本実施の形態では、通信処理部3Mが再トークン発行部42と発行回数判定部43を備える場合や、通信処理部3Mが消失トークン判断部48を備える場合について説明したが、通信処理部3Mを、再トークン発行部42、発行回数判定部43、消失トークン判断部48を有する構成としてもよい。
 これにより、図12に示したように局所的な部分にノイズ源がある場合であっても、ノイズ源に応じたTFの繰り返し送信を局毎に設定することが可能となる。したがって、TFの繰り返し送信に起因する性能劣化を最小限に抑えることが可能となる。
 このように、実施の形態6によれば、TFとデータの衝突を防止しつつTFの消失を防止することが可能となる。したがって、トークンのリカバリを回避することが可能となり、効率良くデータ通信を行うことが可能となる。
 また、マスタ局Mは、局毎にTFの送信回数を設定するので、各局に応じた効率の良いデータ通信が可能となる。また、マスタ局Mは、再発行したTFの数や消失したTFの数に基づいて、TFの送信回数を設定するので、ノイズ源に応じた効率の良いデータ通信が可能となる。
 なお、データ通信システム100は、実施の形態1~6のデータ通信処理や実施の形態1の図4で説明した従来のデータ通信処理を種々組み合わせてデータ通信処理を行なってもよい。
 例えば、データ通信システム100は、実施の形態2で説明したデータ通信処理と実施の形態4で説明したデータ通信処理を組み合わせてデータ通信処理を行なってもよい。この場合、データ通信システム100は、データ送信回数を設定した後(図11のST149)、データmをブロードキャストでスレーブ局SL1,SL2に送信する(図6のST79、ST80)。そして、通信処理部3Mは、スレーブ局SL1,SL2へのデータ送信処理を完了すると、スレーブ局SL1へTFを送る(図11のST150)。
 また、データ通信システム100は、実施の形態1で説明したデータ通信処理と実施の形態4で説明した従来のデータ通信処理を組み合わせてデータ通信処理を行なってもよい。この場合、データ通信システム100では、通信処理部3Mがスレーブ局SL1,SL2からデータs1,s2を受信した後、図4のST38~ST43の処理(マスタ局MのF/W処理)と、図11のST148~ST158の処理が行なわれる。
 また、実施の形態3の図7で説明したデータ通信処理のST109の処理(次判定処理)を、実施の形態4で説明した受信状態の統計情報に基づいて行なってもよい。この場合、例えばノイズの発生率が所定値以上であれば、通信処理部3Mは図3に示したデータ通信処理を選択し、ノイズの発生率が所定値未満であれば、通信処理部3Mは図4に示したデータ通信処理を選択する。これにより、データs1,s2の受信状態に応じた適切なリカバリ処理を行なうことが可能となる。したがって、効率良くデータ通信を行うことが可能となる。
 以上のように、本発明に係るデータ通信システムおよびデータ通信装置は、マスタ局とスレーブ局との間のデータ通信に適している。

Claims (20)

  1.  マスタ局と複数のスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式で行なうデータ通信システムにおいて、
     前記マスタ局は、
     前記各スレーブ局との間でトークンフレームを巡回させて行なう前記各スレーブ局との間のデータ送受信を第1のデータ送受信処理として行なう通信処理部と、
     前記スレーブ局から送られてくるデータを演算処理して前記スレーブ局へ送信するデータを生成する演算処理装置に接続するとともに、前記演算処理装置と前記通信処理部との間で行なうデータ送受信を第2のデータ送受信処理として行うデータ送受信処理部と、
     を有し、
     前記通信処理部は、前記データ送受信処理部との間で行なうデータ送受信を第3のデータ送受信処理として行うとともに、前記第1のデータ送受信処理のうち前記各スレーブ局との間で前記トークンフレームを巡回させるとともに前記各スレーブ局からのデータを受信するデータ受信処理をリトライ処理する場合には、前記第1のデータ送受信処理を行なった後、前記第3のデータ送受信処理を行なうことなく前記各スレーブ局との間で前記トークンフレームを巡回させるとともに前記各スレーブ局からのデータを受信することによってリトライ処理し、前記リトライ処理の後に前記第3のデータ送受信処理を行なうことを特徴とするデータ通信システム。
  2.  前記通信処理部は、
     前記第1のデータ送受信処理を行なった際に前記各スレーブ局へ送信したデータを、前記リトライ処理を行なう前に前記各スレーブ局へ再送信することを特徴とする請求項1に記載のデータ通信システム。
  3.  前記通信処理部は、
     前記各スレーブ局から送られてくるデータの受信状態に基づいて、前記第1のデータ送受信処理または前記リトライ処理を行なった後の処理として前記第3のデータ送受信処理または前記リトライ処理の何れか一方を選択して実行することを特徴とする請求項1または2に記載のデータ通信システム。
  4.  前記通信処理部は、
     前記各スレーブ局から送られてくるデータの受信状態に基づいて、前記各スレーブ局に要求するデータ送信回数を前記スレーブ局毎に設定し、設定したデータ送信回数を前記トークンフレームによって前記各スレーブ局に要求することを特徴とする請求項1または2に記載のデータ通信システム。
  5.  前記通信処理部は、
     前記第1のデータ送受信処理を行なった後、前記第3のデータ送受信処理を行なうことなく予め設定された回数だけ前記リトライ処理を繰り返すことを特徴とする請求項1または2に記載のデータ通信システム。
  6.  前記通信処理部は、
     前記受信状態の履歴を用いて算出された前記受信状態の統計情報に基づいて、前記第3のデータ送受信処理または前記リトライ処理の何れか一方を選択して実行することを特徴とする請求項3に記載のデータ通信システム。
  7.  前記通信処理部は、
     前記受信状態の履歴を用いて算出された前記受信状態の統計情報に基づいて、前記各スレーブ局に要求するデータ送信回数を設定することを特徴とする請求項4に記載のデータ通信システム。
  8.  前記通信処理部は、前記データ受信処理によって全スレーブ局から受信したデータをまとめて前記第3のデータ送受信処理を行なうことを特徴とする請求項1に記載のデータ通信システム。
  9.  前記スレーブ局は、
     前記トークンフレームを受信した際に、前記マスタ局に予め指定された回数だけ前記マスタ局へのデータ送信を繰り返すことを特徴とする請求項4に記載のデータ通信システム。
  10.  前記スレーブ局は、前記マスタ局と共有するデータであって前記スレーブ局から前記マスタ局に送信するデータを複数のフレームに分割し、かつ分割後の各フレームにシーケンシャルナンバを付与するとともに分割後のフレームのうち最後のフレームに最後のフレームであることを示す最後情報を付与して前記各フレームを前記マスタ局に送信し、
     前記通信処理部は、
     前記シーケンシャルナンバおよび前記最後情報に基づいて前記スレーブ局から全てのデータを受信したか否かを判断する判断部を備え、
     前記判断部が前記スレーブ局から全てのデータを受信したと判断した場合に、前記第3のデータ送受信処理を行なうことを特徴とする請求項1に記載のデータ通信システム。
  11.  前記スレーブ局が前記マスタ局に送信するフレームは、前記フレームの送信元を示すフレーム送信元情報を有し、
     前記通信処理部は、
     前記スレーブ局から受信したフレーム内のフレーム送信元情報に基づいて何れのスレーブ局から前記フレームを受信しているかを判断し、前回とは異なる次のスレーブ局から前記フレームを受信したと判断した場合に、前記判断部をリセットして前記判断部に前記次のスレーブ局から全てのデータを受信したか否かを判断させることを特徴とする請求項10に記載のデータ通信システム。
  12.  前記トークンフレームは、前記トークンフレームの宛先を示すトークン宛先情報を有し、
     前記通信処理部は、
     前記トークン宛先情報に基づいて前記トークンフレームの宛先を判断し、自局宛てのトークンフレームを受信したと判断した場合に、前記判断部をリセットして前記判断部に前記次のスレーブ局から全てのデータを受信したか否かを判断させることを特徴とする請求項10に記載のデータ通信システム。
  13.  前記トークンフレームは、前記トークンフレームの送信元を示すトークン送信元情報を有し、
     前記通信処理部は、
     前記トークン送信元情報に基づいて何れのスレーブ局から前記トークンフレームが送信されたかを判断し、前回とは異なる次のスレーブ局から前記トークンフレームを受信したと判断した場合に、前記判断部をリセットして前記判断部に前記次のスレーブ局から全てのデータを受信したか否かを判断させることを特徴とする請求項10に記載のデータ通信システム。
  14.  マスタ局と複数のスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式で行なうデータ通信システムにおいて、
     前記マスタ局は、
     前記各スレーブ局との間でトークンフレームを巡回させて行なう前記各スレーブ局との間のデータ送受信を第1のデータ送受信処理として行なう通信処理部と、
     前記スレーブ局から送られてくるデータを演算処理して前記スレーブ局へ送信するデータを生成する演算処理装置に接続するとともに、前記演算処理装置と前記通信処理部との間で行なうデータ送受信を第2のデータ送受信処理として行うデータ送受信処理部と、
     を有し、
     前記通信処理部は、前記データ送受信処理部との間で行なうデータ送受信を第3のデータ送受信処理として行うとともに、前記第1のデータ送受信処理を行う際には、データ送受信対象となるスレーブ局に前記トークンフレームを複数回繰り返して送信することを特徴とするデータ通信システム。
  15.  前記通信処理部は、
     前記各スレーブ局に要求するトークンフレームの送信回数を前記スレーブ局毎に設定し、設定したトークンフレームの送信回数を前記各スレーブ局に要求することを特徴とする請求項14に記載のデータ通信システム。
  16.  前記通信処理部は、
     前記トークンフレームが消失した場合に前記トークンフレームの再発行を行うとともに、再発行したトークンフレームの数に基づいて、前記各スレーブ局に要求するトークンフレームの送信回数を前記スレーブ局毎に設定することを特徴とする請求項15に記載のデータ通信システム。
  17.  前記通信処理部は、
     消失したトークンフレームを検出するとともに、消失したトークンフレームの数に基づいて、前記各スレーブ局に要求するトークンフレームの送信回数を前記スレーブ局毎に設定することを特徴とする請求項15に記載のデータ通信システム。
  18.  前記スレーブ局は、
     前記トークンフレームを受信した際に、前記マスタ局に予め指定された回数だけ前記マスタ局または他のスレーブ局へのトークンフレームの送信を繰り返すことを特徴とする請求項15に記載のデータ通信システム。
  19.  複数のスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式でマスタ局として行なうデータ通信装置において、
     前記各スレーブ局との間でトークンフレームを巡回させて行なう前記各スレーブ局との間のデータ送受信を第1のデータ送受信処理として行なう通信処理部と、
     前記スレーブ局から送られてくるデータを演算処理して前記スレーブ局へ送信するデータを生成する演算処理装置に接続するとともに、前記演算処理装置と前記通信処理部との間で行なうデータ送受信を第2のデータ送受信処理として行うデータ送受信処理部と、
     を有し、
     前記通信処理部は、前記データ送受信処理部との間で行なうデータ送受信を第3のデータ送受信処理として行うとともに、前記第1のデータ送受信処理のうち前記各スレーブ局との間で前記トークンフレームを巡回させるとともに前記各スレーブ局からのデータを受信するデータ受信処理をリトライ処理する場合には、前記第1のデータ送受信処理を行なった後、前記第3のデータ送受信処理を行なうことなく前記各スレーブ局との間で前記トークンフレームを巡回させるとともに前記各スレーブ局からのデータを受信することによってリトライ処理し、前記リトライ処理の後に前記第3のデータ送受信処理を行なうことを特徴とするデータ通信装置。
  20.  複数のスレーブ局との間のデータ通信をイーサネット(登録商標)を用いたトークンパッシング方式でマスタ局として行なうデータ通信装置において、
     前記各スレーブ局との間でトークンフレームを巡回させて行なう前記各スレーブ局との間のデータ送受信を第1のデータ送受信処理として行なう通信処理部と、
     前記スレーブ局から送られてくるデータを演算処理して前記スレーブ局へ送信するデータを生成する演算処理装置に接続するとともに、前記演算処理装置と前記通信処理部との間で行なうデータ送受信を第2のデータ送受信処理として行うデータ送受信処理部と、
     を有し、
     前記通信処理部は、前記データ送受信処理部との間で行なうデータ送受信を第3のデータ送受信処理として行うとともに、前記第1のデータ送受信処理を行う際には、データ送受信対象となるスレーブ局に前記トークンフレームを複数回繰り返して送信することを特徴とするデータ通信システム。
PCT/JP2008/073645 2008-12-25 2008-12-25 データ通信システムおよびデータ通信装置 WO2010073352A1 (ja)

Priority Applications (7)

Application Number Priority Date Filing Date Title
CN200880132547.XA CN102265557B (zh) 2008-12-25 2008-12-25 数据通信系统以及数据通信装置
DE112008004237.3T DE112008004237B4 (de) 2008-12-25 2008-12-25 Datenkommikationssystem und Datenkommunikationsvorrichtung
JP2010543688A JP4948651B2 (ja) 2008-12-25 2008-12-25 データ通信システムおよびデータ通信装置
US13/131,293 US8725827B2 (en) 2008-12-25 2008-12-25 Data communication system and data communication apparatus in a token passing system with improved recovery
KR1020117014326A KR101314992B1 (ko) 2008-12-25 2008-12-25 데이터 통신 시스템 및 데이터 통신 장치
PCT/JP2008/073645 WO2010073352A1 (ja) 2008-12-25 2008-12-25 データ通信システムおよびデータ通信装置
TW098101184A TWI402678B (zh) 2008-12-25 2009-01-14 資料通訊系統及資料通訊裝置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2008/073645 WO2010073352A1 (ja) 2008-12-25 2008-12-25 データ通信システムおよびデータ通信装置

Publications (1)

Publication Number Publication Date
WO2010073352A1 true WO2010073352A1 (ja) 2010-07-01

Family

ID=42287020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2008/073645 WO2010073352A1 (ja) 2008-12-25 2008-12-25 データ通信システムおよびデータ通信装置

Country Status (7)

Country Link
US (1) US8725827B2 (ja)
JP (1) JP4948651B2 (ja)
KR (1) KR101314992B1 (ja)
CN (1) CN102265557B (ja)
DE (1) DE112008004237B4 (ja)
TW (1) TWI402678B (ja)
WO (1) WO2010073352A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018042115A (ja) * 2016-09-07 2018-03-15 株式会社デンソー 通信システム
TWI751062B (zh) * 2020-04-24 2021-12-21 日商三菱電機股份有限公司 通信裝置、通信系統、通信方法及電腦程式產品

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104115451A (zh) * 2012-02-27 2014-10-22 松下电器产业株式会社 主机装置、通信系统以及通信方法
WO2013186889A1 (ja) * 2012-06-14 2013-12-19 三菱電機株式会社 I/oデバイス、プログラマブルロジックコントローラ及び演算方法
JP2014030168A (ja) * 2012-06-27 2014-02-13 Murata Mach Ltd 中継通信システム、及び中継通信装置
US9414381B2 (en) * 2013-03-15 2016-08-09 Robert Bosch Gmbh Data aggregation method and network architecture for robust real-time wireless industrial communication
KR101789977B1 (ko) * 2015-08-19 2017-10-25 미쓰비시덴키 가부시키가이샤 무선 마스터 스테이션, 무선 슬레이브 스테이션, 무선 통신 시스템 및 무선 통신 방법
WO2021130912A1 (ja) * 2019-12-25 2021-07-01 三菱電機株式会社 データ収集管理装置およびデータ収集システム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63267039A (ja) * 1987-04-24 1988-11-04 Canon Inc ネツトワ−クシステム
JPH0879283A (ja) * 1994-08-30 1996-03-22 Mitsubishi Electric Corp データ通信制御方法
JPH08125671A (ja) * 1994-10-24 1996-05-17 Mitsubishi Electric Corp データ伝送方法
JP2005159920A (ja) * 2003-11-27 2005-06-16 Fuji Electric Fa Components & Systems Co Ltd メッセージ交換管理方法、ネットワークシステム、そのマスタノード、ノード、プログラム

Family Cites Families (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3889221T2 (de) * 1988-10-20 1994-11-17 Ibm Kommunikationsnetzwerk.
KR930001080A (ko) * 1991-06-24 1993-01-16 정용문 직렬 입출력 접속 장치를 이용한 마스터 시스템과 다중 슬레이브 시스템간 데이타 통신 방법
JP3024345B2 (ja) * 1992-03-02 2000-03-21 三菱電機株式会社 データリンク方法
DE4429953B4 (de) * 1994-08-24 2012-06-06 Wabco Gmbh Serielles Bussystem
JPH09130415A (ja) 1995-11-02 1997-05-16 Omron Corp データ伝送装置および方法
JPH09160851A (ja) 1995-12-08 1997-06-20 Hitachi Koki Co Ltd データ通信制御装置
US6751213B1 (en) * 1999-12-24 2004-06-15 Cypress Semiconductor Corporation Token over ethernet protocol
US7099922B2 (en) * 2002-01-23 2006-08-29 International Business Machines Corporation Method and system for simultaneous management of multiple tokens on a communication ring
JP3948330B2 (ja) * 2002-04-10 2007-07-25 日産自動車株式会社 異種ネットワーク間の相互接続装置
TWI223159B (en) * 2003-03-11 2004-11-01 Accton Technology Corp Data transmission method using I2C bus as interface and electronic system thereof
JP2006129235A (ja) * 2004-10-29 2006-05-18 Tokyo Electron Device Ltd ネットワークシステム、マスターデバイス、スレーブデバイス、ネットワークシステムの立ち上げ制御方法。
JP3925660B2 (ja) * 2005-06-09 2007-06-06 オムロン株式会社 通信マスタ局の起動時制御方法
EP1894113B1 (de) * 2005-06-23 2020-06-03 Hilscher Gesellschaft für Systemautomation mbH Verfahren zur datenkommunikation von busteilnehmern eines offenen automatisierungssystems
US7738483B2 (en) * 2005-09-08 2010-06-15 Kabushiki Kaisha Toshiba Systems and methods for managing communication between master and slave devices
JP4776374B2 (ja) * 2005-12-27 2011-09-21 株式会社東芝 二重化監視制御システム、及び同システムの冗長化切替え方法
TW200822622A (en) * 2006-11-13 2008-05-16 Alpha Networks Inc Method of setting and managing a plurality of network devices
CN101193092A (zh) * 2006-11-29 2008-06-04 鸿富锦精密工业(深圳)有限公司 网络设备及其数据同步传输方法
JP5252168B2 (ja) * 2007-03-20 2013-07-31 株式会社大一商会 遊技機
CN101170472A (zh) * 2007-10-26 2008-04-30 华中科技大学 一种基于以太网技术的数控通信方法
KR101218003B1 (ko) * 2008-06-02 2013-01-02 미쓰비시덴키 가부시키가이샤 데이터 통신 시스템 및 데이터 통신 장치
JP5197765B2 (ja) * 2008-12-25 2013-05-15 三菱電機株式会社 通信管理装置および通信装置
CA2806976C (en) * 2010-04-12 2018-07-10 Dentsply International Inc. Dental hand piece with circuit board

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63267039A (ja) * 1987-04-24 1988-11-04 Canon Inc ネツトワ−クシステム
JPH0879283A (ja) * 1994-08-30 1996-03-22 Mitsubishi Electric Corp データ通信制御方法
JPH08125671A (ja) * 1994-10-24 1996-05-17 Mitsubishi Electric Corp データ伝送方法
JP2005159920A (ja) * 2003-11-27 2005-06-16 Fuji Electric Fa Components & Systems Co Ltd メッセージ交換管理方法、ネットワークシステム、そのマスタノード、ノード、プログラム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018042115A (ja) * 2016-09-07 2018-03-15 株式会社デンソー 通信システム
TWI751062B (zh) * 2020-04-24 2021-12-21 日商三菱電機股份有限公司 通信裝置、通信系統、通信方法及電腦程式產品

Also Published As

Publication number Publication date
DE112008004237B4 (de) 2016-02-11
US20110238773A1 (en) 2011-09-29
CN102265557A (zh) 2011-11-30
DE112008004237T5 (de) 2012-07-12
KR101314992B1 (ko) 2013-10-04
JP4948651B2 (ja) 2012-06-06
CN102265557B (zh) 2014-03-12
TW201025016A (en) 2010-07-01
TWI402678B (zh) 2013-07-21
KR20110097877A (ko) 2011-08-31
US8725827B2 (en) 2014-05-13
JPWO2010073352A1 (ja) 2012-05-31

Similar Documents

Publication Publication Date Title
JP4948651B2 (ja) データ通信システムおよびデータ通信装置
US6032205A (en) Crossbar switch system for always transferring normal messages and selectively transferring broadcast messages from input buffer to output buffer when it has sufficient space respectively
US4590468A (en) Token access controller protocol and architecture
JPH02283142A (ja) リング状ネットワークにおけるメッセージ制御方法
JP4154853B2 (ja) 制御データを等値化する冗長化プログラマブルコントローラ及び等値化方法。
US20160380835A1 (en) Communication system using network
JP2010187244A (ja) 端末装置間のトークン異常検出/回復方式
WO2016158203A1 (ja) 通信システム
JP5274679B2 (ja) データ通信システムおよびデータ通信装置
JP4024876B2 (ja) 冗長性終端
US7158561B2 (en) Communication system, communication device, and communication method
JP2007243322A (ja) ゲートウェイ装置、データ転送方法及びプログラム
JP3112778B2 (ja) トークン再発生方式
JP2017147713A (ja) ノード装置、および通信システム
JP2004341595A (ja) 信号転送方法及び信号処理システム
JPS61227443A (ja) 伝送装置
JPH07202917A (ja) 同報通信方法及び通信ネットワーク
JPH0888643A (ja) リング形伝送方式
JPH0383432A (ja) 構内通信網の通信装置
JPH01298833A (ja) トークンパッシング伝送におけるトークン保護方式
JPH02295251A (ja) トークンバス型ローカルネットワークシステムにおける優先度付緊急通信制御方式
JPH09181754A (ja) 通信制御システム及び通信制御方法
JPH01198136A (ja) パケット通信における再送回数制御方式
JPH1185658A (ja) 通信方式
JP2017151765A (ja) 監視装置、監視方法、及びプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200880132547.X

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08879148

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2010543688

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13131293

Country of ref document: US

ENP Entry into the national phase

Ref document number: 20117014326

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 112008004237

Country of ref document: DE

Ref document number: 1120080042373

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08879148

Country of ref document: EP

Kind code of ref document: A1