|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Aquiring Sensor Data
Hi all,
This year we've decided to use the LabView stuff to get some debug/info data from our robot using the link between the operator interface and the computer. I've created a little dashboard interface for our little test robot that tells us batteries info and PWM output. We'd like to have sensor data too, ex: encoder counts, gyro angle, etc... However, I can not find a way to read that data in using this template/toolkit in our dashboard: http://www.chiefdelphi.com/forums/sh...ad.php?t=50742 I've attached the file of my dashboard, as I still do not understand all the LabView lingo quite yet. Any help would be appreciated. Cheers -Tanner |
|
#2
|
|||||
|
|||||
|
Re: Aquiring Sensor Data
You have to understand what the Dashboard is doing - it is sniffing the communications between the OI and the RC. The sensor data doesn't get transmitted between the RC and the OI.
However, there are 6 user bytes in the communications stream (the UserByteX bytes, where X is 1 through 6) that you can fill in yourself in order to get your data up to the OI. In your robot code, you need to fill in the data into the user bytes. Then, in your LabVIEW code, you can read those user bytes. And VIOLA! You've just gotten your data up and you can display the data. If you need more of an explanation, just let me know. -Danny |
|
#3
|
|||||
|
|||||
|
Re: Aquiring Sensor Data
Oh, also I noticed you are trying to use OI data as well as RC data in your dashboard. Realize you will only get the kind of data that your jumper on your OI allows (there's a jumper on your OI to select between RC data and OI data). I recommend RC data so you can see user bytes and PWM data and the like.
-Danny |
|
#4
|
||||
|
||||
|
Re: Aquiring Sensor Data
Hm. Interesting. So if I had some data stored in variable X, and I wanted to pass it to user byte 1, then:
UserByte1 = X; Correct? I'll have to see if I can get this working today. Thanks for the help -Tanner |
|
#5
|
|||
|
|||
|
Re: Aquiring Sensor Data
If you run out of User bytes, another trick you can use is to stuff your sensor data into unused PWM data slots (i.e. make sure there is nothing connected to those PWM ports!). Then your dashboard can read the PWM data slots and make the conversion to sensor data.
|
|
#6
|
|||||
|
|||||
|
Re: Aquiring Sensor Data
Quote:
Code:
unsigned int analogValue = GetAnalogValue( rc_ana_in01 ); // analog input port 1 UserByte3 = (char)analogValue; // Pulls low 8 bits UserByte4 = (char)(analogValue >> 8); // Grabs high 8 bits Quote:
-Danny |
|
#7
|
||||
|
||||
|
Re: Aquiring Sensor Data
Anyone know how to do this in ROBOT C?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| data bus | sciguy125 | Electrical | 10 | 06-09-2007 20:53 |
| pic: CD Aquiring usfirst.org? | Pat McCarthy | Extra Discussion | 7 | 15-11-2006 18:56 |
| Dashboard, The Comp and sensor data... | Kevin Karan | Programming | 7 | 28-01-2004 21:31 |
| Sensor or no Sensor For Autonomous mode | Kyle1010 | Programming | 14 | 22-01-2003 13:10 |