LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop problem

Hi All,

Now I have a problem I wanna solve. Inside a while loop I have two (2) flat sequence structures. It is apparent that if I have different values for X any Y, they will arrive at the destination after different times. Is there a way I can make X and Y get to the final destination at the same time say after 5 seconds if they have different values? Any suggestion or clues will be highly appreciated. Attached is my simple Vi

 

 

Kind Regards,

Opuk

 

 

0 Kudos
Message 1 of 3
(2,982 Views)

the data flow paradigm means, that your hardware-write will wait until both inputs have arrived,

so there really is no need to have the flat-sequence structures for this,

 

i use them to only check the STOP var at the end (which might be useful for long-execution-loops)

 

 fun.png


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 3
(2,951 Views)

Opuk wrote:  It is apparent that if I have different values for X any Y, they will arrive at the destination after different times. Is there a way I can make X and Y get to the final destination at the same time say after 5 seconds if they have different values?

What exactly do you mean by "destination"?  The final value of the output?

 

You could do the math to see how large of steps you need in order to reach your destination in N steps.  Store that value in a shift register and keep stepping by that value until you reach your final value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,921 Views)