LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I register for the timeout Event dynamically

Solved!
Go to solution

What's wrong with having it all in a single event structure?  Typically, event structures are just for user value changes and some other GUI events that occur not often.  So having a timeout case that is sometimes enabled is a common thing (at least in my designs).

 

What is your actual goal here with the second loop?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 18
(1,988 Views)
Solution
Accepted by topic author max_

Again, I want to switch on and off the timeout event.

Read the link in the first post to understand why.

 

At certain times, it makes no sense to run the timeout so I want to disable it.

 

I dropped the idea of using the timeout event entirely and went for a simple loop. Works fine.

Busy waiting for the win.

0 Kudos
Message 12 of 18
(1,985 Views)
Does the example actually use two different event structures? You ate needlessly complicating things it would seem.
0 Kudos
Message 13 of 18
(1,984 Views)

@Dennis_Knutson wrote:
Does the example actually use two different event structures?

The answer to that is no.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 14 of 18
(1,978 Views)
I knew that. It was a rhetorical question in response to the 'it's pretty much the same as the tutorial' comment.
0 Kudos
Message 15 of 18
(1,971 Views)

My point was the handshake between parallel loops/event structures. Especially when you handle the timeout event. This latter may break the communication flow under certain circumstances, that's to avoid.

Reg/unreg events is really useful, but what you're seemingly trying to do is out of the scope of the tutorial.

Create a queue, or a user event (like nathand's highly acceptable suggestion :)) so that you have a user-defined mechanism whose lifecyle is handled more smoothly.

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 16 of 18
(1,968 Views)

I had the timeout in the other loop previously.

I wanted to change it to run in parallel to the other loop and only occasionally.

 

The question wasn't if the event is necessary, but whether it's necessary to change a lot of code and the tutorial seemed to answer that question with no.

0 Kudos
Message 17 of 18
(1,957 Views)

Heck,

 

Max's code in message 4 is so close to working if he understood dataflow in LabVIEW a bit better.  If he added an event case for the "NUmerisch" indicator for Value Change, then instead of righting to a local variable of the indicator used a Value(signalling) property node.

 

Then it will work properly in the design architecture he really wants to use and doesn't use User Events like Nathan's example.

 

I would use Nathan's example if it was my project.

0 Kudos
Message 18 of 18
(1,947 Views)