09-15-2015 09:46 AM
I've recently upgraded to LV 2015. With that, I've also migrated the project I was working on from LV 2014. When I tried to recreate a VI with the fixed-point PID I had been using (Programming >> FPGA Math & Analysis >> Control palette) I was surprised to see that the only PID included with LV 2015 is a floating-point implementation. Using this floating-point implementation takes up a big chunk of the FPGA on an sbRIO-9606 which is why I cherish the fixed-point implementation despite its shortcomings.
After some digging around I found that the VI I was using in LV 2014 is still shipped with LV 2015, so I customised my palette to make it accesible:
In case anyone would like to do the same, the file that needs to added to the palette is <vilib>:\addons\control\pid\fpga.llb\XNode\niFpgaPID.xnode
As a comparison, these are the compilation results for both implementations:
To be fair, the floating-point is intrinsically multi-channel (up to 255 I believe) whereas the fixed-point I compiled would take up more space if I made it multi-channel (I think the total slice usage would go up to about 10% in that case). Almost 20% difference is quite a big deal when you are trying to fit a big program into an FPGA, don't you think?
Why was the fixed-point version not included in the palette? The new floating-point implementation looks great and is feature-rich, but it's not that helpful when you need to curb FPGA resource usage.
If a VI is included in vi.lib but not on the palettes, does that mean that it's no longer officially supported by NI?
09-16-2015 07:45 PM
Thank you for the detailed post, and especially for finding the xnode in vilib because the name is a bit vague.
I'm not sure if I'll be able to find much on why it isn't included if the decision was to remove it from the palette but I will try to find out tomorrow whether it was intended or not.
The resource usage difference is pretty big, what target are you compiling for? I also can't see the whole name of the VI you are compiling for but I know the feeling
09-17-2015 05:49 PM
Dfjuggler,
I looked through a few versions of LabVIEW that I had and this change seemed to have happened between 2014 and 2014 SP1. There was some conversation on whether to include the old PID function in the palette or not so this does appear to be removed on purpose.
As you noted, the older PID function is no longer on the palette so there is no guarantee that the function will be there from year to year.
09-18-2015
06:09 AM
- last edited on
08-19-2024
11:20 AM
by
Content Cleaner
Thanks for looking into it, Matt. I'm using an sbRIO-9606, which carries a Spartan-6 LX45 FPGA.
I'm attaching a zip file with the project and VIs in case you want to play around with it to see if the big difference in resource usage is due to me overlooking some important detail.