Go to Post "We used to shut the robot up in a box and send it away from home. Now we just suffocate it." - GaryVoshol [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 08-01-2009, 23:39
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,795
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 Programing

Here is a simple form of the compressor and controlling a solenoid from the trigger of joustick 2.

There is a "Solenoid with Compressor Example" too you can look at on the LabVIEW startup screen.
Attached Thumbnails
Click image for larger version

Name:	Compressor.jpg
Views:	210
Size:	7.8 KB
ID:	7108  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 08-01-2009 at 23:44.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2009, 21:21
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

Quote:
Originally Posted by Mark McLeod View Post
Here is a simple form of the compressor and controlling a solenoid from the trigger of joustick 2.

There is a "Solenoid with Compressor Example" too you can look at on the LabVIEW startup screen.
I looked at your example, but i am unable to tell how the program knows that it is to run off the trigger of joystick 2. In our setup, we have a third joystick used to control two motors and hopefully also used to control our solenoid with the trigger of joystick 3. any ideas?
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2009, 00:23
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,795
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 Programing

Does it help to know that button 1 is the trigger on the KOP joysticks?
Each of the joystick buttons has the number printed on it except for the trigger of course.
In that example the USB 2 joystick is opened, and button 1 (the trigger) is feed into and controls the solenoid.

If you want to use the trigger on joystick 3 instead, just change "USB 2" to "USB 3" in that example.
In normal usage you'd put all this in the same loop you use the joysticks to tank/arcade drive.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2009 at 00:27.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2009, 08:16
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

This code will be used in the same loop as our tank drive setup, but i'm still a little confused. In the link you provided, there isn't a Joystick open .vi or anywhere to change the USB 2 to USB 3. I understand that the trigger is button one on the joysticks. In our setup, joysticks 1 and 2 run tank drive. Will i need to program the trigger of one of those joysticks?

I guess my question is, in the example that you provided, there never is a specified USB value. It goes from compressor open, to compressor start, to compressor stop and close.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2009, 08: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,795
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 Programing

I think we're looking at different examples.
Take a look at the link to controlling a solenoid that was posted in another thread on the same topic.
CD doesn't allow me to repost it in this thread.

It uses "USB 2" on the left side of the diagram.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2009, 08:54
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

ah yes, this solves my problem. Thanks a lot.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-02-2009, 09:06
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

one more question....do i need to place the code for my compressor and solenoid valves in the teleop case loop inside my while loop? or can i just place it in it's own while loop?
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2009, 09:40
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,795
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 Programing

You want the solenoid check inside your teleop loop, since that's where you are reacting to joystick commands.

The compressor you want operating in both autonomous and teleop modes so that goes elsewhere.
Really, the compressor Open and Start should be in the Begin.vi and the Close in Finish.vi. You need to add the compressor cluster information to RobotData.ctl so it can be used in the Finish.vi

P.S. I'm assuming by what you said that you're using the Advanced Framework. If you're using the Basic one instead it's a little different.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2009 at 09:48.
Reply With Quote
  #9   Spotlight this post!  
Unread 04-02-2009, 11:19
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

thanks, that helps.
Reply With Quote
  #10   Spotlight this post!  
Unread 04-02-2009, 13:18
zebrabots zebrabots is offline
Registered User
FRC #2909
 
Join Date: Jan 2009
Location: Rochester
Posts: 42
zebrabots is on a distinguished road
Re: Pneumatics Programing

Okay, I just sat down to program this setup and i realized that this is a timed function. How do I incorporate the timed function within my teleop loop without it affected the entire teleop loop?
Reply With Quote
  #11   Spotlight this post!  
Unread 04-02-2009, 13:23
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,795
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 Programing

You can leave out the timer from the example. Just take the solenoid, etc. vi's. It should run at the same rate as your other joystick based functions.
That was just a stand-alone sample of a basic loop.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #12   Spotlight this post!  
Unread 16-02-2009, 13:40
star_lancer's Avatar
star_lancer star_lancer is offline
Programming Addict
AKA: Mike Berney
FRC #2346 (CRASH)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Kansas City
Posts: 30
star_lancer is a jewel in the roughstar_lancer is a jewel in the roughstar_lancer is a jewel in the rough
Send a message via AIM to star_lancer Send a message via Yahoo to star_lancer
Re: Pneumatics Programing

Quote:
Originally Posted by Mark McLeod View Post
You want the solenoid check inside your teleop loop, since that's where you are reacting to joystick commands.

The compressor you want operating in both autonomous and teleop modes so that goes elsewhere.
Really, the compressor Open and Start should be in the Begin.vi and the Close in Finish.vi. You need to add the compressor cluster information to RobotData.ctl so it can be used in the Finish.vi

P.S. I'm assuming by what you said that you're using the Advanced Framework. If you're using the Basic one instead it's a little different.
Can I get an image on how this is done? I don't know what you mean by begin.vi or finish.vi
__________________
If you found anything I said helpful, please click the scales next to my post. I really appreciate those reputation points.
Team 2346 - Build, test, panic, repeat.
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
starting programing... xanarchyx Programming 4 05-01-2008 23:48
Programing mormannoob FIRST Lego League 5 03-04-2007 14:02
Programing great_one411 General Forum 2 01-02-2003 17:27
Programing of controller DLyons Programming 0 29-11-2002 20:50
Programing pfortunejr Programming 1 08-01-2002 13:18


All times are GMT -5. The time now is 11:30.

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