From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean array not changing every time for loop runs

I'm trying to make a stepper motor go forwards and ackwards for a certain number of seconds but when I do this code the boolean array does not alternate. I've tried the same setup but just with a signal in the program and it works so I do not understand why it doesn't work in this setting. 

0 Kudos
Message 1 of 4
(2,052 Views)
Check Boolean array indexing on for loop. It executes based on input terminal counts, suppose one of the Boolean array is having only one element in an array it'll execute at once.
0 Kudos
Message 2 of 4
(2,044 Views)

indexing is on on the loop. 

0 Kudos
Message 3 of 4
(2,020 Views)

You inner loop will never stop because the stop button is only read before the FOR Loop even starts.  You need to move the control to be inside of the While Loop.  Then, when you press stop, you will see the opposite condition.


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 4 of 4
(2,014 Views)