TWM608805U - Backup processing system of RS485 ring network - Google Patents

Backup processing system of RS485 ring network Download PDF

Info

Publication number
TWM608805U
TWM608805U TW109210949U TW109210949U TWM608805U TW M608805 U TWM608805 U TW M608805U TW 109210949 U TW109210949 U TW 109210949U TW 109210949 U TW109210949 U TW 109210949U TW M608805 U TWM608805 U TW M608805U
Authority
TW
Taiwan
Prior art keywords
interface
ring network
target device
host
time
Prior art date
Application number
TW109210949U
Other languages
Chinese (zh)
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 TW109210949U priority Critical patent/TWM608805U/en
Publication of TWM608805U publication Critical patent/TWM608805U/en

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

一種RS485環狀網路的備援處理系統,其特徵在於RS485環狀網路發生異常時的備援處理。本新型包括:環狀網路、RS485設備端與主控端。環狀網路串接多個RS485設備端與主控端。主控端的處理單元電性連接於儲存單元、第一接口與第二接口,處理單元運行記錄於儲存單元的路徑控制程序,第一接口與第二接口分別連接環狀網路的兩端,主控端發送第一訊號並計算第一訊號在環狀網路中傳輸的第一時間;主控端每間隔第二時間,主控端發出測試訊號至第二接口,用於判別環狀網路是否中斷,主控端監測環狀網路發生中斷,主控端間隔第三時間驅動第二接口發送另一第二控制命令至第二目標設備。 A backup processing system for an RS485 ring network is characterized by backup processing when the RS485 ring network is abnormal. This model includes: ring network, RS485 equipment terminal and main control terminal. The ring network connects multiple RS485 device terminals and the master terminal in series. The processing unit of the main control terminal is electrically connected to the storage unit, the first interface and the second interface. The processing unit runs the path control program recorded in the storage unit. The first interface and the second interface are respectively connected to the two ends of the ring network. The control terminal sends the first signal and calculates the first time when the first signal is transmitted in the ring network; the control terminal sends a test signal to the second interface every second time interval, which is used to identify the ring network Whether it is interrupted, the host monitors that the ring network is interrupted, and the host drives the second interface to send another second control command to the second target device at a third interval.

Description

RS485環狀網路的備援處理系統 Backup processing system of RS485 ring network

一種訊號的備援處理系統,特別有關RS485環狀網路的備援處理系統。 A signal backup processing system, especially related to the backup processing system of the RS485 ring network.

RS485(或稱EIA485)是隸屬於OSI模型實體層的電氣特性規定為2線、半雙工、平衡傳輸線多點通訊的標準。是由電信行業協會(Telecommunications Industry Association,TIA)及電子工業聯盟(Electronic Industries Alliance,EIA)聯合發布的標準。RS485協議使用纜線兩端的電壓差值來表示傳遞訊號。RS485協議可以應用於組態便宜的區域網和採用單機傳送,多機接受通訊連結。因此RS485協議除了以串接多個設備的方式外,也可以透過環狀網路的方式連接各種設備。 RS485 (or EIA485) is a standard for 2-wire, half-duplex, balanced transmission line multi-point communication that belongs to the electrical characteristics of the physical layer of the OSI model. It is a standard jointly issued by the Telecommunications Industry Association (TIA) and the Electronic Industries Alliance (EIA). The RS485 protocol uses the voltage difference between the two ends of the cable to represent the transmission signal. The RS485 protocol can be used to configure cheap local area networks and use a single machine to transmit, and multiple machines to accept communication links. Therefore, in addition to connecting multiple devices in series, the RS485 protocol can also connect various devices through a ring network.

在環狀網路的架構中,主控端(host)提供兩連接接口且兩連接接口分別連接環狀網路的兩端。因此主控端可以透過任一接口發送訊號並由另一接口接收訊號。環狀網路的優勢在於主控端可以透過任一接口發送訊號至目標設備。 In the ring network architecture, the host provides two connection interfaces and the two connection interfaces are respectively connected to the two ends of the ring network. Therefore, the host can send signals through any interface and receive signals through another interface. The advantage of a ring network is that the host can send signals to the target device through any interface.

但環狀網路的路徑發生中斷時,習知技術的主控端無法得知路徑中斷點位於路徑上的何處。若主控端選錯發送訊號的接口,則控制訊號可能無法順利的發送至目標設備。而習知技術為能確保目標設備可以收到訊號,所以會透過兩連接接口發出訊號至目標設備。 However, when the path of the loop network is interrupted, the master of the conventional technology cannot know where the path interruption point is located on the path. If the host selects the wrong interface to send the signal, the control signal may not be sent to the target device smoothly. In order to ensure that the target device can receive the signal, the conventional technology sends a signal to the target device through two connection interfaces.

此外,主控端也無相關機制可以得知環狀網路是否恢復正常。當環狀網路恢復連接時,主控端仍會透過兩個連接接口發出訊號至目標設備。因此目標設備會分別接到兩個相同的訊號,使得目標設備將會重複執行兩次的動作或回覆兩次回應至主控端。主控端將會受到兩組相同回覆的影響,使得系統運作失常。 In addition, the host has no relevant mechanism to know whether the ring network is back to normal. When the ring network is restored, the host will still send signals to the target device through the two connection ports. Therefore, the target device will receive two identical signals respectively, so that the target device will repeat the action twice or reply twice to the host. The host will be affected by the same two sets of replies, causing the system to malfunction.

本新型提供一種RS485環狀網路的備援處理系統用於RS485環狀網路發生異常時的備援處理。 The model provides a backup processing system for an RS485 ring network, which is used for backup processing when the RS485 ring network is abnormal.

本新型的RS485環狀網路的備援處理系統包括環狀網路、RS485設備端與主控端。環狀網路串接多個RS485設備端與主控端。主控端具有處理單元、儲存單元、路徑控制程序、第一接口與第二接口,處理單元電性連接於儲存單元、第一接口與第二接口,處理單元運行記錄於儲存單元的路徑控制程序,第一接口與第二接口分別連接環狀網路的兩端,主控端透過第一接口發送第一訊號並計算第一訊號在環狀網路中傳輸的第一時間,當環狀網路連線時,主控端透過第一接口發送第一控制命令至環狀網路中的第一目標設備;其中,主控端每間隔第二時間,主控端由第一接口發出測試訊號至第二接口,用於判別環狀網路是否中斷,主控端監測環狀網路發生中斷,主控端驅動第一接口發送第二控制命令至環狀網路中的第二目標設備,主控端間隔第三時間驅動第二接口發送另一第二控制命令至第二目標設備。 The backup processing system of the new RS485 ring network includes a ring network, an RS485 device terminal and a master control terminal. The ring network connects multiple RS485 device terminals and the master terminal in series. The main control terminal has a processing unit, a storage unit, a path control program, a first interface and a second interface. The processing unit is electrically connected to the storage unit, the first interface and the second interface. The processing unit runs the path control program recorded in the storage unit , The first interface and the second interface are respectively connected to the two ends of the ring network, and the host sends the first signal through the first interface and calculates the first time when the first signal is transmitted in the ring network. During the connection, the host sends the first control command to the first target device in the ring network through the first interface; among them, the host sends a test signal from the first interface every second time interval To the second interface, it is used to determine whether the ring network is interrupted. The host monitors that the ring network is interrupted, and the host drives the first interface to send a second control command to the second target device in the ring network. The main control terminal drives the second interface to send another second control command to the second target device at a third interval.

本新型的RS485環狀網路的備援處理系統可以提供主控端在環狀網路連線、中斷或連線恢復的各種情況下,實現主控端對目標設備的存取控制。本新型的RS485環狀網路的備援處理方法與系統再不增加額外的硬體成本的情況下,實現主控端與環狀網路備援的相關措施。 The new RS485 ring network backup processing system can provide the master control terminal to realize the access control of the target device to the target device in various situations of ring network connection, interruption or connection recovery. The new type of RS485 ring network backup processing method and system can realize the related measures of the host and ring network backup without adding additional hardware costs.

有關本新型的特徵與實作,茲配合圖式作最佳實施例詳細說明如下。 With regard to the features and implementation of the present invention, the best embodiments are described in detail as follows in conjunction with the drawings.

100:備援處理系統 100: Redundant Processing System

110:主控端 110: Master

111:處理單元 111: Processing Unit

112:儲存單元 112: storage unit

113:路徑控制程序 113: Path Control Program

114:第一接口 114: first interface

115:第二接口 115: second interface

120:RS485設備端 120: RS485 device side

130:環狀網路 130: ring network

140:目標設備 140: target device

510:第一目標設備 510: first target device

520:第二目標設備 520: second target device

第1圖係為本新型的RS485環狀網路的備援處理系統架構示意圖。 Figure 1 is a schematic diagram of the redundant processing system architecture of the new RS485 ring network.

第2圖係為本新型的環狀網路架構示意圖。 Figure 2 is a schematic diagram of the new ring network architecture.

第3圖係為本新型的運作流程示意圖。 Figure 3 is a schematic diagram of the operation flow of the new model.

第4圖係為本新型的各接口與目標設備的訊號傳輸時序圖。 Figure 4 is a timing diagram of signal transmission between each interface of the new model and the target device.

第5A圖係為本新型的第一目標設備、第一回應訊息與第二回應訊息示意圖。 FIG. 5A is a schematic diagram of the first target device, the first response message, and the second response message of the new type.

第5B圖係為本新型的各接口與目標設備的訊號傳輸時序圖。 Figure 5B is a timing diagram of signal transmission between each interface of the new model and the target device.

第5C圖係為本新型的發生中斷時的訊號傳輸時序圖。 Figure 5C is a timing diagram of signal transmission when an interrupt occurs in the new model.

請配合參考第1圖與第2圖所示,其係分別為本新型的RS485環狀網路的備援處理系統架構示意圖。本新型的RS485環狀網路的備援處理系統100包括主控端110、RS485設備端120與環狀網路130。環狀網路130分別連接於主控端110與多個RS485設備端120。主控端110可以是但不限定為個人電腦或伺服器,也可以是獨立具有通訊與計算能力的電子設備。 Please refer to Fig. 1 and Fig. 2, which are schematic diagrams of the redundant processing system architecture of the new RS485 ring network. The backup processing system 100 of the RS485 ring network of the present invention includes a main control terminal 110, an RS485 device terminal 120, and a ring network 130. The ring network 130 is respectively connected to the main control terminal 110 and a plurality of RS485 device terminals 120. The host 110 can be, but is not limited to, a personal computer or a server, and can also be an electronic device with independent communication and computing capabilities.

主控端110具有處理單元111、儲存單元112、路徑控制程序113、第一接口114與第二接口115。處理單元111電性連接於儲存單元112、第一接口114與第二接口115。儲存單元112存儲路徑控制程序113。處理單元111除了執行路徑控制程序113外,處理單元111也驅動第一接口114與第二接口115並用於傳輸命令或訊息。在本新型中第一接口114與第二接口115均可以任意傳輸命令或訊息,並非僅侷限本新型中所述的傳輸方向。 The main control terminal 110 has a processing unit 111, a storage unit 112, a path control program 113, a first interface 114 and a second interface 115. The processing unit 111 is electrically connected to the storage unit 112, the first interface 114 and the second interface 115. The storage unit 112 stores the path control program 113. In addition to the processing unit 111 executing the path control program 113, the processing unit 111 also drives the first interface 114 and the second interface 115 to transmit commands or messages. In the present invention, both the first interface 114 and the second interface 115 can transmit commands or messages arbitrarily, and are not limited to the transmission direction described in the present invention.

第一接口114與第二接口115分別連接於環狀網路130的兩端。在第1、2圖中環狀網路130係以粗黑線作為表示。環狀網路130的連接方式是以串接RS485設備端120的方式所形成。換言之,第一接口114連接電纜至第一台的RS485設備端120,在由第一台RS485設備端120電纜連接至第二台RS485設備端120,依序連接至次一RS485設備端120直至第二接口115為止。在本新型中為方便說明所指定的RS485設備端120,因此將所指定的RS485設備端120定義為目標設備140。第2圖中的目標設備僅為示意,並非僅侷限於此一位置上的RS485設備端120。並且主控端110根據不同的傳輸目的,主控端110可以發送控制命令與測試訊號至目標設備140,用以驅動目標設備140或確認環狀網路130的連線狀態。 The first interface 114 and the second interface 115 are respectively connected to two ends of the ring network 130. In Figures 1 and 2, the ring network 130 is represented by a thick black line. The connection mode of the ring network 130 is formed by connecting the RS485 device terminal 120 in series. In other words, the first interface 114 connects the cable to the first RS485 device terminal 120, from the first RS485 device terminal 120 to the second RS485 device terminal 120, and then connects to the next RS485 device terminal 120 to the second RS485 device terminal 120 in sequence. The second interface is 115. In the present invention, for the convenience of explaining the designated RS485 device terminal 120, the designated RS485 device terminal 120 is defined as the target device 140. The target device in Figure 2 is only for illustration, and is not limited to the RS485 device terminal 120 at this location. According to different transmission purposes, the host 110 can send control commands and test signals to the target device 140 to drive the target device 140 or confirm the connection status of the ring network 130.

在本新型中為能方便說明不同的狀況下的目標設備,因此定義第一目標設備與第二目標設備。在環狀網路130正常連線時,主控端 110欲控制的目標設備為第一目標設備510。若是環狀網路130發生異常,主控端110對於欲控制的設備則定義為第二目標設備520。所述異常情況泛指網路訊號傳輸中斷或網路延遲過長等情況。 In the present invention, in order to facilitate the description of the target device under different conditions, the first target device and the second target device are defined. When the ring network 130 is normally connected, the master The target device to be controlled by 110 is the first target device 510. If the ring network 130 is abnormal, the host 110 defines the device to be controlled as the second target device 520. The abnormal situation generally refers to situations such as interruption of network signal transmission or excessive network delay.

為進一步說明本新型的運作方式,請配合第3圖,其係為本新型的運作流程示意圖。本新型的RS485環狀網路的備援處理方法包括以下步驟:步驟S310:主控端以環狀網路串接於多個RS485設備;步驟S320:主控端於初始階段時,由主控端的第一接口發出第一訊號,使第一訊號經由環狀網路後經由主控端的第二接口所接收;步驟S330:確認環狀網路的連通並計時第一訊號於環狀網路中經過的第一時間;步驟S340:主控端每間隔第二時間,主控端由第一接口發出測試訊號至第二接口,用於判別環狀網路是否中斷;步驟S350:若環狀網路未發生中斷,主控端透過第一接口發送第一控制命令至第一目標設備,且經過第一時間後第二接口接獲第一控制命令;步驟S360:第一目標設備完成第一控制命令後,目標設備發送第一回應訊息與第二回應訊息至主控端;步驟S370:若環狀網路發生中斷,主控端驅動第一接口發送第二控制命令至第二目標設備;步驟S380:判斷第二目標設備是否於第一時間內完成第二控制命令;步驟S381:若第二目標設備於第一時間內未完成第二控制命令,主控端間隔第三時間驅動第二接口發送另一組第二控制命令至第二目標設備;以及步驟S382:若第二目標設備於第一時間內完成第二控制命令,第二目標設備根據任一第二控制命令返回第三回應訊息至主控端。 In order to further explain the operation mode of the present invention, please cooperate with Figure 3, which is a schematic diagram of the operation process of the present invention. The backup processing method of the RS485 ring network of the present invention includes the following steps: Step S310: The main control terminal is connected to multiple RS485 devices in a ring network in series; Step S320: When the main control terminal is in the initial stage, the main control The first interface of the terminal sends out the first signal, so that the first signal passes through the ring network and then is received via the second interface of the master terminal; step S330: confirm the connection of the ring network and time the first signal in the ring network The first time elapsed; Step S340: The master control terminal sends a test signal from the first interface to the second interface every second time interval to determine whether the ring network is interrupted; Step S350: If the ring network The path is not interrupted, the host sends the first control command to the first target device through the first interface, and the second interface receives the first control command after the first time has elapsed; step S360: the first target device completes the first control After the command, the target device sends a first response message and a second response message to the host; step S370: if the ring network is interrupted, the host drives the first interface to send a second control command to the second target device; step S380: Determine whether the second target device completes the second control command within the first time; Step S381: If the second target device does not complete the second control command within the first time, the host drives the second interface at a third interval Send another set of second control commands to the second target device; and step S382: If the second target device completes the second control command within the first time, the second target device returns a third response message according to any second control command To the host.

本新型的主控端110以串列的方式連接多個RS485設備,藉以形成環狀網路130,如第2圖所示。在環狀網路130的初始階段時,主控端110會開始運行路徑控制程序113。路徑控制程序113會透過第一接口 114發出第一訊號至環狀網路130,如第4圖所示,其係為本新型的各接口與目標設備140的訊號傳輸時序圖。 The main control terminal 110 of the present invention connects multiple RS485 devices in a serial manner to form a ring network 130, as shown in FIG. 2. In the initial stage of the ring network 130, the host 110 will start to run the path control program 113. The path control program 113 will pass through the first interface 114 sends the first signal to the ring network 130, as shown in FIG. 4, which is a timing diagram of signal transmission between each interface of the new model and the target device 140.

第4圖分為上、下兩部分,分別表示網路連接的初始階段與運作階段。所述的初始階段是主控端110開機後連接至環狀網路130的階段。主控端110將會計時第一訊號將通過第一接口114、環狀網路130與第二接口115的時間,而此一時間則是第一時間。如果主機端110重啟後,主機端110在初始階段會載入前次的第一時間作為新一回合的判斷基準。舉例來說,主控端110會根據前次的第一時間T n-1並乘上倍數m,其中0<m≦5且m為任意數;n為主控端110的重啟回合數,若n為1時則m不列入計算。mT n-1用以判斷本次初始階段的環狀網路是否有中斷。 Figure 4 is divided into two parts, the upper part and the lower part, respectively showing the initial stage and operation stage of the network connection. The initial stage is the stage in which the host 110 is connected to the ring network 130 after booting. The host 110 will count the time when the first signal will pass through the first interface 114, the ring network 130 and the second interface 115, and this time is the first time. If the host side 110 restarts, the host side 110 will load the first time of the previous time as the judgment benchmark for the new round in the initial stage. For example, the master 110 will multiply the multiple m according to the first time T n -1 of the previous time, where 0<m≦5 and m is any number; n is the number of restart rounds of the master 110, if When n is 1, m is not included in the calculation. m * T n -1 is used to determine whether the ring network in this initial stage is interrupted.

換言之,第二接口115若是於mT n-1的時間內收到第一訊號,則第二接口115除了可以認為環狀網路是連通的且第一訊號的經過時間則為新的第一時間。反之,第二接口115在經過mT n-1的時間未收到第一訊號,則表示環狀網路130是中斷的。主控端110會發出警示訊號,藉以提示使用者環狀網路130發生異常。 In other words, if the second interface 115 receives the first signal within the time of m * T n -1 , the second interface 115 can consider that the ring network is connected and the elapsed time of the first signal is the new first signal. For a time. Conversely, if the second interface 115 does not receive the first signal within the time of m * T n -1 , it means that the ring network 130 is interrupted. The host 110 will issue a warning signal to remind the user that the ring network 130 is abnormal.

在確認環狀網路130正常主控端110會每間隔第二時間後,主控端110由第一接口114發出測試訊號至第二接口115。主控端110藉由第二接口115有無接收測試訊號作為環狀網路130的中斷依據。其中,第二時間的長度可以透過使用者自行設定。 After confirming that the ring network 130 is normal, the host 110 will send a test signal from the first interface 114 to the second interface 115 every second time interval. The main control terminal 110 uses whether the second interface 115 receives the test signal as a basis for interruption of the ring network 130. Among them, the length of the second time can be set by the user.

在運作階段中,主控端110判斷環狀網路130是否發生中斷。以下為能區別不同情況所發送的命令,因此在未中斷所發送的控制命令為第一控制命令,而中斷時所發送的控制命令為第二控制命令。 During the operation phase, the host 110 determines whether the ring network 130 is interrupted. The following are commands that can be sent in different situations. Therefore, the control command sent without interruption is the first control command, and the control command sent during interruption is the second control command.

若環狀網路130未發生中斷,主控端110透過第一接口114發送第一控制命令至第一目標設備510與第二接口115。由於環狀網路130未中斷,因此第一控制命令除了流經第一目標設備150外,也會傳向第二接口115。因此,第一控制命令從第一接口114發出後,應該在經過第一時間後第二接口115也會收到第一控制命令。路徑控制程序113可以通過第二接口115有無接獲第一控制命令,進而判斷環狀網路130是否發生中斷。 If the ring network 130 is not interrupted, the host 110 sends the first control command to the first target device 510 and the second interface 115 through the first interface 114. Since the ring network 130 is not interrupted, the first control command will not only flow through the first target device 150 but also be transmitted to the second interface 115. Therefore, after the first control command is sent from the first interface 114, the second interface 115 should also receive the first control command after the first time has elapsed. The path control program 113 can determine whether the ring network 130 is interrupted through whether the second interface 115 receives the first control command.

由於第一目標設備510對第一接口114與第二接口115的連線距離是有所差異,也會造成封包傳輸時間是有落差。因此本新型為避免重複接收回應訊息的情況發生,所以在第一個接獲回應訊息時設定一組門檻區間。無論第一接口114先收到回應訊息或是第二接口115先收到回應訊息,主控端110都會開始計時門檻區間。若是門檻區間之中,主控端110又收到另一回應訊息,主控端110就會丟棄第二組的回應訊息。 Since the connection distance between the first target device 510 and the first interface 114 and the second interface 115 is different, there will also be a gap in the packet transmission time. Therefore, in order to avoid repeated reception of response messages, the present invention sets a set of threshold intervals when the response message is first received. Regardless of whether the first interface 114 receives the response message first or the second interface 115 receives the response message first, the host 110 will start timing the threshold interval. If it is in the threshold interval and the host 110 receives another response message, the host 110 will discard the second set of response messages.

在此一階段中將欲進行操作的RS485設備端120定義為第一目標設備510。第一目標設備510除了執行第一控制指令外,第一目標設備510也會在完成後發送一組回應訊息。由於第一目標設備510會將回應訊息發送至第一接口114與第二接口115,因此將回應訊息分別定義為第一回應訊息與第二回應訊息。其中,第一回應訊息與第二回應訊息的內容均相同,而第一回應訊息與第二回應訊息的接收目的端不同,如第5A圖所示。 In this stage, the RS485 device terminal 120 to be operated is defined as the first target device 510. In addition to executing the first control command by the first target device 510, the first target device 510 will also send a group of response messages after completion. Since the first target device 510 sends the response message to the first interface 114 and the second interface 115, the response message is defined as the first response message and the second response message, respectively. The content of the first response message and the second response message are the same, and the receiving destinations of the first response message and the second response message are different, as shown in FIG. 5A.

主控端110將會透過第一接口114接獲第一回應訊息,而第二接口115接獲第二回應訊息。路徑控制程序113根據第一時間的間距判斷第一回應訊息與第二回應訊息的時間差是否超過第一預設門檻,藉以判別環狀網路130的傳輸路徑有無異常。 The host 110 will receive the first response message through the first interface 114, and the second interface 115 will receive the second response message. The path control program 113 determines whether the time difference between the first response message and the second response message exceeds the first preset threshold according to the first time interval, so as to determine whether the transmission path of the ring network 130 is abnormal.

舉例來說,第一接口114接獲第一回應訊息的時間為T 1,第二接口115接獲第二回應訊息的時間為T 2,而第一預設門檻的時間長度為ΔT。第一預設門檻ΔT的時間長度與第一時間成正比。當|T 1-T 2|小於ΔT時,則路徑控制程序113將繼續記錄環狀網路為正常的連線狀態,如第5B圖所示。第一目標設備510是同時向第一接口114與第二接口115發送第一回應訊息與第二回應訊息,而在第5B圖中為能方便說明將第一目標設備510以間隔方式繪製,但實際上並非分時發送。 For example, the time when the first interface 114 receives the first response message is T 1 , the time when the second interface 115 receives the second response message is T 2 , and the time length of the first preset threshold is Δ T. Duration of the first predetermined threshold Δ T is proportional to the first time. When | T 1 - T 2 | is less than Δ T , the path control program 113 will continue to record the ring network as a normal connection state, as shown in Fig. 5B. The first target device 510 sends the first response message and the second response message to the first interface 114 and the second interface 115 at the same time. In Figure 5B, the first target device 510 is drawn at intervals for the convenience of illustration, but In fact, it is not sent in time-sharing.

主控端110可以根據前文的ΔT與測試訊號判別環狀網路130是否發生中斷。實際上環狀網路130發生斷點的位置可能在第一接口114至第二目標設備520之間,也有可能斷點位於第二目標設備520至第二接口115之間。若斷點為前者情況時,則第二目標設備520將不會收到任何訊息。因此在經過第一時間後,第二接口115不會接收第二控制命令。所以主控端110間隔第三時間後在驅動第二接口115發送第二控制命令至第二目標設備 520,如第5C圖所示。換言之,主控端110會分別在不同時間點向第一接口114與第二接口115發出第二控制命令。在環狀網路130中斷的情況中,第二目標設備520根據第二控制命令返回第三回應訊息。 The host 110 can determine whether the ring network 130 is interrupted based on the ΔT and the test signal described above. In fact, the breakpoint of the ring network 130 may be between the first interface 114 and the second target device 520, or the breakpoint may be between the second target device 520 and the second interface 115. If the breakpoint is the former case, the second target device 520 will not receive any message. Therefore, after the first time has elapsed, the second interface 115 will not receive the second control command. Therefore, the main control terminal 110 drives the second interface 115 to send the second control command to the second target device after the third time interval. 520, as shown in Figure 5C. In other words, the main control terminal 110 will respectively issue the second control commands to the first interface 114 and the second interface 115 at different time points. When the ring network 130 is interrupted, the second target device 520 returns a third response message according to the second control command.

另一種情況是,第二目標設備520與第二接口115之間的環狀網路130發生中斷。一般而言,若是第二接口115在經過第一時間未收到第二控制命令,主控端110會視為環狀網路130發生中斷。但有一種例外情況,第二目標設備520可能在第一時間內發生完成第二控制命令的情況。由於第二控制命令的內容種類有所差異,又或者第二目標設備520與第一接口114相鄰使得命令處理時間過短。因此可能會發生在第一時間內第二目標設備520完成第二控制命令的情況。 Another situation is that the ring network 130 between the second target device 520 and the second interface 115 is interrupted. Generally speaking, if the second interface 115 does not receive the second control command after the first time has elapsed, the host 110 will regard the ring network 130 as being interrupted. However, there is an exception. The second target device 520 may complete the second control command within the first time. Because the content types of the second control commands are different, or the second target device 520 is adjacent to the first interface 114, the command processing time is too short. Therefore, it may happen that the second target device 520 completes the second control command within the first time.

若是主控端110在偵測到環狀網路130發生中斷,主控端110在第四時間內偵測第二目標設備520完成第二控制命令與回覆第三回應訊息至第一接口114,則主控端110將會停止第二接口115再次發出第二控制命令。其中,第四時間為第二目標設備520完成第二控制命令的處理時間Ta、與兩倍的第一接口114至第二目標設備520的傳輸時間Tb*2之總和(意即為Ta+2*Tb)。若第四時間內主控端110收到第三回應訊息。 If the host 110 detects that the ring network 130 is interrupted, the host 110 detects that the second target device 520 completes the second control command and responds to the first interface 114 within the fourth time. Then the host 110 will stop the second interface 115 to issue the second control command again. The fourth time is the sum of the processing time Ta for the second target device 520 to complete the second control command and twice the transmission time Tb*2 from the first interface 114 to the second target device 520 (meaning Ta+2 *Tb). If the host 110 receives the third response message within the fourth time.

本新型的RS485環狀網路的備援處理方法與系統可以提供主控端在環狀網路連線、中斷或連線恢復的各種情況下,實現主控端對目標設備的存取控制。本新型的RS485環狀網路的備援處理方法與系統再不增加額外的硬體成本的情況下,實現主控端與環狀網路備援的相關措施。 The new RS485 ring network backup processing method and system can provide the host terminal to realize the access control of the host terminal to the target device in various situations of ring network connection, interruption or connection recovery. The new type of RS485 ring network backup processing method and system can realize the related measures of the host and ring network backup without adding additional hardware costs.

雖然本新型以前述之較佳實施例揭露如上,然其並非用以限定本新型,任何熟習相像技藝者,在不脫離本新型之精神和範圍內,當可作些許之更動與潤飾,因此本新型之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。 Although the present invention is disclosed in the foregoing preferred embodiments as above, it is not intended to limit the present invention. Anyone familiar with similar art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of patent protection for new models shall be determined by the scope of patent applications attached to this specification.

100:備援處理系統 100: Redundant Processing System

110:主控端 110: Master

111:處理單元 111: Processing Unit

112:儲存單元 112: storage unit

113:路徑控制程序 113: Path Control Program

114:第一接口 114: first interface

115:第二接口 115: second interface

120:RS485設備端 120: RS485 device side

130:環狀網路 130: ring network

140:目標設備 140: target device

Claims (5)

一種RS485環狀網路的備援處理系統,其特徵在於RS485環狀網路發生異常時的備援處理,該RS485環狀網路的備援處理系統包括:一環狀網路,串接多個RS485設備端;以及一主控端,具有一處理單元、一儲存單元、一路徑控制程序、一第一接口與一第二接口,該處理單元電性連接於該儲存單元、該第一接口與該第二接口,該處理單元運行記錄於該儲存單元的該路徑控制程序,該第一接口與該第二接口分別連接該環狀網路的兩端,該主控端透過該第一接口發送一第一訊號並計算該第一訊號在該環狀網路中傳輸的一第一時間,當該環狀網路連線時,該主控端透過該第一接口發送一第一控制命令至該環狀網路中的一第一目標設備;其中,該主控端每間隔一第二時間,該主控端由該第一接口發出一測試訊號至該第二接口,用於判別該環狀網路是否中斷,該主控端監測該環狀網路發生中斷,該主控端驅動該第一接口發送一第二控制命令至該環狀網路中的一第二目標設備,該主控端間隔一第三時間驅動該第二接口發送另一該第二控制命令至該第二目標設備。 A backup processing system for RS485 ring network, which is characterized by backup processing when an RS485 ring network is abnormal. The backup processing system for RS485 ring network includes: a ring network with multiple connections in series An RS485 device terminal; and a master control terminal, having a processing unit, a storage unit, a path control program, a first interface and a second interface, the processing unit is electrically connected to the storage unit and the first interface With the second interface, the processing unit runs the path control program recorded in the storage unit, the first interface and the second interface are respectively connected to both ends of the ring network, and the master terminal passes through the first interface Send a first signal and calculate a first time when the first signal is transmitted in the ring network. When the ring network is connected, the host sends a first control command through the first interface To a first target device in the ring network; wherein, every second time interval between the master terminal, the master terminal sends a test signal from the first interface to the second interface for judging the Whether the ring network is interrupted, the host monitors that the ring network is interrupted, the host drives the first interface to send a second control command to a second target device in the ring network, the The main control terminal drives the second interface to send another second control command to the second target device at a third interval. 如請求項1所述之RS485環狀網路的備援處理系統,其中該第一目標設備接獲該第一控制命令後分別向該第一接口與該第二接口發送一第回應訊號與一第二回應訊號。 The RS485 ring network backup processing system described in claim 1, wherein the first target device receives the first control command and sends a first response signal and a first response signal to the first interface and the second interface, respectively. The second response signal. 如請求項1所述之RS485環狀網路的備援處理系統,其中該主控端根據該些RS485設備的數量決定該第二時間。 The backup processing system of the RS485 ring network as described in claim 1, wherein the master control terminal determines the second time according to the number of the RS485 devices. 如請求項1所述之RS485環狀網路的備援處理系統,其中該環狀網路係由該第一接口串接於該些RS485設備與該第二接口。 The backup processing system for an RS485 ring network according to claim 1, wherein the ring network is serially connected to the RS485 devices and the second interface through the first interface. 如請求項1所述之RS485環狀網路的備援處理系統,其中若該環狀網路發生中斷,該主控端間隔該第三時間驅動該第二接口發送另一該第二控制命令至該第二目標設備。 The backup processing system of the RS485 ring network described in claim 1, wherein if the ring network is interrupted, the master drives the second interface to send another second control command at intervals of the third time To the second target device.
TW109210949U 2020-08-20 2020-08-20 Backup processing system of RS485 ring network TWM608805U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109210949U TWM608805U (en) 2020-08-20 2020-08-20 Backup processing system of RS485 ring network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109210949U TWM608805U (en) 2020-08-20 2020-08-20 Backup processing system of RS485 ring network

Publications (1)

Publication Number Publication Date
TWM608805U true TWM608805U (en) 2021-03-11

Family

ID=76036919

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109210949U TWM608805U (en) 2020-08-20 2020-08-20 Backup processing system of RS485 ring network

Country Status (1)

Country Link
TW (1) TWM608805U (en)

Similar Documents

Publication Publication Date Title
EP2075974B1 (en) Method and apparatus for aggregating ports
US8898364B2 (en) Method, system, and bus coupler for exchanging data between a higher-level network and a lower-level network
US20070047436A1 (en) Network relay device and control method
CN107360239A (en) A kind of client connection status detection method and system
CN106603261B (en) Hot backup method, first main device, standby device and communication system
CN107948063B (en) Method for establishing aggregation link and access equipment
CN106789509B (en) A kind of data communications method of redundant CAN bus communication system
CN107248933A (en) A kind of method of the double main protection of rail traffic signal system
WO2019178731A1 (en) Data transmission method and device
WO2016095344A1 (en) Link switching method and device, and line card
US11258666B2 (en) Method, device, and system for implementing MUX machine
CN102026042A (en) Keep-alive and self-healing method and device for advanced telecom computing architecture control surface
US10055322B2 (en) Interpreting signals received from redundant buses
CN212343793U (en) Backup processing system of RS485 ring network
CN101867495A (en) Ethernet automatic protection link failure quick switching method
JP6425748B2 (en) Communication state monitoring method and communication state monitoring screen of electric injection molding machine
TWM608805U (en) Backup processing system of RS485 ring network
CN101491026A (en) Method and system for re-enabling disabled ports in a network with two port MAC relays
JP7417773B1 (en) Network interface card and transmission performance monitoring method
CN114844807B (en) System detection method, device, equipment, storage medium, vehicle and cloud control platform
CN105530110A (en) Network failure detection method and related network elements
TW202209856A (en) The redundant method and system of the rs485 ring network therefor
CN106100941A (en) Method and device based on distributed system test board intercard communication reliability
CN108989120A (en) A kind of data transmission method and device
CN111901216A (en) Backup processing method and system for RS485 ring network

Legal Events

Date Code Title Description
MM4K Annulment or lapse of a utility model due to non-payment of fees