LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with Dynamic Events

Solved!
Go to solution
Solution
Accepted by topic author rhodesengr

You are missing the generate user event call, that I had put in the "Case1:Value Change" event case (see below).

 

Notice that I am not sure what you are trying to accomplish. I have just answered your specific questions about user events.

 

 

simple two LED Event Case Structure (mod)_BD.png

Marc Dubois
HaroTek LLC
www.harotek.com

Message 11 of 17
(234 Views)

Got it. Thanks so much. I have it working both ways now but the Generate event method is better and would allow event cases to cascade one after another. 

0 Kudos
Message 12 of 17
(231 Views)

@rhodesengr wrote:

Got it. Thanks so much. I have it working both ways now but the Generate event method is better and would allow event cases to cascade one after another. 


Watch out for an avalanche!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 17
(226 Views)

@Ben wrote:

@rhodesengr wrote:

Got it. Thanks so much. I have it working both ways now but the Generate event method is better and would allow event cases to cascade one after another. 


Watch out for an avalanche!


Agree with Ben here.  You have to be VERY careful when you have cascading events due to an Event case causing another event.  You might be better off using a Queued Message Handler and then the event case just queues up all of the things the QMH is supposed to do.


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 17
(214 Views)


Agree with Ben here.  You have to be VERY careful when you have cascading events due to an Event case causing another event.  You might be better off using a Queued Message Handler and then the event case just queues up all of the things the QMH is supposed to do


What is the downside of one case triggering another?

0 Kudos
Message 15 of 17
(205 Views)

@rhodesengr wrote:


Agree with Ben here.  You have to be VERY careful when you have cascading events due to an Event case causing another event.  You might be better off using a Queued Message Handler and then the event case just queues up all of the things the QMH is supposed to do


What is the downside of one case triggering another?


It is very easy to create a circular string of Events that you cannot break (A to B to C to A, etc), along the same lines as to why we state to not let a Queued Message Handler queue up tasks for itself.

 

Plus, it becomes hard to follow.  Case A to Case B to Case C is a lot of clicking to see the full chain.  Where if you used a QMH, the single case queues up all of the tasks to be done and you have a simple high level of what is being done right there in a single case.  You can dive into the QMH if you want to see more details.


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 16 of 17
(186 Views)

@rhodesengr wrote:


Agree with Ben here.  You have to be VERY careful when you have cascading events due to an Event case causing another event.  You might be better off using a Queued Message Handler and then the event case just queues up all of the things the QMH is supposed to do


What is the downside of one case triggering another?


Adding to what Tim already wrote...

 

Chaos

 

Seldom a good thing in software.

 

I still want to urge that the cod you want to put in each of theses events should be in sub-VI's. One for each event. When you find you need to implement some type of sequence, you string the sub-VIs together and sequence the operations using data flow. Doing it that way makes it obvious to the reader of your code (could be you someday!) what order is being implemented. After all this is LabVIEW not HPVee.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 17 of 17
(180 Views)