Skip to content
GitHubYouTubeInstagram

One number, from the robot to the log and back.NetworkTables → dashboard → log → reading it → replay

Our launcher speed changes every 20 ms. This course follows that one number: over NetworkTables to a dashboard, into a log on the robot, back out of the log after the match to find out what happened, and, on the FM SystemCore code, through the robot program again to see what a change would have done.

5 chapters · about 47 minutes

  1. 01 · 8 minNetworkTables: publish and subscribeSend a value through the server, then watch a dashboard fall behind the launcher.
  2. 02 · 5 minWhat goes on the driver's screenOur six Elastic tabs, and which one to open for which problem.
  3. 03 · 9 minWhat the robot writes downLog the same launcher burst at five rates and see what is left, and what one log record holds.
  4. 04 · 14 minReading a real matchFind what sent the turret the long way round in Q36, then read a second moment yourself in real AdvantageScope.
  5. 05 · 11 minReplayBreak a replay two ways, change a vision gate and run the code again on logged inputs, and the four ways to write a log. Sim only so far.
Chapter 1 of 5 8 min

NetworkTables: publish and subscribe

Send a value through the server, then watch a dashboard fall behind the launcher.

Two robots show up in this course. The offseason bot is the one we ran at Chezy Champs, and Q36 is its log from qualification match 36 there, on 2026-09-19. Its code is 2026-Spectrum and it logs with DogLog. FM ("Final Machine") is our 2026 competition robot, and FM SystemCore is its code ported to SystemCore, with AdvantageKit logging. You'll see that one in the last chapter.

Robot code runs in a robot loop: every 20 ms it reads the sensors, decides, and sets the motors, 50 times a second. Our launcher's speed changes every loop. In the Q36 log there are 35 moments in 3.7 seconds where it falls 150 rpm or more under the speed we asked for. This chapter follows one number, Launcher/RPM, from the robot code to a screen, and asks how much of it the screen gets to show.

The road is NetworkTables. The robot program runs the server, on port 5810, and everything else connects to it as a client: the Elastic dashboard and AdvantageScope on the laptop, the Limelight cameras, the robot code itself. A value lives under a name, a topic like /Robot/Launcher/RPM. A publisher sets it and every subscriber gets a copy. One client can do both. Elastic subscribes to the launcher's speed and publishes the auto we picked.

LabSend a value through the server

Point at a button to see the line of our code behind it, and say which boxes will light up green. Then press it and check. Last, flip the mirror switch and send the commanded speed again.

// The line of our code that sends the value shows here.

Playing a demo. Press a button to send a value yourself.

A value someone setA copy sent to a subscriberA value written to the log
Topics on the server (FM bench)154 (mirror off)
Demorunning

Simplified: four topics, and the copies fly one at a time. Values are illustrative except the speeds, which are from Q36. The full keys are /Robot/Launcher/RPM, /Robot/Launcher/CommandedRPM, /SmartDashboard/Auto Chooser and /SmartDashboard/Telemetry/MirrorLogsToNT. The 154 and 966 topics are counts from an FM SystemCore bench unit, not from the offseason bot.

Two things in the lab are choices every team makes. First, logging a value and publishing it are separate. The robot writes everything to the wpilog, but only some values also go on the server. Ours are split by two calls in the helper we wrote around DogLog: Telemetry.logDash does both, and Telemetry.log, which is what Launcher/CommandedRPM uses, only writes the file. Second, the mirror switch on the Diagnostics tab, which puts every logged value on the server so AdvantageScope can watch live in the shop. On an FM SystemCore bench unit that took the server from 154 topics to 966. On 2026-09-05 the offseason bot's version took most of one of the roboRIO's two cores, so the switch is off by default and forced off whenever the field is attached.

A value gets to a screen in three hops. The robot code sets it. NetworkTables sends changes out in batches, and its default is one batch every 100 ms, because one network packet carrying every change is far cheaper for the radio and the roboRIO than a packet per change. Then the widget redraws on its own clock; in our Elastic layout that is every 33 ms on the graphs and every 60 ms on most other widgets.

Each hop holds the last value it was given until its next tick. So a hop that ticks every 100 ms makes a value wait up to 100 ms, and 50 ms on average, and the three waits add up. The number on the screen is always older than the one in the motor controller (our Talon FX), and anything that happens between two ticks is gone.

LabWatch a dashboard fall behind the launcher

Start from our 2026 offseason bot, then from the FM SystemCore setup. Then change one hop at a time and watch the orange line lose the fast dips.

The log, every 20 msWhat the widget shows
  • Under 50 ms old on average—How stale the number on screen is.
  • Show half the dips—Dips 150 rpm or more under the commanded speed.
Average age—
Oldest number—
Dips shown—
Waiting in the robot code—
Waiting for the batch—
Waiting for the redraw—

Simplified: no network time, because we haven't measured ours, and the three clocks are set in one fixed arrangement (they aren't in step in real life, so ages move by a few ms either way). The gray line is the 50 Hz log, the fastest this file has. The batch period is NetworkTables' default; we haven't checked what DogLog or AdvantageKit set.

On our offseason bot the widget is 114 ms behind on average: 34 ms waiting in the robot code for the next 10 Hz write, 47 ms for the next batch and 33 ms for the redraw. The batch is the biggest share, so setting the value every loop alone only gets it to 94 ms. The best setting here, every 20 ms into a 33 ms graph, shows about three quarters of the dips the log has (27 of 35), and our offseason bot's 10 Hz setting shows 5 of 35. Nothing is broken in either. A dashboard is for a person looking at a number, and a person can't read a 20 ms dip. It needs to stay put long enough to be read.

The one thing to remember NetworkTables is for people to look at. A dashboard shows a value 33 to 114 ms old on average and misses most of the fast dips, so anything you need all of goes in the log.

Next: What goes on the driver's screen ↓

Chapter 2 of 5 5 min

What goes on the driver's screen

Our six Elastic tabs, and which one to open for which problem.

Our Elastic layout has 6 tabs and 99 widgets. In a match the drive team looks at one tab, the Match tab, and it has 15 of them. That is on purpose. Our docs put the rule in one line: one job per tab, so nobody hunts for a box while a match is running. We moved to Elastic from Shuffleboard in 2024, and the Houston recap says "Elastic worked much better than shuffleboard and was a good switch."

The other 84 widgets are for when something is wrong. A shot lands short, the turret drifts, the loop runs long. Each of those has a tab, and the tab shows the few numbers that answer it and nothing else.

LabOpen the right tab

Pick a symptom, then click the tab you would open. The right tab lights up the widgets that answer it, and the line under the picture says what value to look for. Try to get each one in a single click.

Elastic's Match tab, running our layout against a simulation of the offseason bot

  • Find it in one click—Tabs opened before the right one.
Widgets on this tab—
Fastest refresh—
Camera streams—

The pictures are real Elastic (its web build) running our layout from 2026-Spectrum, branch 2026-offseason-bot, against a simulation of that robot on 2026-09-28. The values are the sim's, so the launcher sits at idle and the cameras are red; they are not from a match. Highlight boxes are placed from the layout file's coordinates. Which tab is for which problem is from the repo's docs/tools/elastic.md.

Three rules sit behind the layout. First, a widget only shows a key the code publishes to NetworkTables, so before you add a widget check that its key is published and not only logged (in our code, a logDash call). A log-only key gives you a box that says no data. Second, the widgets refresh on their own clocks: 33 ms for the graphs, 60 ms for most others, 200 ms for the camera. That is why the last chapter's dashboard misses the fast dips, and why the Shooting tab is a poor place to count balls.

Third, the camera streams. Every MJPEG stream takes radio bandwidth from the 4 Mbps the field allows a robot, so Pre-Match carries one stream, the turret camera, and the Match tab carries none. The Turret tab has a copy of the same stream, and it is not the tab open on the field.

The one thing to remember The driver's tab holds the few numbers someone acts on in the next few seconds. Everything else has its own tab, and anything you need to look at closely goes in the log.

Next: What the robot writes down ↓

Chapter 3 of 5 9 min

What the robot writes down

Log the same launcher burst at five rates and see what is left, and what one log record holds.

The Q36 log is 1,514 seconds long, 36 MB, with 543 topics and about 2 million records. DogLog writes it to the roboRIO as a wpilog in /U/logs. Most of that is boring. A few dozen keys are what you open it for, and how fast each one was written decides what you can see in it.

Our launcher speed is written every loop, 50 times a second. Its stator current is written 10 times a second. Neither number is the Talon's limit: the Talon updates velocity at 100 Hz and current at 20 Hz. We chose the slower logging on 2026-09-05, when every log showed the roboRIO CPU at 92 to 95% and a loop that ran 26 to 39 ms against a 20 ms budget. Logging voltage, currents and temperature at 10 Hz for every mechanism was one of the ways we took load off it.

LabLog the burst slower and see what is left

Start at 10 Hz. Step up to 50 Hz, then down to 2. Watch the rings turn from green, a dip the log caught, to a red cross, a dip only the 50 Hz log has, and watch Samples per ball drop under 2. Then look at the current below.

The 50 Hz logLogged at your rateCommanded speedDip caughtDip lost
  • See half the dips—Out of the dips the 50 Hz log has.
  • Catch the biggest current—Within 10% of the largest sample the log has.
Dips caught—
Biggest current—
Samples per ball—

Simplified: the 50 Hz line is the fastest data this log has, so it stands in for the real wheel; the real wheel is faster. A dip is a moment 150 rpm or more under the commanded speed, and we haven't checked each one against a ball count. The current was only ever written at 10 Hz, so a setting above 10 Hz can't add samples. Data: Q36, 399.8 s to 404.8 s.

The drive team counted 12 to 13 balls a second in that burst, and the speed agrees: its strongest rhythm is 11 to 12 Hz. That is a dip about every 85 ms. The wheel is firing for 3.7 of the 5 seconds in the lab, so there should be about 42 dips, and the 50 Hz log has 35 of them. It catches most, though not every one.

The rule behind the rings is about sample rate. To follow something that repeats 12 times a second, a log needs more than two samples each time it repeats, so more than 24 a second. That is the Nyquist rate, and it's a rule of thumb here, because a dip is sharper than a smooth wave. 50 Hz is 4.2 samples per ball, and 25 Hz is just over 2. 10 Hz is 0.8 samples per ball: it can't follow the balls, and the dips it does catch are wherever a sample happened to land on one. We don't count balls from either log. The shot log writes one row for each burst instead.

What a log record is

Each value in the wpilog is one record: which topic, a timestamp, and the value. These are five real records from Q36, from the loop where the turret was sent the long way round in chapter 4:

Timestamp (s)TopicValue
437.405967/Robot/Turret/CommandedDegrees28.56
437.426799/Robot/SuperStructure/CurrentSuperStateSET_SHOT
437.442214/Robot/Turret/CommandedDegrees−180.0
437.463509/Robot/Turret/StatorCurrent−15.64
437.566796/Robot/Turret/StatorCurrent77.36

The timestamp is the roboRIO's clock, which counts from when the roboRIO started, not from the start of the match. To find the match in it, look at DS:enabled. In Q36 it goes true at 371.58 s for auto, false at 391.95 s, and true again at 394.56 s for teleop. So 437.43 s is 42.9 s into teleop, which is where you'd scrub to in the match video.

The commanded angle has a record every loop, because it changes a little every loop. The super state has one record here, at 437.43 s, because DogLog skips any value that hasn't changed, and the state had been IDLE since its last change. So a flat line in a graph means no new record. The value stayed the same, but a flat line alone can't tell you whether the code ran at all. If that matters, check a topic that is written every loop, like the commanded angle.

The one thing to remember A log can only show what it wrote. We write the launcher's speed at 50 Hz and its current at 10 Hz, on purpose, to save CPU, so we can see the spin-up and most of the dips, but only a sample of the current.

Next: Reading a real match ↓

Chapter 4 of 5 14 min

Reading a real match

Find what sent the turret the long way round in Q36, then read a second moment yourself in real AdvantageScope.

A match log is 36 MB and 543 topics, and nobody reads it top to bottom. You start with a question, find the moment, and then read outward from the moment: what did the code ask for, what did the mechanism do, and what did it cost. In AdvantageScope that is a Line Graph tab with a few topics dragged onto it, a cursor on the moment, and the state topics in a table beside it.

Our question is the one the drive team asked after Q36: the turret was believed to have slipped its belt in teleop. Our match notes count 26 full-turn flips while the robot was enabled, at 70 to 117 A in the turret motor. The overview in the lab is the whole of teleop. Every tall stroke is the turret going the long way round. Three of them are picked out, and each one is a set shot: a button that points the turret at a fixed angle instead of at the target.

LabFind what sent the turret the long way

Pick a moment, or click a green band in the overview, then drag along the graphs to move the cursor. Find the loop where the commanded angle jumps, the peak voltage, and the peak current. Read the state box as you go.

Turret positionCommanded, volts, ampsCursor
  • Find the commandnot yetThe loop the commanded angle jumps by more than 150°.
  • Read the voltagenot yetWhere the turret motor is at its limit.
  • Read the currentnot yetThe largest stator current sample in the window.
Log time—
Super state—
Commanded—
Position—
Turret volts—
Stator current—
Battery—

All the numbers are real logged samples from Q36 (the Chezy Champs match on 2026-09-19); the cursor reads the last sample at or before it, as AdvantageScope does. Voltage and position were logged every 20 ms, current and battery voltage every 100 ms. The code in this match had an 8 V turret limit and soft limits of −209° and +172°.

At 437.43 s the super state goes from IDLE to SET_SHOT, and in the same loop the turret's wanted state goes to FIXED_ANGLE and its commanded angle jumps from 28.6° to −180°. The turret is at +28°. The soft limits in that build were −209° and +172°, so +180° was out of reach and −180° was the only way to point the same direction. That is 208° of travel through zero, where the shortest way round would have been 152°. It runs at −8.1 V, the 8 V limit, for about 0.3 s and at about −4 V for the rest of the 0.7 s move, and the stator current reads 77 to 97 A on the way.

LabSee why −180° meant the long way

Watch the blue dot, the turret's real logged position, go the long way. Then pick the other two moments: the turret starts further round each time, and the short way gets shorter.

The turret, as loggedWhere the set shot sent itPast a soft limit
Turret at—
The way it went—
The short way—

The positions are the logged /Robot/Turret/PositionDegrees samples, every 20 ms, played at real speed. The soft limits are the Q36 build's, from the log notes. The line runs past ±180° because the turret can turn more than a full circle: −180° and +180° point the same way, but they are different places for the wiring.

Then SET_SHOT ends at 438.16 s, the turret's wanted state goes back to AIM_AT_TARGET, the command goes back to +30°, and it sprints the same 208° home. Nothing was wrong with the motor. Someone tapped the set-shot button for 0.7 s. The two later moments start further round, at +106° and +138°, so the turret went 286° and 318° when the short way was 74° and 42°. They read 117 A and 85 A. The logged battery voltage stays above 8.7 V in all three windows, so these moves didn't cause a brownout. The cost is in the motor and its belt.

After Q36 the team changed how the turret picks its direction and went back to a 6 V limit. Trying a code change like that on the match that caused it is what replay is for, in the last chapter.

Now read one yourself

The labs picked the topics and the moments for you. In a real log you pick them, and that is most of the work. The next lab opens Q36 in the real AdvantageScope, in your browser, with nothing to install. The copy has 79 of the log's 543 topics and the match from 365 to 540 s. AdvantageScope is by FRC#6328 Mechanical Advantage; this is their AdvantageScope Lite v26.0.2, hosted by us.

LabFind a flip nobody showed you

Open AdvantageScope with the Step 1 button, set it up like the picture, then find the flip at about 421 s and type in three things you read there. A wrong answer tells you which topic to look at.

Step 1: Open Q36 in AdvantageScope ↗ (new tab)
AdvantageScope Lite as it opens with Q36: the topic tree on the left, an empty line graph, and the Left Axis, Discrete Fields and Right Axis boxes under it12345
  1. 1 The topics. Open Robot → Turret, or type a name into the search box at the top and pick it; the tree jumps to it.
  2. 2 Drag PositionDegrees and CommandedDegrees onto Left Axis.
  3. 3 Drag Robot → SuperStructure → CurrentSuperState onto Discrete Fields. It draws as the colored strip of state names under the graph.
  4. 4 Drag Turret → StatorCurrent onto Right Axis, so amps get their own scale.
  5. 5 Scroll on the graph to zoom, drag it sideways to move, and point at it to read every value at that moment in the sidebar. The picture is the 437 s flip from the lab above. Now go to 420 to 424 s.

Open the log, find the moment, and fill in all three.

  • The moment—From CommandedDegrees.
  • What it asked for—From CommandedDegrees.
  • What asked for it—From CurrentSuperState.

The pictures are AdvantageScope Lite with this copy of Q36, and the answers come from the same file. The super state has no record at 421 s because DogLog skips unchanged values; AdvantageScope shows the last one, as chapter 3 described.

The one thing to remember Read a log outward from a moment: the state that asked, the command it sent, and what the mechanism did about it. Here a 0.7 s button tap sent the turret over 200° at up to 8.1 V, and back.

Next: Replay ↓

Chapter 5 of 5 11 min

Replay

Break a replay two ways, change a vision gate and run the code again on logged inputs, and the four ways to write a log. Sim only so far.

In the last chapter the code sent the turret 208° because of a button tap, and the fix was a code change. A log can show you what happened. replay can show you what would have happened if the code had been different: the robot program runs again on the logged inputs of a match, with a change in it, and writes a second set of outputs next to the ones the robot really produced.

That only works if the code gets everything it knows from the log. Every loop, robot code does three things: it reads the hardware (where is the turret?), it decides (how many volts?), and it writes an output (send 8 V to the Talon). A log splits those into inputs, the values read from hardware, and outputs, the values the code produced. In replay there is no robot. The code runs on a laptop, reads its inputs back from the file, decides again, and writes new outputs next to the old ones.

So the code has to read every input through the log. If one read goes straight to the hardware, replay has no answer for it. And the code must never read an output back out of the log, because once the code changes, the output in the file is the old code's, not its own. The lab breaks a replay both ways, on the turret inputs from Q36's 437 s flip.

LabBreak a replay two ways

Start with every read logged and the 6 V fix: the replay can be trusted. Then switch the reads to the Talon, then to its own logged output. For each, try the unchanged 8 V code as well as the fix.

What the code should commandWhat the replay commandsA read replay can answerA read it can't, and the loops it got wrong
  • A replay you can trust—Every loop matches, and it would still match after a change.
Loops that match—
Worst miss—

Simplified: the turret code is a toy (volts = 0.1 × error in degrees, changing by at most 1 V a loop, clamped to the limit), not ours. The inputs are real: Q36 turret position and commanded angle every 20 ms from 436.8 s. 8 V was the limit in Q36 and 6 V is the one the team went back to after it. A Talon read in replay returns 0, as an AdvantageKit IO layer with no hardware does.

Reading the Talon directly fails straight away, even with nothing changed, so an unchanged replay catches it. Reading the logged output is worse. With the 8 V code the replay matches every loop, and it's only off once you change something, by up to 1 V in 28 of the 132 loops. That is why the check has two halves: the unchanged replay must match, and the code must follow the rules in the table below, because the first check can't catch the second mistake.

Look at what replay can't do, too. The inputs are what the turret really did. A turret on a 6 V limit would have moved slower, but in replay it "moves" at its 8 V speed, because that's what the file says. Replay shows what the changed code would have commanded. It can't show how the robot would have moved in response.

FM SystemCore is built for replay, with AdvantageKit. Every motor's status, every swerve odometry sample and every camera frame goes through an AdvantageKit inputs class. Each one is written to the log as an input, and in replay the robot reads them back from the file instead of from a Talon or a Limelight. The fused pose is worked out on the main loop from those inputs, so a change to a vision gate changes the pose.

LabChange the vision gate and replay the run

Start at 1.6, the value the robot ran with, and see what an unchanged replay gives you. Then pick 0.4 and 0.8 and watch the orange line leave zero. Each button is a real replay.

Peak yaw rate, last 0.3 sThe limit, and the pose changeFrame keptFrame thrown away
  • Replay the code as it was—An unchanged replay should differ from the robot by 0 mm.
Frames kept—
Thrown for yaw rate—
Biggest pose change—
Average change—

Every setting is a real replay of the same 38 s scripted sim drive on the FM SystemCore code, with its yaw-rate limit changed. The gate compares the peak gyro yaw rate over the last 0.3 s with the limit, and rejects a camera frame at or above it. Frames shown are from one of the robot's Limelights (874 frames). The orange line is how far the replayed fused pose is from the one the robot computed, not from the truth: the sim's true pose isn't replayed, so this can't say whether a change is better.

The run at 1.6 rad/s is the check that the whole thing works. Replaying the unchanged code twice gave a fused pose that matched the one the robot computed in every sample, and matched the second replay byte for byte. Without that, a difference in any other run could be noise in the replay and not your change.

The scripted drive spins at 6.4 rad/s for 2 s, so the yaw rate is either near 6 or below about 1.5. That's why 0.2 and 0.4 behave almost the same, and why anything above 1.6 changes almost nothing (3.2 lets in 2 more frames). At 0.4 the gate throws away 253 frames instead of 65, and the fused pose ends up in the same place by a different route, up to 96 mm from the one the robot took.

What replay needsWhy
Every hardware read is a logged inputIn replay there is no Talon or camera. A value read straight from hardware isn't in the file, so the code can't get it.
Logic reads the inputs, never the outputsAn output is what the code produced; in a changed replay it is different from the logged one, and the two runs drift apart.
Log from the main loop onlyA value logged from another thread has no fixed place in the loop, so replay can't line it up.
Time comes from the logged clockCode that reads the real time gets a different answer on a laptop in replay than it did on the robot.

Here are the four ways to write a log in FRC, side by side. Only one of them gives you replay, and it's the one that asks the most of your code:

LoggerWhat it asks of the codeWhat you getOurs
WPILib DataLogManager and EpilogueBuilt in. DataLogManager records NetworkTables and anything you log to it; Epilogue logs annotated fields for you.A wpilog with no library to add.Neither is used in 2026-Spectrum.
DogLogOne call per value. The robot code keeps its shape.A wpilog, optionally mirrored to NetworkTables. No replay.The 2026 robots (DogLog 2026.5.0). We haven't written down why we picked it.
AdvantageKit (FRC#6328)Every hardware read goes through an IO layer and is logged as an input. The robot is built around that.A wpilog, and replay: the code runs again on the logged inputs.FM SystemCore, for replay.
CTRE SignalLoggerNothing beyond enabling it. Phoenix logs every signal from every CTRE device.A .hoot file with each signal at its own update rate, opened in Tuner X.Auto-logging off since 2026-09-05, to save CPU. The 09-05 and 09-07 log releases have .hoot files, the Chezy Champs one has none.

The one thing to remember Replay reruns the code on a match's logged inputs, so a change can be tried on that match before the next one. It needs every hardware read logged as an input, and we haven't yet done it on a real match.

QuizCheck yourself
  1. 1. The launcher holds 3,300 rpm. What does the speed loop read to do that?

  2. 2. You add an Elastic widget for Launcher/CommandedRPM and it says no data. What do you check first?

  3. 3. Our offseason bot sets the value at 10 Hz, NetworkTables batches every 100 ms and a text widget redraws every 60 ms. About how old is the number on screen?

  4. 4. The Q36 log shows the turret drawing 97 A. What can you say about the real peak?

  5. 5. Which of these can replay a match through changed robot code?

  6. 6. In Q36 at 437.43 s the turret went to −180°. What asked for that?

  7. 7. The turret code reads its last output back out of the log. The unchanged replay matches every loop. What happens after you change the code?

  8. 8. You replay a match with no code change and the fused pose differs from the robot's by 40 mm. What does that tell you?

That's the Telemetry, Logs and Replay course.

Next up: Control Systems, or head back to all courses.