Iterating a For Loop on an array index, and repeating
- From: CFAMS Brad <x@xxxxxxxx>
- Date: Sat, 18 Feb 2006 11:40:37 -0600 (CST)
I have a seemingly simple task, but I am new to LabView and visual programming:
I want to write a loop that iterates for each element in an array, and
then starts over again. It will feed into a case structure.
In textual programming, it would look something like this:
For each "element(i=1:3)" in "array(1DX3E)";
If "element(i)" < n, multiply by a;
If "element(i)" <m and >n, multiply by b;
If "element(i)" >m, multiply by c
end "for"
While "Start" = true, repeat for loop
From a beginner's perspective, the for loop only seems iterable on aconstant, for instance I could say repeat 3 times, but this is not
indexing to the unique element of the array. Is there an elegant
way to do this in LV 8 without going from an array to a cluster,
un-bundling it, and then writing 3 different case
structures???????? This is what I have now and it is rather
obtuse!
Thanks for any input,
Brad
.
- Follow-Ups:
- Re: Iterating a For Loop on an array index, and repeating
- From: CFAMS Brad
- Re: Iterating a For Loop on an array index, and repeating
- From: CFAMS Brad
- Re: Iterating a For Loop on an array index, and repeating
- Prev by Date: Re: How do I write an array of strings to a single Excel row?
- Next by Date: Trouble using DAQ Assistant for reading digital values
- Previous by thread: FTP binary file put
- Next by thread: Re: Iterating a For Loop on an array index, and repeating
- Index(es):
Relevant Pages
|