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:

I’ll let you know how it goes.

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.

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:

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.

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.

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.

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?

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.

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 :smiley: