03-09-2009 02:33 AM
i have a problem with this structure
when give "A" data inserts at "A" and made some calculations
this happens when i give "B" too.
now, i want to make add this two values,
as example , i give number 300 at "A" and then i give 100 at "B"
i want to see somewhere the result of this two values 300+100=400
but i can't get value A to structure B and reverse.
has someone an idea how can i do this?
maybe i use another structure or what?
03-09-2009 03:09 AM
Hi thessalon...,
you should use a loop and store your data in a shiftregister. Maybe you should also use an event structure or is it a subvi?
Mike
03-09-2009 05:18 AM
03-09-2009 05:40 AM
Your VI lacks of a valuable architecture. You could use a User Interface Event Handler (not available in LV Base) or a State Machine to implement your code.
thessaloniki wrote:
[...]i want to see somewhere the result of this two values 300+100=400[...]
Where is "somewhere"? Should this addition take place every time? Are there any other equations which should be selectable?
Placing data in shift registers in order to know "older values" is a good idea; using variables (local or gloabl) is, in general, a bad idea....
hope this helps,
Norbert
03-09-2009 06:49 AM
can you show me how can i do this with shift registers?or local variables?
actually i have A,B,C,D,E,F cases
A and B together
C and D together
E and F together
this will happen all time.
03-09-2009 07:34 AM
Hi thessalon...,
see "file -> new..." for some programming architectures. This examples show also how to work with loops and shiftregisters.
Mike