LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of xy-graph references

Solved!
Go to solution

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.

Download All
0 Kudos
Message 1 of 8
(3,146 Views)
Solution
Accepted by topic author dany1

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.

Message 2 of 8
(3,128 Views)

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?

0 Kudos
Message 3 of 8
(3,122 Views)

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.

Message 4 of 8
(3,115 Views)

I solved it. The dots are still there, but I can live with that. Thanks again.

0 Kudos
Message 5 of 8
(3,113 Views)

Hi,

 

I am having a similar problem, as stated in your post. Can you please post, how you have resolved your issue?

 

-Siva

0 Kudos
Message 6 of 8
(3,033 Views)

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.

0 Kudos
Message 7 of 8
(3,023 Views)

Thanks for your reply. My issues was with "reinitialize to default values" getting executed after the values were set.

0 Kudos
Message 8 of 8
(3,016 Views)