05-02-2012 04:19 PM - last edited on 02-01-2017 03:50 PM by Matt_McLaughlin
Are you getting started with the NI Single-Board RIO General Purpose Inverter Controller (GPIC)?
NI Systems Engineer, Dr. Ben Black has put together some example code for three phase inverter control using the NI GPIC and field oriented control techniques. The code requires that you have the CompactRIO Waveform API (the example has been updated to use the latest version of the cRIO Waveform API, 4.01) installed on your computer as well as the typical LabVIEW 2012, FPGA, RT and CompactRIO Module Software tools (download link).
This example demonstrates field oriented control with real and imaginary voltage setpoints and sine-triangle pulse width modulation (PWM). The lab test bench is measuring single phase 120VAC power from the wall and synchronizing it with the output of the three-phase line-to-line voltage. The two phase offsets in the code compensate for delay of the IO and control processing as well as the line-to-line versus line-to-neutral calculations. The code has blocks for RMS, PLL and Clarke / Park calculations as well as lower-level code for rising edge delays on the digital IO and lookup table based triangle wave generation for the sine-triangle PWM implementation.
Discussion thread regarding code updates/revisions: https://decibel.ni.com/content/message/84658
Learn more about the NI sbRIO GPIC: ni.com/singleboard/gpic/
Download the NI sbRIO GPIC Factsheet PDF: decibel.ni.com/content/docs/DOC-19216
Read the NI GPIC FAQ (Frequently Asked Questions): https://decibel.ni.com/content/message/41674
11-02-2012 05:43 AM
Hello,
when trying to set up this example code with the latest versions ( 2012 ), and opening RT-inverter controller and UI.vim, it can't find some of the .ctls and VIs. It seems that those used in the main VI don't match with criowfm_401_installer.zip . Some of them could match "theorically" but others ( ...Poly.vi ) don't exist and I don't know what VI I should choose.
Thanks and regards,
Cristobal
11-02-2012 08:08 AM
Cristobal,
I think that the cRIO Waveform API might have been updated since I posted this code (or at least since I installed software on my development machine). I think that the version of the API that I was using was some flavor of 3.x, and I also seem to remember the author of the API telling me that some of the changes he made in 4.0 would break backward compatibility.
I'm in the process of moving and getting my lab system set back up, but I'll update the code, test it and post it as soon as I get it back up and running. In the mean time please post your feedback if you get the VIs running with the new version of the API.
11-05-2012 02:52 AM
Hello,
I have been able to run successfully the VI installing the previous version of cRIO Waveform API in another PC and copy those VIs and Ctrls in my PC. So that, when the VI asks for those, I just select them from my local hard disk. I suppose this is not the right way, but at least the run button doesn't appear broken.
01-14-2013 01:44 PM
hello
i just start to study using sbRIO 9606 to develop code for power electornics issues. do you guys have any power electornics exmple project using sbRIO 9606/
06-04-2013 02:50 PM
This is a nice example. I wish this was available 2 years ago when I started using NI CompactRIO for inverter control. At the time there was very little example code available, and I ended up building everything here from scratch, and it took me a couple months.
02-03-2014 03:24 AM
Great example! I don't know if this is kept up to date or not, but there was one small issue with it - a function called FXPtoSGL_EncodeU32.vi is deprecated and no longer available starting with LabVIEW 2012 (http://www.ni.com/white-paper/9221/en/). As suggested in the linked white paper though, replacing it with a standard To Single Precision Float fixes the issue.
11-25-2014 03:00 AM
The first link ("
Download the example code and development tools: decibel.ni.com/content/docs/DOC-22394") seems to point to this very page, so no like to the toolchai...
Can you please fix it or explain?
Thanks so much
ciao
11-25-2014 07:07 AM
Ciao Davide- The latest code is attached above and the link you referenced now points to a discussion forum where we workshoped the code and made a number of updates.
03-15-2016 07:11 AM
Hi, i am getting problems with the NI sbRIO 9606. when i input a sine wave of 50 Hz from a signal generator, the waveform recorded in labview is distorted. can someone help please.