10-26-2023 01:41 AM
I have created a simple project that reads in and outputs analog data on NI-9203 and NI-9266 modules and a cRIO-9049. Using the developer tools, I can build this project and connect to our cRIO just fine. The gui I created displays the analog data coming in and I'm able to change the value of the analog data going out as expected.
Next, I wanted to create a user interface .vi file at the "my computer" level that talks to the FPGA through the network. My idea here is to be able to use the GUI to communicate to the FPGA without needing the developer license from LabVIEW (I'd like to run my app standalone). I found an example and followed it here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1rECAQ&l=en-US
The confusion comes in when I try to connect to the cRIO using the network method. I'm able to run FPGA.vi under the FPGA Target and connect to the cRIO just fine. However, I'm unable to connect via the following methods: 1. Right clicking the cRIO target and selecting "connect" 2. Trying to run my Windows_UI.vi under "My Computer". I receive an error that simply states "Failed to connect to the target" with no further details. I've followed the steps listed in this article, however the issue persists.
Could someone take a look at my project and let me know if anything is blaintantly wrong? Again, I can connect to the cRIO and run FPGA.vi, however I can't connect using Windows_UI.vi. Once I get this connection working, can I use the files I've created in the attached project to communicate with the cRIO without needing the LabVIEW developer licenses? If so, how do I do this?
Thanks in advance for the help!
10-26-2023 03:11 AM
Hi Elk,
@rottenelk wrote:
I have created a simple project that reads in and outputs analog data on NI-9203 and NI-9266 modules and a cRIO-9049. Using the developer tools, I can build this project and connect to our cRIO just fine. The gui I created displays the analog data coming in and I'm able to change the value of the analog data going out as expected.
Could someone take a look at my project and let me know if anything is blaintantly wrong?
Please start with the example projects for cRIO targets: they explain how to transfer data from FPGA to RT and from RT to (Windows) host (and vice versa)!
Simple answer: it isn't recommended to try to connect from Windows host computer directly to your FPGA. You always should use the RT target in between for communication - as that is what is used in the IDE as well!
10-26-2023 11:05 AM
In order to develop with LabVIEW code (whether it runs on a PC, on a LabVIEW Real-Time Target (like a cRIO), or on FPGA "inside" a LabVIEW Real-Time Target, you need to do it on a PC. In "Development" mode, you can compile and run your LabVIEW code on the PC, compile and run it on the cRIO, and compile the FPGA code so that it can be run on the cRIO.
You can also (with the right Modules) compile "stand-alone" code that do not need the LabVIEW Development environment, but only a much smaller run-time environment. When you build an executable for the PC (the "Main"), you get something that can be installed on a PC with only the LabVIEW Run-Time environment, not needing the full LabVIEW Development system. Similarly, you can build an executable for the cRIO (the "Target"), which will include the FPGA BitFile, as a "Real-Time Executable" (or .RTEXT) that is saved on the cRIO and can be set to automatically start running when the cRIO is powered up.
With a proper Real-Time Project, you would build a Host executable (.EXE), perhaps with an Installer so it can be "ported" to a PC without LabVIEW, and would also build a Target executable (.RTEXE) that would be deployed (and possibly set to "Run at Startup") to a particular cRIO that would be connected to the Host PC.
I'm not sure I directly answered your question, except to say that it is possible to do two Deployments as explained in the previous paragraph and "Communicate using a (Host) GUI to a Real-Time Target having an FPGA without having LabVIEW Developer installed on the Host".
Bob Schor