In a device for controlling an operation of an anti-collision switch, the anti-collision switch is provided in a support close to a guide frame that is provided at at least one of both lateral sides of a table frame, to prevent collision of the table frame that is supported on the table support to be capable of moving in a lengthwise direction. The device includes a first lever coupled to the table support so that at least a portion of the first lever moves in a vertical direction according to deformation of the guide frame, and a second lever pressing the anti-collision switch in a normal state and, when a vertical movement of the first lever deviates from a preset height, being moved up by the first lever to remove pressing of the anti-collision switch and operate the anti-collision switch.