02-04-2019 02:19 AM
Hello,
I'm working on a LabView project to drive DC motors from the FPGA part of a compactRIO 9063.
I've implemented a small VI to do so, based on optical encoders to retrieve the current motor axis positions and a PID to control the motor courses.
For some reasons I cannot explain, the PID outputs always send as NaN (as far as I can see using the indicator).
Any idea why I have such a behavior ?
Find below a snapshot of my VI.
thanks for your help,
Regards,
Christophe.
Solved! Go to Solution.
02-04-2019 02:30 AM
Which outputs read NaN? Do you use indicators that are not shown in the picture to see these outputs?
02-04-2019 03:04 AM
Oups, sorry.
The indicator connected to the output of PID, in my VI, its name is 'Sorties (-1;1)'.
02-04-2019 07:04 AM - edited 02-04-2019 07:07 AM
No problem!
I am not very familiar with the PID vi, but I can offer some general debugging advice:
To get around the valid inputs problem you could implement some kind of default values on the front panel controls (which you know are valid), which are overwritten when a new value comes from the host. Host updates could even be checked for validity before they are fed into the PID. Though really you should do this sort of validity checking on the host!!
Good luck!
02-15-2019 01:39 AM
Thx, your advice helped a lot !
You were right, I had bad initialisation values that probably set my PID in a weird state !
Many thanks for the help !