|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
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
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? |
|
#10
|
|||
|
|||
|
Re: problems with using switches for autonomous
Quote:
Quote:
|
|
#11
|
|||||
|
|||||
|
Re: problems with using switches for autonomous
Quote:
Quote:
Quote:
Last edited by Alan Anderson : 09-02-2010 at 12:18. |
|
#12
|
||||||
|
||||||
|
Re: problems with using switches for autonomous
Are you using compatibility i/o or extended i/o?
Alan, you forgot the code fragment. |
|
#13
|
|||||
|
|||||
|
Re: problems with using switches for autonomous
I thought it was there when I wrote the post this morning. Here it is (again).
|
|
#14
|
|||
|
|||
|
Quote:
![]() |
|
#15
|
||||
|
||||
|
Re: problems with using switches for autonomous
we have our auton. working in the same way you guys do except on ours we have the boolean output of the "get Dig. in" block going to a block that gets the ID of the switch and goes directly into a case structure. inside the case we have different "pages" that have different auton. programs. the DIG. In is what controls the program.
|
![]() |
| 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 |