10-10-2013 11:36 AM - edited 10-10-2013 11:39 AM
Hi, I was wondering if anyone could explain the behaviour of this VI please? Is it a bug?
top indicator = 4
bottom indicator = [4,4,4]
Those both make sense; it's just the third element of the input array.
However I also get:
middle indicator = [0,0,0]
Why is that?
Thanks for any help!
Solved! Go to Solution.
10-10-2013 11:51 AM
I don't see the [0,0,0]
10-10-2013 11:54 AM
Oh...
I get this:
10-10-2013 12:00 PM - edited 10-10-2013 12:03 PM
Ahhhhhh.....
Stick an "Always Copy" (programming, Aplication Control, Memory Control sub palatte) on both wire branches from the array constant. The buffer alocation bug on forked array constants was fixed in 2013.
cute bug but, we know about it and its work around
10-10-2013 12:03 PM - edited 10-10-2013 12:05 PM
Have you applied the most recent patch to LV12SP1? A similar issue was fixed there. I applied the patch and got the expected result.
Try changing the constant 3 to a control to stop all of the constant folding and see what you get.
Edit: Jeff's AC solution probably won't work as stated. You should only apply the AC to a single branch.
10-10-2013 12:08 PM
@Darin.K wrote:
Have you applied the most recent patch to LV12SP1? A similar issue was fixed there. I applied the patch and got the expected result.
I applied that f5 patch this morning and I am not seeing this bug. I didn't dig through the bug fixes yet though. But it would appear to be fixed now.
10-10-2013 12:15 PM
Thanks for the replies everyone. I've tried the "Always Copy" in a few places without any luck. I'm downloading updates at the moment so hopefully that will fix it.
10-10-2013 12:27 PM
What about changing the constant to a control? Just curious, the real fix is the update.
Always Copy is a little tricky with three branches. I would try the following: branch the array and put the AC node on one of the branches. Now branch the wire out of the AC node and put a second node on one of those branches. Other combinations may have optimizations applied that nullify the effect.
10-10-2013 05:11 PM - edited 10-10-2013 05:14 PM
@JÞB wrote:
Stick an "Always Copy" (programming, Aplication Control, Memory Control sub palatte) on both wire branches from the array constant. :
Is this another case where the icon for the "Always Copy" should be a band-aid?
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-12-2013 04:20 AM
Applying all current updates for 2012 seems to have fixed this. Thanks for the help everyone.
I didn't see the comments about using a control instead of a constant until after I'd applied the updates so I didn't manage to test that, sorry.