Showing results for 
Search instead for 
Did you mean: 

How can I change a variable in a flat sequence and pass it through the sequence to the Arduino output?

Go to solution

You can wire a scalar to the multiply, or an array.  Right clicking and creating constant just happens to create an array by default because the other input is an array.


You typed in 1000.  But you put that in the index of the array, not in any elements.  So now you are just showing the 1000th element of an empty array rather than the 0th (first) element of an empty array.  You would have needed to put a 1000 in both positions 0 and 1 of that array constant to have something functionally equivalent to wiring up a scalar constant that said 1000.

Message 11 of 13

First go vote for this idea. Thanks! 😄


In newer LabVIEW versions, you can also right-click the array and select "change to element", which will turn it into the scalar you want. Try it.



0 Kudos
Message 12 of 13

@akifyalcinkaya wrote:


... and I cannot see the timer value as well. What may be the reason?


The reason you cannot see the timer value is because you wire from the output of the wait satement instead of branching the wait time going into it. (The output of the wait primitive is a random U32 number and of no interest).


If the waits are relatively short, you can also also just switch between the two states using the outer while loop, doing one thing on the even iterations and another thing during the odd iterations.



(If the waits are longer, use a state machine and the elapsed time express VI as others have suggested)

0 Kudos
Message 13 of 13