Jump to content

how to generate a button clicked event


kingson

Recommended Posts

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.

Link to comment
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.

Link to comment
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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.