Guide
Writing workout plans
A plan is a list of steps, each with a length and a target: watts for a ride, pace for a run. The easiest way to make one is the Workout Creator (Workout ▾ → Create…), which writes the file for you and shows the profile as you type. This guide is for writing or editing the file by hand, or making plans with another tool.
Where plans live
Every .json file in the plans folder is listed under Workout ▾, by file name:
- Mac:
~/.config/trainpane/workouts - Windows:
%APPDATA%\Trainpane\workouts(Help ▾ → Plans folder opens it)
Workout ▾ → Open… starts a plan from anywhere else. Clicking a plan starts the workout straight away; the plan's sport picks a run or a ride.
A ride
{
"version": 1,
"name": "Sweet spot 3x12",
"sport": "bike",
"steps": [
{ "name": "Warmup", "seconds": 600, "watts": 140, "toWatts": 200 },
{ "repeat": 3, "steps": [
{ "name": "SS", "seconds": 720, "watts": 245 },
{ "name": "Recover", "seconds": 300, "watts": 130, "erg": false }
]},
{ "name": "Cooldown", "seconds": 300, "watts": 120 }
]
}
Ten minutes ramping from 140 to 200 W, three rounds of 12 minutes at 245 W with 5 minutes of free riding between, then a cooldown.
A run
{
"version": 1,
"name": "Progression run",
"sport": "run",
"steps": [
{ "name": "Easy", "seconds": 900, "pace": "9:30" },
{ "name": "Build", "seconds": 900, "pace": "9:00", "toPace": "7:45" },
{ "name": "Float", "seconds": 300, "pace": "10:00" }
]
}
Paces are minutes per mile. TrainPane shows the target; it never changes the treadmill's speed, so set the belt yourself.
A run by distance
{
"version": 1,
"name": "Quarter repeats",
"sport": "run",
"steps": [
{ "name": "Warmup", "miles": 1, "pace": "10:00" },
{ "repeat": 6, "steps": [
{ "name": "Quarter", "miles": 0.25, "pace": "6:45" },
{ "name": "Jog", "seconds": 90, "pace": "11:00" }
]},
{ "name": "Cooldown", "seconds": 600, "pace": "10:30" }
]
}
A run step can last a distance instead of a time, and one plan can mix both. A step in miles ends when you've covered that far since it began, however long it takes; the Plan pane counts down the miles left. For track reps, use "meters" instead, like { "name": "400", "meters": 400, "pace": "5:47" }, and the pane counts down in metres.
The fields
| Field | Where | What it does |
|---|---|---|
version | Plan | Always 1. Optional |
name | Plan | Shown in the Plan pane. Optional: the file name is used without it |
sport | Plan | "bike" or "run". Required |
erg | Plan or step | Ride plans hold the trainer at each step's watts (ERG) unless this is false. On the plan it turns ERG off for every step; on a step, for that step only, which is free riding |
steps | Plan | The steps, in order. At least one |
name | Step | Optional. Without it the pane shows "STEP 3/8" |
seconds | Step | How long the step lasts, in seconds of working time (see below). Above 0 |
miles | Run step | In place of seconds: how far the step lasts, in miles. Decimals are fine (0.25). Above 0, at most 100 |
meters | Run step | Like miles, in metres: 400 for a track rep. Above 0, at most 160934 (100 miles) |
watts | Ride step | The target power, 0 to 2000 |
toWatts | Ride step | Makes the step a ramp, from watts at the start to toWatts at the end |
pace | Run step | The target pace per mile, as "m:ss", between 3:00 and 30:00 |
toPace | Run step | Makes the step a ramp, from pace to toPace. It changes evenly in speed, so the belt speeds up steadily |
repeat + steps | In place of a step | Repeats the steps inside that many times. Repeats can't be nested |
Working time
A plan runs on working time, not the wall clock: it only moves while you're moving (pace on a run, power on a ride), and a step in miles only moves as the treadmill's distance grows. Step off the treadmill or stop pedalling and the plan waits where it is, then carries on mid-step when you start again. ERG holds its last target while you're stopped.
When a file is refused
TrainPane checks the whole file before starting, and never starts half a plan. The Workout list shows what's wrong, for example:
"sport" must be "bike" or "run"Step 3: "seconds" must be greater than 0Step 2: give "seconds" or "miles", not bothStep 2: a bike step needs "watts", ora run step takes "pace", not "watts"Step 1: 2400 W is outside 0…2000 WStep 4: "repeat" blocks cannot nestNot a workout file: …, for JSON that doesn't parse, such as a missing comma or a trailing one
Step numbers count the steps as written, before repeats are expanded.
Not supported
Ride steps by distance, targets as a percentage of FTP, cadence or heart-rate targets, and importing Zwift .zwo files.