1271621 九、發明說明: 【發明所屬之技術領域】 本發明係關於一種提昇通訊讀取效率的最佳化,特別是一種 人機介面讀取數據的最佳化方法。 【先前技術】1271621 IX. Description of the invention: [Technical field to which the invention pertains] The present invention relates to an optimization for improving communication reading efficiency, and in particular, an optimization method for reading data by a human-machine interface. [Prior Art]
、Ik者自動控制技術的發展,已成功發展出許多功能強大且可 私式化之人機介面(human machine interface ; HMI),藉以作為操 作者與控批顧騎通齡,進續於操作者執健制主機的 運作控制以及傳遞操作者與㈣彳主機_資訊。也就是說,於人 機面上包括各種輸入/輸出元件,例如:按紐、鍵盤、指標裝置、 顯示器等’以提供數據輸入、螢幕選擇、機器操作選擇及手動操 作驅使等功1 S使操作者可藉以執行控制主機的運作監控。The development of Ik's automatic control technology has successfully developed a number of powerful and privately available human machine interfaces (HMI), which serve as an operator and control over the age of the rider, continuing into the operator. The operation control of the master system and the delivery of the operator and (4) host_information. In other words, various input/output components are included on the human surface, such as buttons, keyboards, indicator devices, displays, etc. to provide data input, screen selection, machine operation selection, and manual operation. The operation monitoring of the control host can be performed.
傳統上,控制裝置與人機介面進行連線通訊過程中,若於晝 面程序中使用到大量輸入/輸出元件時,則需依據各元件的讀取^ 址逐-地至控織置上讀取數據,紐再_人機顯示狀態,如 此-來,將花費許多時間於通訊上,進而嚴重影響整體效能。並 且’由於每次通訊所花__相對於控繼置或 =資=:里上所花費之時間高出甚多,因此—但通訊次數頻繁 幾;丨面反應控制裝置的狀態將明顯無法接近 ^展;;較佳之通訊方法,藉以減少人機介面軸裝置的通訊 人但又可正確反應控制裝置的狀態。 其中,可藉由採用讀取最佳化的方式來提昇通訊執行的效 1271621 , 率。於習知技術中,一種讀取最佳化的方法係藉由預定幾組讀取 範圍,並於每次通訊時讀取一組讀取範圍。也就是說,可由操作 者自行指定幾組讀取範圍,並於每次通訊時讀取一組讀取範圍, 因此當晝面上之元件的讀取位址係落於此些讀取範圍中之一組 時,即可直接由先前讀回的範圍區塊中獲得數據,而不須再執行 通訊。然而,於此方法中操作者所能指定的讀取範圍組數有限, 以致指定的輸入元件無法無限擴充。再者,為獲得較好的讀取效 _ 率時,操作者選用之元件的讀取位址需配合指定的那幾組讀取範 圍,導致使用者無法隨心所欲選用讀取位址,而造成使用上有所 限制。 另種^貝取隶佳化的方法係措由類似快取(cache)記憶體的方 式。主要是,於第一次通訊時,多增加一些額外之讀取範圍,因 此當往後的讀取位址係落在前次讀取的範圍内時,即可自前次讀 回的範圍區塊中獲得數據,而不用再執行通訊;而當讀取位址沒 有落在前次讀取範圍内時,則重新通訊讀取,並如同第一次通訊 _ 之模式,多增加一些額外之讀取範圍。不過,於此方法中,若每 次讀取位址都未落在前次通訊所讀回的範圍内時,則每次讀取都 還是需經由通訊來讀取以獲得數據,如此一來,不但無法減少通 訊次數,反而因為每次通訊的數據量增加而花費更久的時間。再 者,若控制裝置所提供的讀取位址是不連續的時,則需另外加入 一些判斷,以避免讀取位址超過範圍而導致讀取錯誤發生。 【發明内容】 1271621 繁^上關題,本㈣社要目的在於提供_種人機 妹數據的最魏方法,_纽上峨先驗術畴在的問題。 兮本發明所揭露之人機介面讀取數據❾最佳化方法, =數’錄低系統花費在軌的咖,以致可提供較多的時間 控:=示數據狀態與其他工作上’而達成即時控制與反應 本發明所揭露之人機介_取數_最佳化方法,可由操作 春者根據撰寫的晝面程序特性,選擇靜態或是動態最佳化模式,、藉 以達到較好的最佳化效果。 曰 本發明所·之人齡面讀取數據的最佳化方法,可根據操 作者使用到的讀取位址來自動產生較佳之讀取範圍,而操作者不 需再自行指定讀取範圍。 。因此,為達上述目的’本發贿揭露之人機介面讀取數據的 最佳化方法,包括下列步驟:首先將複數個讀取位址串成一列, 以得到一串讀取健;接㈣算出—合併長度;根據合併長度將 鲁-串讀取位址中之讀取位址合併成讀取區塊,以得到讀取區塊位 址和開始讀取位址;以及轉換讀取位址,以得到相應之複數個儲 存區塊位址。 其中,係藉由來自控制裝置的一組演算參數來計算出合併長 度。並且,以一次通訊讀取此合併長度内所有讀取位址的數據會 比分兩次通訊讀取花費更少時間。因此,根據不同控制裝置所給 予之一組最佳化參數,即可計算出一最佳的合併長度,藉以充分 1271621 利用一次通訊來讀取數據,進而減少通訊次數。 此外,可根據執行的晝面程序特性選擇適當的最佳化模式。 也就是說,可於晝面編輯器於編譯畫面程序時進行最佳化處理; 或者係當晝面程序進入人機介面後晝面切換時進行最佳化處理。 因此,於將複數個讀取位址串成一列,以得到一串讀取位址 之步驟前’更包括下列步驟:編輯至少—晝面;進人編輯畫面之 轉譯程序;以及於轉譯過程巾,絲财晝面巾所躺到之元件 的讀取位址,並接續執行後續之步驟。 再者,於將複數個讀取位址串成一列,以得到一串讀取位址 之步驟前’更包括下列步驟:當一晝面切換時,t集於顯示晝面 上各個元件的頃取位址,並接續執行後續之步驟。 此外,於得到該些儲存區塊位址之後,更包括下列步驟:依 據讀取區塊位址發出一讀取通訊命令;根據讀取通訊命令執行一 通訊,並於通訊期間讀回相應讀取區塊位址之多筆數據;以及於 讀回所有數據後,形成至少一讀取區塊數據。 於此,可根據該讀取區塊數據顯示該些元件之狀態。再者, 此讀取區塊數據儲存於内部之—齡區塊巾,以棚示相應此讀 取區塊數據之元件狀態時,可藉由儲存區塊位址於儲存區塊中取 付數據,並根據取得之數據顯示元件狀態。 於此’儲存區塊可為人機介面内部的記憶體,由於内部的記 憶體中讀取數據的速度可較經由通訊讀取數據的速度快上許多, 因此可避免因為讀取數據而花費過多時間於通訊上,進而提升人 1271621 機介面的執行效率。 有關本發明的特徵與實作,茲配合圖示作最佳實施例詳細說 明如下。 【實施方式】 以下舉出具體實施例以詳細說明本發明之内容 ,並以圖示作 為輔助說明。說明中提及之符號係參照圖式符號。Traditionally, in the process of connecting communication between the control device and the human-machine interface, if a large number of input/output components are used in the kneading program, it is necessary to read the read-by-ground control of each component. Take the data, the new _ man-machine display status, so - will spend a lot of time on the communication, which will seriously affect the overall performance. And 'because each communication takes __ relative to the control relay or = capital =: the time spent on the inside is much higher, so - but the number of communication times is frequent; the state of the kneading reaction control device will be obviously inaccessible The preferred communication method is to reduce the communication person of the human-machine interface axis device but correctly reflect the state of the control device. Among them, the efficiency of communication execution can be improved by adopting the method of reading optimization. In the prior art, a method of reading optimization is to read a range of reading ranges by a predetermined number of reading ranges and to read a set of reading ranges each time. That is to say, the operator can specify several sets of read ranges and read a set of read ranges each time communication, so when the read address of the component on the face is in the read range In one group, data can be obtained directly from the previously read range block without having to perform communication. However, the number of read range groups that the operator can specify in this method is limited, so that the specified input elements cannot be expanded indefinitely. Furthermore, in order to obtain a better read efficiency, the read address of the component selected by the operator needs to match the specified read range, so that the user cannot select the read address as desired, resulting in use. There are restrictions on it. Another method of taking advantage of the method is to use a method similar to cache memory. Mainly, in the first communication, more additional reading range is added, so when the reading address in the future falls within the range of the previous reading, the range block can be read back from the previous time. Data is obtained without re-execution of communication; when the read address does not fall within the previous read range, the communication is read again, and as in the first communication mode, additional reading is added. range. However, in this method, if each read address does not fall within the range read back by the previous communication, then each read still needs to be read via communication to obtain data, thus, Not only can it not reduce the number of communications, but it takes longer because of the increased amount of data per communication. Moreover, if the read address provided by the control device is discontinuous, additional judgments need to be added to avoid reading the address beyond the range and causing a read error to occur. [Summary of the Invention] 1271621 繁 ^上关题, this (four) Society aims to provide the most popular method of _ kind of human-machine data, _ 纽 峨 峨 峨 峨 峨 。 。. The method for optimizing the human-machine interface reading data disclosed in the present invention, the number of 'low-recording system is spent on the track, so that more time control can be provided: = the data status and other work are achieved. Instant control and reaction The human-machine-acquisition-optimization method disclosed in the present invention can select a static or dynamic optimization mode according to the characteristics of the written kneading program, so as to achieve a better Better effect.最佳 The method for optimizing the reading data of the human face of the present invention can automatically generate a better reading range according to the reading address used by the operator, and the operator does not need to specify the reading range by himself. . Therefore, the method for optimizing the human-machine interface reading data for the above-mentioned purposes includes the following steps: first, stringing a plurality of reading addresses into a column to obtain a string of reading keys; Calculating - merging length; merging the read addresses in the lu-string read address into read blocks according to the merge length to obtain the read block address and the start read address; and converting the read address To obtain the corresponding plurality of storage block addresses. Among them, the combined length is calculated by a set of calculation parameters from the control device. Also, reading the data of all read addresses in this combined length in one communication will take less time than the two communication reads. Therefore, according to a group of optimization parameters given by different control devices, an optimal combination length can be calculated, so that 1271621 can use one communication to read data, thereby reducing the number of communication times. In addition, an appropriate optimization mode can be selected based on the characteristics of the executed program. That is to say, it can be optimized when the screen editor is compiled in the screen program; or it can be optimized when the face program enters the man-machine interface and then switch. Therefore, in the step of stringing a plurality of read addresses into a column to obtain a series of read addresses, the steps further include the following steps: editing at least the face; translating the program into the edit screen; and The reading address of the component where the silk money face towel lies, and the subsequent steps are performed. Furthermore, in the step of stringing a plurality of read addresses into a column to obtain a series of read addresses, the method further includes the following steps: when a switch is switched, t is set on each component of the display surface. Take the address and follow the next steps. In addition, after obtaining the storage block addresses, the method further includes the following steps: issuing a read communication command according to the read block address; performing a communication according to the read communication command, and reading back the corresponding read during the communication A plurality of pieces of data of the block address; and after reading back all the data, forming at least one block data. Here, the states of the components can be displayed according to the read block data. Moreover, the read block data is stored in the internal age block towel, and when the component state corresponding to the read block data is displayed, the data can be retrieved by storing the block address in the storage block. The component status is displayed based on the acquired data. The 'storage block' can be the internal memory of the human-machine interface. Since the speed of reading data in the internal memory can be much faster than reading data via communication, it can avoid excessive cost of reading data. Time is on the communication, which improves the execution efficiency of the 1271162 interface. The features and implementations of the present invention are described in detail with reference to the preferred embodiments. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the specific embodiments will be described in detail to explain the present invention and the accompanying drawings. The symbols mentioned in the description are referenced to the schematic symbols.
參照第1圖,首先,將所有元件的讀取位址串成一列(步驟 no) ’接著計算出合併長度(步驟120),根據此合併長度將讀取 位址合併成讀取區塊,以得到讀取區塊位址和開始讀取位址(步 驟130) ’將元件的讀取位址轉換成相對於由讀取區塊組成的一塊 連續記憶體的位址,以得到儲存區塊位址(步驟140)。 於「步驟120」+,係先取得來自控制裝置的一組演算參數 (步驟122),再根據此組演算參數計算出—合併長度(步驟 I24)如第2圖所示。其巾,於此合併長度⑽所有讀取位址只 須藉由-錢訊即可取_對的數據,也就L次通訊讀取 此合併長度_有讀取位址的數據會比分兩次通訊讀取花費更少 時間。換句話說,於此會根據不同控制裝置所給予一组最佳化束 數,計算崎制合併錢,私充分细—錢訊來讀取數據。 於「步驟⑽」中,係利用計算出的最佳之合併長度判斷傳 入的=串讀取位址中哪些可合併在-起,以於_次通訊中即可讀 回,藉以將可合併的讀取位址併成1取區塊位址,並且紀錄合 併長度和開始讀取位址。 1271621 ^卜操作者可根據執行的晝面程序特性選擇適當的最佳化 核式。即靜恶最佳倾式或祕最佳倾^。也就是說,可於晝 面編輯器於編譯晝面程序時即以靜態最佳化模式進行最佳化處 或者係w旦面轉載人人機介面後再㈣態最佳化模式進行 最佳化處理。 -就靜最佳化核式來說,係將編輯之全部晝面中所有應用到 讀的讀取位址做最佳化。例如,當操作者總共編輯ig個晝面 日^那於此10個晝面上的所有元件之讀輪址在編譯時全部會納 入最佳化處理。 換句H操作者於完成晝面編輯後即晝面編輯器進入編譯 程序,於編譯過程中進行最佳化處理。參照第3目,首先,進入 所有編輯的晝面之編譯程序(步驟25G),_所有晝面中所應用 到的元件的讀取位址(步驟260),將蕙集的讀取位址串成一列(步 驟110),計算此串讀取位址以得到一合併長度(步驟12〇),根據 此合併長度將讀取位址合併成讀取區塊,以得到讀取區塊位址和 •開始讀取位址(步驟130),將元件的讀取位址轉換成相對於由讀 取區塊組成的-塊連續記憶體的位址,以得到儲存區塊位址(步 驟140) ’最後,將讀取區塊位址及相對之储存區塊位址載入人機 介面中(步驟270 )’以供人機介面於執行讀取及顯示程序時使用。 也就是,於人機介面上的通訊讀取程序可依據讀取區塊位址對控 制裝置發㈣取通訊命令(步驟),根據讀取通訊命令執行通 訊,並讀回相應讀取區塊位址之數據,即於一次通訊中讀回多筆 *1271621 ί=Γ282) ’於讀啊細爾她嫩數據後,讀 攄成—讀取嶋據(步驟284),進而將讀取區塊數 2赫_敎儲麵财(_86),阶_人機介面内部 的圮憶體中,如第4圖所示。 、由於旦面上所有%件的讀取位址於執行完最触程序後已 轉成相對之儲存區塊位址,因此於顯示元件狀態時,不需再發出 讀取通訊命令去控制裝置讀回數據,而係根據元件相對之齡區 ,塊位址直接從儲存於人機介面内部的記憶體中之讀取區塊數據取 得所需之雜。也就是說,於顯示元件狀態時,可根據顯示元件 相對讀存區塊位址於儲存區塊中取得數據。由於自内部的記憶 體中讀取數據與經由軌讀取數制速度朗相當大,也就是自 冗t思體中讀取數據的速度可較經由通訊讀取數據的速度快上許 多,如此-來,即可避免因為讀取數據而花費過多時間於通訊 進而提升人機介面的執行效率。 再者,就動態最佳化模式來說,係根據晝面開啟和關閉的變 化而動態執行最佳化程序,即於人機應用程序在主晝面切換,或 者係於子晝面開啟或關閉時啟動執行。 換句話說,當人機介面上的主畫面切換時,或者係子晝面開 啟或關閉時,將當時被開啟顯示的晝面(包含主晝面及子書面) 上的元件之讀取位址納入最佳化處理。 參照第5A、5B目,當晝面切換時,荒集於所有顯示晝面上 之元件的讀取位址(步驟360)’將蒐集到的讀取位址串成一列(步Referring to FIG. 1, first, the read addresses of all components are serialized into one column (step no) 'Next, the merge length is calculated (step 120), and the read addresses are merged into read blocks according to the merge length, Obtaining the read block address and starting the read address (step 130) 'convert the read address of the component to the address of a piece of contiguous memory composed of the read block to obtain the storage block bit Address (step 140). In "Step 120"+, a set of calculation parameters from the control device is first obtained (step 122), and the combined length is calculated based on the set of calculation parameters (step I24) as shown in Fig. 2. The towel, the combined length (10), all the read addresses only need to use the - money message to take the data of the _ pair, that is, the L-communication read the combined length _ the data with the read address will score two communications Reading takes less time. In other words, according to a set of optimized bundles given by different control devices, the rough combined money is calculated, and the private data is carefully read. In "Step (10)", the calculated combined length is used to determine which of the incoming = string read addresses can be merged in, so that they can be read back in the _ communication, so that they can be merged. The read address is taken as 1 block address, and the merge length is recorded and the read address is started. 1271621 ^The operator can select the appropriate optimization kernel according to the characteristics of the executed program. That is, the best tilting or secret is the best. In other words, it can be optimized in the static optimization mode when the facet editor compiles the face program or the system is optimized after the (4) state optimization mode is performed. deal with. - In the case of static optimization nucleus, all the edited read addresses in the entire face of the edit are optimized. For example, when the operator edits a total of ig faces, then the read addresses of all the components on the 10 faces are all optimized during compilation. In other words, after the H operator finishes editing, the face editor enters the compiler and optimizes it during the compilation process. Referring to the third object, first, enter the compiled program of all the edited faces (step 25G), the read address of the component to which all the faces are applied (step 260), and the read address string of the set is read. In a column (step 110), the string read address is calculated to obtain a merge length (step 12A), and the read address is merged into a read block according to the merge length to obtain a read block address and • Begin reading the address (step 130), converting the read address of the component to the address of the -block contiguous memory consisting of the read block to obtain the storage block address (step 140)' Finally, the read block address and the relative storage block address are loaded into the human interface (step 270)' for use by the human interface during the execution of the reading and display program. That is, the communication reading program on the human machine interface can send (4) a communication command (step) to the control device according to the read block address, perform communication according to the read communication command, and read back the corresponding read block position. The data of the address, that is, read back a number of times in a communication *1271621 ί=Γ282) 'After reading the yell her data, read the — — - read the data (step 284), and then read the number of blocks 2 _ _ 敎 面 面 _ (_86), _ _ man-machine interface inside the memory, as shown in Figure 4. Since all the reading addresses of the % of the surface on the surface of the surface have been converted into the relative storage block addresses after the execution of the touch program, no need to issue a read communication command to the control device during the display of the component state. The data is returned, and the block address is directly obtained from the read block data stored in the memory inside the human machine interface according to the relative age zone of the component. That is to say, when the component state is displayed, the data can be acquired in the storage block according to the display component relative to the read block address. Since the data read from the internal memory is quite large compared to the speed of reading through the track, that is, the speed of reading data from the redundant body can be much faster than reading the data via communication, so that - In this way, you can avoid spending too much time on communication to improve the execution efficiency of the human-machine interface. Furthermore, in the dynamic optimization mode, the optimization process is dynamically executed according to the change of the opening and closing of the face, that is, the man-machine application is switched on the main face, or the child face is turned on or off. Start execution. In other words, when the main screen on the human-machine interface is switched, or when the system is turned on or off, the reading address of the component on the screen (including the main page and the sub-writing) that is currently displayed is displayed. Incorporate optimization. Referring to Figures 5A and 5B, when the facets are switched, the read addresses of the components that are allied on all display faces (step 360)' are grouped into a list of read addresses (steps).
(S 11 -1271621 驟110),計异此串讀取位址以得到一合併長度(步驟⑽),根據 此合併長度將讀取健合併成讀取區塊’以剌讀祕塊位址和 開始讀取位址(步驟130),將元件的讀取位址轉換成相對於由讀 取區塊組成的-塊連續記紐的位址’轉顺存區塊位址(步 驟140),接著,於人機介面上的通訊讀取程序再依據讀取區塊位 址對控制裝置發㈣取軌命令(麵),_讀取通訊命令 執行通訊,並讀回相應讀取區塊位址之數據,即於一次通訊中讀 回多筆數據(步驟282),於讀回所有的讀取區塊位址相應之數據 後,讀回的數據會形成一讀取區塊數據(步驟284),進而根據此 頃取區塊數據顯示元件狀態(步驟288)。 此外,可將讀取區塊數據儲存於内部之儲存區塊中(步驟 286)’即儲存在人機介面内部的記憶體中,以於下次晝面切換時, 可根據儲存區塊位址直接從儲存於人機介面内部的記憶體中之讀 取區塊數據取得取所需之數據,如第6A、6B圖所示。 換句話說,參照第7A、7B、7C圖,當晝面切換時,蒐集於 ^有顯不晝面上之元件的讀取位址(步驟360),確認已讀取與未 貝取之元件,即確認蒐集之讀取位址是否有對應之儲存區塊位址 7驟39〇),已項取元件之讀取位址,根據儲存區塊位址直接於 儲2區塊中取得數據(步驟392),進而根據取得之數據顯示元件 (步驟288)。其中,而未讀取元件之讀取位址則執行上述之 步驟110」〜「步驟288」,如第7A、7B、7C圖所示。 即’當顯示晝面上之元件係為已讀取之元件時,則不需再發 12 1271621 出讀取通訊命令去控繼置讀_據,而雜據元件相對之錯存 區塊位址直接從齡於人機介_部的記憶體巾之讀取區塊數據 取得所㊆之數據,而未讀取之元件再進行最佳化處理。 綜合上述,根據本發明之讀取數據的最佳化方法,可減少通 訊次數’並且可降低系統花費在通訊的時間,以致可提供較多的 時間於處理耕顯示數據狀態與其缸作上,而達成即時控制與 反應控制裝置狀態。 〃 再者,根據本發明之讀取數據的最佳化方法,操作者可根據 其撰寫的晝面程序特性,選擇靜態或是動録佳化模式,以達到 較好的最佳化效果。 此外,根據本發明之讀取數據的最佳化方法,可根據操作者 使用到的讀取位址來自動產生較佳之讀取範圍(即,上述之讀取 區塊)’而不用再由操作者自行指定讀取範圍。 雖然本發明以前述之較佳實施例揭露如上,然其並非用以限 疋本卷月任何热習相像技藝者,在不脫離本發明之精神和範圍 内田可作些許之更動與潤飾,因此本發明之專利保護範圍須視 本說明書所附之申請專利範圍所界定者為準。 【圖式簡單說明】 第1圖係為說明根據本發明第一實施例之人機介面讀取數據 的最佳化方法的流程圖; 第2圖係為說明第!圖中之「步驟120」的詳細流程圖; 第3圖係為說明根據本發明第二實施例之人機介面讀取數據 d 13 1271621 的最佳化方法的流程圖; 第4圖係為說明根據本發明第三實施例之人機介面讀取數據 的最佳化方法; 第5A、5B圖係為說明根據本發明第四實施例之人機介面讀 取數據的最佳化方法; 第6A、6B圖係為說明根據本發明第四實施例之人機介面讀 取數據的最佳化方法;以及 第7A、7B、7C圖係為說明根據本發明第四實施例之人機介 面讀取數據的最佳化方法。 【主要元件符號說明】 步驟110......................將讀取位址串成一列 步驟120.....................計算合併長度 步驟122.....................取得來自控制裝置的一組演算參數 步驟124.....................根據此組演算參數計算合併長度 步驟130.....................根據合併長度將讀取位址合併成讀取區 鲁 塊 步驟140.....................轉換讀取位址,以得到相對應之儲存區塊 位址 步驟250 .....................進入編譯程序 步驟260 .....................蒐集所有編輯畫面中應用到之元件的讀 取位址 步驟270 .....................將讀取區塊位址及相對之儲存區塊位址 -1271621 載入人機介面 步驟280 .....................依據讀取區塊位址對控制裝置發出讀取 通訊命令 步驟282 .....................根據讀取通訊命令執行通訊,並讀回相應 讀取區塊位址之數據 步驟284 .....................於讀回所有的讀取區塊位址相應數據 後,形成一讀取區塊數據 步驟286 .....................將讀取區塊數據儲存於内部之儲存區塊(S 11 -1271621, step 110), counting the string to read the address to obtain a merge length (step (10)), and according to the merge length, the read key is merged into the read block 'to read the secret block address and Beginning to read the address (step 130), converting the read address of the component to the address of the -block continuation composed of the read block, and transferring the block address (step 140), and then The communication reading program on the man-machine interface sends (four) the orbital command (face) to the control device according to the read block address, the read communication command performs communication, and reads back the corresponding read block address. Data, that is, reading back multiple data in one communication (step 282), after reading back all the data corresponding to the read block address, the read data will form a read block data (step 284). Further, the component status is displayed based on the block data (step 288). In addition, the read block data can be stored in the internal storage block (step 286), that is, stored in the memory inside the human-machine interface, so that the next time the switch is switched, the storage block address can be used. The required data is directly obtained from the read block data stored in the memory inside the human interface, as shown in FIGS. 6A and 6B. In other words, referring to the figures 7A, 7B, and 7C, when the facets are switched, the read addresses of the components on the display surface are collected (step 360), and the components that have been read and not taken are confirmed. That is, it is confirmed whether the collected read address has a corresponding storage block address 7 (step 39〇), the read address of the selected component is obtained, and the data is directly obtained from the storage 2 block according to the storage block address (step 392), and further displaying the component based on the acquired data (step 288). Wherein, the read address of the unread component performs the above steps 110" to "step 288" as shown in Figs. 7A, 7B, and 7C. That is, when the component on the display surface is the read component, there is no need to send 12 1271621 to read the communication command to control the subsequent read data, and the data component is opposite to the memory block address. The data of the seventh is obtained directly from the read block data of the memory towel that is older than the human machine, and the unread components are optimized. In summary, according to the method for optimizing the read data of the present invention, the number of communications can be reduced, and the time spent in the communication can be reduced, so that more time can be provided for processing the state of the data display and the cylinder operation. Real-time control and reaction control device status is achieved. Furthermore, according to the method for optimizing the read data of the present invention, the operator can select a static or dynamic recording mode according to the characteristics of the written program to achieve a better optimization effect. In addition, according to the method for optimizing the read data of the present invention, the preferred read range (ie, the above-mentioned read block) can be automatically generated according to the read address used by the operator' without further operation. The user specifies the reading range. Although the present invention has been disclosed above in the foregoing preferred embodiments, it is not intended to limit the scope of the present invention, and the present invention may be modified and retouched without departing from the spirit and scope of the present invention. The patent protection scope of the invention is subject to the definition of the scope of the patent application attached to the specification. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a flow chart for explaining an optimization method for reading data of a human-machine interface according to a first embodiment of the present invention; Fig. 2 is a description of the first! A detailed flowchart of "Step 120" in the figure; FIG. 3 is a flow chart for explaining an optimization method of the human interface reading data d 13 1271621 according to the second embodiment of the present invention; FIG. 4 is a description The method for optimizing data read by the human interface according to the third embodiment of the present invention; FIG. 5A and FIG. 5B are diagrams for explaining the method for optimizing the data read by the human interface according to the fourth embodiment of the present invention; 6B is an optimization method for reading data of a human-machine interface according to a fourth embodiment of the present invention; and FIGS. 7A, 7B, and 7C are diagrams for explaining human-machine interface reading according to the fourth embodiment of the present invention. The method of optimizing the data. [Explanation of main component symbols] Step 110......................sequing the read address into a list of steps 120.......... ...........calculate the combined length step 122...............takes a set of calculus parameters from the control device step 124.. ................... Calculate the combined length step 130 based on this set of calculus parameters........................ Combining the read address into the read area block according to the merge length step 140.....................converting the read address to obtain the corresponding storage Block Address Step 250 ..................... Entering Compiler Step 260 .................. ...to collect the read address of the component applied to all the edit screens. Step 270 ..................... will read the block address and relative Storage block address -1271621 Load man-machine interface step 280 .....................Send read communication command to control device according to read block address Step 282 ..................... Perform communication according to the read communication command, and read back the data of the corresponding read block address step 284 ..... ................read back all the read block bits After corresponding data, a read block data formed in step 286 ..................... the read block data is stored in the internal storage block
中 步驟288 .....................根據讀取區塊數據顯示元件狀態 步驟360 .....................蒐集於所有顯示晝面上之元件的讀取位 址 步驟390 .....................確認是否讀取過? 步驟392 .....................根據儲存區塊位址於儲存區塊中取得數 據Step 288 .....................Display component status according to the read block data step 360 ............... ...read the read address of all the components on the display surface. Step 390 ..................... Confirm whether it has been read? Step 392 .....................Acquiring data in the storage block according to the storage block address
1515