Go to Post mabye this is a case of I AM JVN to the Extreme! - Tytus Gerrish [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 06-12-2008, 19:47
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Programing a Digital Input on the DS in Labview

I have been searching the forums on CD for quite some time now with now luck to my question... In labview how to you program a simple digital switch on your DS (wired into the extra digital and analog inputs on the right side) to just run a motor at "x" amount of speed until the push button is released?

I may have just simply overlooked the function in labview but i can't seem to find it...

Can anyone help me out with this? Is there a demo video online explaining how to do this?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 06-12-2008, 20:19
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,833
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: Programing a Digital Input on the DS in Labview

The functions are found in the Block Diagram Functions under WPI Robotics Library -> Driver Station
Or do a search in Functions for
GetDigInput
GetAlgInput
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 06-12-2008, 20:49
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: Programing a Digital Input on the DS in Labview

Quote:
Originally Posted by Mark McLeod View Post
The functions are found in the Block Diagram Functions under WPI Robotics Library -> Driver Station
Or do a search in Functions for
GetDigInput
GetAlgInput
Ok thanks!

I don't see how i missed that...

Although I can't seem to figure out how to set what digital input I am looking at?

I see the pin where is says "Driver Station Digital Input (1-8)" but what goes there? a constant? or do i need to wire that to a different block?


Thanks!
Reply With Quote
  #4   Spotlight this post!  
Unread 06-12-2008, 22:01
BrentJ BrentJ is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2009
Location: Auckland, New Zealand
Posts: 64
BrentJ has a spectacular aura aboutBrentJ has a spectacular aura about
Re: Programing a Digital Input on the DS in Labview

Quote:
Originally Posted by popo308 View Post
Ok thanks!

I don't see how i missed that...

Although I can't seem to figure out how to set what digital input I am looking at?

I see the pin where is says "Driver Station Digital Input (1-8)" but what goes there? a constant? or do i need to wire that to a different block?


Thanks!
Off the top of my head I think it should be a constant just like you used for motors etc. In this case it would probably just be the pin number you want instead of a port and pin.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-12-2008, 03:09
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: Programing a Digital Input on the DS in Labview

Quote:
Originally Posted by popo308 View Post
I see the pin where is says "Driver Station Digital Input (1-8)" but what goes there? a constant? or do i need to wire that to a different block?
The DS Get Digital Input VI outputs a boolean array of length 8. You can wire it to an Index Array to get the individual values. The attached picture should output the first 2 digital inputs, and the last one (remember an array of n elements goes from 0 to n-1), as boolean indicators on the VI front panel.
Attached Thumbnails
Click image for larger version

Name:	dsinput.png
Views:	150
Size:	1.7 KB
ID:	6996  
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
Reply With Quote
  #6   Spotlight this post!  
Unread 15-12-2008, 22:49
Doug G's Avatar
Doug G Doug G is offline
Coach / Teacher
FRC #0701 (Robovikes)
Team Role: Coach
 
Join Date: Dec 2002
Rookie Year: 2001
Location: Fairfield, CA
Posts: 879
Doug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond reputeDoug G has a reputation beyond repute
Re: Programing a Digital Input on the DS in Labview

Boy I have some catching up to do here. First of all, what is the difference between the Joystick.Get.Vi and the Joystick. GetRaw.Vi? They seem to be pretty much the same. What I'm trying to learn is how to use a Joystick button to control the state of a motor; ie. hold down a button and the motor goes forward. I've got the motor control figured out, I'm just lost on how to get it wired to the Joysitck Vi. Any guidance would be much appreciated
__________________
Work Hard, Have Fun, Make a Difference!

Reply With Quote
  #7   Spotlight this post!  
Unread 16-12-2008, 06:11
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Programing a Digital Input on the DS in Labview

Quote:
Originally Posted by Doug G View Post
Boy I have some catching up to do here. First of all, what is the difference between the Joystick.Get.Vi and the Joystick. GetRaw.Vi? They seem to be pretty much the same. What I'm trying to learn is how to use a Joystick button to control the state of a motor; ie. hold down a button and the motor goes forward. I've got the motor control figured out, I'm just lost on how to get it wired to the Joysitck Vi. Any guidance would be much appreciated
Basically the difference is integer vs floating point. Get Raw returns an 8 bit integer of range -128 to 127. Get returns a 32 bit floating point of range -1 to 1.
Are you trying to use the Relay VIs to control the motor?
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
4V - 5V signal on Digital Input tdlrali Programming 5 06-03-2008 19:06
digital input question... Kevin Karan Programming 9 12-04-2004 07:34
counting digital input CharlieWilken Programming 9 22-03-2004 19:56
How do u hook up the digital input to the sensor's wires Fares Technical Discussion 2 14-02-2003 16:41
Robot Digital Input Mike Norton Technical Discussion 5 16-01-2003 14:31


All times are GMT -5. The time now is 20:24.

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