10-18-2006 05:08 PM
10-18-2006 05:25 PM
"Object reference is invalid" is the exact error I am getting. I tried the code out in the first sub-vi to make sure it does indeed work with the refnums.
I have an object refnum control inside an array in the second vi and that is what I am trying to pass the Controls[ ] array of refnums to... There must be something special I have to do here? I've tried a few various casts and am out of ideas for the moment...
Thanks
10-18-2006 05:53 PM
10-18-2006 07:33 PM
10-19-2006 01:28 AM
10-19-2006 11:59 AM
10-19-2006 02:20 PM
10-19-2006 02:35 PM
10-19-2006 02:36 PM
I suspect your are running into issue with the array insisting that all elements be of the same data type. So when you build an array of disimilar types, LV will cast them as generic class refernces.
But I am guessing!
If you posted a small set of demo VI, we may be able to nail this challenge much faster than trying to imagine your code.
Trying to help,
Ben
10-19-2006 02:59 PM
I tried following the directions given above, and I had no errors. It worked fine. The main vi was updated with the value written in subvi 2. You must have a conflict with some other control or cluster in your vi's.
@davey31415 wrote:
Problem.Top level VI has a custom control cluster. I create a reference to the cluster. I drag the cluster reference from the block of the top level to the front of the first sub. I connect the refnum to the first sub's connector pane. I add the first sub to the top level block and connect the reference to the sub. I drag the cluster reference from the block of the top level to the front of the second sub. I connect the (second) refnum to the second sub's connector pane. I add the second sub to the first sub block and connect the refnum to the second sub. In the second sub I create a Controls[ ] property node and wire the second refnum to it. I connect the property node to an index array and index element 0. I create a Value property node and wire a constant numeric to it.