I have three differant ActiveX controls, all three together represent one peice of hardware. The system we are using supports upto twelve peices of hardware connected to the same computer.
Initially I placed three ActiveX object controls in one VI and used that sub-vi 12 times on the parent vi. I found that 12 sub-vi's on the same vi use the same instance so I created twelve differant vi files (each identical appart from the fact they are differant files on the hard disk) and used those to make sure there are differant instances of the ActiveX objects within the program.
I have one loop that is run to initialise the ActiveX objcets, this gets the Refnum from the 12 unique sub-vi's and places them in to an array. It then passes this array
into another Vi to do the setup procedures, this works fine.
after initialisation is over with I want to get down to the real work, the first loop I've written to do something uses the array that was built up in the initialisation stages (before this loop runs of course). The error I am getting is code 93 (I think!), "ActiveX Object refnum is null" (or something similar).
I have tried storing the refnums in, a global, a local (to the top level/parent vi) and an array control on the parent vi. All three continue to give me null in the second stage of the program I wish to run.
I realise this is a bit complex and is probably caused by the design of my program, if you need any more details feel free to ask. Due to it being a commercial peice of software I cant post the code though.
Any general tips on avoiding null ActiveX object refnums would also be helpfull.
Thanks
TMC