Go to Post I think we are having that "hard fun" that Woodie Flowers keeps talking about. - OZ_341 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 15 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2015, 17:51
Techwiz's Avatar
Techwiz Techwiz is offline
Blake B
AKA: Blake
FRC #4909 (The Bionics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Massachusetts
Posts: 85
Techwiz will become famous soon enough
PID Commands and PID Editors

We are trying to use PID Commands. (Not PID subsystems)
We just found out that on the smart dashboard a command button can be turned into a PID editor.
I am unable to find any documentation regarding this really cool control.

Has anyone got them working?
__________________
Blake
Electrical, Programming and Design

Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2015, 18:43
Jalerre's Avatar
Jalerre Jalerre is offline
Registered User
FRC #4965 (FIRE)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Anderson, SC
Posts: 147
Jalerre is on a distinguished road
Re: PID Commands and PID Editors

I don't know about editing the PID in SmartDashboard but in you can in LiveWindow in Test Mode.

Just insert this line into robotInit:
Code:
LiveWindow.addSensor("Subsystem Name", "Sensor Name", subsystem.PID_Controller);
Subsystem name and sensor name must be in quotes or just pass in a string there. The subsystem name is merely used to group your sensors and motors and the sensor name is used to label the PID in LiveWindow. Remember to run LiveWindow in testPeriodic.
__________________
Vex
2013: 415 - Fabrication, Programming, Electrical
2014: 415D - Captain, Programming Lead
FTC
2014: 7354 - Programming Lead
FRC
2013: 415 - Safety Animation, Fabrication
2014-2015: 4965 - Programming & Electrical
2016: 4965 - Captain, Programming Lead, Electrical
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2015, 21:38
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: PID Commands and PID Editors

Our subsystem controllers would show up in Live Window, but then when hitting the green/red enable button, nothing would happen. We had print statemenets in the usePIDOutput and returnPIDInput and they were never called with the enable flag being green or red. Perhaps we were just trying to use it wrong. I'm not sure. During Teleop though, we saw the PID subsystems were running fine.

This was using SFX Live Window. We finally just pushed past the problem by using some SmartDashboard.putNumber/getNumber calls for P, I, D, and Setpoint and a special command that reads them and then reset the PID.

We have about 4 more PIDs to tune, so figuring out the problem would save us a bit of effort. Anyone have similar experience?

We use RobotBuilder and the calls to LiveWindow.addActuator (not addSensor as suggested in previous case) are automatically generated.

Does anyone have a suggestion?

In scanning PIDCommand (we have only two) I don't see that RobotBuilder automatically puts one on LiveWindow. Is there a difference between calling AddActuator with 3rd argument getPIDController() and calling AddSensor? If so, perhaps this is just a bug in RobotBuilder's boilerplate for PIDSubsystem.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi