LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

nxCreateSession Long Execution

Solved!
Go to solution

I have created an executable that uses NI-XNET and a NI PCI-8512 CAN card. I create a distribution and installed it on a PC. After installation, I startup the appplication and everything works as expected.

 

However, when starting the application immediately following a boot of the PC, the application seems to hang a few times. After this, the application does not perform as expected. I have narrowed down the hanging to the NI-XNET function "nxCreateSession". Using printfs and the Timer() function, it seems that it takes this function call 2 to 3 seconds on average.

 

The interesting thing is that if i close the application and start it again, everything works as expected and the "nxCreateSession" function takes about 0.5 seconds on average. Also, If i start the NI-XNET Database Editor prior to starting my application immediately following a boot of the PC, everything works as expected.

 

I hope this makes sense and that someone has seen a similar issue. Thanks in advance for any advice.

 

Mark.

0 Kudos
Message 1 of 2
(3,207 Views)
Solution
Accepted by topic author mjz

Hey mjz,

 

I have never seen this identical issue, however, I have seen some similar issues with the XNET API where errors can occur when the database isn't fully deployed before trying to call to it. Since you said that this behavior only happens when you run the program right after the computer boots, it leads me to believe that you might just need to give the database some time to deploy. Try putting a couple second wait somewhere in your VI before you get to the nxCreateSession function that seems to be hanging and see if that helps at all.

 

Regards,

 

Doug B

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,194 Views)