ABB AC900F學習筆記30:freelance 2019 自定義功能塊引數儲存型別
阿新 • • 發佈:2021-08-07
前面一篇部落格在記錄學習自定義功能塊時,定義的引數有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_DPS就是執行在過程站上自定義功能塊的內部變數,基金用於內部計算,不能在對話方塊編輯時放到某一組,它們不會出現在自定義功能塊的輸入輸出管腳上。換句話說,在引用自定義功能塊的時候,不能夠將外部某個變數的數值直接傳遞給這個內部變數。也正因為這樣,如果自定義功能塊裡面引用了系統自定義的面板,比如變數監視、量程轉換、PID等等,就不能將VAR_DPS用於這些面板引數的傳遞。 PARA_DPS 就是用於過程站程序處理的值的配置。有點繞。比如,操作模式的切換(手動、自動)。這類數值可以通過面板讀和寫。能夠在除錯模式下讀取和修改數值。 PARA_VIS僅用於面板上特定範圍顯示文字變數配置,這裡有點懵逼,以後學習過程中理解了再來更新。 PARA_EXP 用於自定義功能塊中巢狀函式快的關聯資料,可以出現在面板的輸入輸出管腳。比如自定義功能塊裡面引用了一個系統自帶的量程轉換功能塊,兩成轉換功能塊需要定義輸入輸出範圍,那麼這範圍就可以使用PARA_EXP引數來傳遞,在使用這個自定義功能塊時,通過外部變數來傳遞輸入輸出量程範圍。 MP_EXP用於自定義功能塊中使用的系統功能塊的訊息類資料,比如自定義功能塊引用了模擬量監控功能塊,其報警限值可以用MP_EXP類資料在外部定義,參考我前面一篇部落格。 說到這裡,就把幾種型別給說完了,後面的部落格結合實際的練習來體會一下各種型別引數的應用。