04-23-2019 09:25 AM
Maybe the OP doesn't understand that things can be done in parallel, as well. Perhaps a look at producer/consumer or QMH?
04-23-2019 10:45 AM
@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.
04-23-2019 10:48 AM
04-23-2019 10:59 AM
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?
04-23-2019 11:06 AM - edited 04-23-2019 01:37 PM
@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.
04-23-2019 11:09 AM - edited 04-23-2019 11:56 AM
@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).
04-23-2019 11:31 AM
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.
04-23-2019 11:55 AM
@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.
Ben
04-23-2019 12:22 PM
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? 🙂
04-23-2019 12:43 PM - edited 04-23-2019 01:32 PM
@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.