11-20-2010 10:04 AM
Hi,
I'm new on LabVIEW and I'm trying to learn for myself.
You have been a great help, because there are many ways to do some programs, but use the most efficient manner, and know which one is that manner, is not always easy.
Regarding the state machines, I always used that, because I thought that's a way to organize the code, but I realized that's not always necessary. It's a good policy to do that or the program loses efficiency?
Regarding parallel loops, I'm trying to understand the best way to pass data between loops. From
what I read in the forum, I saw that there are several forms, action
engines, queues, occurrence, notifications, beyond local
variables, which I had realized that shouldn't be used very much.
To accumulate the data into arrays, I'm using action engines. But when it comes to pass only one variable, for example, to stop the program, what should I use?
Thanks for your help
Sílvia
11-20-2010 11:14 AM
@sreis wrote:
But when it comes to pass only one variable, for example, to stop the program, what should I use?
Often, you don't need to use much.
11-20-2010 12:32 PM
You talk pretty fluent about architectural issues. So better say:
I'm new on LabVIEW
Welcome.
All the options you mentioned to communicate between parallel loops are good. In most cases there isn't an objective better way. It's more a matter of personal taste. This is the step where coding becomes an art.
Here a short list of recommended readings:
I guess about Action Engines, you already read Ben's über-nugget.
For shuting down both loops of a master slave architecture (queues, notifiers), check my discussion of this issue in my queue nugget.
If you need a many-to-many communication, user events are greate. Enjoy my event nugget.
A very valuable ressource on design issues is LAVA. There is a subforum concerning architectures.
And also locals are bad style, they can be very usful as duct tape.
Felix
11-22-2010 05:50 AM
Hi,
Thanks for your help, I will read everything you advice. I've already read some, and found them very interesting.
But I think I will use queues.
Thanks,
Sílvia