Go to Post You can't guarantee outcomes -- only effort. If your team did its best, be satisfied. - Rick TYler [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 27-01-2013, 00:36
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Pneumatics HELP

So I know some basic labview like programming a motor, drivetrains, and some sensors. This year my team is using Pneumatics. I have literally no clue how to program that. One of my teachers told me that we are limited to 120psi in the compressor but how are you suppose to limit it. We also want it that when the cRio detects that the pressure is decreasing that it starts the compressor again and stops at 120psi. I have looked at the examples provided by NI but don't quite understand them. Can someone please upload an example on how to set up Pneumatics and control the PSI in the Compressor and also please define some of these "Pneumatics" terms such as double solenoids, spikes and etc not exactly sure what they are or the role they play. Thxs
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2013, 01:06
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,708
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Pneumatics HELP

Let's cover the mechanical and electrical first. The pneumatic system has a high pressure side and a low pressure side. The high pressure side tops out at 120psi. It connects to the low pressure side through a regulator, which limits the pressure on the low side to 60psi.

The high pressure side is limited to 120psi by two things. First is a mechanical pressure relief that will start dumping air at around 125 psi. Second is a pressure switch. This is a normally closed switch that opens when the pressure reaches 120 psi. This switch is what lets your software know when you need to run the compressor more to get back up to 120 psi. It needs to be connected to the signal and ground pins of a digital input on your sidecar.

Programming is pretty easier. The relevant VIs are in WPI Robotics Library->Actuators->Compressor.

In your Begin.vi, you want to "Open" a compressor reference, then connect the created reference to the Start VI. Then the program will automatically monitor the pressure switch, and turn the compressor off and on with the Spike relay. Make sure you Do a Refnum Set to save the reference for later use.

In your Periodic Tasks VI, you need to drop the "WPI CompressorControlLoop" VI and pass it the save reference.

In your Finish VI, you need to get the compressor reference, pass it to a Stop VI, and then pass it to a Close VI. And then you're done.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2013, 16:01
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Re: Pneumatics HELP

Thxs, now I understand better, but how about the double solenoids and a pressure switch(Do I have to program that?, If so how). My team wants it that when you press one button the piston goes forward and when you press it again it comes back down.Also, When i went to the actuators on Labview I saw their is a "Relay" what exactly is this. I also saw an example from team 358 and I'm quite confused. So my team is connecting the Double Solenoids straight to the Digital Sidecar since we don't have the correct Crio Solenoid Bumper. So I would program it like the "Solenoid connected to Spike/Relay" example correct? One more thing since the example is only using One Solenoid do I have to copy that same code and change some of the constants since were using two solenoids? I'm sorry I'm asking so much questions. Thxs for the help
Attached Files
File Type: pdf Pneumatics-StepByStep-cRIOversion.pdf (1.26 MB, 62 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2013, 17:06
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Pneumatics HELP

The digital sidecar cannot directly control the solenoids, but if you are using 12 volt solenoids, spike relays can be used for indirect control. However, if you are using 24 volt solenoids, the solenoid bumper MUST be used, and it must be powered by the 24 volt supply on the power distribution board.

Also, all of the pressure switch related code is in the "WPI CompressorControlLoop" VI so there is no need to do anything more with that.
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2013, 19:29
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,708
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Pneumatics HELP

Quote:
Originally Posted by chriz4gx View Post
Thxs, now I understand better, but how about the double solenoids and a pressure switch(Do I have to program that?, If so how). My team wants it that when you press one button the piston goes forward and when you press it again it comes back down.Also, When i went to the actuators on Labview I saw their is a "Relay" what exactly is this. I also saw an example from team 358 and I'm quite confused. So my team is connecting the Double Solenoids straight to the Digital Sidecar since we don't have the correct Crio Solenoid Bumper. So I would program it like the "Solenoid connected to Spike/Relay" example correct? One more thing since the example is only using One Solenoid do I have to copy that same code and change some of the constants since were using two solenoids? I'm sorry I'm asking so much questions. Thxs for the help
Yes, you'd copy it and use a second relay to control the second solenoid of the double solenoid. There is actually a way to use one relay to control both solenoids, but I can't recall if it's legal this year or not.

The best solution is to use the solenoid module and breakout, though. It takes up much less space than a bunch of relays.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #6   Spotlight this post!  
Unread 28-01-2013, 19:07
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Re: Pneumatics HELP

So Today I programmed the compressor(Everything is set up by the tutorial provided by team 358,I provided the Vi) and I had a few questions. First, I noticed that when I press the trigger on Joystick one the compressor began to compress air is there a way I can automatically make it compress air until it gets to 120Psi by itself. I only want to use the trigger to control the Solenoids to push the piston forward and back. Also, I had problems programming the solenoids.Since were connecting the solenoid to a spike and from their to a relay on digital sidecar I had to program relays and I wasn't able to connect the triangle(with the True/False, and Question mark) thing to the RELAY SET VI, I would always get a little red dot on it, So I know something is wrong, how do I fix it? Thxs
Attached Files
File Type: vi Pneumatics.vi (31.2 KB, 16 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 28-01-2013, 22:17
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,113
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 HELP

In the Begin vi, use the Compressor functions to Open a compressor and give it a name with a Refnum Set. Specify the relay powering the compressor and the digital input with the pressure switch connected.

In the Periodic Tasks vi, enable the existing bit of code that starts the compressor control loop. Replace the sample name with the one you used in Begin.

That's all it takes to have a compressor automatically come on when the pressure drops below 90 psi and turn off when it reaches 120 psi.


That red coercion dot is there because the Forward and Off constants you have connected to the Select function are Solenoid constants, and the Relay Set is expecting Relay constants. You can see this if you turn on the Context Help and hover the cursor over the blue wire coming out of them. They happen to be perfectly compatible with one another (Off/On/Forward/Reverse values are represented as 0/1/2/3 in both), so the dot is only a cosmetic issue. But you can fix it by deleting the existing constants and creating new ones based on the RelayValue input terminal of the Relay Set function.
Reply With Quote
  #8   Spotlight this post!  
Unread 28-01-2013, 22:33
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Re: Pneumatics HELP

I did exactly as you said about opening the compressor and have enabled the control loop in periodic tasks but I still need to press and hold down the trigger button to make the compressor turn on. Also, I put the Compressor Set(One of the arrow in front I think thats how it is called), Stop, and Close VI in the Finish VI do you think thats why I have to manually press and hold the trigger button to control the compressor? Should I not put any compressor code in the Finish VI? Thxs
Reply With Quote
  #9   Spotlight this post!  
Unread 28-01-2013, 23:18
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,113
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 HELP

Sorry, I forgot a step. You also need to include a Compressor Start in the mix between the Compressor Open and the Compressor Refnum Set.

And you shouldn't have any other Relay Open functions trying to access the same relay you opened for the Compressor.

Are you seeing any errors on the Driver Station diagnostics output display?
Reply With Quote
  #10   Spotlight this post!  
Unread 02-02-2013, 10:25
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Re: Pneumatics HELP

So Today we tested our pneumatic and for some reason the pistons are not working. We think it might be a programming issue since we have check the pneumatic and there's no problems. The pressure builds up correctly but when I click button 3 on joystick 1 nothing happens. Button 3 is suppose to make this piston push out because we want to manually control it when the piston comes out and comes back in.I don't know whats wrong with the code can someone please check the codes I have provided thxs
Attached Files
File Type: vi Begin.vi (38.8 KB, 13 views)
File Type: vi Finish.vi (18.3 KB, 6 views)
File Type: vi Periodic Tasks.vi (22.3 KB, 8 views)
File Type: vi Teleop.vi (31.9 KB, 11 views)
Reply With Quote
  #11   Spotlight this post!  
Unread 02-02-2013, 20:27
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,113
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 HELP

You have the NI 9472 module in Slot 3 of the cRIO, right? Does its first LED (labeled "0") come on when you press the joystick button?

Is the green power indicator LED on the Solenoid Breakout lit? Where does its power input connect to?

What kind of solenoid valve are you using, and what is its voltage rating?
Reply With Quote
  #12   Spotlight this post!  
Unread 02-02-2013, 20:44
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Re: Pneumatics HELP

Thxs for help we got it fixed! we noticed that the First LED wasn't turning on but then we did some quick research and saw we were suppose to hold the button down. Now our pneumatics is completely up and running. Thank you so much for the help!!
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 21:54.

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