Go to Post I'm still thinking about the 1114 469 doomsday.. I mean, that alliance has national champion written all over it. - Joel J [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 07-02-2010, 19:40
ssica_jj ssica_jj is offline
Registered User
FRC #0368 (TKM)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Hawaii
Posts: 9
ssica_jj is an unknown quantity at this point
problems with using switches for autonomous

For our team autonomous, we decided to use switches for autonomous. We connected the Cypress board and the breadboard to wire up the switches. The value from the switches are being displayed on the driver station(classmate) but somehow, the program is not reading the value. The only value that it reads is 0. Even when we flip the switches, the value on the laptop does not change. (However, the value on the driver station is changing without any problems.)
Could anyone please help us on this problem?
Thank you!

EDIT*
The values from the switches are being read by the Classmate Driver Station, but not on the programming laptop (separate from the Classmate). It shows change on the Classmate Driver Station, but not on the programming laptop.

Last edited by ssica_jj : 07-02-2010 at 22:56.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2010, 21:22
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: problems with using switches for autonomous

The value is being displayed, but it isn't being read? It's changing, but it isn't changing? I don't understand what you're saying.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2010, 21:24
MrForbes's Avatar
MrForbes MrForbes is online now
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 6,017
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: problems with using switches for autonomous

Why not put the switches on the robot, connected to the digital IO on the digital sidecar?
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2010, 21:27
ssica_jj ssica_jj is offline
Registered User
FRC #0368 (TKM)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Hawaii
Posts: 9
ssica_jj is an unknown quantity at this point
Re: problems with using switches for autonomous

the values(boolean) is being displayed on the driver station, under the I/O tab, but not in the program on LabVIEW when you run it. It changes between 1 and 0 on the display on the driver station but not in the program.

I don't know how you would go about putting the switches on the robot. We have always put the switches with the driver station. We would like to keep it this way, however, we are willing to try another way if it is not possible to program the switches with the driver station.

Last edited by ssica_jj : 07-02-2010 at 21:31.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-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,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: problems with using switches for autonomous

How are you determining that the value is not being read in LabVIEW? If you show us your code, we might see something that's not doing what you think it is.
Reply With Quote
  #6   Spotlight this post!  
Unread 07-02-2010, 22:32
ssica_jj ssica_jj is offline
Registered User
FRC #0368 (TKM)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Hawaii
Posts: 9
ssica_jj is an unknown quantity at this point
Re: problems with using switches for autonomous

We ran the RobotMain.vi in the project containing the code. We connect the laptop to the router which is connected to the driver station.

Attached is a screen shot of our code.
Attached Thumbnails
Click image for larger version

Name:	switchcode.jpg
Views:	107
Size:	94.4 KB
ID:	8548  
Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2010, 22:47
Acshi Acshi is offline
Registered User
FRC #2924
 
Join Date: Jan 2009
Location: WA
Posts: 12
Acshi is an unknown quantity at this point
Re: problems with using switches for autonomous

Might it will only work during disabled mode and once it moves into autonomous mode the correct reading are overridden with incorrect ones? That might make sense since, you only have to read once and they might want to insure no active data is going to the bot in autonomous mode...
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2010, 22:51
ssica_jj ssica_jj is offline
Registered User
FRC #0368 (TKM)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Hawaii
Posts: 9
ssica_jj is an unknown quantity at this point
Re: problems with using switches for autonomous

Even though it is in the Disabled.vi, it should be reading it, however it doesn't read whether it is enabled or disabled.
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2010, 22:55
bls0620's Avatar
bls0620 bls0620 is offline
Registered User
FRC #0368 (Team Kika Mana)
Team Role: College Student
 
Join Date: Jun 2008
Rookie Year: 2008
Location: Honolulu, HI
Posts: 29
bls0620 will become famous soon enoughbls0620 will become famous soon enough
Re: problems with using switches for autonomous

Just to clarify.....

We connected several switches to the Cypress IO board and confirmed that the Classmate is reading the inputs correctly. However, when we tried to program on LabVIEW using Driver Station Get Digital Input.vi, we didn't get any feedback from the Classmate.(we can still see switches working on the Classmate though )
__________________
Reply With Quote
  #10   Spotlight this post!  
Unread 07-02-2010, 23:00
ligerbots ligerbots is offline
Registered User
AKA: Elie GLik
FRC #2877 (Ligerbots)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Boston
Posts: 16
ligerbots is an unknown quantity at this point
Send a message via AIM to ligerbots
Re: problems with using switches for autonomous

would it be possible to just program your own dashboard and have that be your switch?
Reply With Quote
  #11   Spotlight this post!  
Unread 07-02-2010, 23:04
bls0620's Avatar
bls0620 bls0620 is offline
Registered User
FRC #0368 (Team Kika Mana)
Team Role: College Student
 
Join Date: Jun 2008
Rookie Year: 2008
Location: Honolulu, HI
Posts: 29
bls0620 will become famous soon enoughbls0620 will become famous soon enough
Re: problems with using switches for autonomous

Quote:
Originally Posted by ligerbots View Post
would it be possible to just program your own dashboard and have that be your switch?
It is possible but that would be troublesome. Using customized dashboard means we would have to click on each buttons(using mouse pad, of course) during the matches, which we are not willing to do so.
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 07-02-2010, 23:37
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: problems with using switches for autonomous

Are you sure that you are using the correct array indices?

The labeling of the Digital Inputs on the Driver's Station starts with 1, but the array indices likely start at 0 (I haven't checked this).
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #13   Spotlight this post!  
Unread 07-02-2010, 23:53
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: problems with using switches for autonomous

Quote:
Originally Posted by ssica_jj View Post
Attached is a screen shot of our code.
You still haven't said how you are determining that the value isn't being read. Are you probing any of the wires to find out whether the data from the Driver Station digital inputs is making it out of the Get Dig In?

I don't know why you're storing a string of text "1" and "0" characters in something called "Program Num", I am having a hard time understanding why you are doing a Concatenate instead of using the Append T/F String vi to do the appending it is designed for, and I have no idea why you put a Get Dig In there three times. Can you describe what that code is supposed to be doing?
Reply With Quote
  #14   Spotlight this post!  
Unread 08-02-2010, 23:04
ssica_jj ssica_jj is offline
Registered User
FRC #0368 (TKM)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Hawaii
Posts: 9
ssica_jj is an unknown quantity at this point
Re: problems with using switches for autonomous

Quote:
Originally Posted by Alan Anderson View Post
You still haven't said how you are determining that the value isn't being read. Are you probing any of the wires to find out whether the data from the Driver Station digital inputs is making it out of the Get Dig In?
When we ran the code, to check the values, we turned on the 'highlight execution' and saw that the only value being read is 0.

Quote:
Originally Posted by Alan Anderson View Post
I dont know why you're storing a string of text "1" and "0" characters in something called "Program Num", I am having a hard time understanding why you are doing a Concatenate instead of using the Append T/F String vi to do the appending it is designed for, and I have no idea why you put a Get Dig In there three times. Can you describe what that code is supposed to be doing?
There are 3 Get Dig In because we are using 3 switches. We are converting the value into string then concatenating them in order to create different combination for the case selector in autonomous. That way, we can have multiple autonomous modes and switch between them between matches without re-downloading the code each time. We are using the Append T/F String.vi to convert the digital input value into string.
Attached Thumbnails
Click image for larger version

Name:	2010disabled_wlabel.jpg
Views:	45
Size:	141.2 KB
ID:	8573  Click image for larger version

Name:	2009 atuo.jpg
Views:	46
Size:	145.3 KB
ID:	8574  
Reply With Quote
  #15   Spotlight this post!  
Unread 09-02-2010, 07:45
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: problems with using switches for autonomous

Quote:
Originally Posted by ssica_jj View Post
When we ran the code, to check the values, we turned on the 'highlight execution' and saw that the only value being read is 0.
Try putting an indicator or a probe on the output of Get Dig In and running the code at speed.

Quote:
There are 3 Get Dig In because we are using 3 switches.
Get Dig In returns all eight switches at the same time. You only need to use it once, and you can get multiple elements from its output with a single Index Array. See the attached code fragment. [edit]...which apparently didn't get attached properly, and which I do not have a copy of at the moment. I'll try to correct that later today.[/edit]

Quote:
We are using the Append T/F String.vi to convert the digital input value into string.
I understand that, but you're ignoring the "Append" part of it. You can build the string as you go instead of keeping the characters separate and combining them in a separate step.

Last edited by Alan Anderson : 09-02-2010 at 12:18.
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
Programming toggle switches to DS for different autonomous routines? grosh NI LabVIEW 9 30-03-2009 20:42
Problems with using 330's goal tracking code windell747 NI LabVIEW 11 16-02-2009 13:02
Using Limit Switches with the Arm iwin2000 Programming 3 18-02-2008 03:52
Problems with transmission using Inventor 8 Drew Hopman Inventor 4 10-01-2005 19:07
laser radar with BS2p using RS232 problems... chei_UCF19 Programming 6 26-02-2004 15:21


All times are GMT -5. The time now is 22:45.

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