OCCRA
Go to Post Okay, Okay, I officially apologize to the the entire country of Canada - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-20-2009, 07:26 PM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Angry Default Labview Dashboard and Windriver Example Help

I used the example code in Windriver to try and get my default dashboard to output what each channel, pwm, analog input, digital output is doing so that I can debug my programs. The example is woefully incomplete and I need help getting the data sent to the default dashboard in Labview so I can figure out what the robot is doing.

I see in the UpdateDashboard subroutine of the Windriver example where some of the data types are assigned a value and I guess that is what is actually sent to the Dashboard. (The default code makes the DGIO indicators in Labview light up like KITT which isn't really helpful) Could someone please do a better job than WPI and give me an example of what C++ code I need to send data from:

PWMs on Module 4 to the Dashboard
Analog Input on Module 1 to the Dashboard
Digital Input on Module 4 to the Dashboard
Solenoids to the Dashboard

A single line example for each of these would be great, I can propagate it for each channel from there.

As an aside I am really frustrated on the lack of examples and documentation on the more complex programs. If I am looking at an example of a program that feeds data to the default dashboard I would expect there to be at least one of each of the different data subsets in the program feeding information back to the dashboard!

For anyone who has a similar question, I have put the default dashboard on the back burner and am instead gonna try out Team 1100's dashboard code which can be found here:
http://www.chiefdelphi.com/forums/sh...ad.php?t=72442
I'll let you know how it goes.

Last edited by sircedric4 : 01-21-2009 at 10:55 AM. Reason: Trying different code instead
  #2   Spotlight this post!  
Unread 01-21-2009, 07:38 PM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Unhappy Re: Default Labview Dashboard and Windriver Example Help

All right I am desperate now. Could someone please help? I've spent the last 2 days just trying to get a LAbview dashboard that will reflect the actions of the control system and am having no luck.

I am having real troubles with the PWM indicators. Does no one else have these problems? Could someone please tell me what C code I need to get the pwm indicators on my Labview Dashboard to read what the digital breakout board is sending my jaguars and victors.

Please help me.
  #3   Spotlight this post!  
Unread 01-21-2009, 08:52 PM
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 120
heydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to behold
Re: Default Labview Dashboard and Windriver Example Help

We had this exact problem. The Dashboard example project, as you've stated, does nothing related to the ACTUAL dashboard other than show you HOW to send the data elements.

For more detailed background, see my post here:
http://www.chiefdelphi.com/forums/sh...ight=dashboard

We made a generic implementation to pack the DashboardDataFormat class with the actual data being sent out of the cRIO modules, globally, on all channels. This has the advantage of not caring at all what driver classes you are using for the various I/Os (ie, doesn't matter if you have a gyro or a potentiometer connected to a channel - it just gets the raw channel value, as in prior years' dashboard).

However, to do this, we had to change WPILib slightly, because the default class interfaces are too restrictive to provide this information.
I've suggested this change to the WPIlib maintainers.

If someone would like to see the function we wrote to do this (knowing you need to change WPILib to use it), let me know and I'll try to extract it out and put it somewhere to share.
  #4   Spotlight this post!  
Unread 01-22-2009, 05:38 AM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Question Re: Default Labview Dashboard and Windriver Example Help

I will take any help I can get if that means tweaking the WPILib that is fine.

I really think there is probably an easier way to get my PWM indicators to show what the robot is doing though.

I have tried for 2 consecutive full days to get my Labview dashboard PWM indicators to show what PWM signals my Jaguars and Victors are getting with no luck.

Could someone please give me a working example of how to setup the PWM indicators to read the PWM values when I move my joysticks and stuff,please.

The Dashboard example leads me to believe I only have to set the class to PWM->GetRaw but I don't know if I am using the wrong module number or channel number or what. What is the C++ code I need to make this work, it should be simple but I have tried every variation of calling the class and setting the class that I know. Most of the time it goes so far as to make the cRIO stop responding.

Examples of the futility I have tried using the Default DashboardDataExample project under the UpdateDashboard subroutine:
dashboardDataFormat.m_PWMChannels[0][1] = PWM(1).GetRaw();
also using modules 1,3,4 and channels 1-7 with no results from any
dashboardDataFormat.m_PWMChannels[0][1] = 50;
also using modules 1,3,4 and channels 1-7 with no results from any

These compile fine, but when I run the robot and the dashboard the PWM indicators don't move! they don't even set themselves to 50!

I have a single digital breakout on the standard module 4 on the cRIO. What module number should I use in this case? If I can just get a single working example I can go from there.

Last edited by sircedric4 : 01-22-2009 at 06:07 AM.
  #5   Spotlight this post!  
Unread 01-22-2009, 01:09 PM
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 120
heydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to behold
Re: Default Labview Dashboard and Windriver Example Help

If you only care about the PWMs, those can be done easily w/out WPILib changes.

You can do something like:

DigitalModule *dm = DigitalModule::GetInstance(4); // 4 is cRIO slot #
dashboardDataFormat.m_PWMChannels[0][0] = dm->GetPWM(1);

to set the first PWM's data in the dashboardDataFormat object.
Continue on down to do the rest of them (use a loop perhaps).


Though if you cannot even get your hard-coded value of 50 to show up on your dashboard, then you may have another issue. Check that your dashboard's Labview install and your Windriver c++ are all at the most recent updated version so that the data packets each expects are the same. Also make sure you don't change the format or ordering of the data in DashboardDataFormat class because that will cause a mismatch with what the LV Dashboard expects.
  #6   Spotlight this post!  
Unread 01-22-2009, 01:46 PM
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
FRC #2992 (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 242
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Default Labview Dashboard and Windriver Example Help

I was extremely frazzled by the time I got to hardcoding so its entirely possible I just messed it up. I will give what you say a try though. I did not even think about trying to query the DigitalModule what with their being a class called PWMs.

I'll try it tonight and let everyone know how it goes. And if that or good hardcoding doesn't work I'll relook at my updates. I did do the updates the second I pulled the components out of the box and during the "breadboarding" phase of the controls process, but maybe something didn't take.

But you maybe on to something, its possible I just disregarded the Labview update since I was intending on only using Windriver until I saw the nice default dashboard. Is there some way to tell if your Labview is the newest version?

Last edited by sircedric4 : 01-22-2009 at 01:56 PM.
  #7   Spotlight this post!  
Unread 01-22-2009, 02:17 PM
heydowns's Avatar
heydowns heydowns is offline
Registered User
AKA: Jeff Downs
FRC #1511 (Rolling Thunder)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Ra-Cha-Cha
Posts: 120
heydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to beholdheydowns is a splendid one to behold
Re: Default Labview Dashboard and Windriver Example Help

Yeah we fill in all the dashboard packet data by querying DigitalModule, AnalogModule directly. It saves having to query all the driver classes in different ways, and also provides access to some things that you can't get through some of the driver classes.

The limitation comes in when you want to get DigitalOutputs and a few others. For those, we had to change WPILib to add access methods or expose the FPGA handle such that we could query it directly for the necessary information.

I don't know how to check for updated LabView, sorry. Maybe someone else can chime in on that.
  #8   Spotlight this post!  
Unread 02-25-2009, 12:58 AM
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
Re: Default Labview Dashboard and Windriver Example Help

I was wondering. How would you get a digital, analog, or even a solenoid value? When I tried that using the basic program, the GPIO lights went crazy.

Any ideas on how to refer to the I2C port?


Thanks
Closed Thread


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
Example LabVIEW Apps - Dashboard, CMUcam2 and Motors DanDon LabView and Data Acquisition 3 01-29-2009 09:13 PM
ROBOT C and the LabVIEW Dashboard robogeek753 Programming 5 02-20-2008 10:30 AM
Example LabVIEW Apps - Dashboard, CMUcam2 and Motors Russ Beavis National Instruments LabVIEW and Data Acquisition 9 01-21-2007 04:19 PM
Labview Dashboard and updated IFI dashboard spec Joe Ross LabView and Data Acquisition 1 04-04-2006 01:04 AM
Labview dashboard and multiple variables Joe Ross LabView and Data Acquisition 2 03-15-2006 08:55 PM


All times are GMT -5. The time now is 10:37 PM.

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


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