PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

CRT not initialized

Solved!
Go to solution
We have a CAN application program written in C using the nicanmsc.lib and nican.h.  This has run successfully in Windows XP with PCI and USB CAN boards, but when we tried it for the first time on a PXI system, it won't start.  When we run it, the same executable file, Windows immediately pops up a message box labeled "Microsoft Visual C++ Runtime Library" that says "Runtime Error! ... R6030 - CRT not initialized".  The PXI chassis contains a PXI-8512 CAN board and a PXI-8105 embedded controller, among other things.  What could be going wrong?
0 Kudos
Message 1 of 5
(6,362 Views)

Hi John,

The PXI 8512 is a XNET device. What version of NI CAN did you develop you application in?

Matt
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,331 Views)

I developed the program a couple of years ago using the frame api defined in nican.h and nicanmsc.lib.  It occurred to me that these files might be out of date, so I recompiled and relinked the program using the newer versions of these files that came with the software on the PXI machine.  The "CRT not initialized" error still occurs (before the first line of my main function executes).

 

The version of NI-CAN on the PXI machine is 2.6.3f2.  There are no version numbers that I can find for the h or lib files, but here are their dates and sizes:

 

03/27/2009  03:28 PM            95,208 Nican.h

03/27/2009  03:28 PM            14,370 nicanmsc.lib

0 Kudos
Message 3 of 5
(6,327 Views)

Hi John,

 

In order to run your NI-CAN code using on your new XNET hardware, you will need to install the NI-XNET Compatibility Library for NI-CAN.  To do this simply install NI-XNET 1.0.  When you select the features to install, be sure to install the NI-XNET Compatibility Library for NI-CAN as shown below:

 

XNET.jpg

 

Regards,

 

Todd V

National Instruments
Applications Engineer
NI Prototyping Community
0 Kudos
Message 4 of 5
(6,310 Views)
Solution
Accepted by topic author John_Gourlay
I had to take one more step after installing XNET to make my program run.  I recompiled and relinked my program once again with the new versions of nican.h and nicanmsc.lib that were installed with XNET and NI-CAN.  My program now starts properly.
0 Kudos
Message 5 of 5
(6,298 Views)