05-24-2013 08:50 AM
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
05-24-2013 08:58 AM
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