![]() |
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?:confused: Thank you!:D 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. |
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.
|
Re: problems with using switches for autonomous
Why not put the switches on the robot, connected to the digital IO on the digital sidecar?
|
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. |
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.
|
Re: problems with using switches for autonomous
1 Attachment(s)
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. |
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...
|
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.
|
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 :confused: ) |
Re: problems with using switches for autonomous
would it be possible to just program your own dashboard and have that be your switch?
|
Re: problems with using switches for autonomous
Quote:
|
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). |
Re: problems with using switches for autonomous
Quote:
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? |
Re: problems with using switches for autonomous
2 Attachment(s)
Quote:
Quote:
|
Re: problems with using switches for autonomous
Quote:
Quote:
Quote:
|
| All times are GMT -5. The time now is 11:58. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi