Hello, thank you for helping me out.
I recently started on the NI MyRIO, I have the following code to handle an ultrasonic range finder:
However when I try to compile it I get the message:
Apparently many of the most common functions of Labview can't be used on an FPGA target. However the code for the rangefinder is a small part of a bigger project in which I'll have to use said functions, so my main worry is wether I'll be able to integrate this FPGA code together with "normal" labview code on the myRIO, if possible then how?
I'd like for example create a "top" VI that has it's own code (showing the waveform graph after realizing some mathematical operations over the data outputed by this VI as well as doing some other stuff).
Thank you again for helping me.
Solved! Go to Solution.
don't use any kind of arrays with non-fixed size on a FPGA target!
And surely your FPGA doesn't have a UI, so it is pointless to have a graph on the FPGA…
LabVIEW comes with a lot of example VIs and projects. There are also projects explaining how to faciliate a FPGA target controlled from a RT host…
Here is the thing with FPGA: you are configuring actual hardware. Everything has to be fixed in size. So if you do have to use an array, you have to configure it to be of a fixed size (right-click in the control to set the size, use Initialize Array or FOR loops with fixed number of cycles and autoindexing).
As GerdW stated, FPGA does not have a GUI. So you will want to use a DMA FIFO to pass your waveform data up to the RT. You create those in the project.
For some really good information, I recommend you check out the cRIO Developer's Guide. The myRIO is the exact same platform as a cRIO except you cannot use C Series modules.
Quick Follow up:
I was able to integrate the FPGA module with the rest of my project using the following after messing around for a bit.
Hopefully this will help someone as new as I am to LabVIew!
Thanks for your answers and time.