LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a real time VI DLL?

I'm trying to convert a VI into a DLL to be called by a CVI program. But both the VI and the CVI are to run on a real time PC target. When I right click on the "build specifications" of the VI listed under the target, the "build shared library" option is not listed (it is listed if it's a VI running on the host). How do I create the DLL of a VI that runs on a real-time target?  Thanks.

0 Kudos
Message 1 of 7
(3,922 Views)

Hi Herod,

You can create a LabVIEW dll the normal way, then create a CVI program that calls the LV dll and have your CVI program execute on a RT target. We now have direct CVI support for Real-Time targets. Install the LabWindows/CVI Real-Time Module,

If you need more help, please include more details on your setup: versions of LabVIEW and CVI, hardware, etc.

Best regards,

Kalin T.
0 Kudos
Message 2 of 7
(3,907 Views)

Hi Kalin,

thanks.  My labVIEW dll is actually the host VI to an FPGA target VI (on a 7830R RIO board), with both VIs running on a real-time PC target.  I am concerned that if I create that dll under my local host computer first, it may not call the FPGA VI correctly when it gets loaded on my real-time target (when it gets called by my real-time CVI program, also running on the target).  Essentially, I'm trying to interface my FPGA to my real-time CVI program.  Are there other ways to do this?  Thanks.

0 Kudos
Message 3 of 7
(3,905 Views)

Hi Herod,

I will check if there are any other ways of doing that. In the meantime, please try my suggestion and let me know if it works.
Another thing you could probably try is create an rt executable from your host VI, download it to the RT target, and have your CVI code call the rt executable.

What prevents you from writing all of your program in LabVIEW?

Best regards,

Kalin T.
0 Kudos
Message 4 of 7
(3,868 Views)

Herod,

Could you please give some more explanation on your setup?

1. Do you have CVI RT module?
2. What is your Real-Time target?
3. What version of LabWindows/CVI and LabVIEW do you have?
4. What version of NI-RIO do you have?
5. How many devices do you have programs running on?
a) Host PC - Real-Time target - FPGA
b) Real-Time target - FPGA
c) Host PC - FPGA
6. Is there any reason why you can't complete all of your program in LabVIEW?

Thanks!

Kalin T.
0 Kudos
Message 5 of 7
(3,863 Views)

Hi Kalin,

1. yes, I have CVI RT.

2. Target is a PC (ETS), with a 7830R FPGA card.

3. CVI 8.0.1 and LV 8.2

4. NI-RIO 2.1

5. b) RT target -FPGA.  Everything (CVI, host VI and FPGA VI) has to run in RT.

6.  The CVI program is long, complex, with many functions and variables.  Converting it to a dll or a VI would probably be a nightmare.  It would be far better and easier for the CVI to call the FPGA.

Building the VI dll on the host first does not work, probably because that dll will then assume the FPGA is on a remote target.  When the dll is moved to the target, it will look for the FPGA via ethernet instead of in the target computer itself.

Have you seen any example of a RT CVI program interfacing with an FPGA?

Thanks,

David

0 Kudos
Message 6 of 7
(3,859 Views)

Hi Herod,

There is no direct way of doing this. I will have to consult someone in R&D on how to go around this limitation.

Best regards,

Kalin T.
0 Kudos
Message 7 of 7
(3,762 Views)