Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   General Forum (http://www.chiefdelphi.com/forums/forumdisplay.php?f=16)
-   -   Air Cylinder,compressor,soleinoids,relay (http://www.chiefdelphi.com/forums/showthread.php?t=115145)

tim101 18-03-2013 14:28

Air Cylinder,compressor,soleinoids,relay
 
Hey, i really and truly need massive help with this programming.......i have been on this for at least three weeks trying to figure out how to program this air compressor and air seinolds, I've been trying to find someone with the right LabVIEW Functions that shows me exactly how to control the air cylinder,compressor,solenoids,relay: the proper steps on how to program each of the 4 subVI'S that were listed

jdaming 18-03-2013 14:42

Re: Air Cylinder,compressor,soleinoids,relay
 
I would start here:
http://www.ni.com/pdf/manuals/372668d.pdf

This is a LabVIEW guide for FIRST robotics (a little old but mostly still good). Chapter 38 will cover solenoids etc.

You can also go to Help>Find Examples and you will find a couple of relevant examples.

If you have specific questions we can answer them.

Worst case come find me during Bayou on Thursday and I'd be happy to help I will be around one of teams 1304,4805, or 4113.

tim101 18-03-2013 15:39

Re: Air Cylinder,compressor,soleinoids,relay
 
thanks n i would really to be there but my team and i aren't goin to the Bayou regional this week we are going to the regional in Arkansas

tim101 18-03-2013 15:58

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1249732)
Hey, i really and truly need massive help with this programming.......i have been on this for at least three weeks trying to figure out how to program this air compressor and air seinolds, I've been trying to find someone with the right LabVIEW Functions that shows me exactly how to control the air cylinder,compressor,solenoids,relay: the proper steps on how to program each of the 4 subVI'S that were listed

I am still looking for help

Racer26 18-03-2013 16:14

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1249771)
thanks n i would really to be there but my team and i aren't goin to the Bayou regional this week we are going to the regional in Arkansas

Uh. If you're with 4297, they're registered for Bayou according to FIRSTs website. You can't just change which regional(s) you're going to on a whim.

jdaming 18-03-2013 16:48

Re: Air Cylinder,compressor,soleinoids,relay
 
Maybe try posting an image of what you have tried so far?

What happens currently when you run the code you are using?

How many solenoids do you have? Do you see any lights change on the 9472 solenoid module in the cRIO chassis?

Alan Anderson 18-03-2013 17:12

Re: Air Cylinder,compressor,soleinoids,relay
 
Using LabVIEW, you have access to some very good example code and tutorials.

On the left side of the Getting Started window, select the Support tab, then click on the "Find FRC Examples..." link. Browse for the "Solenoid with Compressor" example project (it's in the Pneumatics subfolder under FRC Robotics) and open it. It shows you exactly how to make a compressor work and exactly how to control a solenoid.

One of the tutorials you can find from the Getting Started window is Tutorial 7 - Integrating Examples into Robot Code. That'll tell you how to take the working code from the example and put it into your robot program.

chriz4gx 18-03-2013 17:52

Re: Air Cylinder,compressor,soleinoids,relay
 
1 Attachment(s)
Hope this Helps!
Are you connecting your solenoids to a relay or the cRio Solenoid Bumper?

tim101 19-03-2013 11:48

Re: Air Cylinder,compressor,soleinoids,relay
 
2 Attachment(s)
this is my program.

jdaming 19-03-2013 12:11

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by jdaming (Post 1249807)
Maybe try posting an image of what you have tried so far?

What happens currently when you run the code you are using?

How many solenoids do you have? Do you see any lights change on the 9472 solenoid module in the cRIO chassis?

Thanks for the image.

My other two questions still apply to helping us figure out if the problems is in the wiring, code, execution, etc.

Do you initialize "DoubleSolenoid" in the Begin VI? (I assume you do just want to make sure)

You are expecting it to only go out while you have the button pressed and held correct? Do you see the joystick input on the Dashboard? I am not sure the type of solenoid/how you have it connected but have you tried using reverse instead of forward.

Is your compressor running / do you have pressure when you test this?

tim101 19-03-2013 12:31

Re: Air Cylinder,compressor,soleinoids,relay
 
yes i do initialize Double Solenoid in the begin vi

Alan Anderson 19-03-2013 12:44

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250141)
this is my program.

You labeled it Begin, but the picture is obviously Finish.

So what's the problem? Tell us what you want the robot to do, and what it's doing instead.

tim101 19-03-2013 12:48

Re: Air Cylinder,compressor,soleinoids,relay
 
Right now wat I am mostly trying to do is make sure that my compressor is workin

Racer26 19-03-2013 13:01

Re: Air Cylinder,compressor,soleinoids,relay
 
I'm still quite concerned by tim's Regional confusion.

Whether or not the robot works is irrelevant if they show up at the wrong regional with it.

jdaming 19-03-2013 13:04

Re: Air Cylinder,compressor,soleinoids,relay
 
So far I have only seen code that deals with the solenoids. Starting the compressor is a separate piece of code have you included that?

I found an image of someone else's begin VI code here with some compressor code in it so you will want to check you have something like that. You could probably also copy the code out of the example mentioned above.
http://www.chiefdelphi.com/forums/at...0&d=1330110193

Alan Anderson 19-03-2013 13:05

Re: Air Cylinder,compressor,soleinoids,relay
 
To verify that you have everything properly wired to control a compressor, and to see the programming that makes it work, follow the example and tutorial I pointed you to earlier.

tim101 19-03-2013 13:06

Re: Air Cylinder,compressor,soleinoids,relay
 
1 Attachment(s)
THIS is my begin

jdaming 19-03-2013 13:11

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by Racer26 (Post 1250181)
I'm still quite concerned by tim's Regional confusion.

Whether or not the robot works is irrelevant if they show up at the wrong regional with it.

I just sent an email to the contact address on their website:
http://www.wenonahrobotics.webs.com/

I hope so too

jdaming 19-03-2013 13:13

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250190)
THIS is my begin

You have no need for the while loop. Please see the example he is pointing you to!

tim101 19-03-2013 13:22

Re: Air Cylinder,compressor,soleinoids,relay
 
i did not program the begin

tim101 19-03-2013 13:27

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by jdaming (Post 1250191)
I just sent an email to the contact address on their website:
http://www.wenonahrobotics.webs.com/

I hope so too

we already have that sqared away,we have talked to FIRST National,and our BAYOU REGIONAL administrators. We Thank You for your consideration .

Reggie335 19-03-2013 14:38

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by jdaming (Post 1250186)
So far I have only seen code that deals with the solenoids. Starting the compressor is a separate piece of code have you included that?

I found an image of someone else's begin VI code here with some compressor code in it so you will want to check you have something like that. You could probably also copy the code out of the example mentioned above.
http://www.chiefdelphi.com/forums/at...0&d=1330110193

I am also using my solenoids to control my air compressor

G_rupp 19-03-2013 16:00

Re: Air Cylinder,compressor,soleinoids,relay
 
Are you currently trying to operate the compressor and cylinders on a bench setup do you just want to make sure that your code will work once you get there?

I will be the Control System Advisor at the Razorback Regional. Look for one of the volunteers in an orange hat on Thursday and we will help get your compressor and solenoids working.

In the Begin, you do not need the Relay Open block. It is taken care of by the Compressor Open.

In the Solenoid Open, you have both solenoid channels selecting Solenoid 1.

You need to add a Set Ref for the compressor so it can be used inside of Periodic Tasks.vi. Make sure that in Periodic Tasks that the compressor code is enabled and the reference is set to the same name as you add in the Begin.vi.

In Teleop.vi, the release will need to be set to "Reverse", not "Off". Off leaves the valve in the last state.

Alan Anderson 19-03-2013 16:43

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250190)
THIS is my begin

Quote:

Originally Posted by tim101 (Post 1250199)
i did not program the begin

Someone on your team did, and they did it wrong. The Compressor Enabled status check, and the while loop that contains it, should not be there. Instead, there should be a Compressor RefNum Set giving the compressor reference a name, and that same name should be used in the Compressor RefNum Get that feeds the compressor control loop function in Periodic Tasks.

Start with the example project I told you about. Get it working first. Then use the tutorial I told you about to move the example code into your robot program.

tim101 19-03-2013 16:45

Re: Air Cylinder,compressor,soleinoids,relay
 
Hey, thanks and i was wondering when it comes to my victor motors do i have to program them into Teleop.vi.

G_rupp 19-03-2013 17:34

Re: Air Cylinder,compressor,soleinoids,relay
 
What are these victors used for?

You will need to create an Open Motor and Motor Set reference in Begin. Then you will need to use them in teleop.

tim101 20-03-2013 10:37

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by G_rupp (Post 1250330)
What are these victors used for?

You will need to create an Open Motor and Motor Set reference in Begin. Then you will need to use them in teleop.

The victors are for the shooter,and I've done all of that in the begin i just need to know how to do it in the teleop

Alan Anderson 20-03-2013 10:48

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250555)
The victors are for the shooter,and I've done all of that in the begin i just need to know how to do it in the teleop

There's also a Motor Control example. It's pretty trivial -- all you need to do is wire the desired input to a Motor Set function.

tim101 20-03-2013 12:50

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by Alan Anderson (Post 1250556)
There's also a Motor Control example. It's pretty trivial -- all you need to do is wire the desired input to a Motor Set function.

Hey, i tried that it didn't hep

Alan Anderson 20-03-2013 13:54

Re: Air Cylinder,compressor,soleinoids,relay
 
When you say the example didn't help, do you mean that it didn't work? Or do you mean that it worked but you weren't able to implement what it did in your own program?

If the example didn't work, there is a problem with your wiring. Give us as much detail as you can about how you have your motor and speed controller connected to the rest of the robot, and we'll try to help you figure out what's wrong. A clear picture of the wiring would be a big help.

If the example works, then there is a problem with your software. Show us what you did, in both Begin and Teleop, and we'll try to help you figure out what's wrong.

tim101 20-03-2013 14:06

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by Alan Anderson (Post 1250623)
When you say the example didn't help, do you mean that it didn't work? Or do you mean that it worked but you weren't able to implement what it did in your own program?

If the example didn't work, there is a problem with your wiring. Give us as much detail as you can about how you have your motor and speed controller connected to the rest of the robot, and we'll try to help you figure out what's wrong. A clear picture of the wiring would be a big help.

If the example works, then there is a problem with your software. Show us what you did, in both Begin and Teleop, and we'll try to help you figure out what's wrong.

There really wasn't an example it was just basically explaining about each sub vi's

Alan Anderson 20-03-2013 16:00

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250628)
There really wasn't an example it was just basically explaining about each sub vi's

The Motor Control example project should be in the Robot and Motor folder of the NI Example Finder (assuming you're browsing by Task, which is the default).

If you won't share details of your wiring or your existing code, there's really not much more we can do to help you.

tim101 20-03-2013 17:20

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by Alan Anderson (Post 1250670)
The Motor Control example project should be in the Robot and Motor folder of the NI Example Finder (assuming you're browsing by Task, which is the default).

If you won't share details of your wiring or your existing code, there's really not much more we can do to help you.

Alright, this is it i got a Solenoid that is plugged up to my Relay Channel on the top of my cRIO,my Air Compressor has two Air Cylinders and 1 piston that are all plugged in my air compressor's pressure switch, which is plugged into the Digital I/O Channel 1 on the digital sidecar. Finally I have a Spike Relay and it is plugged into the Relay Channel on the digital sidecar

Alan Anderson 20-03-2013 19:37

Re: Air Cylinder,compressor,soleinoids,relay
 
Quote:

Originally Posted by tim101 (Post 1250712)
Alright, this is it...

Your description isn't clear enough for me to get a good idea of what you're trying to do. You did give enough detail about the pressure switch to be able to verify half of the code that initializes the compressor, so that much is good.

I'm mostly having problems understanding what you're trying to say about your pneumatics system. There's obviously a problem with shared terminology -- I can't tell what "two Air Cylinders and 1 piston" is supposed to mean, for example. Pictures would help a lot.

It probably would also help a lot if you used the tutorials and example projects that are included with LabVIEW.


All times are GMT -5. The time now is 22:01.

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