I've gotten simulated JAMs working on a test gun by modifying the programming in a
Trigger Master, and installing a switch.
A "jam" stops the gun from firing. Instead of firing, the gun vibrates (like a cell phone) until an IA drill (tap-rack-bang) is done to clear the jam.
It's just for fun, really. I can simulate shoddy equipment or crappy ammo or dirty guns now!

opcorn:
Click for YouTube Video:
Technical bits:
- A switch installed in the M4's upper receiver detects the racking of the bolt and signals this to the Trigger Master.
- Jams are more common in full auto or burst firing modes. It's more "reliable" to shoot in semi.
- The "tap" part of the IA drill (where the magazine is tapped in) isn't actually detected.

I cheated on that part.
Further info:
-
How to develop for the Trigger Master (tutorial)
- The
Trigger Master Homepage