1. 程式人生 > 其它 >ABB AC900F學習筆記30:freelance 2019 自定義功能塊引數儲存型別

ABB AC900F學習筆記30:freelance 2019 自定義功能塊引數儲存型別

前面一篇部落格在記錄學習自定義功能塊時,定義的引數有VAR_IN、VAR_OUT、VAR_DPS、PARA_DPS、PARA_VIS、PARA_EXP、MP_EXP幾種儲存型別,幫助檔案裡面解釋了這幾種型別。

VAR_IN represent inputs to the user function block. VAR_IN variables cannot be written to the user function block program. They can be displayed in the faceplate. At runtime, the user function block instance will be supplied at the cycle rate with values from the associated signal lines for further processing.
VAR_OUT represent the outputs of the user function block. The values are calculated by the user function block program and can also be displayed in the faceplate. At runtime, signal lines associated with VAR_OUT variables are updated at the cycle rate. VAR_DPS are local variables used by the user function block running on the process station. They are used to hold intermediate values. VAR_DPS
variables can be read from the faceplate. They are used for internal calculation in the faceplate.
PARA_DPS variables are used in the configuration of values that effect the processing at the process station, for example, operating mode switching. They can be read and written from the faceplate. PARA_DPS
variables can be commissioned i.e. they can be written or corrected in commissioning mode.
PARA_VIS variables are used in the configuration of variables which are only used in the faceplate, such as instance-specific display text, and operation locking. PARA_VIS variables cannot be changed from commissioning mode. PARA_EXP variables are used to reference data of nested function blocks (standardized or user function blocks). They inherit their other characteristics from the parameters they are used to reference. Each variable with the PARA_EXP storage type can be used to reference one and only one parameter of a nested function block. MP_EXP variables are used to reference message data from nested function blocks. Each one references a complete message structure, comprising message type, message priority, hint data and message text 先吐槽一下,ABB公司在中國擴充套件業務,其軟體的幫助檔案全部是英文的,官網的技術文件也全部是英文的,請一個會中文的團隊翻譯一下很難嗎? 言歸正傳,儘管英文看起來有點頭疼,但還是要學習。我結合著自己的理解翻譯一下。 VAR_IN就是自定義功能塊的輸入變數,是隻讀變數,不能在自定義功能塊修改數值,可以在面板上顯示,也就是在對話方塊編輯時可以將這類變數放入某一個組,在引用這個自定義功能塊的時候可以將某個外部變數連線到這個輸入管腳。使用者在使用自定義功能塊的時候,需要連線外部變數。 VAR_OUT 就是自定硬塊的輸出變數。這個變數由自定義功能塊內部演算法得到數值,能夠在面板上顯示,也就是在對話方塊編輯時可以將這類變數放入某一個組,在引用這個自定義功能塊的時候可以將某個外部變數連線到這個輸入管腳。在執行階段按照預定的迴圈週期重新整理數值。
VAR_DPS就是執行在過程站上自定義功能塊的內部變數,基金用於內部計算,不能在對話方塊編輯時放到某一組,它們不會出現在自定義功能塊的輸入輸出管腳上。換句話說,在引用自定義功能塊的時候,不能夠將外部某個變數的數值直接傳遞給這個內部變數。也正因為這樣,如果自定義功能塊裡面引用了系統自定義的面板,比如變數監視、量程轉換、PID等等,就不能將VAR_DPS用於這些面板引數的傳遞。 PARA_DPS 就是用於過程站程序處理的值的配置。有點繞。比如,操作模式的切換(手動、自動)。這類數值可以通過面板讀和寫。能夠在除錯模式下讀取和修改數值。 PARA_VIS僅用於面板上特定範圍顯示文字變數配置,這裡有點懵逼,以後學習過程中理解了再來更新。 PARA_EXP 用於自定義功能塊中巢狀函式快的關聯資料,可以出現在面板的輸入輸出管腳。比如自定義功能塊裡面引用了一個系統自帶的量程轉換功能塊,兩成轉換功能塊需要定義輸入輸出範圍,那麼這範圍就可以使用PARA_EXP引數來傳遞,在使用這個自定義功能塊時,通過外部變數來傳遞輸入輸出量程範圍。 MP_EXP用於自定義功能塊中使用的系統功能塊的訊息類資料,比如自定義功能塊引用了模擬量監控功能塊,其報警限值可以用MP_EXP類資料在外部定義,參考我前面一篇部落格。 說到這裡,就把幾種型別給說完了,後面的部落格結合實際的練習來體會一下各種型別引數的應用。