Intelligent processing unit for CNC machine tool panel based on 89C51/52 single chip microcomputer (2)

The power-on reset and initialization of the microcontroller can be completed in a very short time, and the initialization of the CNC system takes a long time. When the initialization of the CNC system is not completed, the serial communication cannot work. Therefore, after completing the initialization, the main program of the MCU waits for the CNC system to send a "READY" signal from the serial port, and starts to operate the panel after receiving the "READY" signal. The input/output is controlled.

In the timer interrupt service program, check the status of each key one by one. If the status of a key changes, the new status is sent from the serial port to the CNC system, and the interrupt service program is exited. Otherwise, all the keys are checked. After exiting the interrupt service routine. In order to detect the change of the key state, the original state of the key must be stored in the memory, with 00H indicating that the key is in the on state, and FFH indicating that the key is in the off state. When reading a key is in the on state, first determine whether the value in the memory is 80H or <80H. If the value in the memory is 80H, the key is originally in the disconnected state, and if it is decremented by 1 then FCH, It is stored in the memory. If <FCH, it means that the read key is turned on three times in succession, that is, the state of the key changes from off to on, and the memory is cleared to 00H (on state); if the value in memory is <80H , the key is turned on, the state of the key has not changed, and the memory is cleared to 00H (due to various disturbances, the memory may be a number of <03H). When a key is read as being disconnected, it is still first determined whether the value in the memory is 80H or <80H. If the value in the memory is 80H, the key is originally in the disconnected state, and the state of the key has not changed. The memory is set to FFH (because there are various disturbances, the memory may be a number of FCH); if the value in the memory is <80H, the key is turned on, and if it is incremented by 1, it is stored in <04H. The memory, if 04H, indicates that the read-in key is disconnected for three consecutive times, that is, the state of the key is changed from on to off, and the memory is set to FFH (on state). This can effectively avoid misjudgment caused by key jitter and other interference. These processes can be accurately described using the state transitions shown in FIG.


Figure 3 state transition diagram

4 Conclusion

This paper proposes a new intelligent processing unit based on 89C51/52 single-chip CNC machine tool panel. From theoretical analysis and practical application, the following conclusions can be drawn:

(1) The panel intelligent processing unit satisfies the functional requirements of the manual operation panel of the numerical control machine tool, and the software and hardware design is reasonable and the reliability is high;

(2) Using serial communication, making the manual operation panel a simple and standard interface;

(3) This paper proposes an algorithm for software to eliminate key jitter, which has the advantages of reliability and simplicity;

(4) The panel intelligent processing unit has good expandability, can easily expand the single-point input/output port, and can also drive digital or liquid crystal display.

Previous page

BK7 Ball Lenses

BK7 Ball Lenses,ball lenses ,ball contact lenses, half ball lenses, glass ball lenses,glass ball contact lenses

Our company can produce many kinds of flat convex Spherical Mirrors with different sizes, radii and base materials, flat convex spherical Mirrors, flat concave spherical mirrors, double convex spherical mirrors, double concave spherical mirrors, meniscus spherical mirrors and other ordinary spherical mirrors. Special spherical mirror can also be processed, such as: achromatic spherical mirror, aspheric surface and spherical mirror group.
Materials: optical glasses such as flint glass, ultraviolet fused quartz and infrared fused quartz, as well as optical crystal materials such as calcium fluoride (CaF2), germanium (Ge), Zinc selenide (ZnSe) and silicon (Si)
Focal length: ±5mm -- ±1000mm±1%
(Germany TIROPTICS OPTOMATIC2000 test)
Outer circle: 4mm -- 200mm±0.1mm
Center thickness tolerance: ±0.1mm
Center deviation: 3-5 points
Surface accuracy: /2@
Surface quality: 40/20
Effective diameter: 90%
Plating film: according to customer requirements can be coated
In addition, we have more than a thousand kinds of standard products, and some of the standard products in stock to meet your needs

Fused Silica Ball Lenses

Ball Lenses,Eyeball Distance Lens,Eyeball For Lenses,Eyeball In Lenses

Gold Dragon Optics Electronic Technology CO.,Ltd , https://www.golddragon-optics.com

Posted on