03-30-2017 03:51 AM
Hi All,
I'm deploying a server application to a PXI rack full of Oscilloscopes in LabVIEW RT. As is fairly normal one of the first things it does is check what hardware it has on-board. Sadly nisyscfg.lvlib:Find Hardware.vi returns nonsense for a certain amount of time after start-up. My fix is pretty brutal (keep asking for it for a certain amount of time+) and this type of fix always has a habit of coming back and biting.
Is there a more intelligent way (or a bug fix)?
LabVIEW 2014 SP1 RT.
Lots of Love
Steve
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
Solved! Go to Solution.
04-06-2017 03:13 PM
Unfortunately your approach has become the expectation in scenarios like this. Other examples I have seen are trying to access shared variables too quickly after booting or trying to access the DAQmx driver too quickly after booting. The drivers and associated configuration databases just aren't ready by the time the startup app tries to call them.
Bugs have been filed on these in the past and the outcome is usually that the bug is closed as not an issue. The approach is to do as you are doing, loop on error until the function returns correctly. Definitely report it to NI as a bug if you feel this is insufficient though.
04-07-2017 03:33 AM
Thanks Tim,
I think you're right, I really posted it so that other people wouldn't waste the time I wasted trying to fix it.
It seems that the general fix would be to hold the ability to load software until x secs after boot-up. This is one of those things that sounds an awful lot easier to do on paper than it is in real-life.
Steve
Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop
04-07-2017 07:47 AM - edited 04-07-2017 07:47 AM
Yeah that does seem like the right approach. In the Shared Variable scenario I mentioned before the solution was to add a 10 second wait at the beginning of the startup app.
I was hoping there was an ini token we could use to delay load the startup app without having to do in code changes but it doesnt' seem like there is one.
What LabVIEW Real-Time Related Settings Can be Changed Using INI Tokens?
http://digital.ni.com/public.nsf/allkb/6DC32025FF6DF0B586257204007F2C05