LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate event on other control within one event

Value(Signaling) property means that the value does not have to actually change, only has to be written to, even with the same data as before. The variable value may not have changed, but an attempt was made to write a value to the variable. NI makes the statement in an effort to make users realize that this special property was created specifically for use in generating events programmatically, which is exactly what is being done in the example vi.
- tbob

Inventor of the WORM Global
0 Kudos
Message 11 of 20
(1,901 Views)
Also Bob,
My program is in LV6.1. The property you used does not seem to be available in 6.1

Thanks
Sandeep
0 Kudos
Message 12 of 20
(1,901 Views)
Sorry, this was just an oversight by me. The timeout needs to get a "-1" after event #2. To fix, I just moved one tiny wire in the attached example and now it works as designed. HTH.

(The timeout is usually infinite, except after event 1 or event 3 have just executed. In these cases the timeout is zero (default output) and the timeout event occurs. The timeout event then resets the timeout value back to -1 (infinite).)
0 Kudos
Message 13 of 20
(1,698 Views)
As mentioned earlier, LabVIEW 6.1 only has "value" property nodes, and not "value(signaling)" property nodes. Plain value properties will not trigger events.

You need to use a workaround, such as the modified example I posted today (Trigger_Other_EventMOD2.vi)
0 Kudos
Message 14 of 20
(1,698 Views)
That Works in LV6.1 as well, Altenbanch.
Thanks much for help.

Best Regards
Sandeep
0 Kudos
Message 15 of 20
(1,698 Views)
Thanks much, Bob for your help.
It works with LV7. and you also introduced me to a new property.

Thanks again.
Sandeep
0 Kudos
Message 16 of 20
(1,901 Views)
Can I do it on 'Non-Time out event' ?
I must not use timeout event for the same.
Thanks
0 Kudos
Message 17 of 20
(1,698 Views)
Of course! There are dozens of possibilities to achieve what you need, you just need to be a bit creative. Attached is a version that uses a second case structure to execute the button2 events in its "true" case. It executes after events 1,2, or 3 have been fired, but not after a timeout.

Of course easiest would be to upgrade to 7.1, where you can simply use signaling properties. 😉
0 Kudos
Message 18 of 20
(1,699 Views)
Dear altenbach,

This post has been really interesting to learn and i am hoping to do something fairly similar to what Sandeep is trying to achieve. Am i right to understand that Sandeep is achieving:

1) if button 2 is pressed, ONLY event of button 2 is executed.
1) if either button 1 or 3 is pressed, events of either button 1 or 3 is FIRST executed THEN event of button 2 is executed ???

May i ask then if there is a simple modification for the VIs that you have posted here, but doing a bit of the opposite of what Sandeep is trying to achieve please?

The process i want to achieve is:

1) If i Press button 2, it only executes the event in button 2
2) if i press button 1, it FIRST executes event of button 2 THEN executes the event of button 1

I look forward to hear of your discussion. Thank you for your kind attention.

Regards,
tmntic


P.S.: I am working on LabVIEW 8.0
0 Kudos
Message 19 of 20
(1,501 Views)
Use a queued message handler.

In event 2 send first the Q2 message (this is an example name)
I event 1 send first Q2 then Q1 messages.

Or use 1 event for both buttons. If button 1 is pressed do the extra stuff you want. The detection is done via the ctrl-refnum returned by the event case.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 20 of 20
(1,483 Views)