Go to Post So go out and start thinking outside of the KOP. - ChrisH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2009, 14:08
spooncwru spooncwru is offline
Registered User
FRC #0126
 
Join Date: Jan 2009
Location: Clinton, MA
Posts: 13
spooncwru is an unknown quantity at this point
Angry Programming Digital Inputs from Driver Station

Has anyone had success programming a digital input connected to the driver station? The "Get Digital Data" vi shown in the FRC Programming Guide doesn't seem to be in our updated version of Labview.

We tried the Get DI vi, and indexed the array, but we can't seem to make the connection work to anything that takes a boolean input.

Any tips?
  #2   Spotlight this post!  
Unread 25-01-2009, 17:57
KRibordy KRibordy is offline
Registered User
FRC #1000 (Cybearcats)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2006
Location: Valparaiso, IN
Posts: 36
KRibordy is an unknown quantity at this point
Re: Programming Digital Inputs from Driver Station

I use windriver, but you might be having the same problem as I was. We had a push button switch (2 inputs) wired to the signal and ground inputs. The driver station doesn't have a "pull down" function, so the switch read 0 when pushed and output random numbers when not pushed. To fix this, you have to wire a 100k resistor between the signal and +5V connectors by the switch. Or, you can use a single pole double throw switch. Hope that helped.
  #3   Spotlight this post!  
Unread 25-01-2009, 19:46
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,113
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: Programming Digital Inputs from Driver Station

Quote:
Originally Posted by spooncwru View Post
We tried the Get DI vi, and indexed the array, but we can't seem to make the connection work to anything that takes a boolean input.
You said that it doesn't seem to work, which doesn't necessarily mean that it doesn't actually work. What are you expecting it to do? What does it do instead? As KRibordy pointed out, it might just be that your switch isn't wired properly to the DS pins.
  #4   Spotlight this post!  
Unread 28-01-2009, 07:20
spooncwru spooncwru is offline
Registered User
FRC #0126
 
Join Date: Jan 2009
Location: Clinton, MA
Posts: 13
spooncwru is an unknown quantity at this point
Re: Programming Digital Inputs from Driver Station

We're trying to get a boolean return from the VI that's reading that switch.
  #5   Spotlight this post!  
Unread 30-01-2009, 10:24
RedOctober45 RedOctober45 is offline
Mentor - Embedded Software Engineer
FRC #0291
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2005
Location: Pittsburgh
Posts: 16
RedOctober45 will become famous soon enoughRedOctober45 will become famous soon enough
Send a message via AIM to RedOctober45
Re: Programming Digital Inputs from Driver Station

Try using the VI that actually is meant for the driver station.

Inside LabVIEW, right click and go to WPI Robotics Library->DriverStation->Get Digital Input.vi

Try that, that is what we use and it works. You have to use this Lib for any input on the driver station.
  #6   Spotlight this post!  
Unread 30-01-2009, 11:52
3DWolf's Avatar
3DWolf 3DWolf is offline
Boots - Head Programmer / 3D
AKA: Jake
FRC #1502 (Technical Difficulties)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Chelsea Michigan
Posts: 97
3DWolf is on a distinguished road
Send a message via AIM to 3DWolf Send a message via MSN to 3DWolf
Re: Programming Digital Inputs from Driver Station

Have you read the update that instructs you to ground your grounds to the DS box itself?
I was having trouble getting the correct inputs from the Digital Inputs as well before I added resistors to my switch to elimate the sensitivity issue. I assume the update solves this problem but don't quote me on that.
__________________
You can call it the programming teams fault, but we'll just force your arguments nil.

There are 10 kinds of people in the world -> Those who understand binary and those who don't.

WYSIWYG - In FIRST: Greatness
  #7   Spotlight this post!  
Unread 30-01-2009, 23:58
Jranko311 Jranko311 is offline
Mentor-Programmer-Design Engineer
AKA: Jon Hrenko
FRC #0155 (Technonuts)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2002
Location: Berlin, CT
Posts: 12
Jranko311 is an unknown quantity at this point
Re: Programming Digital Inputs from Driver Station

We have not been fully able to test it, because we have not setup the pull-ups for the Digital Inputs. But I think the way you can program the DS in LabView is:

1. Grab the DS Get Digit Input Vi put it in the program.
2. Grab an Array to Cluster function, and put it to the right of the DS Get Digit Input Vi.
3. Wire the boolean array output of the DS Get Digit Input Vi to the input of the Array to Cluster function.
4. Grab an unbundle by name function, and put it to the right of the Array to Cluster function.
5. Wire the output of the Array to Cluster function to the unbundle by name function.
6. The outputs of the unbundle by name function are now boolean values, not a boolean array. The unbundle by name identifies, by name, the digit inputs.

Let me know if it works.
  #8   Spotlight this post!  
Unread 01-02-2009, 11:37
spooncwru spooncwru is offline
Registered User
FRC #0126
 
Join Date: Jan 2009
Location: Clinton, MA
Posts: 13
spooncwru is an unknown quantity at this point
Re: Programming Digital Inputs from Driver Station

Update:

Thanks for the first tip about wiring the resister in. Once we did that, we connected it to our digital sidecar and it worked perfectly!

I just tried the tip about using the Driver Station-> Get Dig In VI, clustering the array and then unbundling it. For some reason, it always sends out True, even when my switch is off.

Anyone else experience this or have a fix?

Thanks to everyone for their help and suggestions!

Sean
  #9   Spotlight this post!  
Unread 01-02-2009, 13:14
spooncwru spooncwru is offline
Registered User
FRC #0126
 
Join Date: Jan 2009
Location: Clinton, MA
Posts: 13
spooncwru is an unknown quantity at this point
Re: Programming Digital Inputs from Driver Station

Nevermind! Switch was installed backwards. We're all set. Thanks again to everyone!

Sean, Team 126
Closed Thread


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
Digital Outputs on the Driver Station with C/C++ Bongle C/C++ 6 26-01-2009 15:45
driver station digital outputs DustinB_3 FRC Control System 0 24-01-2009 11:29
Using driver station digital inputs Japper FRC Control System 6 19-01-2009 20:01
Flashing Driver Station Digital Input MacGyver1718 FRC Control System 3 15-01-2009 19:22
Interrupt on driver station digital input Nameless Programming 9 04-12-2008 16:55


All times are GMT -5. The time now is 21:54.

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