NI產品與技術 討論區

取消
顯示結果 
搜尋替代 
您的意思是: 

有關事件迴圈的問題

請問一下  我使用事件迴圈 他的觸發事件 是否不能用輸出當作觸發
不然怎麼我設定  輸出值做改變就觸發事件迴圈  結果沒有動作  
0 積分
1 條訊息(共 2 條)
4,498 檢視

hi Kthard

LabVIEW的使用手冊(在以下的連結)中有說明,Event只對使用者直接操作的介面產生反應,它不會對VI server、global variables、local variables和其它利用程式來改變front panel上物件的值的方法產生反應。
因為Iteration是利用程式來改變物件的值,所以LabVIEW的Event不會產生反應。

http://digital.ni.com/public.nsf/websearch/9D572B8EC475972686256D1A002E6569?OpenDocument

additional info

Title:  
Event Structure Does Not Capture the 'Value Change' Event When Values are Programmatically Changed

Problem:  
Using an Event Structure, I configured a case to execute when there is a Value Change of an indicator on my front panel. In my VI, the indicator is sent a value from another part of my code. When I run the VI, I can see the indicator value changing, but the code in the event case that I configured never executes. Why is the Event Structure not registering the Value Change of my indicator?

Solution:  
The Event Structure only registers events generated by direct user interaction with the front panel. In this example, the indicator value is changed programmatically, thus LabVIEW does not capture the Value Change event. However, if you clicked on the indicator (on the Front Panel) and manually changed the value, the Event Structure would register the Value Change of the indicator. Furthermore, Value Change events do not occur if you use VI Server, global variables, local variables, etc. to change VI or front panel objects programmatically.

There is one exception: Events for controls and indicators can programmatically be generated with a property node, using the property Value (Signaling). This write-only property creates an event that acts like a front panel value change each time it is written. Beware of using this property in a loop, however, because if it is written in each iteration of the loop, it will generate a value change trigger for each iteration, regardless of whether the value was actually changed.

In LabVIEW 7.1 or earlier, refer to the LabVIEW User Manual (linked below) for more information on registering for events. In LabVIEW 8.0 or later, refer to the User Events topic in the LabVIEW Help (linked below).

super

 


0 積分
2 條訊息(共 2 條)
4,440 檢視