Go to Post The imbalance and vibration is telling you something, you are not listening. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-07-2009, 09:36
Happyisgood Happyisgood is offline
Registered User
FRC #3161 (Tronic Titans)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Canada
Posts: 23
Happyisgood is an unknown quantity at this point
Monitering C++ Code With A LabVEIW Dashboard

I've made much progress in my programming since my last post and am well on my way to getting this summer bot off the ground (not literally of course.)

A mentor from my team has asked me to look into something, I've researched for a while and can not find anything to suggest it is possible so I figured I'd ask you at the CD community.

My mentors want my code to be monitored through a Dashboard, not console outputs like I have now. As far as I'm aware this is not possible unless I use LabVIEW to program the entire robot, which I don't want to do.

Any input would be appreciated!
Nick
__________________
2009 - Waterloo Regional - Regional Finalist
2009 - Waterloo Regional - Engineering Inspiration Award


________________________

2009 Team Member 1334
Reply With Quote
  #2   Spotlight this post!  
Unread 10-07-2009, 10:53
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Monitering C++ Code With A LabVEIW Dashboard

The LabVIEW Dashboard application just needs to receive the appropriate data from the robot. There is an example program that shows how to send that data using C++. I apologize for not having better details for you, but we chose LabVIEW for our robot programming and I'm not familiar enough with the C++ environment to help you more.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-07-2009, 18:46
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,753
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: Monitering C++ Code With A LabVEIW Dashboard

As Alan stated, the LV dashboard displays information it receives from the driver station/robot via the UDP connection. This means that the LV dashboard really doesn't even know what language the robot code is running. The tricky part for the robot code is what is called marshaling. This is taking arbitrary data and flattening it into a byte buffer, then unflattening it on the other side and reconstructing the original data. To make this easier, the example introduces some classes for doing this.

In summary, it is certainly possible, give it a try and ask for help if you get stuck.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 10-07-2009, 23:24
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
Re: Monitering C++ Code With A LabVEIW Dashboard

its relatively simple... as long as you know how to broadcast UDP packets in c++ (shouldnt be too bad)

basically you create a data structure that holds the data you want to send over, then you typecast it into a character array ( senddata = (char *)data ) or something like that.

once its sent, you can build an identical data structure in labview (make sure you pack it correctly in c++), unflatten it from a string (see the documentation on that vi), and shazam you now have a data structure filled with data.

im sure there may also be libraries in c++ to do complete communications with labView, allowing real time updates too, but thats basically the reverse of the process described above.
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
Reply With Quote
  #5   Spotlight this post!  
Unread 11-07-2009, 13:59
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Monitering C++ Code With A LabVEIW Dashboard

Look into the Dashboard class provided in WPILib. There's a good demo there that should get you off the ground. It interfaces nicely with the Labview Dashboard example as well. Once you figure out how it's working, it's easy to modify it to suit your needs.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-07-2009, 14:01
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,089
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Monitering C++ Code With A LabVEIW Dashboard

I've also created a library that allows you to monitor and modify variables in C++ via an embedded webserver on the bot: http://code.google.com/p/webdma/

Then you don't need LabVIEW either, just a web browser.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #7   Spotlight this post!  
Unread 14-07-2009, 17:23
Happyisgood Happyisgood is offline
Registered User
FRC #3161 (Tronic Titans)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Canada
Posts: 23
Happyisgood is an unknown quantity at this point
Re: Monitering C++ Code With A LabVEIW Dashboard

Thanks guys I'll give this a try, my code has also run into another brick wall, so I'll be asking this in a few minutes!
__________________
2009 - Waterloo Regional - Regional Finalist
2009 - Waterloo Regional - Engineering Inspiration Award


________________________

2009 Team Member 1334
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
Installing Labveiw on Vista mtnman1 NI LabVIEW 17 04-03-2009 18:10
anyone still learning labveiw suj NI LabVIEW 7 08-01-2009 20:15
IFI Dashboard Sorce Code kE7JLM Programming 4 13-03-2008 18:19
pic: the future of hall monitering will_freer Extra Discussion 11 16-09-2006 22:28
Code for the Dashboard HuskieRobotics Programming 1 04-03-2004 11:10


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

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