LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807346 - Invalid Object Reference in FGV Shift Register

I've got a FGV in LabVIEW 2012 SP1 that controls the timing functions in my PXI application.  The code has worked previously (using differnet hardware and compiled under LV2009) and the initialisation stage works without any error but after the first cycle of the FGV I get an Invalid Object Reference error on every subsequent NI-Sync call.

 

I've found a thread that sounds similar, but I didn't see a solution but I'm clear that if the VI goes out of memeory than the FGV contents are lost so I've probed the inputs and outputs to the loop and they look fine?  I'm stumped.  Any suggestions?

 

An exmaple of the code is attached and I'm using the PXI 6683 for our timing reference.

0 Kudos
Message 1 of 4
(2,709 Views)

You obviously can not run this VI in isolation because the reference will be closed every run, but I guess you already know that.

 

I wonder if you are doing something that makes the FGV go out of scope but perhaps putting probes on the wires forces the VI to stay in memory? Have you tried adding a check for an invalid reference in the FGV and putting up a dialog if true? Does it work if you create the reference in the top level VI and pass it in to the FGV for storage?

 

What is the returned "instrument handle out" used for?

0 Kudos
Message 2 of 4
(2,692 Views)

Hi Jon,

 

As I understood it, the instrument handle stays valid as long as the VI stays in memory unless it's explicitly closed so I ran it from within a project.  Have I got something wrong there?  If I have that explains it.

 

Even when the probes are in-circuit the error persists.  The probes indicate that the handle is valid.  I put the indicator in to run the VI without probes and see the handle at the end of each run.  If the handle has become invalid it may stay in the FGV but at runtime LabVIEW won't recognise it.

 

Is there any way to get the runtime to not release the handle?

 

 

0 Kudos
Message 3 of 4
(2,683 Views)

I would guess that you are not suffering from the leaving memory problem, otherwise the reference would reset to its default null value and this would be obvious with a probe. There are other reasons that a reference can become invalid, refer ro this post for an example, that's why I was asking why you returned the reference and what was done with it. . I don't know whether anything the niSync driver does could make this happen, but I don't think it is necessarily safe to assume that the "reference out" returned by a VI is the same as the "reference in".

 

Jon

0 Kudos
Message 4 of 4
(2,663 Views)