06-06-2014 11:32 AM
Hello,
I am working on a PID controller on the FPGA module using cRIO-9076. The code is written using labview 2013 SP1.
I have used the Example project "Using Discrete PID - cRIO.lvproj" (labview\examples\control\pid\fpga.llb\CompactRIO) as a starting point, but for the host VI I replaced the plant simulator subVI with a discrete transfer function within a control & simulation loop (both found under control design & simulation module). I left everything else on the host VI and the FPGA vi pretty much the same, but somehow the host VI is not compiling because "labview needs more memory to compile VI". The code itself is pretty simple and there is plenty of memory available on the computer, so I don't understand what is causing this problem. Does anyone have any advice as to what I can do to decrease memory usage on the host VI?
Regards,
Shin
06-06-2014 01:32 PM
Can you share the code (ideally all the related VIs, in a zipped file) that generates the error? Does the error occur when you try to run the host, or when you compile the FPGA?
06-06-2014 01:37 PM
I'm sorry, but I'm not clear. When you say the "host", do you mean the cRIO, or the PC connected to the cRIO?
Mike...
06-06-2014 01:39 PM
Hello Nathan,
Thank you for the quick reply. The FPGA compiles fine, the error occurs when I compile the host VI.
Here is the zip file of all the related VI's.
06-06-2014 01:47 PM
I'll have to look at it later, I'm still on LabVIEW 2012 here (have 2013 available elsewhere). But I'm confused about one thing - you should never need to compile the host VI. That happens automatically in the background when you edit or deploy the VI (depending if you're running it on your computer or on a remote RT target). If your host is actually under the FPGA target and you're right-clicking and compiling it, you're doing it wrong. If not, then exactly at what point does the error occur? When you click the Run arrow?
06-06-2014 01:50 PM
Hello Mike,
In this project, the host VI is located under the cRIO target.
Attached is an image of the project explorer window.
06-06-2014 01:54 PM
I actually meant to say that the host VI does not "run", meaning that the error occurs when I click the run arrow on the host VI. I am sorry for the confusion, I am still getting used to the terminology as I am relatively new to labview.
06-06-2014 01:58 PM
Do you have a large amount of data stored in the host VI in some form - for example, a graph or an array control holding many values? Make sure those are cleared and not saved as default values, they can eat up a lot of memory. Again, sorry I can't actually look at your VI right now, which would let me answer the question myself.
06-06-2014 02:14 PM
I have two waveform charts, one that plots the controller output and one that plots the setpoint and the process variable. Apart from that, I have a few controls but nothing too large. I will try running the host without the two charts. Thank you for the advice!
06-07-2014 10:03 AM
Doesn't look to me like the charts are the problem. My next guess is there's some issue with the transfer function, but I haven't used the simulation toolkit and don't have it installed so there's nothing I can do to look at it, unfortunately.