LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ligar vi a otros vi

Buenas, soy nuevo en esto y  quisiera preguntar como podria ligar un programa que tengo el cual contiene 10 productos, en este caso una taqueria, la cual quiero que se le puedan modificar los precios de los productos y que se guarden para poder ser usado por otro vi el cual dandole click a un boton contabiliza la cantidad del producto seleccionado, y un total a pagar. Necesito ayuda ya que estoy en acto desesperado :c

0 Kudos
Message 1 of 3
(2,201 Views)
I'm not exactly sure what you are asking but that VI is just a mess. The local variables are being misused and you should never, ever use an equal comparison with floating point numbers. It doesn't appear you have any wait in the loop so it just spins at a high rate. This is known as a greedy loop.

I would suggest using an event structure and getting rid of all (or at least most) of the locals.
0 Kudos
Message 2 of 3
(2,150 Views)

As Dennis said, you have a jumble of local variables, many identical, and many directly next to their respective terminals. If you do an equal comparison of a terminal with it's own local variable, you will get an equal unless there is a random race condition. Storing the same value in a shift register and via a local variable makes no sense either.

 

You boolean logic seem to be completely useless. to have a value equal to itself AND equal to zero can only happen if everything is zero and there are easier ways to test for that. Why don't you connect your indicators to the code?

 

I won't guess on greedy loop conditions, because we don't see the entire diagram, so there could be a wait somewhere. 😉

 

Can you attach the actual VI? All you probably need is a while loop and a small event structure.

0 Kudos
Message 3 of 3
(2,139 Views)