setting Pull Lever on repeat causes a full cycle every 100 ticks, iirc.
Works. Idk about specifics of rate, but works to stab things a lot.
As far as entering...I'd actually do something like this:
ppbbbb__
WW WW
W W
(...as deep a hole as you care for...)
W W
W^^^^^^W
WWWWWWWW
Where W is wall/natural ground, _ is floor, b is retracting bridge tile, p is pressure plate, and ^ is upright spikes. You should make the bridge and pit longer than I drew them.
Invaders come from left. The first in the group trips both pressure plates. One is non-resetting (requires manual reset) and starts the spikes repeating via some minecart or liquid-based repeater. The second auto-resets, and retracts the bridge after a delay. Trapped and ded with one bridge and no manual input.
In case there are any tough blighters that survive the spikes indefinitely because of armor or dodging skill or whatever, the design of the hole is important to keep them from climbing out. Deeper is better (also more likely to knock out or outright kill the invaders); you must smooth the walls that form the side of the pit (no dirt layer traps for you!); and the overhanging lip around the pit's edge is important.
I would also recommend fortifications at the end of the hall for crossbowdwarves, and a way to prevent any who get through that trap from getting into your fort without meeting significant resistance. In the case that the leader of the squad is caught and killed before some members of his squad, the rest of his squad may camp in the area of the pressure plates, potentially holding the bridge open for their squadmates to escape. Those two measures should remedy that.
Trap also has two weaknesses: trapavoiders and fliers. Potentially building destroyers as well. But it works well for general-purpose enemies, and the trapavoiders can be killed still with manual lever action if you time it right. (You should always have backup control levers.)