TWI805418B - System for loading script dynamically to change handling action of material and method thereof - Google Patents

System for loading script dynamically to change handling action of material and method thereof Download PDF

Info

Publication number
TWI805418B
TWI805418B TW111123499A TW111123499A TWI805418B TW I805418 B TWI805418 B TW I805418B TW 111123499 A TW111123499 A TW 111123499A TW 111123499 A TW111123499 A TW 111123499A TW I805418 B TWI805418 B TW I805418B
Authority
TW
Taiwan
Prior art keywords
production line
script
processing
internal data
change
Prior art date
Application number
TW111123499A
Other languages
Chinese (zh)
Other versions
TW202401247A (en
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 TW111123499A priority Critical patent/TWI805418B/en
Application granted granted Critical
Publication of TWI805418B publication Critical patent/TWI805418B/en
Publication of TW202401247A publication Critical patent/TW202401247A/en

Links

Images

Landscapes

  • Preliminary Treatment Of Fibers (AREA)
  • Stored Programmes (AREA)

Abstract

A system for loading a script dynamically to change a handling action of a material and a method thereof are provided. By loading dynamically and executing scripts for changing internal data generated by executing an internal logic by an operation service, and changing handling action of a target material corresponding to the changed internal data on a production line based on the changed internal data, the system and the method can change handling action of target maternal without updating and restarting operation service, and can achieve the effect of avoid loss caused by stopping operation service.

Description

動態載入腳本以改變料件處理動作之系統及方法System and method for dynamically loading scripts to change material handling actions

一種生產線處理動作調整系統及其方法,特別係指一種動態載入腳本以改變料件處理動作之系統及方法。A production line processing action adjustment system and method, particularly a system and method for dynamically loading scripts to change material processing actions.

工業4.0(Industry 4.0),又稱為第四次工業革命,其並不是單單創造新的工業技術,而是著重於將現有的工業技術、銷售流程與產品體驗統合,透過人工智慧技術建立具有適應性、資源效率和人因工程學的智慧工廠,並在商業流程及價值流程中整合客戶以及商業夥伴,以提供完善的售後服務,進而建構出一個有感知意識的新型智慧型工業世界。Industry 4.0 (Industry 4.0), also known as the fourth industrial revolution, does not just create new industrial technologies, but focuses on integrating existing industrial technologies, sales processes and product experience, and establishes adaptable products through artificial intelligence technology. Smart factory based on nature, resource efficiency and human factors engineering, and integrate customers and business partners in business process and value process to provide perfect after-sales service, and then construct a new intelligent industrial world with awareness.

隨著工業4.0的浪潮襲捲全球,製造業者無不以智能製造優化生產轉型,提升競爭力。智慧製造是架構在感測技術、網路技術、自動化技術、與人工智慧的基礎上,透過感知、人機互動、決策、執行、與回饋的過程,來實現產品設計與製造、企業管理與服務的智慧化。With the wave of Industry 4.0 sweeping the world, manufacturers are all using smart manufacturing to optimize production transformation and enhance competitiveness. Smart manufacturing is based on sensing technology, network technology, automation technology, and artificial intelligence, through the process of perception, human-computer interaction, decision-making, execution, and feedback to realize product design and manufacturing, enterprise management and services of wisdom.

而電子組裝業薄利多銷、產品價格競爭激烈的特性,讓業者追求對原物料及生產工具更有效的管控與最佳化,促使工廠生產資源效益最大化。其中,在電子組裝業的生產線上,必定包含各種控制與測試環節,例如,將被判定為存在問題的料件移出生產線等。The characteristics of small profits but quick turnover and fierce product price competition in the electronic assembly industry make the industry pursue more effective control and optimization of raw materials and production tools, so as to maximize the efficiency of factory production resources. Among them, in the production line of the electronic assembly industry, various control and testing links must be included, for example, the materials that are judged to be problematic are removed from the production line.

目前,對生產線上各種料件處理裝置的控制大多仰賴不斷運作的運作服務。若要調整運作服務的功能,例如改變一種或多種料件處理裝置對特定的一種或多種料件的處理動作,則通常只能變更運作服務的程式碼,並將運作服務升級或更新,及在升級或更新運作服務後重新啟動運作服務以使運作服務載入更新後的程式碼以改變一種或多種料件處理裝置對特定料件的處理動作。Currently, the control of various material handling devices on the production line mostly relies on operational services that are constantly running. If you want to adjust the function of the operation service, such as changing the processing action of one or more material processing devices for one or more specific materials, you can usually only change the code of the operation service, upgrade or update the operation service, and After upgrading or updating the operation service, restart the operation service so that the operation service loads the updated code to change the processing action of one or more item processing devices for the specific item.

由於升級運作服務程式或更新程式碼需要停止運作服務,若是僅為了緊急或臨時使用的功能而停止運作服務將可能影響生產速度,反而可能造成更大的損失。Since upgrading the operation service program or updating the code requires stopping the operation service, if the operation service is stopped only for emergency or temporary functions, it may affect the production speed, and may cause greater losses.

綜上所述,可知先前技術中長期以來一直存在進行功能調整需要停止控制生產線之運作服務的問題,因此有必要提出改進的技術手段,來解決此一問題。To sum up, it can be seen that there has been a problem in the prior art for a long time that function adjustment needs to stop the operation service of the control production line, so it is necessary to propose improved technical means to solve this problem.

有鑒於先前技術存在進行功能調整需要停止控制生產線之運作服務的問題,本發明遂揭露一種動態載入腳本以改變料件處理動作之系統及方法,其中:In view of the problem in the prior art that function adjustment needs to stop the operation service of the control production line, the present invention discloses a system and method for dynamically loading scripts to change material handling actions, wherein:

本發明所揭露之動態載入腳本以改變料件處理動作之系統,至少包含:邏輯執行模組,用以執行內部邏輯以產生與生產線上之目標料件對應之內部資料;腳本載入模組,用以動態載入外部腳本;腳本執行模組,用以執行外部腳本以更改內部資料;條件判斷模組,用以判斷內部資料是否符合處理條件;產線控制模組,用以於內部資料符合處理條件時,控制生產線對目標料件進行與處理條件對應之處理動作。The system for dynamically loading scripts to change material processing actions disclosed by the present invention at least includes: a logic execution module for executing internal logic to generate internal data corresponding to target materials on the production line; script loading module , used to dynamically load external scripts; script execution module, used to execute external scripts to change internal data; condition judgment module, used to judge whether internal data meets processing conditions; production line control module, used for internal data When the processing conditions are met, control the production line to perform processing actions corresponding to the processing conditions on the target material.

本發明所揭露之動態載入腳本以改變料件處理動作之方法,其步驟至少包括:執行內部邏輯以產生與生產線上之目標料件對應之內部資料;動態載入外部腳本;執行外部腳本以更改內部資料;判斷內部資料符合處理條件時,控制生產線對目標料件進行與處理條件對應之處理動作。The method for dynamically loading scripts to change material processing actions disclosed by the present invention includes at least the steps of: executing internal logic to generate internal data corresponding to target materials on the production line; dynamically loading external scripts; executing external scripts to Change internal data; when judging that the internal data meets the processing conditions, control the production line to perform processing actions corresponding to the processing conditions for the target material.

本發明所揭露之系統與方法如上,與先前技術之間的差異在於本發明透過讓執行內部邏輯之運作服務動態載入並執行外部腳本以更改內部邏輯所產生之內部資料,藉以依據更改後之內部資料改變生產線對與內部資料對應之目標料件進行之處理動作,藉以解決先前技術所存在的問題,並可以達成在不更新也不重啟運作服務而改變運作服務對目標料件之處理動作以避免損失的技術功效。The system and method disclosed in the present invention are as above, and the difference between it and the prior art is that the present invention dynamically loads and executes external scripts to change the internal data generated by the internal logic by allowing the operation service that executes the internal logic to change the internal data according to the modified data. The internal data changes the processing action of the production line on the target material corresponding to the internal data, so as to solve the problems existing in the previous technology, and can change the processing action of the operation service on the target material without updating or restarting the operation service. Avoid loss of technical efficacy.

以下將配合圖式及實施例來詳細說明本發明之特徵與實施方式,內容足以使任何熟習相關技藝者能夠輕易地充分理解本發明解決技術問題所應用的技術手段並據以實施,藉此實現本發明可達成的功效。The features and implementation methods of the present invention will be described in detail below in conjunction with the drawings and embodiments, the content is enough to enable anyone familiar with the relevant art to easily and fully understand the technical means used to solve the technical problems of the present invention and implement them accordingly, thereby realizing The effect that the present invention can achieve.

本發明可以讓執行於產線控制裝置中的運作服務載入並執行外部腳本(Script),使得運作服務依據外部腳本的執行結果判斷是否改變對生產線上之目標料件的處理動作。其中,產線控制裝置可以是計算設備。The present invention allows the operation service executed in the production line control device to load and execute an external script (Script), so that the operation service judges whether to change the processing action on the target material on the production line according to the execution result of the external script. Wherein, the production line control device may be a computing device.

以下先以「第1圖」本發明所提之動態載入腳本以改變料件處理動作之系統架構圖來說明本發明的系統運作。如「第1圖」所示,本發明之系統應用在產線控制裝置100中,含有運作服務110與外部腳本130。其中,產線控制裝置100可以執行一組或多組計算機指令以產生運作服務110。The system operation of the present invention will be described below with "Fig. 1" the system architecture diagram of the dynamic loading script mentioned in the present invention to change the material processing action. As shown in "Fig. 1", the system of the present invention is applied in a production line control device 100, and includes an operation service 110 and an external script 130. Wherein, the production line control device 100 can execute one or more sets of computer instructions to generate the operation service 110 .

運作服務110負責執行預定的內部邏輯以對生產線上的一種或多種料件進行預定的處理動作,也負責載入並執行外部腳本130以控制料件處理裝置410對目標料件進行非預定的處理動作。Operation service 110 is responsible for executing predetermined internal logic to perform predetermined processing actions on one or more materials on the production line, and is also responsible for loading and executing external script 130 to control material processing device 410 to perform unscheduled processing on target materials action.

在部分的實施例中,運作服務110更可以如「第2圖」本發明所提之動態載入腳本以改變料件處理動作之元件示意圖所示,包含邏輯執行模組210、腳本載入模組220、腳本執行模組230、條件判斷模組250、產線控制模組260,以下將對上述各模組做進一步說明。In some embodiments, the operation service 110 can be further shown in "Fig. 2" the schematic diagram of the elements of the present invention to dynamically load scripts to change material processing actions, including logic execution module 210, script loading module The group 220, the script execution module 230, the condition judgment module 250, and the production line control module 260 will be further described below.

邏輯執行模組210負責執行預定之內部邏輯以產生與生產線上之一個或多個料件對應的內部資料。在本發明中,符合條件的特定料件也被稱為目標料件。一般而言,生產線上的每一個料件可以對應運作服務110所產生的一個或多個內部物件(Object),本發明所提之內部資料為與目標料件對應之內部物件的一個或多個屬性之屬性值。The logic execution module 210 is responsible for executing predetermined internal logic to generate internal data corresponding to one or more materials on the production line. In the present invention, the specific material that meets the conditions is also referred to as the target material. Generally speaking, each material on the production line can correspond to one or more internal objects (Object) generated by the operation service 110. The internal data mentioned in the present invention refers to one or more internal objects corresponding to the target material. The attribute value of the attribute.

腳本載入模組220負責載入外部腳本130。要說明的是,腳本載入模組220是動態的載入外部腳本130,而非固定的載入外部腳本130,也就是說,腳本載入模組220可以在生產線上的目標料件需要進行非預定的處理動作時,才載入外部腳本130,而若生產線上的料件將進行預定的處理動作時,腳本載入模組220將不載入外部腳本130。The script loading module 220 is responsible for loading the external script 130 . It should be noted that the script loading module 220 dynamically loads the external script 130, rather than loading the external script 130 fixedly. The external script 130 is only loaded when there is an unscheduled processing action, and the script loading module 220 will not load the external script 130 when the material on the production line will perform a predetermined processing action.

腳本載入模組220可以持續檢查存放外部腳本130的特定目錄,當特定目錄中存在可執行之外部腳本130時,載入可執行的外部腳本。更詳細的,腳本載入模組220可以先判斷運作服務110是否支援存放於特定目錄中之外部腳本的語言,若是,表示該外部腳本可以被執行,腳本載入模組220可以載入該外部腳本,而若腳本載入模組220判斷運作服務110不支援存放於特定目錄中之外部腳本的語言、或腳本載入模組220無法識別出特定目錄中之外部腳本的語言,表示該外部腳本無法被執行,腳本載入模組220將不載入該外部腳本。其中,特定目錄為儲存媒體中的儲存空間,且儲存媒體可以被設置在產線控制裝置100中,或被設置在與產線控制裝置100連接的儲存裝置(圖中未示)中,本發明沒有特別的限制。The script loading module 220 can continuously check the specific directory storing the external script 130, and load the executable external script 130 when there is an executable external script 130 in the specific directory. More specifically, the script loading module 220 can first determine whether the operation service 110 supports the language of the external script stored in a specific directory, if so, it means that the external script can be executed, and the script loading module 220 can load the external script. script, and if the script loading module 220 determines that the operation service 110 does not support the language of the external script stored in the specific directory, or the script loading module 220 cannot recognize the language of the external script in the specific directory, it means that the external script cannot be executed, the script loading module 220 will not load the external script. Wherein, the specific directory is a storage space in the storage medium, and the storage medium can be set in the production line control device 100, or in a storage device (not shown) connected to the production line control device 100, the present invention There are no particular restrictions.

腳本執行模組230負責執行腳本載入模組220所載入的外部腳本130,也就是執行外部腳本130所記載的處理邏輯,並依據外部腳本130的處理邏輯更改邏輯執行模組210所產生的內部資料150。The script execution module 230 is responsible for executing the external script 130 loaded by the script loading module 220, that is, executing the processing logic recorded in the external script 130, and changing the processing logic generated by the logic execution module 210 according to the processing logic of the external script 130. Internal information 150.

在部分的實施例中,腳本執行模組230也可以依據外部腳本130的處理邏輯選擇是否更改邏輯執行模組210所產生的內部資料150。例如,腳本執行模組230可以依據執行外部腳本130所產生的回傳值判斷是否更改內部資料150,也就是說,當回傳值表示需要更改內部資料或回傳值符合預定條件時,腳本執行模組230可以更改一個或多個內部資料150,而當回傳值表示不需要更改內部資料或回傳值不符合預定條件時,腳本執行模組230將不更改內部資料150。In some embodiments, the script execution module 230 can also choose whether to modify the internal data 150 generated by the logic execution module 210 according to the processing logic of the external script 130 . For example, the script execution module 230 can judge whether to change the internal data 150 according to the return value generated by executing the external script 130, that is, when the return value indicates that the internal data needs to be changed or the return value meets a predetermined condition, the script executes The module 230 can modify one or more internal data 150 , and when the returned value indicates that the internal data does not need to be modified or the returned value does not meet the predetermined condition, the script execution module 230 will not modify the internal data 150 .

另外,為了避免腳本執行模組230在執行外部腳本130時發生不可預期的錯誤,導致運作服務110發生異常或結束執行,腳本執行模組230也可以在執行外部腳本130時攔截執行外部腳本130所發生的錯誤。In addition, in order to avoid unexpected errors when the script execution module 230 executes the external script 130, causing the operation service 110 to be abnormal or to end the execution, the script execution module 230 can also intercept the execution of the external script 130 when executing the external script 130. An error occurred.

條件判斷模組250負責判斷邏輯執行模組210所產生的內部資料150或腳本執行模組230更改過的內部資料150是否符合處理條件。舉例來說,處理條件可以記載一個或多個數值或一個或多個字串或一個或多個計算式等資料,條件判斷模組250可以判斷內部資料150是否與處理條件所記載的任何一個資料相同或相符,若是,則條件判斷模組250可以判斷內部資料150符合處理條件,反之,條件判斷模組250可以判斷內部資料150不符合處理條件。要說明的是,條件判斷模組250判斷內部資料150是否相符的處理條件可以是一個或多個,本發明沒有特別的限制,且每一個處理條件對應一個或多個處理動作,本發明亦不以上述為限。一般而言,每一個處理條件可以記載相對應的處理動作,或是由產線控制模組等其他模組記載與處理條件對應的處理動作。The condition judgment module 250 is responsible for judging whether the internal data 150 generated by the logic execution module 210 or the internal data 150 modified by the script execution module 230 meets the processing conditions. For example, the processing conditions can record one or more numerical values or one or more character strings or one or more calculation formulas, and the condition judging module 250 can judge whether the internal data 150 is consistent with any data recorded in the processing conditions The same or match, if yes, the condition judging module 250 can judge that the internal data 150 meets the processing condition, otherwise, the condition judging module 250 can judge that the internal data 150 does not meet the processing condition. It should be noted that the condition judging module 250 can judge whether the internal data 150 matches one or more processing conditions, and the present invention is not particularly limited, and each processing condition corresponds to one or more processing actions, and the present invention does not subject to the above. Generally speaking, each processing condition can record the corresponding processing action, or other modules such as the production line control module can record the processing action corresponding to the processing condition.

產線控制模組260可以取得生產線上各個料件的位置。舉例來說,產線控制模組260可以在每一個料件通過特定位置時更新與各料件對應之內部物件的位置屬性,例如將特定位置的位置訊息寫入位置屬性中等。其中,特定位置可以是生產線上的計錄點、檢查點或作業裝置(如料件處理裝置410)等,但本發明並不以此為限。The production line control module 260 can obtain the position of each material on the production line. For example, the production line control module 260 can update the position attribute of the internal object corresponding to each material when each material passes a specific position, for example, write the position information of the specific position into the position attribute. Wherein, the specific location may be a counting point, an inspection point, or an operating device (such as the material processing device 410 ) on the production line, but the present invention is not limited thereto.

產線控制模組260負責在條件判斷模組250判斷內部資料150符合處理條件時,控制生產線對目標料件進行與符合內部資料150之處理條件對應的處理動作。舉例而言,產線控制模組260可以產生與符合內部資料150之處理條件對應之處理動作的控制訊息,並可以透過產線控制裝置100之通訊模組(圖中未示)以有線或無線通訊方式將所產生的控制訊息傳送給設置於生產線上的料件處理裝置410,藉以透過控制訊息控制料件處理裝置410進行特定的處理動作。The production line control module 260 is responsible for controlling the production line to perform processing actions corresponding to the processing conditions of the internal data 150 on the target material when the condition judging module 250 judges that the internal data 150 meets the processing conditions. For example, the production line control module 260 can generate control messages corresponding to processing actions that meet the processing conditions of the internal data 150, and can communicate with wired or wireless information through the communication module (not shown) of the production line control device 100. The communication method transmits the generated control message to the material processing device 410 installed on the production line, so as to control the material processing device 410 to perform specific processing actions through the control message.

在部分的實施例中,產線控制裝置260更可以先判斷目標料件的位置,再依據目標料件的位置進行對應的處理動作。更詳細的,產線控制裝置260可以先由與目標料件對應之內部物件的位置屬性中讀出表示目標料件之位置的屬性值,並可以依據所讀出的屬性值選擇對應的處理動作並產生相對應的控制訊息,其中,產線控制裝置260可以選擇的處理動作包含選擇進行處理動作的料件處理裝置410及/或選擇料件處理裝置410所進行的處理動作等,本發明並不以此為限。In some embodiments, the production line control device 260 can further determine the position of the target material first, and then perform corresponding processing actions according to the position of the target material. In more detail, the production line control device 260 can first read the attribute value indicating the position of the target material from the position attribute of the internal object corresponding to the target material, and can select the corresponding processing action according to the read attribute value And generate corresponding control information, wherein, the processing actions that can be selected by the production line control device 260 include selecting the material processing device 410 for processing and/or selecting the processing actions performed by the material processing device 410, etc. The present invention does not This is not the limit.

料件處理裝置410可以接收產線控制模組260所傳送的控制訊息,並可以對生產線上的目標料件進行特定的處理動作。舉例來說,料件處理裝置410可以將目標料件由生產線上移開,使得目標料件不再隨著生產線繼續移動;料件處理裝置410也可以將目標料件放置到生產線上的特定位置,如,將目標料件移動到目標料件先前通過的位置以使目標料件重新進入先前已通過的裝置,或將目標料件移動到目標料件先前未經過的裝置之後以跳過特定的裝置,或是將目標料件移動到人工處理區等。其中,料件處理裝置410可以依據所接收到之控制訊息對目標料件進行之對應之處理動作。The material processing device 410 can receive the control information sent by the production line control module 260, and can perform specific processing actions on the target materials on the production line. For example, the material processing device 410 can remove the target material from the production line, so that the target material does not continue to move along with the production line; the material processing device 410 can also place the target material at a specific position on the production line , such as moving the target material to a location where the target material previously passed to re-enter a device that the target material has previously passed, or to skip a specific device after a device that the target material has not previously passed device, or move the target material to the manual processing area, etc. Wherein, the material processing device 410 can perform corresponding processing actions on the target material according to the received control information.

接著以一個實施例來解說本發明的運作系統與方法,並請參照「第3A圖」本發明所提之動態載入腳本以改變料件處理動作之方法流程圖。在本實施例中,假設產線控制裝置100中的運作服務110是使用C#語言開發,但本發明並不以此為限。Next, an embodiment is used to illustrate the operating system and method of the present invention, and please refer to "FIG. 3A" for the flow chart of the method for dynamically loading scripts in the present invention to change material processing actions. In this embodiment, it is assumed that the operation service 110 in the production line control device 100 is developed using C# language, but the present invention is not limited thereto.

當產線控制裝置100開始運作時,產線控制裝置100中的運作服務110可以依照預定的內部邏輯運作,並可以為生產線上的每個料件產生對應的內部物件,如此,運作服務110中的邏輯執行模組210可以執行預定的內部邏輯以產生與生產線上之各個料件對應的內部資料(步驟310)。在本實施例中,假設邏輯執行模組210可以產生包含多個屬性的內部物件,上述屬性包含但不限於類型、製造商、編號、序號、規格、生產參數(如hide)、位置等。When the production line control device 100 starts to operate, the operation service 110 in the production line control device 100 can operate according to a predetermined internal logic, and can generate corresponding internal objects for each material on the production line. In this way, the operation service 110 The logic execution module 210 can execute predetermined internal logic to generate internal data corresponding to each material on the production line (step 310 ). In this embodiment, it is assumed that the logic execution module 210 can generate an internal object containing multiple attributes, including but not limited to type, manufacturer, serial number, serial number, specification, production parameters (such as hide), location, and so on.

同樣在產線控制裝置100開始運作後,運作服務110中的腳本載入模組220也可以動態的載入外部腳本130(步驟320)。在本實施例中,假設腳本載入模組220可以持續的每隔一定時間就透過網路連線到儲存裝置並檢查儲存裝置之特定目錄中是否存放可執行的外部腳本130,若否,則結束當次的執行,使得生產線按照預定的程序作業,若是,則腳本載入模組220可以載入外部腳本130,例如,使用C#語言中的函式CSScript.Evaluator.LoadCode()載入特定目錄中的外部腳本130。若生產線上的料件一切正常,則各個料件可以順利組裝為商品,腳本載入模組220通常無法偵測到外部腳本130,即腳本載入模組220沒有外部腳本130可以載入;而若存在生產線上的目標料件(如編號為「6051B1095301」與「6Y21B0416101」的記憶體)被組裝為商品前被確認不應組裝到商品上,則在目標料件被組裝到商品上之前,生產線的相關人員或生產線外部的通訊裝置(圖中未示)可以將外部腳本130傳送到儲存裝置的特定目錄中,使得腳本載入模組220可以由儲存裝置的特定目錄中載入外部腳本130。Also after the production line control device 100 starts to operate, the script loading module 220 in the operation service 110 can also dynamically load the external script 130 (step 320 ). In this embodiment, it is assumed that the script loading module 220 can continue to connect to the storage device through the network at regular intervals and check whether the executable external script 130 is stored in the specific directory of the storage device. If not, then End the current execution, so that the production line operates according to the predetermined program, if so, the script loading module 220 can load the external script 130, for example, use the function CSSScript.Evaluator.LoadCode () in the C# language to load a specific directory External script 130 in . If the materials on the production line are all normal, then each material can be successfully assembled into a commodity, and the script loading module 220 cannot detect the external script 130 usually, that is, the script loading module 220 does not have the external script 130 to load; If there are target materials on the production line (such as the memories with numbers "6051B1095301" and "6Y21B0416101") that are confirmed not to be assembled on the product before they are assembled into the product, the production line will Relevant personnel or a communication device (not shown) outside the production line can transmit the external script 130 to a specific directory of the storage device, so that the script loading module 220 can load the external script 130 from the specific directory of the storage device.

在運作服務110的腳本載入模組220載入外部腳本130後,運作服務110的腳本執行模組230可以執行外部腳本130以更改運作服務之邏輯執行模組210所產生的內部資料150(步驟330)。在本實施例中,假設腳本執行模組230可以如「第3B圖」之流程所示,在執行被載入的外部腳本130(步驟331)時,可以偵測執行外部腳本130的過程是否發生非預期的錯誤(步驟333),若是,則腳本執行模組230可以攔截錯誤(步驟335),例如,透過try-catch的語法攔截執行外部腳本130所發生的錯誤,並可以在攔截到錯誤時結束外部腳本130的執行;而若腳本執行模組130執行外部腳本130的過程沒有發生非預期的錯誤,且外部腳本130在被執行後可以產生回傳值,則腳本執行模組130依據外部腳本130所產生的回傳值判斷是否更改內部資料150(步驟337),例如,外部腳本130可以逐一檢查每一個內部物件之編號屬性的屬性值是否為「6051B1095301」或「6Y21B0416101」(且外部腳本130也可以檢查內部物件之類型屬性的屬性值是否表示為記憶體),若否,如回傳值為false,也就是外部腳本130判斷當前檢查之內部物件之編號屬性的屬性值不為「6051B1095301」與「6Y21B0416101」,則腳本執行模組230可以不更改任何內部物件的任何屬性值(內部資料),而若回傳值為true,也就是外部腳本130判斷當前檢查之內部物件之編號屬性的屬性值為「6051B1095301」或「6Y21B0416101」,則腳本執行模組230可以更改同一內部物件之hide屬性的屬性值(內部資料150)為ture(步驟339)。After the script loading module 220 of the operation service 110 loads the external script 130, the script execution module 230 of the operation service 110 can execute the external script 130 to change the internal data 150 produced by the logic execution module 210 of the operation service (step 330). In this embodiment, it is assumed that the script execution module 230 can detect whether the process of executing the external script 130 occurs when executing the loaded external script 130 (step 331) as shown in the flow of "Fig. 3B". An unexpected error (step 333), if so, the script execution module 230 can intercept the error (step 335), for example, intercept the error that occurs in the execution of the external script 130 through the syntax of try-catch, and can intercept the error End the execution of the external script 130; and if there is no unexpected error in the process of executing the external script 130 by the script execution module 130, and the external script 130 can generate a return value after being executed, then the script execution module 130 The return value generated by 130 determines whether to change the internal data 150 (step 337). For example, the external script 130 can check whether the attribute value of the serial number attribute of each internal object is "6051B1095301" or "6Y21B0416101" (and the external script 130 It is also possible to check whether the attribute value of the type attribute of the internal object is represented as memory), if not, if the return value is false, that is, the external script 130 judges that the attribute value of the number attribute of the currently checked internal object is not "6051B1095301" and "6Y21B0416101", the script execution module 230 may not change any attribute value (internal data) of any internal object, and if the return value is true, that is, the external script 130 judges the attribute of the serial number attribute of the internal object currently checked If the value is "6051B1095301" or "6Y21B0416101", the script execution module 230 can change the attribute value (internal data 150) of the hide attribute of the same internal object to true (step 339).

回到「第3A圖」,在運作服務110的腳本執行模組230更改運作服務之邏輯執行模組210所產生的內部資料150後,運作服務110的條件判斷模組250可以判斷腳本執行模組230更改後的內部資料150是否符合處理條件(步驟350)。在本實施例中,假設條件判斷模組250包含多個處理條件,其中一個處理條件為內部物件之hide屬性的屬性值為true,則條件判斷模組250可以判斷出編號屬性之屬性值為「6051B1095301」或「6Y21B0416101」的內部物件之hide屬性的屬性值符合處理條件。Returning to "Figure 3A", after the script execution module 230 of the operation service 110 changes the internal data 150 generated by the logic execution module 210 of the operation service, the condition judgment module 250 of the operation service 110 can judge the script execution module 230 Whether the modified internal data 150 meets the processing conditions (step 350). In this embodiment, assuming that the condition judging module 250 includes multiple processing conditions, one of which is that the attribute value of the hide attribute of the internal object is true, the condition judging module 250 can judge that the attribute value of the serial number attribute is " The attribute value of the hide attribute of the internal object of 6051B1095301" or "6Y21B0416101" meets the processing conditions.

當運作服務110的條件判斷模組250判斷存在內部資料150符合處理條件時,運作服務110的產線控制模組260可以控制生產線對目標料件進行與被符合之處理條件對應的處理動作(步驟360)。在本實施例中,假設產線控制模組260可以記錄與處理條件對應的處理動作,則產線控制模組260可以讀出與hide屬性的屬性值為true之處理條件對應的處理動作,例如,將目標料件移出生產線,如此,產線控制模組260可以依據生產線上hide屬性之屬性值為true的內部物件所對應之特定料件(即編號為「6051B1095301」或「6Y21B0416101」的目標料件)的位置(hide屬性之屬性值為true的內部物件之位置屬性的屬性值)控制生產線上的料件處理裝置410對目標料件進行與hide屬性的屬性值為true之處理條件對應的處理動作,即將編號為「6051B1095301」或「6Y21B0416101」的目標料件移出生產線,使得編號為「6051B1095301」或「6Y21B0416101」的目標料件不會被組裝到商品中,藉以避免出貨商品包含有問題之編號為「6051B1095301」或「6Y21B0416101」的目標料件。When the condition judgment module 250 of the operation service 110 judges that the internal data 150 meets the processing conditions, the production line control module 260 of the operation service 110 can control the production line to perform processing actions corresponding to the processing conditions for the target material (step 360). In this embodiment, assuming that the production line control module 260 can record the processing action corresponding to the processing condition, the production line control module 260 can read the processing action corresponding to the processing condition whose attribute value of the hide attribute is true, for example , to move the target material out of the production line. In this way, the production line control module 260 can be based on the specific material corresponding to the internal object with the attribute value of the hide attribute on the production line (that is, the target material with the number "6051B1095301" or "6Y21B0416101") item) (the attribute value of the position attribute of the internal object whose attribute value is true for the hide attribute) controls the material processing device 410 on the production line to perform processing corresponding to the processing condition for the target material whose attribute value is true for the hide attribute The action is to move the target material with the number "6051B1095301" or "6Y21B0416101" out of the production line, so that the target material with the number "6051B1095301" or "6Y21B0416101" will not be assembled into the product, so as to avoid the shipment of the product containing the problematic Target item numbered "6051B1095301" or "6Y21B0416101".

如此,透過本發明,可以在不更新不重啟運作服務的前提下透過外部腳本將特定的處理邏輯導入生產線中,藉以調整生產線預定對特定料件的處理動作。In this way, through the present invention, specific processing logic can be imported into the production line through external scripts without updating or restarting the operation service, so as to adjust the processing actions scheduled by the production line for specific materials.

綜上所述,可知本發明與先前技術之間的差異在於具有執行內部邏輯之運作服務動態載入並執行外部腳本以更改內部邏輯所產生之內部資料,藉以依據更改後之內部資料改變生產線對與內部資料對應之目標料件進行的處理動作之技術手段,藉由此一技術手段可以來解決先前技術所存在進行功能調整需要停止控制生產線之運作服務的問題,進而達成在不更新也不重啟運作服務而改變運作服務對目標料件之處理動作以避免損失之技術功效。In summary, it can be seen that the difference between the present invention and the prior art lies in that the operation service with internal logic can dynamically load and execute external scripts to change the internal data generated by the internal logic, so as to change the production line according to the modified internal data. The technical means of the processing action of the target material corresponding to the internal data can solve the problem in the previous technology that the function adjustment needs to stop the operation service of the control production line, and then achieve no update or restart The operation service changes the processing action of the operation service on the target material to avoid loss of technical efficiency.

再者,本發明之動態載入腳本以改變料件處理動作之方法,可實現於硬體、軟體或硬體與軟體之組合中,亦可在電腦系統中以集中方式實現或以不同元件散佈於若干互連之電腦系統的分散方式實現。Furthermore, the method of dynamically loading scripts of the present invention to change material processing actions can be implemented in hardware, software, or a combination of hardware and software, and can also be implemented in a centralized manner in a computer system or distributed with different components Implemented in a decentralized manner over several interconnected computer systems.

雖然本發明所揭露之實施方式如上,惟所述之內容並非用以直接限定本發明之專利保護範圍。任何本發明所屬技術領域中具有通常知識者,在不脫離本發明所揭露之精神和範圍的前提下,對本發明之實施的形式上及細節上作些許之更動潤飾,均屬於本發明之專利保護範圍。本發明之專利保護範圍,仍須以所附之申請專利範圍所界定者為準。Although the embodiments disclosed in the present invention are as above, the content described is not intended to directly limit the scope of protection of the present invention. Anyone with ordinary knowledge in the technical field of the present invention, without departing from the spirit and scope disclosed in the present invention, makes some changes and modifications to the form and details of the implementation of the present invention, all of which belong to the patent protection of the present invention scope. The scope of patent protection of the present invention shall still be defined by the scope of the attached patent application.

100:產線控制裝置 110:運作服務 130:外部腳本 150:內部資料 210:邏輯執行模組 220:腳本載入模組 230:腳本執行模組 250:條件判斷模組 260:產線控制模組 410:料件處理裝置 步驟310:執行內部邏輯以產生與生產線上之目標料件對應之內部資料 步驟320:動態載入外部腳本 步驟330:執行外部腳本以更改內部資料 步驟331:執行外部腳本 步驟333:偵測執行外部腳本是否發生錯誤 步驟335:攔截錯誤 步驟337:依據外部腳本產生之回傳值判斷是否更改內部資料 步驟339:更改內部資料 步驟350:判斷內部資料是否符合處理條件 步驟360:控制生產線對目標料件進行與處理條件對應之處理動作 100: Production line control device 110: Operational Services 130:External script 150: Internal information 210: logic execution module 220:Script loading module 230: script execution module 250: Condition Judgment Module 260: Production line control module 410: Material handling device Step 310: Execute internal logic to generate internal data corresponding to target materials on the production line Step 320: Dynamically load external scripts Step 330: Execute external script to change internal data Step 331: execute external script Step 333: Detect whether an error occurs in the execution of the external script Step 335: Intercept errors Step 337: Judging whether to change the internal data according to the return value generated by the external script Step 339: Change internal data Step 350: Judging whether the internal data meets the processing conditions Step 360: Control the production line to perform processing actions corresponding to the processing conditions on the target material

第1圖為本發明所提之動態載入腳本以改變料件處理動作之系統架構圖。 第2圖為本發明所提之動態載入腳本以改變料件處理動作之運作服務之元件示意圖。 第3A圖為本發明所提之動態載入腳本以改變料件處理動作之方法流程圖。 第3B圖為本發明所提之執行腳本更改內部資料之方法流程圖。 Figure 1 is a system architecture diagram of dynamically loading scripts to change material processing actions proposed by the present invention. Fig. 2 is a schematic diagram of components of the operation service for dynamically loading scripts to change material processing actions proposed by the present invention. FIG. 3A is a flow chart of the method for dynamically loading scripts to change material processing actions proposed by the present invention. FIG. 3B is a flow chart of the method for changing internal data by executing scripts proposed by the present invention.

步驟310:執行內部邏輯以產生與生產線上之目標料件對應之內部資料 Step 310: Execute internal logic to generate internal data corresponding to target materials on the production line

步驟320:動態載入外部腳本 Step 320: Dynamically load external scripts

步驟330:執行外部腳本以更改內部資料 Step 330: Execute external script to change internal data

步驟350:判斷內部資料是否符合處理條件 Step 350: Judging whether the internal data meets the processing conditions

步驟360:控制生產線對目標料件進行與處理條件對應之處理動作 Step 360: Control the production line to perform processing actions corresponding to the processing conditions on the target material

Claims (10)

一種動態載入腳本以改變料件處理動作之方法,該方法至少包含下列步驟:執行一內部邏輯以產生與一生產線上之一目標料件對應之一內部資料;判斷該目標料件將進行非預定之處理動作時載入一外部腳本,或判斷該目標料件將進行預定之處理動作時不載入該外部腳本;執行該外部腳本以更改該內部資料;及判斷該內部資料符合一處理條件時,控制該生產線對該目標料件進行與該處理條件對應之處理動作,該處理條件記載至少一數值、至少一字串、或至少一個計算式。 A method for dynamically loading scripts to change material processing actions, the method at least includes the following steps: executing an internal logic to generate internal data corresponding to a target material on a production line; judging that the target material will be processed Load an external script during the scheduled processing action, or not load the external script when it is judged that the target material will perform the scheduled processing action; execute the external script to change the internal data; and judge that the internal data meets a processing condition control the production line to perform processing actions corresponding to the processing conditions for the target material, and the processing conditions record at least one value, at least one character string, or at least one calculation formula. 如請求項1所述之動態載入腳本以改變料件處理動作之方法,其中該動態載入該外部腳本之步驟為持續檢查一特定目錄,當該特定目錄中存在可執行之該外部腳本時,載入該外部腳本。 The method for dynamically loading scripts to change material processing actions as described in claim 1, wherein the step of dynamically loading the external script is to continuously check a specific directory, and when there is an executable external script in the specific directory , load the external script. 如請求項1所述之動態載入腳本以改變料件處理動作之方法,其中執行該外部腳本以更改該內部資料之步驟,更包含依據執行該外部腳本所產生之一回傳值判斷是否更改該內部資料之步驟。 The method for dynamically loading scripts to change material processing actions as described in claim 1, wherein the step of executing the external script to change the internal data further includes judging whether to change based on a return value generated by executing the external script The steps of the internal information. 如請求項1所述之動態載入腳本以改變料件處理動作之方法,其中執行該外部腳本以更改該內部資料之步驟,更包含攔截執行該外部腳本所發生之錯誤之步驟。 The method for dynamically loading scripts to change material processing actions as described in claim 1, wherein the step of executing the external script to change the internal data further includes the step of intercepting errors that occur during the execution of the external script. 如請求項1所述之動態載入腳本以改變料件處理動作之方法,其中控制該生產線對該目標料件進行與該處理條件對應之處理動作之步驟為控制 該生產線上之料件處理裝置將該目標料件由該生產線上移開或放置到該生產線上之特定位置。 The method for dynamically loading scripts to change material processing actions as described in claim item 1, wherein the step of controlling the production line to perform processing actions corresponding to the processing conditions for the target material is control The material handling device on the production line removes or places the target material from the production line to a specific position on the production line. 一種動態載入腳本以改變料件處理動作之系統,該系統至少包含:一邏輯執行模組,用以執行一內部邏輯以產生與一生產線上之一目標料件對應之一內部資料;一腳本載入模組,用以判斷該目標料件將進行非預定之處理動作時載入一外部腳本,及判斷該目標料件將進行預定之處理動作時不載入該外部腳本;一腳本執行模組,用以執行該外部腳本以更改該內部資料;一條件判斷模組,用以判斷該內部資料是否符合一處理條件,該處理條件記載至少一數值、至少一字串、或至少一個計算式;及一產線控制模組,用以於該內部資料符合該處理條件時,控制該生產線對該目標料件進行與該處理條件對應之處理動作。 A system for dynamically loading scripts to change material processing actions, the system at least includes: a logic execution module for executing an internal logic to generate internal data corresponding to a target material on a production line; a script Loading module, which is used to load an external script when judging that the target material will perform an unscheduled processing action, and not to load the external script when judging that the target material will perform a predetermined processing action; a script execution module A group, used to execute the external script to change the internal data; a condition judgment module, used to judge whether the internal data meets a processing condition, the processing condition records at least one value, at least one character string, or at least one calculation formula ; and a production line control module, used to control the production line to perform processing actions corresponding to the processing conditions for the target material when the internal data meets the processing conditions. 如請求項6所述之動態載入腳本以改變料件處理動作之系統,其中該腳本載入模組是持續檢查一特定目錄,當該特定目錄中存在可執行之該外部腳本時,載入該外部腳本。 A system for dynamically loading scripts to change material processing actions as described in claim 6, wherein the script loading module continuously checks a specific directory, and when there is an executable external script in the specific directory, load it The external script. 如請求項6所述之動態載入腳本以改變料件處理動作之系統,其中該腳本執行模組更用以依據執行該外部腳本所產生之一回傳值判斷是否更改該內部資料。 The system for dynamically loading scripts to change material processing actions as described in claim 6, wherein the script execution module is further used to judge whether to change the internal data according to a return value generated by executing the external script. 如請求項6所述之動態載入腳本以改變料件處理動作之系統,其中該內部資料為一內部物件之一屬性值。 The system for dynamically loading scripts to change material handling actions as described in Claim 6, wherein the internal data is an attribute value of an internal object. 如請求項6所述之動態載入腳本以改變料件處理動作之系統,其中該產線控制模組是控制該生產線上之料件處理裝置將該目標料件由該生產線上移開或放置到該生產線上之特定位置。 The system for dynamically loading scripts to change material processing actions as described in claim 6, wherein the production line control module controls the material processing device on the production line to remove or place the target material from the production line to a specific location on the line.
TW111123499A 2022-06-23 2022-06-23 System for loading script dynamically to change handling action of material and method thereof TWI805418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111123499A TWI805418B (en) 2022-06-23 2022-06-23 System for loading script dynamically to change handling action of material and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111123499A TWI805418B (en) 2022-06-23 2022-06-23 System for loading script dynamically to change handling action of material and method thereof

Publications (2)

Publication Number Publication Date
TWI805418B true TWI805418B (en) 2023-06-11
TW202401247A TW202401247A (en) 2024-01-01

Family

ID=87803006

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111123499A TWI805418B (en) 2022-06-23 2022-06-23 System for loading script dynamically to change handling action of material and method thereof

Country Status (1)

Country Link
TW (1) TWI805418B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080301564A1 (en) * 2007-05-31 2008-12-04 Smith Michael H Build of material production system
CN107710149A (en) * 2015-06-04 2018-02-16 西门子公司 Utilize the method and system of connectivity model generation PLC codes
TWI699664B (en) * 2018-10-31 2020-07-21 日商東芝三菱電機產業系統股份有限公司 Process line hmi system
CN113868120A (en) * 2021-09-08 2021-12-31 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Industrial software debugging method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080301564A1 (en) * 2007-05-31 2008-12-04 Smith Michael H Build of material production system
CN107710149A (en) * 2015-06-04 2018-02-16 西门子公司 Utilize the method and system of connectivity model generation PLC codes
TWI699664B (en) * 2018-10-31 2020-07-21 日商東芝三菱電機產業系統股份有限公司 Process line hmi system
CN113868120A (en) * 2021-09-08 2021-12-31 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Industrial software debugging method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
TW202401247A (en) 2024-01-01

Similar Documents

Publication Publication Date Title
CN107111308B (en) Method and apparatus for advanced control using function blocks in industrial process control and automation systems
EP3065010B1 (en) Field device commissioning system and method
US10466686B2 (en) System and method for automatic configuration of a data collection system and schedule for control system monitoring
US8819695B2 (en) Controlling application landscapes
CN110892348B (en) Traditional control function and NEWGEN control function in NEWGEN controller
US7974937B2 (en) Adaptive embedded historians with aggregator component
CN111857730A (en) Method and equipment for compiling operating system
CN113806155B (en) Industrial equipment management method and system based on Internet of things
TWI805418B (en) System for loading script dynamically to change handling action of material and method thereof
US9989951B2 (en) Generation and publication of shared tagsets
US20230393565A1 (en) Automated component sourcing based on process system design
US7552439B2 (en) System and method to allow non-deterministic execution in a process control system
CN111600753B (en) Intelligent agent management system in cloud computing environment
CN117289656A (en) System and method for dynamically loading script to change material processing action
CN109067611B (en) Method, device, storage medium and processor for detecting communication state between systems
CN113515293A (en) Method and system for managing DevOps tool chain
EP3780551A1 (en) Method and system for managing assets in a cloud computing environment
US20190079498A1 (en) System and method for managing devices by association between control loop and plant asset value
JP7449322B2 (en) information processing system
KR102707373B1 (en) The Industrial 5G Edge-Terminal-System Supporting Adaptive Containers
KR102679210B1 (en) The Delay Detection And Evaluation Method In Industrial 5G Communication System Using Edge-Terminal
CN115951893B (en) Method, system, equipment and storage medium for acquiring semiconductor processing script
US20240160506A1 (en) Operation support apparatus, system, method, and computer-readable medium
US20220171692A1 (en) Digital mirroring method, server, and storage medium
JP2023099985A (en) Cluster periodic coordinated control method and apparatus