LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Where to put open/close FPGA vi refs?

Guys,

 

I'm working on my first FPGA project on a cRIO.  My FPGA code is working and I'm integrating it with my main VI running on the cRIO.  To do the read from the FPGA I need to first open an FPGA VI reference.  Should the sub-vi I'm designing do the FPGA open, read and close all in one session or should the open only be done once initially before the main program loop starts?

 

TIA,

Sean

0 Kudos
Message 1 of 4
(3,308 Views)
i open the reference once and close at end.
Stu
0 Kudos
Message 2 of 4
(3,288 Views)

Sean,

 

Definitely look at the example programs available for the cRIO. Help->Find Examples. This will help you greatly as you begin working on the FPGA and hopefully give you an idea for the structure of FPGA and Host VIs.

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 3 of 4
(3,265 Views)

Open it at the beginning of your program and close it at the very end. What you don't see is that the Open FPGA Reference is actually what loads the FPGA program you wrote to the FPGA. For many reasons, you don't want to do this a bunch of times in your program. This definately needs to happen each time your program is run. I don't know what you meant by each "session".

 

You should definately model your program after the module-specific examples for your hardware, and you will see that loading once and closing once is what they do.

Message Edited by rex1030 on 10-26-2009 04:47 PM
---------------------------------
[will work for kudos]
0 Kudos
Message 4 of 4
(3,259 Views)