LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute order of an event trigged by other event

Solved!
Go to solution
Highlighted

Maybe the OP doesn't understand that things can be done in parallel, as well.  Perhaps a look at producer/consumer or QMH?

0 Kudos
Message 51 of 63
(335 Views)
Highlighted

@TITANs, CLAD, Knights of NI 🙂

 

"Jacobson - Insider Titan; NI employee, spiller of secrets

RavensFan - General Purpose Titan; hobby leaving wine at Poe's grave site

Intaris - FPGA Titan; hobby refactoring FPGA code

altenbach - Efficiency titan; hobby reducing block diagrams to postage stamps

Kevin_Price - DAQmx Titan; hobby does an excellent Fozzie Bear impersonation

Ben - Action Engine Titan; hobby developing natural water springs"

 

Well, it's obvious you all have no clue of how to resolve my question - "the Event execution order" in LV - but I do NOW. From the beginning, Either you're (TITANs) criticizing or answering diversity which hopefully steering away the subject in question. Excuses like ":valsgnl" is a trigger, execution as FIFO arrangements, making 2 loops, blah blah blah!.  and that's the way it is. Well, shame on you masters!

 

Finally, I figure it out that Nation Instument LV SW design engineers added the "USER EVENTS" features just to solve this kind of (FIFO) problems existed. Here is the solution for those who want to LEARN!  THE PROBLEM SOLVED BY THE OP ha ha.

 

0 Kudos
Message 52 of 63
(311 Views)
Highlighted

@John4191

Would you mind posting the VI. I am curious to see how it works.

 

Cheers,

mcduff

0 Kudos
Message 53 of 63
(308 Views)
Highlighted

Oh wait, so you're now saying it's do-able? Well I'll be.....

 

Does that mean

 

For my current situation, I guess that I have to repeat the read code in the write event. There's no choice. As I thought, Labview has its strong/weak points period!

 

is somehow less than 100% correct?

 

0 Kudos
Message 54 of 63
(300 Views)
Highlighted

@John4191 wrote:

If there's a competitor, LV is not my choice... 🙂


You don't have a problem with LabVIEW, but a problem with graphical programming in general and the implications of dataflow. Dataflow is the central paradigm that makes graphical programs tick. There are plenty of alternatives, but you would run into exactly the same walls unless you change your way of thinking. If you think you can devise a functional graphical programming language without dataflow, be our guest. That would be revolutionary!  But can you really? Starting with Jeff Kodosky's brilliant concept, LabVIEW has received many decades of refinement and is truly the best that's out there. It would be very hard to beat!

 

In addition to the already mentioned Dunning-Kruger effect, you also seem to be a victim of the fallacy that if you don't like "A", "B" must necessarily be better, even if you know nothing about it. (A powerful tool of political campaigns, but there is no place for it in STEAM).

 

Programming in any form (text, graphical, etc.) share much more similarities than differences. Your "choice" should be to decide if you want to be a programmer or not. The "competitors" here are other jobs (farmer, carpenter, blacksmith, server, artist, accountant, lawyer, etc.). Each require a learning curve, but you can get good at them over time if they make you happy. It seems LabVIEW programming does not make you happy, so run! Find a different job, or field of study!

 

You might also read some of the related discussions.

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 55 of 63
(293 Views)
Highlighted

@John4191 wrote:

THE PROBLEM SOLVED BY THE OP ha ha.


Looks more like a horrible kludge than a solution. 😄

 

(It is not natural to abuse events in this way (even though it is possible, see my earlier example). Events are primarily for dealing with user interactions).


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 56 of 63
(287 Views)
Highlighted

THE PROBLEM SOLVED BY THE OP ha ha.

 


Actually, mcduff already told you about user events back in message 33.  But what you put together looks like a toddler tried to build a LEGO castle using random pieces.  Heaven help whoever has to deal with your code.

0 Kudos
Message 57 of 63
(273 Views)
Highlighted

@Mancho00 wrote:

THE PROBLEM SOLVED BY THE OP ha ha.

 


Actually, mcduff already told you about user events back in message 33.  But what you put together looks like a toddler tried to build a LEGO castle using random pieces.  Heaven help whoever has to deal with your code.




 I suspect the OP did not actually try anything that was suggested or take the time to read what was posted to help.

 

See here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 58 of 63
(261 Views)
Highlighted

As a Knight of NI, I expect you (all) to understand what those hints (pictures) meant But I doubt it hmm. Yes, 'Dynamic user events' has no other meaning but is actually supported for the initial basic designed events of LV. And that's obviously true!

 

One of the Knight of NI may create a vi from the hint, can you? 🙂

0 Kudos
Message 59 of 63
(246 Views)
Highlighted

@John4191 wrote:

One of the Knight of NI may create a vi from the hint, can you? 🙂


I pass, because the code shown in the picture is full of ambiguities and potential race conditions (e.g. can you really be sure that these local variables are written before the loops start or if they are even necessary?). It is not even immediately obvious if you show three independent loops or three views of the same loop.

 

You made the VI and attaching it here would be significantly more efficient for you (taking a screen capture and converting it to an attachable image takes longer!) and us (because it requires efforts to recreate from scratch and many features, such as the event configuration, cannot be determined from an image alone. We don't waste our time duplicating something that already exists!). If you are not willing to do your part, this discussion is over. We are not your puppets.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 60 of 63
(243 Views)