kingson Posted October 27, 2004 Report Share Posted October 27, 2004 Hi all, I intend to programatically generate a Value Changed event for a latched boolean control. just because I want to reuse the process code for this evnet while it is not convenient to put it in a sub-vi. I tried to link a boolean constant TRUE to the property Value(Signaling), but get an error that this doesnt work for a latched boolean control. Is there any way out? Thanks. Quote Link to comment
kingson Posted October 27, 2004 Author Report Share Posted October 27, 2004 Hi all,I intend to programatically generate a Value Changed event for a latched boolean control. just because I want to reuse the process code for this evnet while it is not convenient to put it in a sub-vi. I tried to link a boolean constant TRUE to the property Value(Signaling), but get an error that this doesnt work for a latched boolean control. Is there any way out? Thanks. 2484[/snapback] I just come up with a workaround in which I use switched boolean instead of latched. I can access its property Value(Signaling). Then in the Value Changed event process, I wire a FALSE constant to the local variable of this boolean control to reset the value. Quote Link to comment
todd Posted October 27, 2004 Report Share Posted October 27, 2004 Here's how I reset the button and catch errors. Quote Link to comment
kingson Posted October 28, 2004 Author Report Share Posted October 28, 2004 Here's how I reset the button and catch errors. 2488[/snapback] Will the "Delete Selected" Value Changed event executed again when you reset its value? What I did is examplifed in the attached file. Download File:post-915-1098975601.vi Quote Link to comment
todd Posted October 28, 2004 Report Share Posted October 28, 2004 Will the "Delete Selected" Value Changed event executed again when you reset its value? No. It would execute again If the property was 'Value (Signaling)' instead of 'Value'. I haven't yet installed 7.1. Quote Link to comment
kingson Posted October 29, 2004 Author Report Share Posted October 29, 2004 No. It would execute again If the property was 'Value (Signaling)' instead of 'Value'.I haven't yet installed 7.1. 2511[/snapback] Not to make it excute twice is most I am concerned now. The demo above runs well locally but if I control it remotely from a web browser, it will get executed once again. After spending quite some time, incidently I popup a dialog in the event processing, and then the second event doesnt show up. This demo will show two different results when you select to popup dialog or not. Run it by Tool->Web Publishing Tool...->Preview in Browser So now I am confused with the Labview event processing. Maybe the popup dialog prevents the second event. Download File:post-915-1099040052.vi Quote Link to comment
kingson Posted October 29, 2004 Author Report Share Posted October 29, 2004 Finanally I give up singaling value to generate an event. I turned to make the process as a user event, and generate this user event wherever its needed. This works like the helper function in other language(pseudo code). void onOKButton() { saveHelper() } void onSaveButton() { saveHelper() } void saveHelper() { //do the real work } You can say this can be done easily in subVI. But in my case, the subVI input parameters consume a lot space which I cant fit it in. Download File:post-915-1099046286.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.