Hebei Huali Machinery Company produces hand handwheel, knob, bakelite hand wheel, hinge, chain, handgrip, button and other Machine Tool Accessory,Tel 0318-2222299
Sign in  |  Register
河北华利机械配件有限公司

Based on serial communication CNC hand wheel connection scheme

2015-09-25 14:00:05
        With advances in computer technology and communication technology, PC numerical level is also developing rapidly, especially in the EtherCAT Industrial Ethernet is widely used on behalf of fieldbus technology and to SoftServoSystem as the representative of pure software open CNC system, so NC Machine toward performance excellence EtherCAT network control technology has a flexible topology and simple hardware architecture, with RJ45 Ethernet cable is connected between the Industrial PC and the servo module via a standard NIC card, to avoid the complexity of traditional CNC system communication module and wiring, and the interference signal and low attenuation, to overcome the disadvantages of long pulse transmission, large data capacity, smooth operation of the servo motor, control high precision.
        However, since the scanning cycle general I / O module is only about 8 ms, it is difficult to meet the handwheel pulse signal in real time, it requires high-speed response processing, EtherCAT communications platform control bus system is no good handwheel connectivity solutions, currently The practice is in the industrial PC in additional dedicated communication card is used to connect a hand wheel, which increases the amount of hardware and costs. Connection handwheel SFP-75 board, SoftServoSystem handwheel connected via high-speed I FP-75 boards / O ports and PCI slots and PC, the handwheel signal to the CNC system kernel real-time processing.
        Although this method can meet the requirements of the system, but increased the number and cost of hardware. This study presents a new handwheel connection, to address bus mode CNC System handwheel signal acquisition and transmission is difficult.
        1 is based on serial communication to achieve the basic idea to connect the handwheel
        For the special requirements of the handwheel and existing hardware conditions, this study presents the NC handwheel serial communication connection scheme is based, namely: The simple circuit processing, the handwheel pulses will be sent to a computer serial port, and then by specific signal processing program to read and parse the handwheel pulse signal, and the results to the kernel in order to complete the corresponding numerical control system, real-time control operation. The advantage of this scheme is that no level conversion chip MAX232 level translation between TTL and RS-232 and TTL signals directly control the optocoupler, then controlled by the opto RS232 signal itself off, its response speed, hardware concise. At the same time, embedded software has better resistance, can make full use of the source function numerical control system to achieve the read signal and execute commands seamlessly.
        2 Experimental circuit design
        In this study, CNC hand wheel is bipolar pulse generator ManualPulseGenerator, built a GP1A70R photoelectric conversion head, operating voltage of 5 V, A / B two-phase pulse output TTL, high level of 5 V, the low level of 0 V , two-phase pulse phase difference of 90 ° to distinguish the steering. Revolution produce A / B two-phase pulse each 100 TTL. This works hand wheel after Mitsubishi FX1S series PLC high-speed counter C251 Duplex double counting detection, certify that the above parameters are correct.
        Computer 9-pin serial port to a common RS-232 port, a high level of -3 V ~ -15 V, the actual measurement is -11 V, the low level of 3 V ~ +15 V, the actual measurement to +11 V..
3 Signal Processing Program Development
        This experiment used the VisualBasic serial communication control MSComm, involving CommEvent, CommPort, PortOpen, RTSEnable and other four properties. Test in order to achieve a more intuitive image effects, this study adds VB form 2 Shape control, with a change in color to show the state change 1,6 pin when Shape is red (light), that corresponding to the serial pin is high, while the other foot is low, otherwise white (light off), TextBox control is used to display the current number of pulses, the program to continue to detect high frequency electric 1,6 feet level state and make the appropriate treatment, the test program interface shown in Figure 8. After repeated verification, this program can accurately and reliably handle two-phase TTL signals. The frequency of the test program for the computer's motherboard operating frequency, under normal circumstances are a few megabytes, fully able to adapt to changes in the handwheel signals.
        4 Actual operation and test results
        The author of the above experimental design applied to simulate CNC, CNC system for the United States SoftServoSystem's pure software open CNC system, the system of secondary development kit (SDK) is also prepared by the VB language is made, therefore, we need only SDK insert test program, when the pulse number is changed, the trigger incremental precise jog function SSSPos-Start command to synchronize precise point on the machine axis motion, moving the handwheel frequency proportional to the speed of the machine axes. As can be seen, consistent and machine handwheel pulses through the displacement reaches a predetermined target.
        In addition, the general CNC system will provide two hand wheel work, that no accumulation mode and accumulation mode. The above test is to simulate the hand wheel work in the absence of accumulation mode, when the pulse equivalent is large, for example, 1 mm, the machine takes a long time to perform a pulse, if the machine is executing a current pulse is ignored It has been sent from the next pulse, resulting in a so-called pulse lose step phenomenon. To solve this problem, you can add in the program of a cycle of 30 ms clock subroutine to achieve cumulative work. Proven by adding the program can achieve a good accumulation of work.
        5 Conclusion
        From the above results and the actual application shows that the serial read and processed by computer numerical control handwheel method is feasible, but compared with the actual use of the handwheel, the handwheel experiment without magnification selection and axis selection, It needs to be further demonstrated improvement in future experiments, and RS-232 9-pin interface might not be enough, you need to replace the 25-pin to provide additional interfaces. Serial take over the wheel of the program there has been no practical application, but with the advent of fieldbus era, this new program will certainly provide an inspiration and choice for the handwheel signal processing bus, but can also be extended to the grating, etc. connect to other digital instruments having an encoder on the nature of the use.