02-18-2014 08:54 AM
Hi everybody,
You may know that, there is Labview FPGA built in PID control module.
And you can not see the inside of the module.
I would like to build digital PID of my own with shift registers or so. Any suggestion for that implementation?
Best
02-18-2014 09:48 AM
02-19-2014 10:00 AM
Hi Lausanne,
You should actually be able to see the code inside, although it's not especially pretty. If you right-click on the node and select Convert to SubVI, it will give you the code corresponding to the current configuration. You can then access any other Express subVIs by right-clicking and selecting Open Front Panel.
Jim
02-19-2014 11:45 AM
In addition to what Jim said, after you generate or modify the VI, you can just drop this inside a Control and Simulation Loop (CDSIM Loop) and, then, you can configure it to be 'discrete step', so simulation how this would work on the cRIO.
To do that, after the VI is inside the CDSIM Loop, right-click on the VI and select "SubVI Node Setup...". That will bring a dialog that you can choose 'Discrete' and enter the period you want to run. '-1' indicates that it will inherit the time from the Control and Simulation Configure Simulation Parameters (Left node on the CDSIM Loop).
Also, check this example to demonstrate the use of LabVIEW VI and Control and Simulation code...
C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Case Studies\Mechatronics\Pendubot\Pendubot.vi
hope this helps,