07-02-2011 06:07 AM
Hi all,
I looked in the forum for a problem that I thought was simple, but I couldn't find anything helpful.
I'm passing an array of references to XY graphs, from one VI to another. The sub-VI extracts the references when needed and wires them to property nodes. These change the active plot on the XY graph and its visibilty.
I also tried to pass a cluster of references and convert it to an array inside the sub-VI, but it didn't help.
I noticed that all the reference wires have a coercion dot on the build array. That may be the key of the problem, even if I can't see how.
The error I get is:
Error 1055 occurred at Property Node in make_trg_vis2.vi->main10.vi
Possible reason(s):
LabVIEW: Object reference is invalid.
The attached files explains the issue. Top.vi calls the sub-VI.
I hope all this is clear enough. The thing works fine if, instead of using a sub-VI, I use property nodes in top.vi.
Solved! Go to Solution.
07-02-2011 02:16 PM
In your subVI, you have your index array wired to the N terminal of the for loop. Perhaps it should be the i terminal?
N=8. (Always, every iteration of the For Loop). You multiply it by 3, then add 1, then another 1. So you have indices 24, 25, 26. But the array coming in has 24 elements which are at indices 0 to 23. Thus you are immediately acting on an empty graph reference at index 24.
You also appear to have a lot of duplicated cases in your case structures. For example, cases 3 6 and 7 look identical. Rather than using 3 different cases. You can have one case that is 3, 6, 7.
07-02-2011 03:05 PM
Oh dear, I should have wired the i terminal, you're right. Silly mistake.
I saw the duplicated cases and fixed them. Thanks for pointing them out.
Anyway, the problem with the reference remains. Can it be something related to the class type, strict type or similar?
07-02-2011 04:02 PM
It could be that there are some slight differences between graphs that cause it to have a little bit different definition and is causing all of the others to coerce them self to be the same type as one or two of them. Does it seem to be causing you any problems in the operation of the VI? If not, I would ignore the dots.
07-02-2011 04:06 PM
I solved it. The dots are still there, but I can live with that. Thanks again.
09-26-2011 02:35 PM
Hi,
I am having a similar problem, as stated in your post. Can you please post, how you have resolved your issue?
-Siva
09-26-2011 02:57 PM
Hi,
I didn't really solve it. I just left the coercion dots there... Anyway, I get errors, sometimes, when I run and stop the VI several times. It might be because I don't close the references.
09-26-2011 03:22 PM
Thanks for your reply. My issues was with "reinitialize to default values" getting executed after the values were set.