03-11-2014 04:24 PM
This may help.
03-12-2014 06:39 AM
The picture definitely helps. I will try it today report back this afternoon. Thank you!
03-15-2014 07:16 AM - edited 03-15-2014 07:17 AM
Since you're using that blue sub-vi in the loop already it's very neat when placed in a loop, you'll just need to wire the loop counter i to the input.
Once it works, that loop is also a perfect candidate to parallellize.
/Y
03-17-2014 12:30 PM
@Yamaeda wrote:
Since you're using that blue sub-vi in the loop already it's very neat when placed in a loop, you'll just need to wire the loop counter i to the input.
Once it works, that loop is also a perfect candidate to parallellize.
/Y
Hi Y,
Do you mind expanding on this a little more?
Thanks,
Pepi
03-17-2014 01:09 PM - edited 03-17-2014 01:18 PM
Here's how the loop would look like.
To parallelize it, you would need to first make the subVI reentrant (preallocate clones) and then make the FOR loop parallel. Naturally this only helps if your CPU has multiple cores. (see also this article). Your subVI is so lightweight that parallelizing will not gain much overall. I would not bother here.
(Of course the subVI would benefit from a serious makeover too. Eliminate the formula express VI, make a big case structure containing all code after the comparison. Resize the index array, eliminate all the representation mismatches (coercions), etc.
03-17-2014 02:39 PM - edited 03-17-2014 02:41 PM
@altenbach wrote:
Here's how the loop would look like.
To parallelize it, you would need to first make the subVI reentrant (preallocate clones) and then make the FOR loop parallel. Naturally this only helps if your CPU has multiple cores. (see also this article). Your subVI is so lightweight that parallelizing will not gain much overall. I would not bother here.
(Of course the subVI would benefit from a serious makeover too. Eliminate the formula express VI, make a big case structure containing all code after the comparison. Resize the index array, eliminate all the representation mismatches (coercions), etc.
Hi altenbach,
Thanks for the reply. I'm having an issue with different dimension arrays, and it seems that you don't because your wires in and out of the blue SubVI are not broken and when I try these my wires are broken.
Did you change the blue SubVI to get this to work? Did you resize the index array?
My biggest hurdle in LabView is understanding arrays so I'm stomped once again. I had the same issue when I tried the solution BowenM suggested.
03-17-2014 03:23 PM - edited 03-17-2014 03:24 PM
Tunnels at loop boundaries can be non-indexing or indexing (plus some more options for the output tunnels, depending on the LabVIEW version). In this case, the upper input should be non-indexing so all subVI calls have the full 2D array. The lower input should be indexing, processing one row per iteration.
And so on.
Right-click each tunnel to change the indexing mode as desired.
(If this is not clear to you, maybe you should start with a few basic LabVIEW tutoials.)
03-18-2014 09:19 AM
@altenbach wrote:
Tunnels at loop boundaries can be non-indexing or indexing (plus some more options for the output tunnels, depending on the LabVIEW version). In this case, the upper input should be non-indexing so all subVI calls have the full 2D array. The lower input should be indexing, processing one row per iteration.
And so on.
Right-click each tunnel to change the indexing mode as desired.
(If this is not clear to you, maybe you should start with a few basic LabVIEW tutoials.)
Thanks again. I didn't know you can do that with loop boundaries. This worked, or at least the wires are not broken anymore and now I just have to run it and play around with the blue subVI if things are not working right.
I appreciate it.
Pepi
03-18-2014 11:00 AM
Hi all,
How can I have individual indicators like I have in my original VI?
Should I use a similar method of using a separate "for loop" and putting an "index array" with the "i" from the loop connected to the "index" node and then somehow connecting it to individual indicators?
Or do I have to have "n" amount of "index arrays". "n" being the number of indices I have?....Which I guess would put me in the same situation I was originally, which is have an index array for every channel I'm reading.
Does that even make sense? I realize at some point I will have to have the same amount of indicators as I have channels because I want to see every channel in the front panel, but ideally I would like to have one "for loop" for the blue subVI, one "for loop" for indexing the arrays and then the amount of indicators that I need.
03-18-2014 11:11 AM
If you want individual indicators from an array simply add an "index array" function and resize it for the desired number of outputs. Connect the indicators in order and you don't even need to wire the indices. Leave the main data in the array for further processing.
If you design the from panel in a smart way, you can often use array indicators directly. Resize the container (horisontally oor vertically) to the desired number of elements and hide the index terminal.