HI Sir
在研究configuration file後,還是不懂如何使用,
能否提供範例呢?
假設我要設計一程式,且其要給的參數時常要更改
,想使用load file方式來取代修改程式內碼,是用
configuration file好?還是使用load excel好?
或是有其他方式?(因其數據眾多,以excel為例,
在A1,B1,C1....處為TITAL{數據的名稱}而A2,B2,C2....
則為其數據{此數據既為要LOAD到程式內碼的參數)
想利用這種方式來自由選擇要使用的參數去執行,這樣就不需
時常要改內碼了。
EX:
FREQUENCY POWER
180K 45
260K 56
350K 61
其格式入上所述,除了Frequency power不需load到程式碼內
其餘皆要,我現行是採用2d array來寫的,但若其參數一改變,則又要
改變程式內碼(數據有好幾百個),這樣會很耗時,所以想改用load file方式來取代
現形用Case Structure又會開好幾十層(此做法不是很好,又會造成人機介面複雜)
因此想改其他方式來完成,所以只點一下有何方式可以取代的?
11-10-2009 07:24 PM - 已編輯 11-10-2009 07:28 PM
Using Configuration File I/O will let you have better manipulation of the data... such as, 180K (freq.) as Key and 45 (pwr) as Data...
You may get the Power for a given Frequency i.e. 180K, simply by a Read Key function
Section name could be i.e. [Frequency-Power]
PS: here is one example of using Configuration File I/O for language select I posted earlier on in the NI Japanese Forum
http://forums.ni.com/ni/board/message?message.uid=863224#U863224
在 11-10-2009 08:57 PM
如果有解決到您的問題麻煩您勾選已接受解答,並且給我一個獎勵!謝謝~~~