LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA with dll

Hello,

 

I have created a host VI for the PXI 7831 FPGA card in LV 7.1. If I run it under LabVIEW development environment, it is working, so the code is running in the FPGA, and I can write data to and read data from it.

 

I plan to compile this all to a dll. I have 4 functions: Init (send code to FPGA), read, write, Close (stop code on FPGA). If I call the init function via call library function, labview closes without any error message. I have tried to compile the dll with and without adding the host VI to the dll as a dynamic VI, but it doesn´t matter. I can´t use it. Can a compiled dll send the VI to the FPGA?

 

MB

0 Kudos
Message 1 of 5
(3,335 Views)

You are trying to run this DLL on the RT right, using it to interface with the FPGA? Not dropping a dll to the FPGA diagram? You might want to post a copy of the DLL and calling VI, as the call library node sometimes does strange things when not called correctly.

 

Also, why are you going to the trouble of making a dll? Why not just use the Open FPGA reference, choose your bitfile, create a typedef of the reference to pass from VI to VI and set it to run when opened?

0 Kudos
Message 2 of 5
(3,326 Views)

Hi Greg,

 

I just do what you have written, see attached screeshot. 

This function seems to work, but the rest not. The rest works, if I´m in development mode, but not in dll.

 

To communicate with the FPGA I use the FPGA property node, see Snap1.gif.

 

regards

Mitulatbati

 

Download All
0 Kudos
Message 3 of 5
(3,298 Views)

It would help a lot to enable someone help you, if you could post your project file and all the VIs in it. From the few image snippets and the description, I at least haven't understood what you try to do, and I'm sure I'm not the only one. FPGA is already a system where only a few people have real experience with, limiting them to understand your problem makes it only less likely that you will get a really helpful answer.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(3,283 Views)

The code looks fine from what I can tell. Again, why are you making a dll? It sounds to me like you need to build an executable. Unless there is some reason for making a dll (like you are trying to call LabVIEW code from another language, which I'm guessing you are not), why not just build an exe? It will be far easier.

0 Kudos
Message 5 of 5
(3,277 Views)