Go to Post You know you've been involved with robotics too long when you see a remote-controlled traffic barrel coming up behind people and honking - and it doens't faze you. - GaryVoshol [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 08-10-2008, 10:50
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,670
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
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?
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #2   Spotlight this post!  
Unread 08-10-2008, 12:32
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,566
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Kevin Sevcik View Post
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?
That is one point on which several beta teams are confused. It really depends on whether the references carry state information (best I can tell, some do and some don't). There have been a lot of ideas thrown around on how to improve things, both through examples and added documentation.

Quote:
Originally Posted by Kevin Sevcik View Post
2. Is 25 Hz just a random loop timing decision on your part, or is it the recommended max loop rate?
It is the rate at which the driver station sends data. That should be raised soon. I have not seen any recommendations as to a maximum.

Quote:
Originally Posted by Kevin Sevcik View Post
3. The Victor/PWM modules seem to have some sort of deadband and transform setup. Does that configuration happen in a separate module?
There are 4 PWM type VI Libraries, a raw PWM, a Victor, a Jaguar, and a servo. The Victor, Jaguar, and Servo have different types of deadband and scaling control. You can use the raw PWM, if you want to implement your own methods for scaling and or deadband elimination.

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
Reply With Quote
  #3   Spotlight this post!  
Unread 08-10-2008, 12:52
BornaE's Avatar
BornaE BornaE is offline
Registered User
FRC #0842 (Formerly 39)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Gilbert, Arizona
Posts: 359
BornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant future
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Kevin Sevcik View Post
Tom,

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?
The pink Wires pass the device refrence information, but there are some subVIs that can change the parameteres in that cluster.
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.
__________________
-Borna Emami
Team 0x27
Reply With Quote
  #4   Spotlight this post!  
Unread 08-10-2008, 13:48
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,670
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Joe Ross View Post
Quote:
Originally Posted by Kevin Sevcik View Post
2. Is 25 Hz just a random loop timing decision on your part, or is it the recommended max loop rate?
It is the rate at which the driver station sends data. That should be raised to 40hz soon (same as IFI). I have not seen any recommendations as to a maximum.
Ah. Good to know, then. One more followup while I'm on my lunch break. Is it possible to run separate loops at higher rates for improving PID control? For example, with the IFI RC, you could set up the "fast loop" to update some of the PWM outputs at whatever speed you liked. Given that the Victors can theoretically handle update rates of 120Hz, I'd dislike having to throttle them to whatever the update rate of the DS is.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #5   Spotlight this post!  
Unread 08-10-2008, 14:48
BornaE's Avatar
BornaE BornaE is offline
Registered User
FRC #0842 (Formerly 39)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Gilbert, Arizona
Posts: 359
BornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant future
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Kevin Sevcik View Post
Ah. Good to know, then. One more followup while I'm on my lunch break. Is it possible to run separate loops at higher rates for improving PID control? For example, with the IFI RC, you could set up the "fast loop" to update some of the PWM outputs at whatever speed you liked. Given that the Victors can theoretically handle update rates of 120Hz, I'd dislike having to throttle them to whatever the update rate of the DS is.
Yes, you can run other loops simultaneously at different rates.
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.
__________________
-Borna Emami
Team 0x27

Last edited by BornaE : 08-10-2008 at 14:52.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-10-2008, 22:47
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #7   Spotlight this post!  
Unread 09-10-2008, 00:55
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Kevin Sevcik View Post
Tom,
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.
The FPGA is implemented to execute hardware timed analog acquisitions in the background. You can specify different sample rates for each module (which is more flexible than DAQmx) so that you can better tailor the measurement to the sensors connected to that module. In addition, there are hardware accumulators (DAQmx doesn't have them), oversampling / averaging engine (DAQmx doesn't have it), 8 analog triggers (DAQ boards usually have 0 to 2) and the triggers support rollover detection (DAQ triggers don't)... the list goes on and on.

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:
Originally Posted by Greg McKaskle View Post
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.
The goal was to create an API that, while not as general purpose as DAQmx, provides more of the features that teams will need to excel. I hope you find that to be true. Oddly enough, for my day job I'm a driver developer for DAQmx.
Reply With Quote
  #8   Spotlight this post!  
Unread 10-10-2008, 03:33
BornaE's Avatar
BornaE BornaE is offline
Registered User
FRC #0842 (Formerly 39)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Gilbert, Arizona
Posts: 359
BornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant future
Re: Team 39, 2008 LabVIEW Beta Code

New Revision posted here: http://hhsrobotics.org/forums/viewto...f=4&t=3&p=6#p6
__________________
-Borna Emami
Team 0x27
Reply With Quote
  #9   Spotlight this post!  
Unread 10-10-2008, 07:02
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #10   Spotlight this post!  
Unread 10-10-2008, 17:21
BornaE's Avatar
BornaE BornaE is offline
Registered User
FRC #0842 (Formerly 39)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Gilbert, Arizona
Posts: 359
BornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant futureBornaE has a brilliant future
Re: Team 39, 2008 LabVIEW Beta Code

Quote:
Originally Posted by Greg McKaskle View Post
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
Oops, I forgot to put that in there.
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.
__________________
-Borna Emami
Team 0x27
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 13:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi