CNC carving and milling machine motor basic action implementation
by:Transon2020-07-25
With the motion control card to control the stepping motor of CNC engraving and milling machine, its input control information has three types: enable, direction, and a certain frequency of pulse.
PC host will accordingly send it to the USB device to a certain format of the data definition, to classify, and then in the heart of the MCU receives the data according to this kind of format is analyzed, and realizes its function.
below is single chip microcomputer application in the main loop program in processing the received data process.
according to the flow chart, it can be seen to make CNC engraving and milling machine motor running along a certain direction of certain steps, simply send motor in turn can make the direction information, speed information and a series of steps, the steps of receiving information is often n = & plusmn;
1 the basic movements of the machine.
In order to avoid the CNC engraving and milling machine> basic action of motor for receiving data between time and becomes discontinuous, single-chip microcomputer timer interrupt programming was used to control the pulse output, and single chip microcomputer to data should be sent to the front desk is responsible for the receiving host, and wait for the completion of a pulse output.
AT89S52 single chip microcomputer timer interrupt there were 3 road, just can meet the control requirements of engraving machine three motor, each timer interrupt is responsible for the control of a motor control pulse output.
We are here to help you! If you close the chatbox, you will automatically receive a response from us via email. Please be sure to leave your contact details so that we can better assist