Can two cannons be on the same file in xiangqi?
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
Yes, and it is one of the strongest formations in the game. The front cannon becomes the screen the rear one needs, so the rear cannon attacks straight through it. Aimed at the general, that is 重炮 (double cannon) — a mate, provided the front cannon is defended.
The three conditions
For the mate to work: the front cannon must be defended, or the general simply takes it; there must be no gap for the defender to interpose into; and the general must be unable to step sideways — usually because its own advisors are in the way.
Notation for stacked pieces
Two identical pieces on a file need distinguishing: Chinese uses 前 (front) and 後 (rear) in place of the file number, and WXF uses + and -. So +C=5 is "the front cannon traverses to file 5".
Related questions
Can the two cannons capture each other's targets?
The rear one captures through the front one. The front one needs its own separate screen further along the line.
Is stacking chariots useful too?
Yes — doubled chariots on an open file are very strong, though for the ordinary reason rather than the screen reason.