Does putting a piece in the way stop a cannon?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws for movement, checkmate and both repetition rulings: a side that forces a repetition by perpetual check or perpetual chase loses rather than drawing. The chase half has not been validated against the official casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it before publishing.
Direct answer
It depends entirely on what was already there. Adding a piece to an empty line gives the cannon the screen it lacked and switches its attack on. Adding one to a line that already has a screen makes the count two and switches the attack off. Count before you interpose.
The mistake this causes
A chess player's reflex is to block a line to stop an attack. Against a cannon on an empty line, that reflex creates the attack — you have just handed it the screen it was missing, and your blocking piece is now the thing being fired across.
It is the single most expensive habit a chess player brings to xiangqi.
Using it deliberately
Both directions are tactics. Dropping any piece onto an empty line between your cannon and the enemy general creates a check from nothing; moving a piece off a line switches an enemy cannon off. Neither has a chess equivalent, and both are everyday moves here.
Related questions
So how do I block a cannon's check?
By making the screen count wrong — either add a second piece to the line, or remove the existing screen.
Does it matter whose piece the screen is?
No. Only the number of pieces on the line matters.