Go to Post oooh tight leather bumpers...sexy! - Nuttyman54 [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 18-02-2013, 10:14
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
labview adding button from joystick

Hello I am having a issues with adding a button into labview 2013. This is what i got so far in the programming I have no idea if this is even right thanks.
Attached Thumbnails
Click image for larger version

Name:	teleop false.PNG
Views:	45
Size:	81.5 KB
ID:	14075  Click image for larger version

Name:	teleop.PNG
Views:	40
Size:	81.5 KB
ID:	14076  
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2013, 10:26
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: labview adding button from joystick

Assuming you initialized the joystick in the begin vi (it is if you didn't modify the default code), it looks ok.

It looks like you are checking button 1 of the joystick. If it is true (ie pressed) you stop the motor, else false you pass the values from the axis to your motor.
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2013, 10:30
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

Precisely.Well the button works in the simulator and the motor stops but nothing is moving. Basically its for our launcher press button 1 and the 2 motor start and the drive motors stop.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2013, 10:51
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

It looks like you have the "drive motors stop" part, but you are missing "the 2 motor start" part.
__________________
Omar
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2013, 11:01
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

so do i add something like this?
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	28
Size:	4.5 KB
ID:	14078  
Reply With Quote
  #6   Spotlight this post!  
Unread 18-02-2013, 11:09
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

Try this.
Click image for larger version

Name:	labview adding button from joystick.png
Views:	32
Size:	35.1 KB
ID:	14079
__________________
Omar
Reply With Quote
  #7   Spotlight this post!  
Unread 18-02-2013, 11:10
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

Quote:
Originally Posted by team4372 View Post
so do i add something like this?
The part you added goes in your Begin.vi
__________________
Omar
Reply With Quote
  #8   Spotlight this post!  
Unread 18-02-2013, 11:20
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

Add this to your Begin.VI
Attached Thumbnails
Click image for larger version

Name:	Begin_VI.png
Views:	22
Size:	21.8 KB
ID:	14080  
__________________
Omar
Reply With Quote
  #9   Spotlight this post!  
Unread 18-02-2013, 11:31
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

would the buttons work in the simulator? and THe robot just spins in cercles in the simulator.
Reply With Quote
  #10   Spotlight this post!  
Unread 18-02-2013, 11:35
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

here the begin and teleop updated
Attached Thumbnails
Click image for larger version

Name:	teleop new.PNG
Views:	20
Size:	20.6 KB
ID:	14081  Click image for larger version

Name:	begin.PNG
Views:	21
Size:	18.8 KB
ID:	14082  
Reply With Quote
  #11   Spotlight this post!  
Unread 18-02-2013, 11:41
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

teleop true
Attached Thumbnails
Click image for larger version

Name:	true23.PNG
Views:	14
Size:	20.4 KB
ID:	14083  
Reply With Quote
  #12   Spotlight this post!  
Unread 18-02-2013, 11:48
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

To use the 2 Motor Open with a Tank drive for your launcher.
Attached Thumbnails
Click image for larger version

Name:	Two Motor.png
Views:	15
Size:	31.0 KB
ID:	14084  
__________________
Omar
Reply With Quote
  #13   Spotlight this post!  
Unread 18-02-2013, 11:56
team4372 team4372 is offline
Registered User
FRC #4372
 
Join Date: Feb 2013
Location: Cambridge, ontario
Posts: 11
team4372 is an unknown quantity at this point
Re: labview adding button from joystick

what value do i add in the false statement?
Reply With Quote
  #14   Spotlight this post!  
Unread 18-02-2013, 11:57
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

In Teleop you need to rename the two "My Motor Refnum" to "shooter 1" and shooter2".

Be VERY careful with the Ref Names string! Pay attention to spaces you use in them.

"shooter2" is not the same as "shooter 2"

In fact make it a rule not to use any spaces. Call them "shooter_1" and "shooter_2"

I should have used "Launcher_Motor_1" and "Launcher_Motor_2" in my example that I posted.
__________________
Omar
Reply With Quote
  #15   Spotlight this post!  
Unread 18-02-2013, 12:02
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: labview adding button from joystick

Quote:
Originally Posted by team4372 View Post
what value do i add in the false statement?
For the launcher motors? What do you want the launcher motors to do when you release the joystick button?

I assume you want them the stop when you release the joystick button as write out 0 (zero)

The snipplets that I posted you can copy them to your desk top and them drag them on to any block diagram and you will have the code just as I created it.
__________________
Omar
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 22:56.

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