LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize and increment a fractional number.

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.

0 Kudos
Message 1 of 6
(3,329 Views)

Use a shift register. initialize it with the start value and increment it at each iteration by adding the increment.

0 Kudos
Message 2 of 6
(3,319 Views)
0 Kudos
Message 3 of 6
(3,306 Views)

Use a shift register. initialize it with the start value and increment it at each iteration by adding the increment.

 

Download All
0 Kudos
Message 4 of 6
(3,305 Views)

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

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 6
(3,303 Views)

@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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(3,301 Views)