LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting a value from a while loop to input back into the loop

This program is supposed to recognize an input voltage of 5V and then proceed to start the vertical bar picture box moving either left or right, per the users choice. The user can also input the desired bar width, scroll speed, and cycle duration (time to get from left to right and back). I want the picture box to move left and right repeately and smoothly. On frame #3, I created what I believe to be a state machine. The outer while loop should obtain the resulting position value from the inner while loop and then use that value as the new starting position. For some reason, the picture box will start moving left (if "Left" is chosen as the initial direction) and then remain on the left while shaking. It should rather move from the left back to the right and back left again. How do I fix this problem?
Thank you!!
 
(the first attachment is with the state machine.
the second has the same problem as the first but has a less complicated format)
 
0 Kudos
Message 1 of 4
(2,392 Views)
Here's a solution that I threw together quickly so it is not the cleanest code. This will scroll the picture as you have indicated
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 4
(2,380 Views)

I am unable to view your changes because I only have LabView 7.0. Could you post print screen images of your changes?

Thank you so much!

0 Kudos
Message 3 of 4
(2,359 Views)
Andrew,
 
Thank you for your help. FYI I got the program to work (I erased the wire leading to the set start time of the time function within the inner loops. The program works perfectly!!
 
 
0 Kudos
Message 4 of 4
(2,349 Views)