1378244 [0001] [0002] 101年09月05日核正替換頁 發明說明: 【發明所屬之技術領域】 , 本發明涉及一種螂試裝置,尤其涉及一種外接式硬 碟測試裝置。 【先前技術】 當前,外接式硬磲可存放大量的數據而被廣泛的使 用,其分為無需電源適配器的外接式硬碟及需電源適配 器的外接式硬碟。所述無需電源適配器的外接式硬碟設 置有通用串行總線接D (USB接口),通用串行總線接口 與電腦相連,從而可傳輸數據。需電源適配器的外接式 硬碟設置有電源接口及數據接口,電源接口與電源適配 器相連,數據接口與電腦相連,從而可傳輸數據。 當對無需電源適配器的外接式硬碟進行運行穩定度 測試時’藉由其通用串行總線接口連接數據線再與電腦 相連’然後進行測試。在測試過程中’對數據線進行數 千次的插拔才能完成相關的測試。當對需電源適配器的 外接式硬碟進行運行穩定度測試時’藉由一數據線和一 | 電源線將待測硬碟的數據接口及電源接口分別與電腦及 電源適配器相連,然後進行測試β在測試過程中,需要 對數據線和電源線進行數千次的插拔才能完成相關的測 試。 惟’上述外接式硬碟測試過程中,需要對數據線及 電源線進行不斷的插拔,因而不僅容易損壞相關器件而 且效率低。 【發明内容】 09812074#單蝙號 Αΰίοι 第4頁/共16頁 1013338352-01378244 [0001] [0001] [November 05, 2010] Nuclear replacement page Description of the Invention: [Technical Field] The present invention relates to a testing device, and more particularly to an external hard disk testing device. [Prior Art] Currently, an external hard disk can be widely used for storing a large amount of data, and is divided into an external hard disk that does not require a power adapter and an external hard disk that requires a power adapter. The external hard disk without the power adapter is provided with a universal serial bus connection D (USB interface), and the universal serial bus interface is connected to the computer to transmit data. An external hard disk that requires a power adapter is provided with a power interface and a data interface. The power interface is connected to the power adapter, and the data interface is connected to the computer to transmit data. When performing an operational stability test on an external hard disk that does not require a power adapter, 'connect to the computer via its universal serial bus interface and connect to the computer' and then test. During the test, thousands of data lines were plugged and unplugged to complete the relevant tests. When performing an operational stability test on an external hard disk that requires a power adapter, the data interface and power interface of the hard disk to be tested are connected to the computer and the power adapter by a data cable and a power cable, respectively, and then tested. During the test, thousands of data lines and power lines need to be plugged and unplugged to complete the relevant tests. However, in the above-mentioned external hard disk test process, the data line and the power line need to be continuously inserted and removed, so that it is not only easy to damage the related device but also inefficient. SUMMARY OF THE INVENTION 09812074#单单号 Αΰίοι Page 4 of 16 1013338352-0
[00031 “ [^^〇9£05S^JEmW I θ發明的主要目的係針對上述習知技術存在之缺陷 提供-種不僅不容錢壞相關科而且效率高 硬碟剩試裝置。 為實現上述目的’本發岐供—種外接式硬碟測試 、用於對外接式硬碟的運行穩定度進行測試所述 外接式硬碟設置有-通用串行總線接口。該外接式硬碟 測試裝置包括-電子開關及一電腦,電子開關控制所述 外接式硬碟職與關;電腦控㈣述電子關,該電 腦《又置有一通用串行總線接口該電腦之通用串行總線 接口的接地線及數據線與所述外接式硬碟之通料行總 線接口的接地線及數據料應電性相連所述外接式硬 碟之通用串行總線接口的電源線與所述電子開關相連, -玄電腦内β又置有對所述外接式硬碟之運行德定度進行測 試的測試程式。 為實現上述目的,本發明提供另一種外接式·硬碟測 °式裝置,用於對外接式硬碟的運行穩定度進行測試,所 述外接式硬碟設置有一電源接口及一通用串行總線接口 ’該外接式硬碟測試襄置包括一電源適配器、一電子開 關及電腦,電源適配器與所述電源接口相速並為所述 外接式硬碟提供電能;電子開關控制所述電源適配器開 啟與關閉,電腦控制所述電子開關,該電腦設置有一通 用串灯總線接口,言玄電腦之通用串行總線接口的電源線 、接地線及數據線與所述外接式硬碟之通用串行總線接 口的電源線、接地線及數據線對應電性相連,該電腦内 設置有對所料接式硬叙運行敎度進行測試的測試 程式· 2074#單编號 Α〇101 第5頁/共16頁 1013338352-0 1378244 [ϊ〇ι年〇9月os日粧餘英~| 如上所述,本發明外接式硬碟測試装置藉由電腦之 測試程式控制所述電子開關,從而進一步控制外接式硬 碟之電源的開啟與關閉,從而不僅不容易損壞相關器件 而且效率高。 【實施方式】 [0004] 為詳細説明本發明之技術内容、構造特徵、所達成 β 的目的及功效,以下茲例舉實施例並配合圖式詳予說明 請參閱第一圖’本發明外接式硬碟測試裝置100用於 對外接式硬碟1的運行穩定度進行測試,該外接式硬碟1 設置有一通用串行總線接口(USB接口)。該外接式硬碟測 試裝置100包括一電源供應器2、一電子開關及一電腦4。 本實施例中該電子開關為一繼電器3。 所述電源供應器2設置有一接地部GND1。所述繼電器 3設置有1至4號引腳’該電腦4設置有一通用串行總線接 口及一串口(RS232接口)。繼電器3之1號引腳與電源供 應器1相連,繼電器3之2號引腳與外接式硬碟1之電源線 相連,3號引腳及4號引腳分別與電腦4之串口的訊號返回 線(RX)及訊號線(RTS)相連。 當對所述外接式硬碟1進行運行穩定度測試時,電源 供應器2之接地部GND1與外接式硬碟1之接地線GND相連 ,繼電器3之2號引腳與外接式硬碟1之電源線相連,電腦 4之通用串行總線接口之接地線及數據線與外接式硬碟1 之接地線及數據線對應電性相連,電腦4輸入有對所述外 接式硬碟1之運行穩定度進行測試的測試程式。 請參閱第二圖及第三圖,當所述測試程式開始運— 09812074#單編號A0101 第6頁/共16頁 ° 1013338352-0 1378244 101年.09月05日梭正替換頁 後(步驟S1),操作者便對相關參數進行賦值(步驟S2)及 測試程式對相關賦值進行校驗(步驟S21),所述相關參數 包括測試程式内相關子程式運行的次數等,測試程式會 先確認參數是否錯誤(步驟S22),如果參數不錯誤,則打 開曰志文件(步驟S23),並確認打開是否失敗(步驟S24) 。如果參數錯誤,即會返回“失敗”信息(步驟S252)。 曰志文件用於紀錄程式運行過程中的各種信息,若打開 日志文件成功即會返回“成功”信息(步驟S251),否則 返回“失敗”信息(步榦S252)。 靖參閱第二圖及第四圖,如果上述曰志文件打開成 功(步驟S3) ’則正式對硬碟進行測試(步驟S4),否則進 入步驟S7 »假設上述日志文件打開成功,則在開始測試 時’先判斷β亥子私式之循J衣次數的數值是否大於〇(步驟 S40),如果循環次數的數值大於〇,則開啟目標設備電源 (步驟S401),即驅動串口,使訊號線及訊號返回線產生 高低電平訊號,從而形成電流,促使繼電器3開啟,此時 ,繼電器3之2號引腳輸出一電壓為5伏的訊號,最終使外 接式硬碟1打開。 當外接式硬碟1打開且設備準備好(步驟S4〇2)後,即 外接式硬碟1打開好後’便將外接式硬碟作為遠程文件夹 辦載到计异機内的本地文件炎(步驟S41),如果掛載不失 敗(步驟S411),則計算計算機内之一數據文件夾的校驗 和且將該數據文件夾複製到所述遠程文件失(步驟S42), 如果上述步驟不失敗(步驟S421),則再將述遠程文件夹 的數據文件夾複製到本地文件失(步驟S43),如果上述步 驟不失敗(步驟S431),則計算本地文件夾的數據文件来 !〇13338352-〇 09812074^單編號A0101 第7頁/共16頁 1^78244 的校驗和(步驟S44)。 如果上述步騾不失敗(步驟S441),則將步驟S42數 據文件夾的校驗和與步驟S44數據文件夾的校驗和進行比 較,看校驗和是否匹配(步驟S45),如果校驗和匹配,則 刪除本地文件夾的數據文件(步驟S46),如果上述步驟不 失敗(步驟S461),則卸載遠程文件夾(步驟S47),如果 上述步驟不失敗(步驟S471),則斷開目標設備電源(步驟 S481),即驅動串口,使訊號線及訊號返回線產生相同的 電平,從而不形成電流,促使繼電器3關閉。[00031 " [^^〇9£05S^JEmW I θ The main purpose of the invention is to provide the shortcomings of the above-mentioned conventional technologies, and to provide a high-quality hard disk residual test device. The present invention provides an external hard disk test for testing the operational stability of an external hard disk. The external hard disk is provided with a universal serial bus interface. The external hard disk test device includes - electronic The switch and a computer, the electronic switch controls the external hard disk job and the off; the computer control (four) describes the electronic switch, the computer "has a universal serial bus interface, the computer's universal serial bus interface ground and data lines The grounding wire and the data material of the external bus interface of the external hard disk are electrically connected to the electronic power switch of the universal serial bus interface of the external hard disk, and the electronic switch is connected to the electronic switch. Further, a test program for testing the operating degree of the external hard disk is provided. To achieve the above object, the present invention provides another external hard disk measuring device for the operation of the external hard disk. The stability is tested, the external hard disk is provided with a power interface and a universal serial bus interface. The external hard disk test device includes a power adapter, an electronic switch and a computer, and the power adapter is connected to the power interface. Quickly providing power to the external hard disk; the electronic switch controls the power adapter to be turned on and off, and the computer controls the electronic switch, the computer is provided with a universal serial light bus interface, and the universal serial bus interface of the mysterious computer The power line, the grounding line and the data line are electrically connected to the power line, the grounding line and the data line of the universal serial bus interface of the external hard disk, and the computer is provided with a hard running operation for the connected type. Test program for testing · 2074#单号Α〇101 Page 5/16 pages 1013338352-0 1378244 [ϊ〇ι年〇9月日日妆余英~| As mentioned above, the external hard disk of the present invention The test device controls the electronic switch by a computer test program, thereby further controlling the power on and off of the external hard disk, thereby not only easily damaging the related device but also [Embodiment] [0004] In order to explain the technical content, structural features, and the purpose and efficacy of the present invention in detail, the following embodiments are described in detail with reference to the drawings. The external hard disk testing device 100 is inspected for testing the operational stability of the external hard disk 1. The external hard disk 1 is provided with a universal serial bus interface (USB interface). The external hard disk testing device 100 includes A power supply 2, an electronic switch and a computer 4. In the embodiment, the electronic switch is a relay 3. The power supply 2 is provided with a grounding portion GND1. The relay 3 is provided with pins 1 to 4 'The computer 4 is provided with a universal serial bus interface and a serial port (RS232 interface). The pin 1 of the relay 3 is connected to the power supply 1 and the pin 2 of the relay 3 is connected to the power line of the external hard disk 1. The pins 3 and 4 are connected to the signal return line (RX) and the signal line (RTS) of the serial port of the computer 4 respectively. When the operation stability test is performed on the external hard disk 1, the grounding portion GND1 of the power supply 2 is connected to the ground line GND of the external hard disk 1, the second pin of the relay 3 and the external hard disk 1 The power line is connected, and the grounding line and the data line of the universal serial bus interface of the computer 4 are electrically connected to the grounding line and the data line of the external hard disk 1. The computer 4 input has stable operation on the external hard disk 1. Test program for testing. Please refer to the second and third figures, when the test program starts running - 09812074# single number A0101 page 6 / total 16 pages ° 1013338352-0 1378244 101 years. September 05 after the shuttle is replacing the page (step S1 The operator assigns the relevant parameters (step S2) and the test program verifies the relevant assignments (step S21), the related parameters include the number of times the relevant subroutine runs in the test program, etc., and the test program first confirms the parameters. Whether it is an error (step S22), if the parameter is not wrong, the file is opened (step S23), and it is confirmed whether the opening has failed (step S24). If the parameter is wrong, "fail" information is returned (step S252). The file is used to record various information during the running of the program. If the log file is successfully opened, it will return "success" information (step S251), otherwise it will return "failed" information (step S252). Referring to the second and fourth figures, if the above document is successfully opened (step S3) 'the test is officially performed on the hard disk (step S4), otherwise proceed to step S7 » assuming that the above log file is successfully opened, the test is started. When the first step is to determine whether the value of the number of times of the J-clothing is greater than 〇 (step S40), if the value of the number of cycles is greater than 〇, the target device power is turned on (step S401), that is, driving the serial port to make the signal line and signal The return line generates a high and low level signal, thereby forming a current, causing the relay 3 to be turned on. At this time, the pin 2 of the relay 3 outputs a signal of a voltage of 5 volts, and finally the external hard disk 1 is turned on. When the external hard disk 1 is turned on and the device is ready (step S4〇2), that is, after the external hard disk 1 is turned on, the external hard disk is loaded as a remote folder to the local file in the computer ( Step S41), if the mount does not fail (step S411), calculate a checksum of one of the data folders in the computer and copy the data folder to the remote file (step S42), if the above steps do not fail (Step S421), the data folder of the remote folder is copied to the local file again (step S43), and if the above step does not fail (step S431), the data file of the local folder is calculated! 〇13338352-〇 09812074^Single number A0101 Page 7 of 16 Checksum of 1^78244 (step S44). If the above step does not fail (step S441), the checksum of the data folder of step S42 is compared with the checksum of the data folder of step S44 to see if the checksum matches (step S45), if the checksum If it matches, the data file of the local folder is deleted (step S46), if the above steps do not fail (step S461), the remote folder is uninstalled (step S47), and if the above steps do not fail (step S471), the target device is disconnected. The power supply (step S481), that is, driving the serial port, causes the signal line and the signal return line to generate the same level, thereby not forming a current, causing the relay 3 to be turned off.
此時,繼電器3之2號引腳輸出一電壓為0伏的訊號, 最終使外接式硬碟1關閉,從而完成外接式硬碟1的一次 檢測,然後延時一段時間,在本實施例中,延時時間為 30秒(步驟S482),然後將“循環次數”減1再賦值給“ 循環次數”(步驟S483),最後再進行“循環次數”的判 斷’即再回到步驟S40 ’當運行完賦予的循環次數後,便 返回一 “成功”訊息(步驟S492),否則返回一“失敗,, 訊息(步驟S491) » 如果上述步驟失敗(步驟S5) ’則先斷開目標設備電 源(步驟S6),然後再將計算機内的用於存放本測試程式 的記憶體釋放(步驟S7),如果上述步驟不失敗(步驟$5) ,則直接進入釋放已配置的記憶體(步驟S7),最後關閉 日志文件(步驟S8),最終完成-外接式硬碟…測試(步 驟S9)。 第8頁/共16頁 請參閱第五圖,本實施例與上述第—種實施例的姓 構大致相同,其不同之處在於:本實施例之外接式硬碟6 設置有-電源接口6匕該外接式硬碟6與繼電器3之間連 09812074卢單編號 A0101 1013338352-0 1378244 101年.09月05日核正替换頁 接有一電源適配器5,電源適配器5及繼電器3均電性連接 至一插頭7,該外接式硬碟6之通用串形接口與電腦4的通 用串形接口直接對接,繼電器3之一號引腳與外部電源相 連,繼電器3通過控制電源適配器5的開啟與關閉,從而 實現對外接式硬碟6的開啟與關閉控制。本實施例之測試 原理與上述第一種實施例之測試原理相同,在此不再贅 述0 綜上所述,本發明外接式硬碟測試裝置100藉由電腦 4之測試程式控制所述繼電器3,從而進一步控制外接式 硬碟(1或6)之電源的開啟與關閉,從而不僅不容易損壞 相關器件而且測試效率高。 【圖式簡單說明】 [0005] 第一圖係本發明外接式硬碟測試裝置對外接式硬碟進行 測試時的第一種實施例之電路原理圖。 第二圖係第一圖所示電腦測試程式的流程圖。 第三圖係第二圖所示電腦測試程式的步驟S2的流程圖。 第四圖係第三圖所示電腦測試程式的步驟S4的流程圖。 第五圖係本發明外接式硬碟測試裝置對外接式硬碟進行 測試時的第二種實施例之電路原理圖。 【主要元件符號說明】 [0006] 外接式硬碟測試裝置 100 外接式硬碟 1、6 電源供應器 2 繼電器 3 電腦 4 電源適配器 5 電源接口 6 1 插頭 7 A0101 第9焉/共I6頁 0981207# 1013338352-0At this time, the pin 2 of the relay 3 outputs a signal with a voltage of 0 volts, and finally the external hard disk 1 is turned off, thereby completing one detection of the external hard disk 1, and then delaying for a period of time, in this embodiment, The delay time is 30 seconds (step S482), then the "cycle number" is decremented by 1 and assigned to the "cycle number" (step S483), and finally the "cycle number" determination is performed, that is, the process returns to step S40. After the number of cycles is given, a "success" message is returned (step S492), otherwise a "failure, message (step S491) is returned. » If the above steps fail (step S5)', the target device power is first turned off (step S6). Then, the memory for storing the test program in the computer is released (step S7). If the above step does not fail (step $5), the memory that has been configured is directly released (step S7), and finally the log is closed. File (step S8), final completion-external hard disk...test (step S9). Page 8 of 16 Please refer to the fifth figure, which is substantially the same as the last name of the above-described first embodiment, The difference is that the external hard disk 6 of the embodiment is provided with a power interface 6, and the external hard disk 6 and the relay 3 are connected to each other, and the number is 098,074,074, and the single number is A0101 1013338352-0 1378244. The power supply adapter 5 is connected to the power adapter 5, and the power adapter 5 and the relay 3 are electrically connected to a plug 7. The universal serial interface of the external hard disk 6 directly interfaces with the universal serial interface of the computer 4, and one of the relays 3 The pin is connected to the external power source, and the relay 3 controls the opening and closing of the power adapter 5 to control the opening and closing of the external hard disk 6. The test principle of the embodiment and the test principle of the first embodiment described above Similarly, the details of the external hard disk test apparatus 100 of the present invention are controlled by the test program of the computer 4 to further control the power supply of the external hard disk (1 or 6). Turning on and off, so as not only is not easy to damage the related device and the test efficiency is high. [Simplified illustration] [0005] The first figure is an external hard disk test device of the present invention, which is connected to an external hard disk. The schematic diagram of the first embodiment of the test. The second diagram is a flow chart of the computer test program shown in the first figure. The third diagram is the flow chart of step S2 of the computer test program shown in the second figure. The figure is a flow chart of step S4 of the computer test program shown in the third figure. The fifth figure is a circuit schematic diagram of the second embodiment when the external hard disk test device of the present invention is tested on an external hard disk. Component Symbol Description [0006] External Hard Disk Test Set 100 External Hard Drive 1, 6 Power Supply 2 Relay 3 Computer 4 Power Adapter 5 Power Connector 6 1 Plug 7 A0101 Page 9 / Total I6 Page 0981207# 1013338352- 0