LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

structure problem

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?

0 Kudos
Message 1 of 6
(2,880 Views)

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

Message 2 of 6
(2,868 Views)
Use Local Variables, or, Shift Register
0 Kudos
Message 3 of 6
(2,852 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(2,847 Views)

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.

 

0 Kudos
Message 5 of 6
(2,833 Views)

Hi thessalon...,

see "file -> new..." for some programming architectures. This examples show also how to work with loops and shiftregisters.

 

Mike

0 Kudos
Message 6 of 6
(2,816 Views)