LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA shared dll comunication problem

Hi,

I want to read and write to the FPGA 7841R DIO via C/C++ but when I call FPGA shared dll from my application written in C nothing happens. Here is what I've done.
I created an FPGA VI that reads and writes to a DIO. Then I created a host VI that opens FPGA reference and reads or writes to a DIO. I run the host VI to check that everything works and then I created a shared dll. Then I imported that shared dll in labview (Tools->import->Shared library) just to make sure that DLL is configured properly and everything still works. So far so good. Next I added the whole shared dll compilation (with directory structure) to the Microsoft Visual studio project. When I call the read_ function or write_function in main() to read/write the DIO on FPGA the function executes without errors but the DIO on 7841R does not toggle the line. It appears as if the handle to the FPGA is somehow missing.
Any ideas / suggestions?

 

tnx

0 Kudos
Message 1 of 2
(2,074 Views)

Solved it. I forgot to include the (.lib) file of the compiled DLL into C/C++ project. After that the shared library (.DLL) should be in the same directory as exe application. 

 

Regards

0 Kudos
Message 2 of 2
(2,073 Views)