Go to Post Ask questions; don't be afraid to talk to "powerhouse" teams. - CalTran [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
  #31   Spotlight this post!  
Unread 13-02-2010, 23:52
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,560
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: solenoid with compressor vi

One thing I noticed is that you're opening and closing your robot drive in teleop, plus you still have references to the default robot drive in telop. You probably have conflicts in PWM assignments doing that. You also shouldn't be opening and closing hardware like that, as telop is called 50 times per second. You should open it and save the device reference in begin. In teleop you should get the device reference and do something with it. It should be closed in finish.
Reply With Quote
  #32   Spotlight this post!  
Unread 14-02-2010, 00:26
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: solenoid with compressor vi

Quote:
Originally Posted by Mark McLeod View Post
I'd need to see your code to help much, but I don't see anything.
Are you using imageshack or something like that?
Those sites get block by our school and there's not even an indication that there is a picture in any of your posts.

Someone else will have to help with this problem...

P.S. When I get home I'll be able to see what you posted. That is if they ever let me out of this shop...
I used tinypic. next time, ill just upload a zip file so everyone can access it.

Quote:
Originally Posted by Joe Ross View Post
One thing I noticed is that you're opening and closing your robot drive in teleop, plus you still have references to the default robot drive in telop. You probably have conflicts in PWM assignments doing that. You also shouldn't be opening and closing hardware like that, as telop is called 50 times per second. You should open it and save the device reference in begin. In teleop you should get the device reference and do something with it. It should be closed in finish.
Thats what we had. We had all that, and the only errors we were getting from the driver station were the watchdog errors. This was good, except that tank drive was not functioning properly(meaning each joystick controls its own jaguar which moves the motor its connected to).

I guess we are just having errors somewhere when everything is being referenced. maybe some other code is screwing around the data for the references because when we use joystick references instead of just opening joysticks on a USB port, tank drive screws up(I am sure i wrote this before, but ill do it once again. When i say tank drive screws up, i mean that in light bulb mode, the joysticks are giving the correct values[joystick 1 turns left motor, joystick 2 turns right motor]. When we run the code on the robot, Joystick 1 controls both motors and joystick 2 looses control of motor 2(it regains control for half a second randomly)

It would be really helpful if you could post or PM me some sample code(we dont have any examples installed in labview for some reason) that we could work off of.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award

Last edited by umangv620 : 14-02-2010 at 00:28.
Reply With Quote
  #33   Spotlight this post!  
Unread 14-02-2010, 10:59
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: solenoid with compressor vi

I can see it at home.

Your Begin.vi code looks good. The only danger is we can't see if you are opening multiple things like "USB 1" and "Drive Motors".
P.S. One mistake is you open two different devices on Relay 1.

Your basic Teleop.vi code looks okay too, except for what Joe commented on.

The Compressor code in Robot Main.vi doesn't actually do anything. It can be removed and you wouldn't notice any difference in operation.
I'd refrain from adding anything at all to Robot Main on general principle.

I'm with Joe on the duplicate drive code. Without seeing the full Begin.vi it looks like you probably have a conflict where sometimes your code wins control and sometimes the default drive code you left in the False case in the top part wins control.

If you're not using the default targeting code I'd recommend you just delete it from Teleop.
In Begin clean up opening the drive motors twice and any multiple Opens on joysticks you might have.

I'll see if I can post a cleaned up version of your code later after lunch and a trip to Lowe's for bumper plywood and aluminum tubing.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-02-2010 at 16:10.
Reply With Quote
  #34   Spotlight this post!  
Unread 14-02-2010, 13:15
furiousgeorge's Avatar
furiousgeorge furiousgeorge is offline
Registered User
FRC #3055
 
Join Date: Jan 2009
Location: Austin
Posts: 74
furiousgeorge will become famous soon enoughfuriousgeorge will become famous soon enough
Re: solenoid with compressor vi

we were having this same problem of the compressor turning on and then immediately off as soon as the robot was enabled. now the compressor does not turn on at all. after reading several other posts i noticed that our relay leds on our digital side car are not lighting up and the led on our spike stays orange, it has never changed colors, i've tried fliping the pwm cable around but that seems to not have made any difference. we are using the example vi from labview to try to run this compressor and cylinder. does any one have any suggestions on how to get the relay to start working?
Reply With Quote
  #35   Spotlight this post!  
Unread 14-02-2010, 16:43
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: solenoid with compressor vi

I copied your code into a new copy of the default robot project.
Robot Main.vi is left in it's original untouched state.
All Opens are done in Begin.vi
All Closes are in Finish.vi
All uses are in Teleop.vi

I got rid of the duplicate drive motors and fixed the duplicate relays.
Attached Thumbnails
Click image for larger version

Name:	Teleop-sample.jpg
Views:	55
Size:	23.4 KB
ID:	8662  Click image for larger version

Name:	Finish-sample.jpg
Views:	57
Size:	41.1 KB
ID:	8663  Click image for larger version

Name:	Begin-sample.jpg
Views:	62
Size:	82.3 KB
ID:	8670  
Attached Files
File Type: vi Teleop.vi (19.0 KB, 17 views)
File Type: vi Begin.vi (42.7 KB, 12 views)
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-02-2010 at 18:06. Reason: Fixed the multiple PWM - thanks Alan
Reply With Quote
  #36   Spotlight this post!  
Unread 14-02-2010, 17:59
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: solenoid with compressor vi

Quote:
Originally Posted by Mark McLeod View Post
I got rid of the duplicate drive motors and fixed the duplicate relays.
I see PWM2 being used for both the right drive motor and the camera base servo. That'll have to be fixed before Mark's code will do what is intended.
Reply With Quote
  #37   Spotlight this post!  
Unread 18-02-2010, 18:18
umangv620 umangv620 is offline
Programming Captain
AKA: Umang
FRC #1403 (Cougar Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2008
Location: New Jersey
Posts: 80
umangv620 will become famous soon enoughumangv620 will become famous soon enough
Re: solenoid with compressor vi

Ok, we now have Tank Drive running in Teleop(The problem was that we didn't realize that there was Arcade drive code in the Teleop.vi which was screwing around with our tank drive. I fixed it, so its working now.

Now back to the thread.
I have very minimal solenoid code in LabView atm. I have a Solenoid Get Ref outside the Robot Main loop, and a Front Panel Boolean switch wired to the Solenoid Set inside the Teleop loop in Robot Main.

When we run the code(when i click on the boolean switch to go from false to true), the solenoids doesn't fire the piston-type-firing-thing(no clue what its called). We know the solenoid works mechanically because we can press the button to release the air into the piston thing, and it fires.

my begin vi looks very similar to mark's code. We have the solenoid we are testing in slot 1 on module 8, so wiring is not the problem.
__________________
Team 1403 Cougar Robotics

2009-2011 Programming Captain

2010
NJ-Regional - Chairmans Award
Reply With Quote
  #38   Spotlight this post!  
Unread 18-02-2010, 22:13
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: solenoid with compressor vi

Quote:
Originally Posted by umangv620 View Post
I have very minimal solenoid code in LabView atm. I have a Solenoid Get Ref outside the Robot Main loop, and a Front Panel Boolean switch wired to the Solenoid Set inside the Teleop loop in Robot Main.
That won't work the way you think it will. The RefNum Get is very likely going to be executed before Begin.vi has done its RefNum Set, so the reference you're passing to the Solenoid Set will be invalid.

I strongly advise you to leave Robot Main the way it started. Don't change it from its default. When you want to add code, do it in the Begin, Teleop, and Finish vi's, and maybe in the Periodic Tasks. Your solenoid code should be right next to your drive code in Teleop.
Reply With Quote
  #39   Spotlight this post!  
Unread 20-02-2010, 23:30
Team1268 Team1268 is offline
Registered User
FRC #1268
 
Join Date: Feb 2010
Location: Milwaukee, WI
Posts: 3
Team1268 is an unknown quantity at this point
Re: solenoid with compressor vi

Hello All,

We've been having some problems with the compressor vi's. We've followed the solenoid with compressor example and

are trying to do pretty much the same thing.

We are putting the Compressor Open.vi in BEGIN and assigning a refnum to it. Then in Teleop.vi we do refnum get

and inside the execute loop we have the refnum get wired to compressor start and compressor enable. We've changed

around where we put the start and enable vi's- whether to go inside the loop or if they only need to be called

once.

When we look into the block diagrams of the open vi, it seems that this is where all the inputs get read, logic is

processed, and outputs set. The other compressor vi's seem only to do monitoring and fifo stuff which we don't

mess with. In the example, the compressor Open.vi is not in the loop and the only vi's in the loop seem to change

the monitoring feedbacks.

Where should I put the compressor Open.vi? Where are the other vi's supposed to go? DO WE NEED the other vi's?

The programming manual says 'After you open a reference to a compressor, you can use the start and stop vi's...'

but the block diagrams for the start and enable vi's don't have anything to do with reading DIO get or relay SET.

In the Dashboard I can see the IO channel change state when I short together wires (for a long time) simulating

the contact closure/opening of the pressure switch. Just outputs never get set - the relay LEDs on the sidecar

don't light, spike relay doesn't change colors, and in hilight execution it doesn't show the action taking place

within the compressor open.vi

We ran the simple relay example successfully and our solenoids are working elsewhere in the program.

any help is greatly appreciated!!



Team 1268 WHS Purgolders
Reply With Quote
  #40   Spotlight this post!  
Unread 21-02-2010, 00:04
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: solenoid with compressor vi

The examples have a lot of things we don't need.
As you noticed, the Enabled vi just tells us if the compressor is running or not.

The necessary compressor vi's are just the Open and Start in Begin.vi.
They only need to be called that one time, not repeatedly.
It's also good technique to close the compressor in Finish.vi, but it's not absolutely necessary in this case.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-02-2010 at 00:08.
Reply With Quote
  #41   Spotlight this post!  
Unread 27-12-2010, 16:26
Rangel(kf7fdb)'s Avatar
Rangel(kf7fdb) Rangel(kf7fdb) is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 722
Rangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond repute
Re: solenoid with compressor vi

Hello, I have a similar problem. I have the same goal that involves turning the compressor on when below 120 psi and turning it off when it reaches it. The code seems to be exactly the same as the images posted. Problem is that the compressor stays on forever. What am I missing that turns the compressor off? I have attached screenshots of my code to a zip file.
Attached Files
File Type: zip Pics.zip (92.0 KB, 6 views)
__________________
2011-2014 Arizona Regional Winners
2012 Dean's List Winner
2012-2013 Team President
2013 8th Place Robosub Competition
2014-? Mentor


Reply With Quote
  #42   Spotlight this post!  
Unread 27-12-2010, 18:55
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,560
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: solenoid with compressor vi

Is your pressure switch working and connected to DIO 14? On the dashboard, do you see DIO 14 change when the pressure reaches 120?
Reply With Quote
  #43   Spotlight this post!  
Unread 29-12-2010, 13:38
Rangel(kf7fdb)'s Avatar
Rangel(kf7fdb) Rangel(kf7fdb) is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 722
Rangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond repute
Re: solenoid with compressor vi

Quote:
Originally Posted by Joe Ross View Post
Is your pressure switch working and connected to DIO 14? On the dashboard, do you see DIO 14 change when the pressure reaches 120?
It seems that I had the wrong version of my team's pin-out. It was supposed to be connected to DIO 8. It is working fine now.

Thanks
__________________
2011-2014 Arizona Regional Winners
2012 Dean's List Winner
2012-2013 Team President
2013 8th Place Robosub Competition
2014-? Mentor


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solenoid Wiring and Compressor Help BurtGummer Electrical 16 17-02-2010 14:25
How to program solenoid and compressor? Jason F Java 8 08-02-2010 15:15
1482 Help with Compressor Rinaldi 427 General Forum 7 31-01-2007 07:46
Help With Compressor Code fred Programming 6 21-01-2005 17:40
Problem with compressor Nick R. Pneumatics 3 21-02-2003 10:51


All times are GMT -5. The time now is 04:36.

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