LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW software applications

THe following code is not working with the do-while loop. If i comment out the "do" and "while" then it works but can not continuously run. The input and output are all wired.
outiii=iii;
xaT=111; yaT=222; xbT=333; ybT=444;


do{
if (xaMean>0.55 || yaMean>4) {
xaT= 10;
yaT= 10;
xbT= 10;
ybT= 10;}

} while( iii=10)
0 Kudos
Message 1 of 4
(3,002 Views)
Post the vi to illustrate your point.
0 Kudos
Message 2 of 4
(3,002 Views)
I attach my vi here. I need outputs xaT..ybT to be updated while do-loop is running according to the input xaMean, yaMean.
The purpose of this example is as follows:
First I need to initialize Targer volatage array ( not the default zeros). And then the loop continuously checks the input to change the Target voltage array and outputs the new values to the Target voltage. But the code traps in the loop and nothing happens in the output.
This simple example can be very easily run in Matlab or C but so difficult in LabVIEW.
0 Kudos
Message 3 of 4
(3,002 Views)
Your problem was answered in the post here. Even once you fix the problem with using = instead of == for comparison, the while loop will always runs since iii is never updated.
0 Kudos
Message 4 of 4
(3,002 Views)