LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2147024809 - nisyscfg library

Hello Good People,

 

I am using the NI System Configuration VIs to monitor the available memory on a 9606 sbRIO (using LabVIEW RT 2013). The application runs as a deployed start up application.

 

At start up I initialize a software reference to the hardware by using the nisyscfg.lvlib:Find Hardware.vi. Most of the time this happens without any problems, but sometimes (seemingly random) the following error is generated: -2147024809. The source is nisyscfg.lvlib:Find Hardware Helper.vi (which seems to be a subVI of Find Hardware.vi).

 

There is a 3sec delay in the code before the above VIs so that every init process can finish.

 

Please, if you have any ideas why this might happen, don't hold it back.

 

 

Many thanks,

Norbert

0 Kudos
Message 1 of 5
(4,272 Views)

Is there an accompanying error message with the code? The error description says "Invalid parameter". I've used System Configuration in many RT projects and can't say I've ever had that error occur - even at startup and without an initialisation delay.

 

Can you show us your code?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(4,254 Views)

Hi Sam,

 

Unfortunately the error message is not very explanatory:

 

"nisyscfg.lvlib:Find Hardware Helper.vi:7120001"

 

and then the complete call chain to the source of the error.

 

This is the FGV that stores the reference I'm using:

 nisyscfg.png

 

Before this is called, there is a bunch of initialization steps but none of them concerns either the hardware or the sys config VIs.

 

We previously have had this type of problem: the code was running fine from the development environment, but it was returning an error when executing as a deployed application. That was the point when we introduced that 3 second delay before the above VI. That seemed to have solved the issue, we have not had any problems with this for the past year. Even now it doesn't error out every time, but we didn't manage to find out what exactly causes it.

 

Thanks,

Norbert

0 Kudos
Message 3 of 5
(4,242 Views)

Ok, so here are a couple of things that I noticed:

 

- You never actually call the 'Initialize Session' VI. In the help it says 'you must use this VI to obtain a handle for a specified target that can be used in other Sys Config VIs'. Obviously it works sometimes, but I'd put that VI in your initialize case just to be on the safe side.

- You have to be careful that you don't actually call 'Get' before calling 'Init' - there's nothing to prevent you from doing that and it would return an invalid reference on first call (obviously programmer discipline comes into play here!)

- It's also worth noting that you can actually return memory information from the system session directly:

2016-01-06_15-21-32.png

- Finally, I'm not sure if there's a possibility of the VI returning multiple resources e.g. NI-VISA on the sbRIO as well as the RT controller?

 

I'd definitely try adding the Initialize Session VI and see how you get on with that as a first port of call.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(4,229 Views)

Hey Sam,

 

Many thanks for the advices!

 

I have included the Initialize Session VI. It'll be quite hard to tell if it made any difference since the system almost always works.

I'll probably try using the session handle to get the memory information as well. Makes the code a bit more readable!

 

Many thanks,

Norbert

0 Kudos
Message 5 of 5
(4,221 Views)