It looks like you are losing connection to your controller, causing your laser to stop and the connection to reset. This could be caused by a loose USB connection, a USB port sleeping, static discharge causing the controller to reset, or insufficient power supply leading to a brown out condition.
Here are some resources to help you troubleshoot these issues: