02-20-2020 06:12 PM
My hardware application utilizes a piezo servo motor and optical encoder to move a stage in a single axis. The stage travel is large enough to require a 32 bit integer to store its position without warping around. I am running into problems using the PID express vi because it seems like the Process variable and setpoint are limited to 16 bits. From similar posts I've seen, there doesn't appear to be a simple way to modify the express vi to handle 32 bit integers.
My question is if there is a standard solution to this problem like somehow keeping the input at 16 bits and monitoring the wrap around?
Thanks for the input and sorry if there is an obvious fix, i'm still pretty new.
Theo
02-21-2020 01:12 AM
Hi tbrock,
@tbrock2 wrote:
I am running into problems using the PID express vi because it seems like the Process variable and setpoint are limited to 16 bits. From similar posts I've seen, there doesn't appear to be a simple way to modify the express vi to handle 32 bit integers.
Then the "simple" solution would be not to use this ExpressVI and create your own PID subVI…
(I recommend to use FXP datatypes instead of plain I32 values in the FPGA.)