05-07-2007 04:29 PM
05-07-2007 04:39 PM
05-07-2007 04:44 PM
05-07-2007 04:46 PM
05-07-2007 05:02 PM
05-07-2007 05:08 PM
05-07-2007 05:38 PM
05-07-2007 05:51 PM
@altenbach wrote:It seems to me there is a fundamental misunderstanding of dataflow programming.If you place a FOR loop around something and wire a "1" to N, this is the same as leaving the FOR loop out in this case. Everytime, this FOR loop is encountered in the dataflow, it will execute for one iteration. It does not mean the code executes only once overall. Is all this in a bigger loop somehow or are you running this with the "continuous run" button?Your code is just peppered with local variables, but none is called X as in your text description.You shouldn't be afraid to post code. You already said that you just started with LabVIEW, but had no formal training. I am sure you'll get the best benefit if you let us look at the program and point out ways to improve it. If you don't, bad ideas will become bad habits very quickly and it will be harder to un-learn them later. 🙂
05-07-2007 06:05 PM
Jeremy,
What you may be looking for is the "First Call?" function, located in the pallette Advanced -> Synchronization. Instead of a For loop, surround the code you want to execute only once with a case structure that is wired to the output of the "First Call?" function. This will cause it to execute only the first time that section of code is run. See the help for an explanation of the function.
I hope this helps. Don't get discouraged - we all started somewhere and may have forgotten over the years that what seems so elementary now was at one time something we didn't know.
Allen
05-14-2007 10:33 AM