cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Boolean array not changing every time for loop runs

Highlighted

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
(82 Views)

Re: Boolean array not changing every time for loop runs

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.
----
SABARI SARAVANAN M | CLD
0 Kudos
Message 2 of 4
(74 Views)

Re: Boolean array not changing every time for loop runs

indexing is on on the loop. 

0 Kudos
Message 3 of 4
(50 Views)

Re: Boolean array not changing every time for loop runs

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 4
(44 Views)