Go to Post With FIRST, its all about style! In the northeast, we are alllll style. - Andy Grady [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-06-2015, 23:28
madz's Avatar
madz madz is offline
Registered User
FTC #4962 (FRC 2723 Team Rocket/FTC Rockettes/FLL Baking Soda Volcano)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Oklahoma
Posts: 37
madz is on a distinguished road
Pneumatics programming help needed

Hello,

We're excited to be preparing for our first offseason event in the history of our team, and need a little bit of help with understanding and fixing some code for our pneumatic lift. We have a double solenoid that powers a large air cylinder. The problem is that when enable the robot tethered to the computer, the cylinder automatically raises the lift in teleop before be push the button to raise it.

It also will not come down when we push the button to lower it. I don't think anything has changed on the robot since our regional. I'm taking over someone else's code (I'm a Labview newbie) and am trying to understand it. I've attached a couple of pictures below of the begin.vi and teleop.vi.

If anyone can help understand where or if it is mis-wired, I would really appreciate it! Thanks!
Attached Thumbnails
Click image for larger version

Name:	20150611_220354.jpg
Views:	68
Size:	1.42 MB
ID:	19121  Click image for larger version

Name:	20150611_220211.jpg
Views:	62
Size:	1.11 MB
ID:	19122  
__________________
"Jill of all trades" for
FTC 4962 The Rockettes
FRC 2723 Team Rocket
Reply With Quote
  #2   Spotlight this post!  
Unread 12-06-2015, 07:25
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Pneumatics programming help needed

I don't immedietly see the problem in the snippets you provided, could you please post other regions of interest?

(P.S. printscreen is your friend)
__________________
2015 MAR District Champions




Reply With Quote
  #3   Spotlight this post!  
Unread 12-06-2015, 07:48
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,570
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Pneumatics programming help needed

Have you tried pushing the button to raise it after it's raised?

In addition to your programming, be sure to check the wiring and plumbing of your pneumatics; if couple of hoses were swapped, you could probably get this behavior.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-06-2015, 11:52
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pneumatics programming help needed

I'd look at the wiring and tubing first as those could easily have changed since your last competition, while the code at face value seems okay.
  • I assume the False case's are completely empty? Any reference at all to the solenoid in the False cases would break the code. There are safer ways to structure this, but leave that for future improvements.
  • Divide and conquer - If the code is working correctly then the PCM will show a red led on the solenoid 0 or solenoid 1 outputs. If these toggle when the buttons are pushed then your code is fine. If they do not toggle then the code is the problem.
  • If the code seems to be the problem also check the PCM to see that the status light on it is not blinking red. Red means the CAN wires are not properly connecting it to the roboRIO. It receives the code commands over CAN.
  • If the PCM LEDs are changing from Solenoid 0 to Solenoid 1 and vice versa when the buttons are pushed, then look next at your double solenoid where it also generally has indicator lights when one side or the other is activated to see that they are working correctly. If the PCM LEDs are glowing but the double solenoids are not then check the wiring between the PCM and solenoid.
  • If the double solenoid lights are changing, but the pressure is not, then check the voltage required by the solenoid and make sure the PCM jumper is set for 12v or 24v as necessary.
  • If the PCM jumper is set correctly, then check that the solenoid wires are in the correct red/black orientation connected to the PCM outputs.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 12-06-2015 at 12:04.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-06-2015, 21:10
madz's Avatar
madz madz is offline
Registered User
FTC #4962 (FRC 2723 Team Rocket/FTC Rockettes/FLL Baking Soda Volcano)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Oklahoma
Posts: 37
madz is on a distinguished road
Re: Pneumatics programming help needed

Thanks to everyone for the help so far. That's a great list of things to check this week.

Here are the screenshots (figured it out!) of the code. One of the buttons causes air to release a little at a time really randomly but the cylinder doesn't pull in, while the other one doesn't do anything when we push it. We had the hoses and connections checked by two different engineers who thought everything was in the right order, but they are new potential mentors and haven't worked on a robot before.

Thanks again for helping!
Attached Thumbnails
Click image for larger version

Name:	image.png
Views:	19
Size:	300.9 KB
ID:	19128  Click image for larger version

Name:	image (1).png
Views:	17
Size:	164.2 KB
ID:	19129  Click image for larger version

Name:	image (2).png
Views:	18
Size:	133.9 KB
ID:	19130  
__________________
"Jill of all trades" for
FTC 4962 The Rockettes
FRC 2723 Team Rocket
Reply With Quote
  #6   Spotlight this post!  
Unread 13-06-2015, 21:51
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pneumatics programming help needed

What's in the False Case for the solenoids?
The symptom sounds like you have code in there (bad).
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 13-06-2015, 22:16
madz's Avatar
madz madz is offline
Registered User
FTC #4962 (FRC 2723 Team Rocket/FTC Rockettes/FLL Baking Soda Volcano)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Oklahoma
Posts: 37
madz is on a distinguished road
Re: Pneumatics programming help needed

I attached the false case. I didn't know that there was something hiding in there even though I probably should have. If I want nothing to happen when the button is not pressed, the false case should be empty, correct?

I also read that the on/off is for the single solenoid and that double solenoid use forward/reverse, and so could that be causing the strange behavior?
Attached Thumbnails
Click image for larger version

Name:	image (3).png
Views:	17
Size:	363.3 KB
ID:	19131  
__________________
"Jill of all trades" for
FTC 4962 The Rockettes
FRC 2723 Team Rocket
Reply With Quote
  #8   Spotlight this post!  
Unread 13-06-2015, 22:47
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Pneumatics programming help needed

Remove everything from the False Cases and it should work.

There are two issues.
  1. The On/Off doesn't work with a double solenoid
  2. Both cases are executing at the same time, so they are clobbering each other. It will work if the False cases are empty and both buttons are not pressed at the same time.
A better technique is to only set the solenoid in a single place outside both cases.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 13-06-2015 at 23:17.
Reply With Quote
  #9   Spotlight this post!  
Unread 13-06-2015, 23:46
madz's Avatar
madz madz is offline
Registered User
FTC #4962 (FRC 2723 Team Rocket/FTC Rockettes/FLL Baking Soda Volcano)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Oklahoma
Posts: 37
madz is on a distinguished road
Re: Pneumatics programming help needed

Thank you so much! We will try that this week and I will let you know what happens!
__________________
"Jill of all trades" for
FTC 4962 The Rockettes
FRC 2723 Team Rocket
Reply With Quote
  #10   Spotlight this post!  
Unread 14-06-2015, 20:17
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Pneumatics programming help needed

This is SOP for double solenoids on the Lunatecs. Reference goes outside the cases, cases are wired to their respective forward/backward buttons. False cases are empty.
Attached Thumbnails
Click image for larger version

Name:	snippet2.png
Views:	22
Size:	8.1 KB
ID:	19140  
__________________
2015 MAR District Champions




Reply With Quote
  #11   Spotlight this post!  
Unread 15-06-2015, 21:57
madz's Avatar
madz madz is offline
Registered User
FTC #4962 (FRC 2723 Team Rocket/FTC Rockettes/FLL Baking Soda Volcano)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2011
Location: Oklahoma
Posts: 37
madz is on a distinguished road
Re: Pneumatics programming help needed

Thank you again. Removing the code in the false case fixed the problem.

I have another question, though. Is there any way to use a read switch to stop the cylinder in a middle position (someplace between fully open and fully closed)? The manual says its not recommended, but has anyone got it to work? If so, do you have any code examples you can share?
__________________
"Jill of all trades" for
FTC 4962 The Rockettes
FRC 2723 Team Rocket
Reply With Quote
  #12   Spotlight this post!  
Unread 15-06-2015, 23:07
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Pneumatics programming help needed

Quote:
Originally Posted by madz View Post
Is there any way to use a read switch to stop the cylinder in a middle position (someplace between fully open and fully closed)? The manual says its not recommended, but has anyone got it to work?
You can't really "stop" a cylinder at an arbitrary middle point. There are three-position pneumatic cylinders, but they are three specific positions.

It is possible to remove pressure from both sides of the cylinder so that it isn't being pushed to one side or the other by the air. At the same time, however, it isn't going to resist being moved by external forces.
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 03:53.

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