Joe Ross
28-01-2014, 20:45
I was recently asked the following question via PM, but I thought the answers might be helpful for other people, and so that other more experienced people could chime in.
Have you been able to interface Java with LabVIEW so that sensor data is automatically shown. What I mean by this is something like when I call
SmartDashboard.put ("Intake Roller", intakeRollerSpeed);
in the SmartDashboard this would automatically populate with a label Intake Roller and the value would get updated accordingly. Is there someway I can implement automatic population in a custom LabVIEW Dashboard and a Java coded robot?
I have not looked very much at the 2014 LabVIEW Dashboard, but I expect it would be similar to 2013. The 2013 dashboard had a tab called Operation. Any controls you placed on that tab would be automatically bound to the SmartDashboard variable of the same name as the control. This isn't quite as easy as the Java Smartdashboard since the controls don't appear automatically, but it's very easy to drag a new control to the tab and rename. This will also transmit any changes made to the control on the front panel. It will not transmit any changes made programmatically, so you can't use this, for example, to send vision data that was processed on the dashboard to the robot.
Additionally, the Variables tab shows all Smartdashboard variables in a tree format.
From my understanding I have to send my data to a NetworkTable with a key and value in my Java code and call upon the same key in my LabVIEW Dashboard to view the feedback.
This is the more flexible way to do it. I would recommend using the SmartDashboard class in Java and the SmartDashboard VIs in LabVIEW (NetworkTable is a little lower level). You can do additional calculations in LabVIEW either before transmittal or before display.
Last year, we used a nicely configured LabVIEW dashboard with large indicators and controls that the drivers could use. When the programmers wanted to debug something, we would bring up the java smartdashboard, because it was more convenient to send and receive arbitrary variables. You can even have both of them running at the same time.
Have you been able to interface Java with LabVIEW so that sensor data is automatically shown. What I mean by this is something like when I call
SmartDashboard.put ("Intake Roller", intakeRollerSpeed);
in the SmartDashboard this would automatically populate with a label Intake Roller and the value would get updated accordingly. Is there someway I can implement automatic population in a custom LabVIEW Dashboard and a Java coded robot?
I have not looked very much at the 2014 LabVIEW Dashboard, but I expect it would be similar to 2013. The 2013 dashboard had a tab called Operation. Any controls you placed on that tab would be automatically bound to the SmartDashboard variable of the same name as the control. This isn't quite as easy as the Java Smartdashboard since the controls don't appear automatically, but it's very easy to drag a new control to the tab and rename. This will also transmit any changes made to the control on the front panel. It will not transmit any changes made programmatically, so you can't use this, for example, to send vision data that was processed on the dashboard to the robot.
Additionally, the Variables tab shows all Smartdashboard variables in a tree format.
From my understanding I have to send my data to a NetworkTable with a key and value in my Java code and call upon the same key in my LabVIEW Dashboard to view the feedback.
This is the more flexible way to do it. I would recommend using the SmartDashboard class in Java and the SmartDashboard VIs in LabVIEW (NetworkTable is a little lower level). You can do additional calculations in LabVIEW either before transmittal or before display.
Last year, we used a nicely configured LabVIEW dashboard with large indicators and controls that the drivers could use. When the programmers wanted to debug something, we would bring up the java smartdashboard, because it was more convenient to send and receive arbitrary variables. You can even have both of them running at the same time.