運算子 FloatFieldParamReference

Operator Library: Parameters

此運算子會根據設計中任意位置的欄位參數, 產生一個 1:1 的映射參數(位於「參數欄位」中)。您需在「參數參照」中指定所引用的參數 (路徑與名稱)。

被引用欄位參數的類型可為 VA_DOUBLEFIELD 之一種。 映射參數完全反映被引用參數的所有屬性。

Since there are no field parameters specified in the GenICam standard, the created GenICam API and the created Framegrabber API code (FgLib) vary on this point. In the GenICam API code, the two parameters <DisplayName>_Index und <DisplayName>_Value are created.

您可以在設計階層內定義一個目標,讓參照的參數在該處可見且可存取。目標由兩個參數定義:DisplayHierarchy 與 DisplayName。在 DisplayHierarchy 中,您指定參照 operator 本身所在的同一個處理程序中的階層方塊。在參數 DisplayName 中,您設定目標參數的名稱。如果同時設定了 DisplayHierarchy 與 DisplayName,則由 DisplayName 定義的參數將可在 DisplayHierarchy 所指定的階層方塊中使用。如果 DisplayName 為空,則不會建立參數。如果設定了 DisplayName,但 DisplayHierarchy 為空,則由 DisplayName 定義的參數會新增至父階層(也就是參照 operator 本身所在的階層方塊)。

這讓您可以將設計中的場參數 設定為可在(設計的)任何層級上使用。 例如,您可以將受保護層級方塊內模組的場參數 直接設定為可在該受保護層級方塊本身的屬性下方進行參數化。

已映射的參數本身即可被引用。 因此,您可以引用參數 Field的內容, 或是引用您在參數 DisplayName和DisplayHierarchy 中所定義的參數。 這在 受保護的階層式方塊是由其他受保護的階層式方塊所建構時,尤其重要。

[注意] 所有連接的參數會同時更新

若其中一個相連的參數(被引用參數、地圖參數 欄位或目標參數)發生變更,其他所有相連的參數值也會隨之變更。

此 operator 沒有輸入和輸出,因為它不會干擾設計的資料流結構。

關於 Library Parameters 的一般介紹,請參閱 Library Parameters。

範例:

map 參數 TransformCoeff 現已於 Process0/Level0/Level1 推出:

I/O Properties

Property Value
Operator Type 無(因為沒有輸入或輸出)

Supported Link Format

無

Parameters

Status
Type 靜態讀取參數(儘管 GUI 顯示為寫入)
Default 無
Range OK 或錯誤訊息

顯示錯誤狀態。若參數Activate 設定為Yes, 則會檢查其他模組參數。 此參數會顯示該檢查的結果, 即「OK」或錯誤訊息。

此參數不屬於最終 applet 的一部分。

DisplayName
Type 靜態寫入參數
Default 無
Range 任何字串

若您希望在設計中的其他位置(除了參考運算子實例本身之外) 授予存取被參考欄位參數 (定義於「參數參考」中)的權限, 則需定義一個新參數。 請在此處指定此新參數的名稱。

如果此欄位為空白,則不會建立新參數。

DisplayHierarchy
Type 靜態寫入參數
Default 無
Range 任何字串

在此指定您要附加在參數 DisplayName 中定義的新 map 參數的階層式方塊。

對於此參數,您可以使用自動完成功能和語法突顯。若要使用自動完成,請按一下 此參數在 Module Properties 對話方塊中的 Parameter Values 欄位, 然後按下鍵盤上的 TAB 鍵。如需有關自動完成功能的 更詳細說明,請參閱 'Autocompletion and Syntax Highlighting for Translator and Reference Operators'。

如果您定義了新參數 DisplayName, 但將參數 DisplayHierarchy 留空:新參數將會 新增至包含參考 operator 實例的階層式方塊。 (請記住,如果參考 operator 實例 位於最高(製程)層級,則無法這樣做。)

[注意] 設定顯示目標路徑的語法

若要讓新參數顯示在設計的其他位置, 您需要在 DisplayHierarchy 參數中指定包含新參數之階層方塊的路徑。

語法如下:

<Path> is the relative path from process level to the hierarchical level of the design where the <Hierarchical Box> is located that is to receive the new parameter. Thus, parameter DisplayHierarchy can only address hierarchical boxes within the same process. Use a slash as separator between different hierarchical levels.

<HierarchicalBox> is the name of the hierarchical box that is to receive the new map parameter.

範例: Level0/Level1

索引
Type dynamic write parameter
Default 0
Range UInt

請在此處設定欄位索引。

Value
Type 動態、寫入、讀取參數
Default 0
Range 帶號整數 (64 位元)、無帶號整數 (64 位元)

設定或讀取由參數Index 所指定的欄位值。

欄位
Type 靜態、動態、寫入、讀取參數
Default 無
Range 陣列

用於存取被引用欄位參數的映射參數。 此參數反映被引用欄位參數的所有屬性。

描述
Type 靜態寫入參數
Default -
Range 任何文字

在此輸入參數 Value 的描述。

Reference
Type 靜態寫入參數
Default 無
Range 定義參照參數的任意字串:模組的相對路徑、模組名稱與參數名稱

在此,您可以定義參照參數在設計中的位置。

對於此參數,您可以使用自動完成功能和語法突顯。若要使用自動完成,請按一下 此參數在 Module Properties 對話方塊中的 Parameter Values 欄位, 然後按下鍵盤上的 TAB 鍵。如需有關自動完成功能的 更詳細說明,請參閱 'Autocompletion and Syntax Highlighting for Translator and Reference Operators'。

[注意] 參照語法

The syntax is as follows:

<Path> is the relative path to the hierarchical level where the referenced module "Module" is located. Use a slash as separator between different hierarchical levels. Define the path as relative path from the hierarchical level the reference operator instance is located in.

<Module> is the name of the module (operator instance or hierarchical box) that contains the referenced parameter.

<ParamName> is the actual name of the referenced parameter.

If <Path> starts with a slash, the path is interpreted as absolute path starting from design level (e.g., /Process0/UUT/Transform.Coefficients)。

您也可以使用 ../ 來返回上一層。 不過,在設計可自由複製或可重新定位的模組時,請注意不要使用此選項。

Activate
Type dynamic write parameter
Default 否
Range {No, Yes}

Yes = 已啟用對參照參數的存取以及來自參照參數的存取 (透過對應參數 Value)。

No = 對參照參數的存取及來自參照參數的存取已停用,且 Status 參數已停用。 DisplayName 與 DisplayHierarchy 參數將無效。

Examples of Use

以下範例展示了運算子 FloatFieldParamReference 的使用方式: