LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution order issues

I'm have some case structures in a program that need to execute in a certain
order. However, nesting them in a sequence would mess up the entire program
organization. Right now, though, one of them is executing before I want it
to (it depends on globals which are modified in the other cases, and thus is
getting incorrect values by executing too early).

Is there a way to influence the program to execute some portion of the
diagram before another part? I've thought of running a dummy constant
through all the cases in order, but that's an awful hassle, too, and seems
pretty kludgy. Hopefully there's a more elegant way of doing it?

Thanks!

Justin Goeres
mailto:jgoeres@indiosystems.com
Project Engineer
Indio Systems, Inc.
0 Kudos
Message 1 of 3
(2,654 Views)
I believe one way(and perhaps the best?) would be to use occurences. They're
pretty easy to understand, and I'd suggest looking at the example under 'Execution
Control.' Essentially, using an occurence(found in ::,
you can keep one part of a vi from doing anything until a condition is met
in another part of the vi.

"Justin Goeres" wrote:
>I'm have some case structures in a program that need to execute in a certain>order.
However, nesting them in a sequence would mess up the entire program>organization.
Right now, though, one of them is executing before I want it>to (it depends
on globals which are modified in the other cases, and thus is>getting incorrect
values by executing too early).>>Is there a
way to influence the program
to execute some portion of the>diagram before another part? I've thought
of running a dummy constant>through all the cases in order, but that's an
awful hassle, too, and seems>pretty kludgy. Hopefully there's a more elegant
way of doing it?>>Thanks!>>Justin Goeres>mailto:jgoeres@indiosystems.com>Project
Engineer>Indio Systems, Inc.>>>
0 Kudos
Message 2 of 3
(2,654 Views)
"Justin Goeres" writes:

> I'm have some case structures in a program that need to execute in a certain
> order. However, nesting them in a sequence would mess up the entire program
> organization. Right now, though, one of them is executing before I want it
> to (it depends on globals which are modified in the other cases, and thus is
> getting incorrect values by executing too early).
>
> Is there a way to influence the program to execute some portion of the
> diagram before another part? I've thought of running a dummy constant
> through all the cases in order, but that's an awful hassle, too, and seems
> pretty kludgy. Hopefully there's a more elegant way of doing it?
>
> Thanks!
>
> Justin Goeres
> mailto:jgoeres@indiosystems.c
om
> Project Engineer
> Indio Systems, Inc.

Justin,

I'm a quite radical follower of data flow programming. It's all you need.
A (too) radical wishlist item to NI:

What about removing
- sequences,
- global (and local?) variables,
- occurrences and other sync functions (keeping semaphores) and
- basic, non VISA I/O (While we are at it)
from the factory default functions palette?

A simple state machine vi as a template might help a lot...

This way beginners are forced to make good code from the start. You
_need_ to take a different approach to G than to C. I've seen
too many projects growing bigger than the "muddling through" approach
can handle. But that's what consultants live from...

Johannes Niess
0 Kudos
Message 3 of 3
(2,654 Views)