Can a cannon pin a piece in xiangqi?
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
Yes, but it takes two pieces, not one. With a chariot, the single piece in between is pinned. With a cannon, a single piece in between is the screen, and whatever lies beyond is already attacked. The pin appears when two pieces stand between the cannon and its target: moving either one off the line leaves the other as the screen and exposes whatever stands beyond.
Working out whether it is real
Count. With two pieces between an enemy cannon and your general, both are pinned: moving either off the line would leave exactly one screen and put your own general in check, so the move is illegal. With one piece between, there is no pin at all: your general is already in check, and moving that piece off the line is one way to answer it.
This is why cannon pins are missed so often in both directions — players look for the pin one piece away, where it does not exist, or move one of two pieces off the line and hand the cannon its screen.
Breaking one
Capture the cannon, move the piece being aimed at, or add a third piece to the line, after which either of the other two can leave without switching the cannon on. That last option has no chess equivalent.
Related questions
What is the strongest pin in xiangqi?
Not a cannon pin — it is the flying general pin: a piece alone between the two generals can never leave that file, and a horse, elephant or advisor there cannot move at all. See the pin.
Can a cannon pin against the general?
Yes, and those are the ones that matter: with two pieces between the cannon and your general, neither may leave the line, because that would put your own general in check.