NI Labs

Showing results for 
Search instead for 
Did you mean: 

C Interface to LabVIEW FPGA



While it has never been tested, I expect it to work with minimal changes. The C API was written to be extremely cross-platform, so there's a good chance it will work out-of-the-box. If you could give it a try and let me know any problems you run into, that would be very helpful. Please just be sure to used a released version of the FPGA Interface C API (installs with NI-RIO 3.2 or later), instead of this early NI Labs release. The NI Labs release is no longer supported.


I actually didn't know many people used Borland compilers nowadays. Is this more common in Taiwan? Are they using the old Borland C++ series (discontinued in 1997), or one of the new C++Builder products? Do you know which versions are common?

0 Kudos
Message 71 of 79



In Taiwan, I met some customers using Borland C++ and asking if our API support this tool.

However,  I'm not quite sure which version did they use.


Attachment picture "NiFpga" is the error shows in Borland C++. (My customer send me it.)


In order to understnd how to use "C interface for LV FPGA", I try to write a pogram include this API in

LabWindows CVI, but there is some error occure when I compile it.

(I add an error mssage in picture "C inter.png")


Could you give me a hand about this two problem?




Download All
0 Kudos
Message 72 of 79



The Borland C++ problem might be that we're trying to typedef a type which isn't yet defined. Please see the "Integer types must be defined by the client." line above it. This could be solved by #include'ing stdint.h, or by manually typedef'ing those types in a similar way to lines above it. Please tell me which ends up working, so we can consider adding a separate case for Borland. I will need to know the version of the compiler you're using.


For the CVI problem, I noticed that you're calling NiFpga_SetStatus. This is actually the old name for this function that was used in the NI Labs release. For the released version, it was renamed to NiFpga_MergeStatus. Are you mixing old code with the new C API?

Message 73 of 79



Your're right.

I copy the example code download form here, it should be Lab version.


Thanks a lot!!


p.s. About the borland version, I'll ask the customer and let you know later.




0 Kudos
Message 74 of 79

Yes, that page still needs to be updated. Sorry about the confusion.


Looking forward to hearing back about the Borland compiler versions, and whether my workaround helped!

0 Kudos
Message 75 of 79



About the compile issue, the version of borland C++ which our custmer used is 6.0.




0 Kudos
Message 76 of 79

From these Wikipedia pages, it looks like "Borland C++" never actually made it past version 5.x from 1997:


I'm assuming your customer is actually using "C++Builder" 6.0 from 2002?

0 Kudos
Message 77 of 79

Hello, I'm trying the tutorial >> Building a R Series FPGA ...<<.

Unfortunately I get always the error in the 9.0.0 CVS 61070, corrupt or invalid bitfile.

I'm using LV FPGA 8.6.1 and I get *.lvbit files that works correctly.

The current FPGA Interface Generator C API 1.1 but would like *.lvbitx files.
Therefore, I have the resulting *.lvbit-file renamed in *.lvbitx.
The generator then produces the c-and h-files that look right to me.

But after the CVS, I still get the error message above.
The tutorial I've adapted because I think there are still commonly used functions from the old generator
1.0, since they always led to errors such as missing prototypes.

Can it be that the versions are out of synch with each other, so that LV 9, etc. must be used to induce
the Bitfile too?

Thanks for an

0 Kudos
Message 78 of 79



I'm sorry you're running into problems. You are correct that the released version of the FPGA Interface C API 1.0 and later only works with LabVIEW 2009 bitfiles with a .lvbitx extension. The prerelease NI Labs version worked with LabVIEW 8.6 .lvbit files (which is a different format), but this is no longer supported.


Unfortunately, that tutorial has not yet been updated for the released 1.0 version. Until it is updated, please try to follow the same directions with only a few modifications. First, make sure to use LabVIEW 2009 .lvbitx files instead of earlier .lvbit files. Additionally, note that some of the code will have to change. For example, you'll have to change NiFpga_SetStatus to NiFpga_MergeStatus and NiFpga_Infinite to NiFpga_InfiniteTimeout.


Sorry for the inconvenience.

0 Kudos
Message 79 of 79