|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Tom,
I think the code looks.... reasonably straight forward. But then, I'm a bit used to deciphering Labview code. It looks like most every function is going to be run through those XYZ-Open,Something,Close function blocks. Open XYZ on Port B at Slot A, either when the robot is turned on or when initializing into a mode. Do something to it. Close it when your robot turns off, stops needing it, or stops running the Labview code. I imagine the latter is important to not forget, since it could possibly confound things if you don't close these ports when you stop the code to make a programming change. I'm a little concerned that I don't see any DaqMX tasks in this code. I realize it's slightly advanced stuff, but it's important slightly advanced stuff. You can set up hardware timed data sampling tasks that run at much higher frequencies than your background processing tasks, as well as setting up custom scales and all sorts of other things. Hopefully it's just that beta teams haven't gotten around to looking at that sort of thing yet, as opposed to it not being an option. Borna, A few followup questions from an interested bystander: 1. I assume the pink wires in and out of the various modules (DigMd, AnlgMd) are carrying module configuration info. Are the shift registers you have on these module configuration lines actually necessary? Could they instead just be simple tunnels, as with the Joystick in your main loop? 2. Is 25 Hz just a random loop timing decision on your part, or is it the recommended max loop rate? 3. The Victor/PWM modules seem to have some sort of deadband and transform setup. Does that configuration happen in a separate module? |
|
#2
|
||||||
|
||||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
Quote:
Quote:
For example, The deadband control for Victor is a boolean value, whether to scale the inputs to eliminate the victor deadzone and center on 127 (rather then 132) or not. Last edited by Joe Ross : 08-10-2008 at 13:49. Reason: fixed update rate |
|
#3
|
||||
|
||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
too keep the new data for the next loops, shiftregisters are needed. but in our case as of now, tunnels would work the same. ================================================== ==== For our code as of now, we dont need to sample the inputs more that 25hz since thats the only time they are needed. once we get to gyros or accelerometers, sampling fater would come in handy. I promise the next revision looks much better. |
|
#4
|
|||||
|
|||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
|
|
#5
|
||||
|
||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
Also a new Driver Station update was released today that changed the update rate to approximately 50Hz you can also run this loop faster, it is best if the loop OS run at a multiple of DS update rate. eg. 100Hz - 200Hz and make sure your processor doesnt run out of time. Last edited by BornaE : 08-10-2008 at 14:52. |
|
#6
|
|||
|
|||
|
Re: Team 39, 2008 LabVIEW Beta Code
Responding to the question about DAQmx usage, the cRIO and other reconfigurable I/O devices don't have a traditional driver API to their I/O. The I/O is defined by VIs that run on the FPGA, and accessed by VIs that run on the RT target. In other words, the WPI library really is the API. It is built upon/incorporates the FPGA, and is DAQmx is not in the picture.
Greg McKaskle |
|
#7
|
|||
|
|||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
Custom scales are implemented by you wrapping the GetVoltage VI with the calculations you want for your scale. The voltage values that are returned to you are scaled with factory calibration constants stored for each channel on each module during manufacturing. Quote:
|
|
#8
|
||||
|
||||
|
Re: Team 39, 2008 LabVIEW Beta Code
New Revision posted here: http://hhsrobotics.org/forums/viewto...f=4&t=3&p=6#p6
|
|
#9
|
|||
|
|||
|
Re: Team 39, 2008 LabVIEW Beta Code
It looks like you have lots of things hooked up and working. I don't see any timing in your BIG loop with all of your dig I/O stuff. That of course means it runs all out in parallel with everything else. If you can determine a time for it to run based on response, that will likely help with the responsiveness of the other loops.
My guess is that you can put a Wait of 20ms, similar to the camera loop. If that seems too slow, lower the number. Greg McKaskle |
|
#10
|
||||
|
||||
|
Re: Team 39, 2008 LabVIEW Beta Code
Quote:
I was using a Timed loop before that but since that was not provided with the default FRC labview, i switched it to a while loop. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Posting LabView Code Easily? | Greg Marra | NI LabVIEW | 17 | 25-11-2009 16:49 |
| LabView FRC Toolkit code level issue | KHall | National Instruments LabVIEW and Data Acquisition | 2 | 11-06-2008 10:40 |
| [TBA] Match Archives 2008 (beta) | Greg Marra | The Blue Alliance | 16 | 07-10-2007 14:39 |
| Configuring Labview code to easyC | team877 | LabView and Data Acquisition | 6 | 16-01-2007 09:21 |
| LabView Gear Tooth Sensor Code | SkiRacer | LabView and Data Acquisition | 2 | 17-01-2006 03:53 |