|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||||
|
|||||
|
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.
|
|
#3
|
|||||
|
|||||
|
Re: problems with using switches for autonomous
Why not put the switches on the robot, connected to the digital IO on the digital sidecar?
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||||
|
|||||
|
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.
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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...
|
|
#8
|
|||
|
|||
|
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.
|
|
#9
|
||||
|
||||
|
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 ) |
|
#10
|
|||
|
|||
|
Re: problems with using switches for autonomous
would it be possible to just program your own dashboard and have that be your switch?
|
|
#11
|
||||
|
||||
|
Re: problems with using switches for autonomous
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.
|
|
#12
|
|||||
|
|||||
|
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). |
|
#13
|
|||||
|
|||||
|
Re: problems with using switches for autonomous
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? |
|
#14
|
|||
|
|||
|
Re: problems with using switches for autonomous
Quote:
Quote:
|
|
#15
|
|||||
|
|||||
|
Re: problems with using switches for autonomous
Quote:
Quote:
Quote:
Last edited by Alan Anderson : 09-02-2010 at 12:18. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |