01-04-2010 10:15 PM
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.
Solved! Go to Solution.
01-05-2010 05:18 PM
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.
01-05-2010 07:52 PM
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!
01-06-2010 06:01 PM
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!
01-11-2010 02:30 AM
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.
01-11-2010 01:33 PM
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
01-12-2010 01:05 AM
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!