取消
显示结果 
搜索替代 
您的意思是: 

button does not pop back.

Hi,
I trigger  a dialog on mouse down event on one button which is located on my GUI. But  after the user finished the dialog the button that invoked the dialog does not pop back. Is the button supposed to pop back automatically or am I supposed to programatically pop it back?
Thanks.


0 项奖励
1 条消息(共 14 条)
4,365 次查看
What is the "mechanical action" setting?
 
(Latch action booleans will reset once they are read by the code, so make sure they are inside the releveant loop or event case. Why don't you use "value change" instead of "mouse down"?)
 
2 条消息(共 14 条)
4,356 次查看
Hmm,
I just checked the button and it says  "Latch when pressed". Will changing event to "Value change" help me?
0 项奖励
3 条消息(共 14 条)
4,352 次查看


RSibagatullin wrote:
Hmm,
I just checked the button and it says  "Latch when pressed". Will changing event to "Value change" help me?

No, this will not help. In order for a latch action boolean to revert, it needs to be read by the code, i.e. be in the dataflow. If the terminal of the boolean is somewhere random on the diagram there is no garantee that it will get read after a press (e.g. If the terminal is outside the main while loop, it will be in the dataflow exactly once at the start of the program and then never again).
 
Why don't you attach a simplified version of your program so we can see where the problem is. 
4 条消息(共 14 条)
4,329 次查看
Is the block diagram terminal for the button located in the event frame so
that it is read after being pressed?


0 项奖励
5 条消息(共 14 条)
4,320 次查看

It does sound like the button does not get processed...  Can you post your code?

 

R

6 条消息(共 14 条)
4,301 次查看

Hi RSibagatu,

 

This article (Using Events with Latched Boolean Controls) explains the caveats about using Boolean controls with Event Structures.

 

(It sounds like you might need to put your control inside the event case.)

 

Best of luck,

Kevin S.

Applications Engineer

National Instruments

Message Edited by Kevin_S on 08-13-2008 11:38 AM
0 项奖励
7 条消息(共 14 条)
4,278 次查看

For the frequent flyers here on the Forum....

 

I have personally wittnessed a sticking boolean* both in LV 8.2 and LV 8.5. 8.5 seems much better but I have still seen them stick in LV 8.5.

 

Ben

 

 * Its a real pain when you press the emergency stop button, it sticks and your customer is standing there giving you a puzled look. The good news was there was a complete mechanical back-up safety system implemented "just in case".

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 项奖励
8 条消息(共 14 条)
4,275 次查看

Just for completness, I am wondering about "mouse down" and "value changed" in this context.

 

Is there protection in the code or could there possibly be a race condition? I assume that "mouse down" occurs before "value change", so it is conceivable that a mouse down event could leave the boolean unread for the current event. I have not done any tests, just curious. 🙂

0 项奖励
9 条消息(共 14 条)
4,268 次查看

Hi,

I have attahched the code of the  event trigger. The button by itself is outside the while loop.

Thanks. 

0 项奖励
10 条消息(共 14 条)
4,252 次查看