09-12-2013 12:12 PM
I need to use a looping structure wherein a variable needs to be initialized by a user control (or upstream calculation) before the loop and incremented within by a fractional amount. For example the variable could range from 0 to 2 pi in increments of 0.01 and roll over at 2 pi, but it may need to start at 3.07.
My main problem is how to set a loop variable outside or before the loop starts. Is 'variable' a valid term in a data flow concept?
Thanks.
09-12-2013 12:48 PM
Use a shift register. initialize it with the start value and increment it at each iteration by adding the increment.
09-12-2013 12:57 PM - edited 09-12-2013 01:01 PM
09-12-2013 12:58 PM - edited 09-12-2013 12:58 PM
Use a shift register. initialize it with the start value and increment it at each iteration by adding the increment.
09-12-2013 12:58 PM
It's called a control. Put it outside the loop, inside another one which will stop when the operator enters his/her number.
Have you gone through any of the online tutorials on LabVIEW? They should be able to at least quickly give you the basics, and very basic questions are what you are asking about.
Cameron
09-12-2013 12:59 PM - edited 09-12-2013 01:01 PM
@Good_Tweetie_Bird wrote:
Is 'variable' a valid term in a data flow concept?
Thanks.
Good Question!
And no, "Variable" is a poor term for anything in LabVIEW. In LabVIEW (To slightly over-simplify) there are really only four concepts we need to master: Data, The Node, The Wire and The Synchronization Boundary. "Data travels from node to node, along wires, when sychronization boundary criteria are met." Dataflow in one sentance.