|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Quote:
The testing and development of code has always been hindered by the progress of the robot build team. This sounds great. Can you provide a bit more insight into how the DAQ device is going to interface with the RC? Your comments almost suggest that the DAQ can be used to replace the IFI controller during development. My sense is that the DAQ is external to that but I am foggy on how one will watch the code while observing data flow. Maybe the point is that one really wants to just watch the data flow. My fingers are itching to get a hold of this device and plug it into last year's robot. |
|
#2
|
|||||
|
|||||
|
Re: What is labview
Quote:
In a sense you're right, Andrew. You really do want to watch the data flow coming from the IFI controller, but it's also nice that you can inject data with the DAQ device as well. Let's look at a couple scenarios that lead up to something I think is the best thing since the IFI breaker panel. Scenario 1: I have written some dead-reckoning autonomous code, and I want to be able to see when the code I have written actually tells the motors to start and stop; I think I've timed the start/stop correctly (based on initial estimates of how fast the robot travels), but I am unsure. There are two ways to do this; one would be with the IFI or LabVIEW Dashboard, and the other would be to monitor the PWM signals themselves with the 6009 DAQ device - of course I want to use the DAQ device since it's the one that will allow me to cut additional wires and write some LabVIEW code (yes, for this example it's overkill but follow with me). Once you've connected the DAQ device to the PWM signal driving the motor (you don't even need the motors here, just the IFI controller) you can write a simple LabVIEW program that will display the PWM signals acquired from the DAQ device to a strip-chart. I can then start my autonomous mode on the IFI controller and see how long the signal is applied to the motors and at what "percentage", and that can help me determine if my code is timing the autonomous properly. I can then tweak my values once the robot is ready, but at least now I have code that I have verified is working properly. Scenario 2: I've decided that I want to use sensors since all the dead-reckoning business is making my head hurt. I don't really know what kind of signals I'm going to get from a Hall-effect sensor or a gyro since I've never used them before, so before I write a bunch of code I want to find out what sensor values I'll get and log some sample readings. So, I connect the Hall-effect sensor (or the gyro or whatever your sensor of choice happens to be) to the DAQ device (as per the instructions with the sensor), write a simple LabVIEW program to gather its data to a strip-chart, and save the data to a file (so we can reference it later or share). I play with it until I am satisfied I know what the sensor data looks like under various conditions - for the gyro and other sensors, I can even prototype code in seconds to figure out the best algorithm for working with that sensor. Now I have mastered the sensor! Scenario 3: OK, so now I have replaced the lame dead-reckoning code with some code to use a Hall-effect sensor watching a wheel sprocket but I'm unsure my code will do what I want it to do. Now I roll up my shirt sleeve and get a little down and dirty. I connect the appropriate DAQ inputs to the PWM outputs on the RC, but I also connect the appropriate DAQ outputs to the appropriate analog/digital inputs on the RC. I use LabVIEW in the same manner as I did before to gather motor/PWM data into a strip-chart, but I also tell LabVIEW to generate a signal that mimics my Hall-effect sensor (or other sensors) and to output that signal to the DAQ outputs (I also want to view this data with a strip-chart as it's being output to the RC). I add a little bit of smarts to my LabVIEW code so that it will begin outputting the generated sensor data only when the motor has been turned on, and stop outputting the signal once the motor is turned off. This way I can start up my autonomous code and watch the RC react to the sensor data from the simulated Hall-effect sensors. Does my robot stop after N number of pulses? Yes! I've just unit tested a portion of my autonomous code without having any physical robot hardware attached to the RC! Once I have my robot, the values can be tweaked for optimum performance. This is just an extremely simple example of what you can do with the NI USB-6009 DAQ device and the IFI RC, but hopefully you are able to extrapolate this use-case to larger projects for your team. -Danny |
|
#3
|
|||||
|
|||||
|
Re: What is labview
Quote:
Eric |
|
#4
|
|||
|
|||
|
Re: What is LabVIEW
There is a version of Labview called RoboLab written for the Lego RCX brick.
I believe this has always been included as part of the FLL distribution, and can be obtained separately from Dacta for under $50 (I think). Robolab was witten by Tufts University under a NASA Grant. I believe our own Jeff Seaton (National MC and NASA guy) was responsible for awarding the grant. Any way you can get a good introduction to Labview for very little $$$. I don't think LabView would be suitable for FRC, heck - you guys need to learn C eventually!!!! If you google "tufts sensors NASA" you should get to the site. |
|
#5
|
|||
|
|||
|
Re: What is LabVIEW
LabVIEW is a great program made by a company that stands behind their product. The hardware is also the best in the industry and relatively inexpensive, but the software is not. Both have been around a long while.
It is rumored that Microsoft purchased the Windows name from National Instruments. I use it every day, and love it. |
|
#6
|
|||||
|
|||||
|
Re: What is LabVIEW
Quote:
Quote:
-Danny |
|
#7
|
|||||
|
|||||
|
Re: What is LabVIEW
Quote:
Quote:
-Danny |
|
#8
|
|||||
|
|||||
|
Re: What is LabVIEW
Quote:
-Danny |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| National Instruments LabVIEW and Data Acquisition Forum | Danny Diaz | National Instruments LabVIEW and Data Acquisition | 1 | 16-01-2006 13:20 |
| **FIRST EMAIL**/National Instruments Pilot | Danny Diaz | FIRST E-Mail Blast Archive | 2 | 23-11-2005 08:34 |
| National Instruments LabVIEW & Data Aquisition Forums | Brandon Martus | Announcements | 0 | 22-11-2005 21:12 |
| LabVIEW FAQ | Danny Diaz | LabView and Data Acquisition | 0 | 21-11-2005 01:11 |
| Custom Dashboard code for LabVIEW ready for download. | archiver | 2001 | 3 | 24-06-2002 00:49 |