View Full Version : Get Array From SmartDashboard
bvisness
25-01-2014, 16:39
I'm trying to get an array of information about the vision targets to send from the SmartDashboard to the cRIO. I absolutely can't figure out how to do this - the documentation seems much too sparse.
I know that when using LabVIEW we could just use a "SD Get Numeric Array" or something like that. Where's the equivalent function in C++ (or how do I work around it for myself?)
BradAMiller
29-01-2014, 07:26
Quick question... are you trying to write code that runs in a SmartDashboard custom widget that creates the array of values and sends them to the robot program?
BradAMiller
29-01-2014, 11:05
Here is some documentation that shows how to retrieve values in an array on the robot that were generated by RoboRealm for doing vision operations.
http://wpilib.screenstepslive.com/s/3120/m/7912/l/171861-using-networktables-with-roborealm
and here is some documentation that shows how you might send values from a Java client program running on the desktop.
http://wpilib.screenstepslive.com/s/3120/m/7912/l/80205-writing-a-simple-networktables-program-in-c-and-java-with-a-java-client-pc-side
This desktop example doesn't use arrays, but from the previous example, it might give you enough information to make it work.
Hope this helps.
bvisness
29-01-2014, 11:17
Thanks for the advice. Since I'm using C++ (which makes arrays a giant headache) I actually ended up using VBScript in RoboRealm to save the array data I wanted into single variables for sending to the robot. Seems to be working fine!
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.