NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Control Add-on

http://github.com/NIVeriStandAdd-Ons/Control-Custom-Device

I'm working on a VeriStand application for test cell control and need to integrate a PID Controller.  I visited the NI VeriStand Add-On GitHub page and found the Control-Custom-Device, see the link above.  I was able to run the build specification under the my computer target, and placed the custom device, workspace tool, and display templates in the correct folders for access in VeriStand.  I I can add a PID controller tot he system def, but get an error because it appears that this device is only compatible with cRIO targets that are running Windows, PharLap, or VxWorks.  I'm trying to integrate the add-on with a cRIO 9066 which has a Linux-32-ARM operating system.  I'm currently running LabVIEW 2015 and VeriStand 2015 on my system as well.  I noticed that in the Custom Device Control Addon XML file there are specified file paths that mention Windows, PharLap, and VxWorks, but not Linux.  I also noticed a line in the XML file that is referring to a file path on the c drive in a folder named "ni-rt".  This folder does not exist on my computer.

Is there an easy way to modify this custom control add-on so that it will work with my system, or do I need to start from scratch?  If I can't modify this file, does anyone know an easy way to create a PID Controller for VeriStand?

Thanks,

Dan

0 Kudos
Message 1 of 6
(7,177 Views)

Hi Dan,

Linux support was added in VeriStand 2015, and it seems like this custom device wasn't updated to add that support.  I've used the request page on Github to suggest that the author add support for Linux, but no guarantees if/when that will occur.  Adding support yourself wouldn't be a terribly difficult endeavor.  In a general sense, you will:

  1. Download the custom device
  2. Add a linux target to the LabVIEW source
  3. Move the VI source files underneath the linux target
  4. Build it (using the other build specs as a guide)
  5. Add the Linux tags into the XML next to the PharLap and VxWorks tags.


If you have trouble or need guidance adding in the Linux support, you can contact NI support through www.ni.com/ask for help.  They won't be able to assist with many specifics about the Control Custom Device as a whole, but they will be able to assist with how to build a custom device with Linux support.  Hope this helps, and sorry about the delay in response!

-Kyle

0 Kudos
Message 2 of 6
(5,804 Views)

I added Linux support but didn't have a target to test deployment.  Let me know if you have any issues.

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 3 of 6
(5,804 Views)

Daniel,

I was actually able to add the Linux support as well, and it seems to be working ok.  I haven't tried your version with Linux yet, but might download it in the future to see if it is any different than what I did.

I do have another question for you.  When I add a PID controller to my VeriStand workspace, I am only able to set PID parameters up to 3 decimal places.  The boxes let the user input values with more percision than 3 decimal places, but once the system defitinon is saved it rounds the parmeters to the nearest thousandth.  Below are the steps I executed to make this happen.

1.  I entered 0.0001 for the P term

2.  I hit Apply.

3.  When I save the system defition file, the P term changes to 0.000000

If I enter 0.0015, apply, and save, the P term changes to 0.002.

When I deploy my sytem definition file, and have the workspace open, I can use the PID workspace tool to change the PID terms.  At this point, I can enter smaller values that extend farther than 3 decimal places (example:  I can now enter 0.00001 for the P term).

Any advice on how to change the Custom Device so the user can enter PID terms with more percision in the system definition file?

Regards,

Dan

0 Kudos
Message 4 of 6
(5,804 Views)

The latest version of the addon gives 6 digits of precision (up from 3) so that should fix your problem.  If you want to fix it yourself, you can search the code for .3f and replace it with .6f.

Thanks!

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 5 of 6
(5,804 Views)

I'm trying to get this working on VS 2018 and I successfully installed the CD and having it running, however I can't modify the PID values from the UI. They don't appear as an editable value in the system explorer or the UI.

Also, the work space PID tuning tool does not work with 2018 (it's version 2015 in the source code). I tried to recompile into 2018 but had "NI VeriStand Application Software support for LabVIEW 2018 is missing..."

Thanks for the help and the CD! It's a shame Veristand has no native provisions for PID control.

0 Kudos
Message 6 of 6
(4,040 Views)