LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 2009 realtime GPIB link error

Solved!
Go to solution

The GPIB source code only call the ibdev function.

ibdev (0, 1, NO_SAD, T10s, 1, 0);

 

When I tried to compile the GPIB source code in CVI 2009 real time, I received the following link error message.

 

Project link error:

Undefined symbol '__imp__GetCurrentProcess@0' referenced in "c:\program files\national instruments cvi2009\cvi2009\bin\msvc\cvistart.lib"....
 

But the GPIB source code can be compiled and run in windows XP.

 

Any help out there?

 

Thanks.

 

 

0 Kudos
Message 1 of 7
(4,526 Views)

Hi Vincent,

 

I am curious as to which libraries are you calling into in your code.  GetCurrentProcess is one of the Win32 API functions that is not supported in real-time, which explains why your code works on Windows XP but not on the realtime machine.  Here is a link to the libraries as well as a link to the CVI functions that are supported by CVI for real-time applications.  Take a look at these KnowledgeBase articles to verify that everything you are using in your program is supported in the real-time environment.

Cheers,
Kelly R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,502 Views)

Hi Kelly

 

I forgot to mention the project can be compiled with CVI 9.0

After I upgrade to CVI 2009, the project can't be compiled.

 

I'm absolute sure the project can be run in real time environment.

 

I also try to create a new real time project with CVI 2009,

and it also throws the project link error.

Please refer to the following code. 

 

#include <gpib.h>
#include <cvirte.h>
#include <rtutil.h>

void CVIFUNC_C RTmain (void)
{
 if (InitCVIRTE (0, 0, 0) == 0)
  return;    /* out of memory */

 while (!RTIsShuttingDown ())
 {
  /* Your code. */
  SleepUS (100000);
 }

 ibdev (0, 1, NO_SAD, T10s, 1, 0);
 
 CloseCVIRTE ();
}

I think this a bug of CVI 2009.

 

Thanks!

0 Kudos
Message 3 of 7
(4,495 Views)

Hi Vincent,

 

Thank you for the additional information and the source code.  This behavior was reported to R&D (CAR #201310) for further investigation.  Thanks for the feedback!

 

Cheers,
Kelly R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(4,473 Views)

Hi Kelly

 

My company is a Alliance Partners of NI at Taiwan.

 

After my customer upgrade to CVI 2009, he has this GPIB problem in real time system.

They push me to get the solution. 

 

Could you please tell me where I can trace the "CAR #201310"??

 

Thanks in advance.

 

   

 

0 Kudos
Message 5 of 7
(4,424 Views)
Solution
Accepted by topic author VincentY

Vincent,

 

Hello.  First, I wanted to mention that the NI GPIB library is not officially supported on LabWindows/CVI Real-Time systems.  Has your customer been using it in previous CVI RT applications?  Can you tell me which functions they are using?

 

While the NI GPIB library is not officially supported in CVI RT, the link errors you are seeing in CVI 2009 were not intentional.  You can instruct your customer to copy the file gpib.lib from the CVI 9.0 location:

<Program Files>\National Instruments\<CVI 9.0>\bin\msvc\gpib.lib

to the CVI 2009 location:

<Program Files>\National Instruments\<CVI 2009>\bin\msvc\gpib.lib

 

This should fix the problem.

 

If your customer ever repairs or reinstalls their CVI 2009 installation, they will have to make this change again.

 

We plan to fix this issue in the next version of LabWindows/CVI.

 

-Jeff

NI

 

 

0 Kudos
Message 6 of 7
(4,399 Views)

Hi Jeff

 

I've written a sample program for my customer and it works fine in CVI 9.0 real time.

After upgrade to CVI 2009, the project can't be compiled.

 

I used the following functions.

ibdev

ibwrt

ibrd

ibonl

 

After I replace the gpib.dll from CVI 9.0 to CVI 2009, the problem is fixed.

 

Thanks for your great help!

0 Kudos
Message 7 of 7
(4,382 Views)