From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use discrete PID in FPGA module?

Hi,
I want to implementa PID controller for a Two tank set up, where my aim is to control the level in the tank.so my process variable will be in centimeters and my set point will also be in centimeters.The control output calculated will be milli ampere equivalent of binary because, my pid gain have the unit of ma/cm. shall i have to scale my setpoint, process variable, range in host vi before i pass it to FPGA VI? and to which length of bits shall i have to convert i.e. either to 16 bit or 32 bit.Range i will be specifying in milli amperes.when i see in example VI , PID gains are scaled by  2^8  and all other values like set point, process variable, range are scaled by 2^15 why?.

regards,
Vishnu
0 Kudos
Message 1 of 4
(3,613 Views)

Hi Vishnu,

All of the inputs to the PID Express VI are 16 bit inputs.  In the example, the setpoint and process variables are ranges from 0 to 100%, so the setpoint is set relative to the process variable maximum.  The help for the Express VI for the PID Gains says "the upper 8 bits (out of 16) of each integer represent the integer portion of the gain", meaning that 128 is the highest (unscaled value, scaled would be 32767) value you can specify for Kc.

Regards,

James R.
National Instruments
0 Kudos
Message 2 of 4
(3,524 Views)

It means there is no possibility of using fractional value in PID Controller How can you set the gains of PID ?

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

FPGA PI 

0 Kudos
Message 4 of 4
(2,221 Views)