Home
Support
我如何將 TestStand 的值傳到 LabVIEW 的叢集〈 Cluster〉中?
我如何將 TestStand 的值傳到 LabVIEW 的叢集〈 Cluster〉中?
主要軟體:
主要軟體版本: 4.0
主要軟體修正版本:
次要軟體: N/A
問題: 我的 LabVIEW code 有一個 Cluster 而我想將值從 TestStand 傳遞進去。當我設定了參數並且傳送到我的 LabVIEW module 時發生了下述的錯誤訊息:-17311; Could not accept the parameters passed in 為什麼會這樣?那麼我要如何傳送資料到 LabVIEW 的 cluster?
解答: 要將參數傳到 LabVIEW,要先在資料格式〈Data Type property〉 對話框的
Cluster Passing 分頁中啟動 cluster passing 的選項。
由於我們只能透過自訂資料格式〈custom data type〉才能更動 data type 的 property,我們必須先建立一個 custom data type 才能傳送物件〈object〉到 LabVIEW 的 cluster 中。
以下的範例說展示了建立 custom data type 最快的方式,並且利用這個 data type 傳送參數到 LabVIEW 模組〈module〉中。
- 在您的 sequence 中加入一個 action 的 step,然後呼叫一個包含 cluster 輸入的 LabVIEW 模組。
-
在 Step Settings 面板中,選擇 Module 分頁,接著在參數列表的 Type 下按下 Create Custom Data Type... 按鍵。

-
為您的 custom data type 命名,接著在
Create Custom Data Type From Cluster 對話框中按下
Create 按鈕。

-
接下來,在參數面板〈Parameter〉按右鍵選擇
insert parameter » Types» < 您的 Custom_Type> 來產生您的要用來傳送參數的 custom type,並為這個參數命名

您現在已經可以將參數由 TestStand 中傳入 LabVIEW 的叢集中。如果您注意的話,在 data type property 的對話框中,
cluster passing 的分頁裡面的 cluster passing 選項已經被啟動了。
相關連結:
附加檔案:
報告日期: 10/17/2007
最後更新: 11/08/2007
文件偏號: 4EGISTA0
Other Support Options
Ask the NI Community
Collaborate with other users in our discussion forums
Request Support from an Engineer
A valid service agreement may be required, and support options vary by country.