Jay,
If you connect your TTL laser driver input to your Z axis DIRECTION pin, you can trigger the laser on with a Z-0.x (negative direction) move in your gcode, and turn the laser off with a Z0.x (positive direction) move. This may be the simplest setup to get you going. You could also use the 4th axis if the G540 has one free (I don't use the G540, so not sure). In this case you would set up the 4th axis as a 'C' axis, and use its direction pin instead of the Z axis direction pin. This would leave your Z axis available for raising and lowering the laser to adjust focus. This will work with the UC100 as I am using one in a similar setup with a laser diode.
John Champlain