If you are using MK4DUO firmware and your printer stops printing after 30 minutes, you probably hit a 'feature' of the firmware. This is to protect you against leaving the machine heating while not printing. But it doesn't reset after move commands. Use the M530 command to explicitly start printing mode.
* M530 - Enables explicit printing mode (S1) or disables it (S0). L can set layer count
So in your start gcode of your slicer, put in M530 S1. In the end gcode M530 S0.