06-21-2015 08:24 AM - edited 06-21-2015 08:25 AM
@demarkIV wrote:
I have some trouble with a VI program. I am trying to create a program where a variable X start with a initial value during some ms. Then this variable must be used in another while loop, and the value should be changing continuously after some calculations. I use it just for the first calculation, and then it changes continuously for other calculations.
Maybe a global variable must be used, but I'm not sure.
You already got some good advice from Mike, but maybe you should re-think some of the other points too.
06-21-2015 01:16 PM
Hi Altenbach,
Well first of all thank you very much.
I´ve made lot of changes since the first time, and the program is doing more or less most of the things I need. I am just making small changes to correct anomalies.
As you can see in the image, the numeric indicator doesnt give me the same value that I need from the x/y indicator.
¿Why is it? Would you mind to tell me please?
Thanx
06-21-2015 01:27 PM - edited 06-21-2015 01:29 PM
The numeric indicator only gets updated onafter the loop ends. The X/Y indicator gets updated continually inside the loop.
Now that loop will run only one time, or will run forever depending on the value of the boolean wire that gets passed into the loop. If it is True, it runs for ever and the only way to end the VI is to abort it. If it is False, then the loop only runs one time.
Try doing a block diagram cleanup. You have a lot of backwards running wires making it hard to read. What is the purpose of adding zero to a number?
There seems to be a lot of basic things you still need to learn about LabVIEW. I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
06-21-2015 01:27 PM - edited 06-21-2015 01:28 PM
Duplicated post.
06-21-2015 03:39 PM - edited 06-21-2015 03:39 PM
Please don't attach truncated pictures with wires going in all directions, attach the actual VI instead.
As has been said, you still need to understand dataflow. Run your Vi in execution highlighting mode to see why it makes no sense.