LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital PID control

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

 

0 Kudos
Message 1 of 4
(2,817 Views)

Hi Lausanne,

 

for suggestions you could read Wikipedia on PID controls!

And I suggest to use FXP datatype for the math…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,802 Views)

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

0 Kudos
Message 3 of 4
(2,752 Views)

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,

Barp - Control, Simulation, RTT and HIL - National Instruments
0 Kudos
Message 4 of 4
(2,738 Views)