How should I use my cannons in the opening?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.
Direct answer
Put one on a line that already does something, usually the central file, and then leave the cannons alone and develop. The starting position hands cannons long open lines for free, which is why they are natural first movers — and also why beginners over-move them and fall behind in development.
The one good cannon move
炮二平五 or its mirror. It aims at the enemy general through the central soldiers and forces a reply. After that, a second cannon move is usually worse than a horse or chariot move, because the cannon is already doing its job.
If you have moved a cannon three times and both chariots are at home, you are behind, whatever the board looks like.
Do not chase with it
A cannon shuffling along a rank hunting a soldier is a cannon not attacking the palace. Cannons are strongest when they point at something permanent — the general — and weakest when they are used as raiders.