LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Unspecified Error 0x800004005 while writing Shared Variant

In LabVIEW 2010 I am getting Unspecified Error 0x800004005 when I run test.vi. It comes anytime I try to write a Variant to the Shared variable ServoVIs which is declared as a Variant. Why does this error occur and how can I workaround it? A probe just before the write shows a Variant that consists of an array of 16 values.

 

What I am trying to do:

 

My application will have 16 separate calls to the same subVI called Servo.VI. Each invocation will be given a unique AxisID as input to identify it. They will all be running in parallel.

 

In another portion of the application I have a front panel that will select one of the Servo invocations and display that Servo as a subPanel. To do that I need a VI Reference to the selected Servo. To provide this VI Reference, I plan to build an Array of 16 VI References and store them in the Shared variable ServoVIs as a Variant (since a Shared Variable can not be an Array of Generic VI References). Each servo, on startup will use its unique AxisID to index into ServoVIs and store its VI Reference there. When the subPanel is needed, it will use the selection to index into ServoVIs and fetch the appropriate VI Reference to the Servo selected.

 

Since my test of ServoVIs is getting an error, does anyone know a better way to do what I am attempting to do?

 

0 Kudos
Message 1 of 5
(2,984 Views)

Does this error appear when calling multiple instances of 'test.vi' or just when running 'test.vi' directly?  The reason I ask is because it appears that 'test.vi' is not marked as reentrant in the VI Properties, which it would need to be if you are calling parallel instances.

 

- Greg J

0 Kudos
Message 2 of 5
(2,943 Views)

I get the error when I run test.vi just once. I do not use it in parallel.

 

Test.vi does not need to be reentrant.

 

Why can't I store a Variant in a Shared Variable Variant like this without getting an error in LabVIEW 2010?

0 Kudos
Message 3 of 5
(2,933 Views)

Is this the error that you're seeing?

 

22487iD7B5BFD823FE6DE3

 

I'm only able to reproduce this with a network published shared variable.  Setting it to 'single process' seems to resolve the error.  Do you need network published?

Message 4 of 5
(2,909 Views)

I think that is the same error.

 

I believe that my shared variable is network publish because that was the default. I don't really need it. You may have found a workaround.

 

Now for someone to find out what that error is occurring when it is network publish. It shouldn't get an error in either case.

 

THANKS.

0 Kudos
Message 5 of 5
(2,898 Views)