Talon SRX Encoder Readouts for labview.


We are having problems getting encoder values to go to the dashboard. We are using the CAN talon speed controller.vi found under the help>find examples in labview. When we deploy the vi it displays values to its front panel. We see the readouts on the graph. However, right once we try displaying the values to the dashboard it stops working.

To display to the dashboard we are using in the VI:
NT WRITE and setting the name “Encoder”
Then connecting the value to the terminal

To display to the dashboard we are using this dashboard code.

NT READ and setting the name to “Encoder”
Connecting that to an indicator and putting that on the dashboard.

Code is attached below.

Does anyone have any idea of why the encoder is not printing values? It prints to the front panel of the VI but not to the dashboard. How come?

Thank You

Code that we are using…docx (29.7 KB)

Code that we are using…docx (29.7 KB)

The dashboard has a tab called Variables. This displays all network tables contributed by any client, and updates at five or ten times per second. Look to see if the /SmartDashboard/Encoder is in the tree. If you don’t find it, look for /Encoder. The vis will take a string with a prepended / as an absolute path. A string without a / will be prepended with /SmardDashboard. Be sure the robot and dashboard match exactly, case, spaces, and / will all matter.

The code you put in the attached doc didn’t say where it was located. If it is not in a loop, it will run once and never again. The read and write to local is a single transfer of data and not a registration of a periodic service. So you either need to put that in a loop – the top one work. Or you can name the display of the encoder data “Encoder” to match the SmartDashboard variable name, and place it in the Custom tab or the Basic tab. The contents of those two tabs are registered using the NT Bind, and no looping is necessary.

Greg McKaskle