01-19-2010 06:54 PM
Hello all,
I apologize if I am asking a repeat question. I searched for this a bit and couldn't find a solution.
I am trying to run a single VI (either on the compactRIO RT or on the connected host PC) and have it run code on the host PC, the RT target, and the FPGA code. I currently have code running on the host PC that opens the FPGA reference and runs the FPGA code, but I am not sure how to do this with a VI on the RT target. Any advice/help would be great. Thank you!
Brandon
Solved! Go to Solution.
01-20-2010 09:31 AM
BrandonGT,
Hello! This document talks about how to Programmatically Open a VI from within Another VI. Using the VI server you can open a VI on your PC from the RT and vice-versa. Is this what you were looking for?
If you were wanting to know how to open and run the FPGA code from the RT code, you can do it the same way you are currently doing it from the PC, the code should be the same. This tutorial on FPGA Design, Development and Programming talks about this.
01-20-2010 12:22 PM
This is close. I want the VI running on the host PC to run a VI from the RT on the RT. Your links are helpful but I have no idea how to use the VI server to accomplish this. Perhaps I am missing something. Any additional advice? Thank you!
Brandon
01-21-2010 08:38 AM - edited 01-21-2010 08:40 AM
Hi Brandon,
try this:
On the host side:
Make sure IP address and port of VI server matches target settings.
On the RT target:
Inside RT_LoadFPGA.vi:
1st start the VI on RT target
2nd run the VI on your host
Regards,
Swen
01-22-2010 12:13 AM
01-22-2010 08:21 AM
You're not far away from reaching your goal. But you need at least
If you double click the exe on your host computer it will open an application reference to your RT target machine and call the VI on that target machine. Thats how you can run code on your RT. From this RT code you can download and run the FPGA code (bitfile) to your FPGA, or control the already running FPGA code by controlling a state-machine. Load more VIs to your RT targets memory and call them from your host to add more funtionality if you need to.
01-22-2010 09:05 AM
swenp wrote:You're not far away from reaching your goal. But you need at least
- Compiled FPGA code (Bitfile) containig your code to run on the FPGA.
- A compiled executable for your RT target, set to autostart.
You could use the code from my first post as a starting point. Compile, deploy and set it to autostart on your RT target.- A compiled executable for your Host machine; the one your user will start.
You could use the code from my first post, maybe load settings IP Address, Port etc. from Ini-File.If you double click the exe on your host computer it will open an application reference to your RT target machine and call the VI on that target machine. Thats how you can run code on your RT. From this RT code you can download and run the FPGA code (bitfile) to your FPGA, or control the already running FPGA code by controlling a state-machine. Load more VIs to your RT targets memory and call them from your host to add more funtionality if you need to.
Ditto! You could even go as simple as have your PC code have a shared variable "start" that when ran sends a boolean true value to your RT code that is a startup executable waiting for a "start" (boolean true) signal.