CN116736798A - Servo control method and system - Google Patents
Servo control method and system Download PDFInfo
- Publication number
- CN116736798A CN116736798A CN202311026425.5A CN202311026425A CN116736798A CN 116736798 A CN116736798 A CN 116736798A CN 202311026425 A CN202311026425 A CN 202311026425A CN 116736798 A CN116736798 A CN 116736798A
- Authority
- CN
- China
- Prior art keywords
- target
- servo motor
- program
- servo
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000004891 communication Methods 0.000 claims abstract description 109
- 238000010586 diagram Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 9
- 230000003044 adaptive effect Effects 0.000 description 8
- 238000011161 development Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 4
- 210000001503 joint Anatomy 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 3
- 230000007547 defect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/41—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
- G05B19/4103—Digital interpolation
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34117—Machine workpiece along, parallel to largest dimension
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Numerical Control (AREA)
Abstract
The invention provides a servo control method and a system, in the invention, when a preset servo motor driver is used, such as the case of a non-specified servo motor driver, parameters of all target feed shafts controlled by the preset servo motor driver in a numerical control system are set as virtual feed shaft parameters, so that the target feed shafts are configured as virtual feed shafts, the virtual feed shafts are not controlled by the specified servo motor driver through an original non-open servo communication bus, but are controlled by the preset servo motor driver in the invention, thus, the target operation information of the target virtual feed shafts can be read through a preset communication interface configured in the numerical control system, and the motion following operation of the virtual feed shafts is carried out through the target servo motor driver based on the target operation information of the target virtual feed shafts, thereby achieving the aim that the numerical control system controls the servo motor to work through the non-specified servo motor driver, and improving the user experience.
Description
Technical Field
The present invention relates to the field of servo control, and more particularly, to a servo control method and system.
Background
At present, when the numerical control system controls the servo motor to work through the servo motor driver, the feeding shaft control end of the numerical control system can only be matched and butted with a specified servo motor driver (such as a servo motor driver of a self brand or other specified brands) through a non-open servo communication bus of the feeding shaft control end.
When the servo motor driver fails or needs to be newly added, if the servo motor driver which is not specified is required to be used, the numerical control system cannot control the servo motor to work through the servo motor driver which is not specified, so that user experience is reduced.
Disclosure of Invention
In view of the above, the present invention provides a servo control method and system to solve the problem that the numerical control system cannot control the servo motor to work through the servo motor driver not specified above, and reduce the user experience.
In order to solve the technical problems, the invention adopts the following technical scheme:
a servo control method, through the parameter configuration operation in advance, set up the parameter of all goal feed axes controlled by preset servo motor driver in the numerical control system as the fictitious feed axis parameter, in order to dispose all said goal feed axes as fictitious feed axes;
The servo control method includes:
acquiring target operation information of a target virtual feed shaft through a preset communication interface configured in the numerical control system; the target virtual feed shaft is at least one of all the virtual feed shafts;
acquiring servo operation information, and determining position control information of a servo motor based on the target operation information under the condition that the servo operation information meets preset servo control conditions;
the position control information for causing a target servo motor driver to control the servo motor based on the position control information to perform a motion following operation of the target virtual feed shaft; the target servo motor driver is used for controlling the target virtual feed shaft to move.
Optionally, the numerical control system communicates with the target device in a preset communication mode; under the condition that the preset communication mode is an IO bus communication mode, a first program and a second program are configured in the numerical control system; the first program is a numerical control system control software program communicated through a servo bus; the second program is a program which is secondarily developed on the numerical control system and is used for assisting in virtual feed shaft control; the target device comprises a shaft control adapter or a target servo motor driver;
The method for obtaining the target operation information of the target virtual feed shaft through the preset communication interface configured in the numerical control system comprises the following steps:
the second program reads target operation information of a target virtual feed shaft based on a preset communication interface of the first program and sends the target operation information to the target device.
Optionally, the servo operation information includes on-off state information of a motion following enabling switch and alarm state information of a target servo motor driver controlling the motion of the target virtual feed shaft;
determining, based on the target operation information, position control information of a servo motor in a case where the servo operation information satisfies a preset servo control condition, including:
and under the condition that the switch state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the target equipment performs interpolation operation based on the target operation information so as to determine the position control information of the servo motor.
Optionally, the target operation information includes a target coordinate value;
performing interpolation operation based on the target operation information to determine position control information of the servo motor, including:
Calculating the difference value between the target coordinate value and the coordinate value of the previous control period;
and performing interpolation operation on the difference value to obtain the position control information of the servo motor.
Optionally, the method further comprises:
the second program reads the scram state of the target virtual feed shaft, and outputs an effective scram control instruction to the target device when the scram state of the target virtual feed shaft is determined to be effective;
the target equipment adjusts the enabling signal value of the target servo motor driver to be a first preset enabling value, and stops coordinate following control operation; the first preset enabling value characterizes that an enabling signal of the target servo motor driver is in a closed state.
Optionally, the method further comprises:
the second program outputs an invalid scram control instruction to the target device when determining that the scram state of the target virtual feed shaft is invalid from valid adjustment;
the target equipment adjusts the enabling signal value of the target servo motor driver to be a second preset enabling value, obtains the position value of the servo motor and sends the position value to the second program; the second preset enabling value represents that an enabling signal of the target servo motor driver is in an on state;
The second program sends the position value of the servo motor to the first program based on the preset communication interface, so that the first program adjusts the actual coordinate value of the target virtual feeding shaft according to the position value of the servo motor.
Optionally, after the second program sends the position value of the servo motor to the first program based on the preset communication interface, the method further includes:
and the second program outputs a motion following start instruction to the target device so as to enable the target device to start the coordinate following control operation authority.
Optionally, the method further comprises:
the target equipment reads the alarm state information of the target servo motor driver and outputs the alarm information to the second program under the condition that the alarm state information is valid;
the second program controls the first program to generate alarm prompt information and controls all feeding shafts to stop moving;
and under the condition that the alarm state information is invalid, the target equipment outputs alarm clearing information to the second program so that the second program controls the first program to clear alarm prompt information.
Optionally, in the case that the preset communication mode is an ethernet communication mode, a first program is configured in the numerical control system; the first program is a numerical control system control software program communicated through a servo bus;
The method for obtaining the target operation information of the target virtual feed shaft through the preset communication interface configured in the numerical control system comprises the following steps:
and the target equipment acquires target operation information of a target virtual feed shaft based on a preset communication interface configured in the numerical control system.
Optionally, the servo operation information includes on-off state information of a motion following enabling switch and alarm state information of a target servo motor driver controlling the motion of the target virtual feed shaft;
determining, based on the target operation information, position control information of a servo motor in a case where the servo operation information satisfies a preset servo control condition, including:
and under the condition that the switch state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the target equipment performs interpolation operation based on the target operation information so as to determine the position control information of the servo motor.
Optionally, the target operation information includes a target coordinate value;
performing interpolation operation based on the target operation information to determine position control information of the servo motor, including:
calculating the difference value between the target coordinate value and the coordinate value of the previous control period;
And performing interpolation operation on the difference value to obtain the position control information of the servo motor.
Optionally, the method further comprises:
the target device reads the scram state of the target virtual feed shaft;
under the condition that the emergency stop state of the target virtual feeding shaft is determined to be effective, the target equipment adjusts the enabling signal value of the target servo motor driver to be a first preset enabling value, and stops coordinate following control operation; the first preset enabling value characterizes that an enabling signal of the target servo motor driver is in a closed state.
Optionally, the method further comprises:
under the condition that the sudden stop state of the target virtual feed shaft is determined to be invalid from effective adjustment, the target equipment adjusts the enabling signal value of the target servo motor driver to be a second preset enabling value; the second preset enabling value represents that an enabling signal of the target servo motor driver is in an on state;
the target equipment acquires a position value of the servo motor and outputs the position value to the first program so that the first program adjusts an actual coordinate value of the target virtual feed shaft according to the position value of the servo motor;
And the target equipment starts the coordinate following control operation authority.
Optionally, the method further comprises:
the target equipment reads alarm state information of the target servo motor driver;
under the condition that the alarm state information is valid, the target equipment outputs alarm information to the first program so that the first program generates alarm prompt information and controls all feed shafts to stop moving;
and under the condition that the alarm state information is invalid, the target equipment outputs alarm clearing information to the first program so that the first program clears the alarm prompt information.
A servo control system comprises a numerical control system and target equipment, wherein a first program and a second program are configured in the numerical control system; the second program and the target device are used for executing the servo control method in a matched mode; the target device includes a shaft-controlled adapter or a target servo motor driver.
A servo control system comprises a numerical control system and target equipment for executing the servo control method; the target device includes a shaft-controlled adapter or a target servo motor driver.
Compared with the prior art, the invention has the following beneficial effects:
The invention provides a servo control method and a system, in the invention, when a preset servo motor driver is used, such as the case of a non-specified servo motor driver, parameters of all target feed shafts controlled by the preset servo motor driver in a numerical control system are set as virtual feed shaft parameters, so that the target feed shafts are configured as virtual feed shafts, the virtual feed shafts are not controlled by the specified servo motor driver through an original non-open servo communication bus, but are controlled by the preset servo motor driver in the invention, thus, the target operation information of the target virtual feed shafts can be read through a preset communication interface configured in the numerical control system, and the motion following operation of the virtual feed shafts is carried out through the target servo motor driver based on the target operation information of the target virtual feed shafts, thereby achieving the aim that the numerical control system controls the servo motor to work through the non-specified servo motor driver, and improving the user experience.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a servo control scenario provided in the prior art;
FIG. 2 is a schematic diagram of a servo control scenario provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of another servo control scenario provided in an embodiment of the present invention;
FIG. 4 is a schematic diagram of a servo control scenario according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a servo control scenario according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a fifth servo control scenario provided in an embodiment of the present invention;
FIG. 7 is a flowchart of a servo control method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a sixth servo control scenario provided in an embodiment of the present invention;
FIG. 9 is a schematic diagram of a seventh servo control scenario provided in an embodiment of the present invention;
FIG. 10 is a schematic diagram of an eighth servo control scenario provided by an embodiment of the present invention;
fig. 11 is a schematic diagram of a ninth servo control scenario provided in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a numerical control system (abbreviated as a numerical control system) of a machine tool controls four feed shafts, namely feed shafts X, Y, Z and B, to move, for example, feed shaft X controls a factory servo motor X to move through a factory servo motor driver X to drive the feed shaft X to move, and feed shafts Y, Z and B are similar. The factory servo motor driver X is communicated with the numerical control system control software through a servo bus.
When the servo motor driver fails or needs to be newly added, such as the original factory servo motor driver X fails, and needs to be replaced, or a new feeding shaft, such as the feeding shaft a, needs to be configured, and a servo motor driver corresponding to the feeding shaft a needs to be configured, a common numerical control system (such as the family of finaceae, mitsubishi, siemens, etc.) in the market is required, and because the communication protocol is self-developed, the feeding shaft of the numerical control system can only be adaptively docked with the specified servo motor driver (in this embodiment, the original factory servo motor driver, such as the servo motor driver including the self or the specified brand) through a non-open servo communication bus (such as Fssb, busLink of the mitsubishi, profinet of the siemens) of the self-developed communication protocol, and cannot be adaptively docked with the third party servo motor driver. The servo motor driver of former factory is expensive, and the exchange period is long, and optional model is limited, and the new servo motor driver that needs to add in later stage can only purchase in spare part form, leads to no matter lathe equipment factory or end use user in servo motor driver's selection very passively limited.
For this reason, if other servo motor drivers than the factory servo motor driver, such as a third party servo motor driver, can be used, the servo motor driver can be selected in many types if it communicates with the numerical control system and can control the feed shaft. However, currently, if other servo motor drivers are required to be used, the numerical control system cannot control the servo motor to work through the other servo motor drivers, so that user experience is reduced.
Therefore, the inventor finds that a set of shaft control programs (a shaft control macro program or a shaft control PLC (Programmable Logic Controller) program, etc.) independent of original control software of the numerical control system can be developed for secondary development of the numerical control system, and communication and simple positioning control with a third-party servo motor driver can be realized through a hardware interface (serial port, ethernet and Input/Output (Input/Output) point) opened by the numerical control system.
Referring to fig. 2, the feed shaft X, Y, Z is still driven by a factory servo motor driver to control the factory servo motor, and other feed shafts, such as a newly added feed shaft, are controlled by a third party servo motor driver through a shaft control macro program, and a serial port communication mode is used during the control. Specifically, an axis control macro program is written on the numerical control system, and when the numerical control system is used, an instruction is called in the numerical control machining program through the axis control macro program, and the instruction carries axis motion parameters (generally, position and speed) and calls and executes the axis control macro program. When the shaft control macro program is executed, a motion instruction is output from a serial port through a serial port output function of the numerical control system in a certain format, the shaft controller analyzes and checks when receiving the shaft motion instruction and sends a motor motion instruction to the third-party servo motor driver, the shaft controller monitors the running state of the third-party servo motor controlled by the third-party servo motor driver and inputs the running state (executing/executing success/executing failure and the like) into the numerical control system through an input/output IO (input/output) point, and the numerical control system generates an alarm when an error exists after receiving the motion state, and the numerical control machining program stops running. If the motion state is successful, the axis control macro program is normally ended, and the numerical control machining program continues to run downwards.
The above-mentioned working mechanism is that when the feeding shaft moves automatically, if the feeding shaft is to be manually operated, the related manual operation (such as hand wheel feeding, manual movement, etc.) needs to be performed by an additional manual operation unit. The current state of the feed shaft can only be checked by an additional manual operation unit and cannot be displayed on the numerical control system.
The scheme can solve the problem that the numerical control system controls the servo motor to work through the servo motor driver which is not specified above, but has the following defects:
1. the feeding shaft can only be manually operated by using an additional manual operation unit, and the feeding shaft cannot be manually operated on the original operation panel of the machine tool, so that the feeding shaft is inconvenient to use.
2. The feeding shaft can only be independently positioned and moved, and can not be linked with other feeding shafts provided with original factory servo motor drivers, so that the use is limited.
3. The feeding shaft needs to call the shaft control macro program to carry out shaft control programming through the shaft control macro program call instruction, the shaft control programming of the shaft control macro program has large difference from the shaft control programming of the numerical control system standard, and the use is inconvenient.
4. The position coordinates of the feed shaft can only be displayed on an additional manual operation unit, but cannot be displayed on a coordinate picture of the numerical control system, so that the numerical control system is inconvenient to use.
5. The serial communication is easy to be interfered by the site, the stability is poor, and the interface can be occupied and cannot be used.
Besides the defects, the axis control macro program is not suitable for numerical control system control software connected with the numerical control system, so that the original feed axis function (such as standard G code axis control instruction, axis coordinate display, axis coordinate offset, multi-axis linkage, manual and automatic axis feed multiplying power, 360-degree coordinate circulation, near positioning, unidirectional positioning, cylindrical interpolation and the like) of the numerical control system cannot be used, and the difference between the axis control macro program and the feed axis ratio of the servo motor driver of the original factory is large in the aspects of convenience in use, functional integrity, scene applicability and the like, and the method is only suitable for scenes with simple positioning and low requirements on operation convenience.
In addition to the serial communication mode, the communication modes of the ethernet port and the input/output IO point interface can be used, referring to fig. 3 and fig. 4, respectively, the whole control flow is similar to the control flow of the serial communication mode, but when the communication is performed, the communication interface between the numerical control system and the shaft controller is changed into the ethernet (when the ethernet is used, the input/output IO point is also required to be used for data feedback) or the direct input/output IO point, so that the scheme defect is basically the same as that of the serial scheme, and the description is omitted.
In order to solve the above problems in the communication method using the serial port, the ethernet port and the input/output IO point interface, the inventor finds that if the device can be adapted to the control software of the numerical control system, the original feed shaft function of the numerical control system can be used, the original operation panel of the machine tool can be used to control the feed shaft, no additional manual operation unit is needed, and the feed shaft linkage control and the position coordinate display function of the feed shaft can also operate normally.
In addition, in order to solve the problem that communication is easy to be interfered, a high-speed high-reliability IO bus or an Ethernet interface (skipping a non-open servo communication bus of the numerical control system) of the numerical control system can be used for carrying out high-speed real-time communication and control with a third-party servo motor driver.
The control system is characterized in that the control system is provided with a control program, a control program is controlled by the control program, the control program is configured and developed for the second time, the control program is matched with control software of the control system, and is communicated and controlled with a third-party servo motor driver in real time at a high speed through a high-speed and high-reliability IO bus or an Ethernet interface of the control system, the function of a feed shaft of the control system is reserved, the servo motor driver of a former factory is replaced, and finally the full-function replacement of the servo motor driver of the former factory of the control system is realized.
In order to enable the running control program of secondary development to be in adaptive butt joint with the control software of the numerical control system and to use the third-party servo motor for driving, the replaced feeding shaft is required to be set to be a virtual feeding shaft, so that the virtual feeding shaft does not need to be in adaptive butt joint with the servo motor driver of the original factory, namely, the virtual feeding shaft is not controlled by the designated servo motor driver through the original non-open servo communication bus, but can be controlled by the third-party servo motor driver. However, at the same time, the functions of the virtual feed shaft on the numerical control system are the same as the actual feed shaft of other adaptive factory-adapted servo motor drivers, and are not different.
On the basis, the position coordinates of the virtual feeding shaft can be obtained in real time through a high-speed high-reliability IO bus or an Ethernet interface of the numerical control system based on a secondary developed operation control program, and are converted into control instructions of a third-party servo motor driver, so that the real-time position following of the virtual feeding shaft is realized. In addition, the running state of the third-party servo motor driver is monitored in real time, and the running state is fed back to the numerical control system in real time through a high-speed high-reliability IO bus or an Ethernet interface of the numerical control system, so that alarm monitoring is realized. The method realizes the adaptive butt joint of the virtual feed shaft and the third-party servo motor driver, and finally realizes the full-function replacement of the servo motor driver of the original factory of the numerical control system.
It should be noted that, in the data system, the feed shaft is set as a virtual feed shaft, only for the purpose that the feed shaft is no longer controlled by the servo bus, the configuration belongs to the software configuration layer, and in the hardware, the feed shaft is still an actually existing shaft, and the feed shaft is driven to move by the driving motor.
Based on the above, the embodiment of the present invention provides a servo control method, in which parameters of all target feed axes controlled by a preset servo motor driver in a numerical control system are set as virtual feed axis parameters in advance through a parameter configuration operation, so that all target feed axes are configured as virtual feed axes.
In practical application, referring to fig. 5, the target feeding shaft to be replaced by the factory-oriented servo motor driver is set to be a virtual feeding shaft (such as the feeding shaft B in fig. 5) through numerical control system parameter configuration, and the virtual feeding shaft is not required to be adapted to be connected with the factory-oriented servo motor driver, but the function related to the numerical control system feeding shaft is the same as that of other adapted factory-oriented servo motor drivers, and is not different. The following describes the virtual feed axis configuration process taking the newly added 4 th axis of the FANUC numerical control system, such as the feed axis (B) setting as an example:
1. The numerical control system parameter #987 (or # 8130) is changed from 3 to 4, the number of the numerical control system feed shafts is changed from original 3 to 4, and 1 feed shaft is added.
2. Setting the parameter #1020 of the newly added feed shaft of the numerical control system to 66, and enabling the name of the newly added feed shaft to be 'B'.
3. Setting a parameter #1023 of a new feeding shaft of the numerical control system to be-128, wherein the parameter #1023 is a virtual feeding shaft, and the parameter #1023 is used for indicating that the shaft is not connected with an actual servo motor driver.
4. Other parameters of a new feeding shaft of the numerical control system are set, and the setting of the part is the same as the actual feeding shaft of the servo motor driver of the original adaptation matching factory, and the detailed description is omitted.
As can be seen from fig. 5, the control end of the feeding shaft XYZ still communicates with the factory servo motor driver by means of a servo bus communication, and the feeding shaft B breaks the servo bus communication link after being configured as a virtual feeding shaft, so that the factory servo motor driver is no longer adapted. The internal secondary development interface on the numerical control system is a preset communication interface, and is used for reading the target operation information of the virtual feeding shaft, generally a target coordinate value, namely a target position for controlling the movement of the feeding shaft, and then the secondary development program is called a second program in the embodiment, and the third party servo motor driver B is in butt joint with any servo motor driver capable of performing communication control except the original factory servo motor driver.
The second program is a program for assisting in performing virtual feed shaft control on a numerical control system, such as a numerical control system controller, which is secondarily developed, and the implementation of the second program generally adopts a mode of a PLC program, or can also adopt other secondary development modes supported by the numerical control system.
In addition to the second program developed for the second time, the original control software program of the numerical control system still exists, which is called a first program in this embodiment, that is, the first program is the control software program of the numerical control system communicating through the servo bus.
Referring to fig. 5, a first program is capable of controlling the movement of feed shafts X, Y, Z and B, wherein feed shaft X, Y, Z is controlled by the original factory servo motor driver and factory servo motor, such as feed shaft X is controlled by factory servo motor driver X and factory servo motor X. The feed shaft B is controlled by a third party servo motor driver.
Fig. 5 is an application scenario in which the feed shaft B is newly added or is required to be controlled using a third party servo motor driver. If it is desired to control the feed axis X also using a third party servo motor driver, the feed axis X may be set as a virtual feed axis.
The present embodiment supports control of at least one virtual feed shaft, and in the case where there are a plurality of virtual feed shafts, such as two, referring to feed shafts B and C of fig. 6, the second program at this time may be a duplicate of a single virtual feed shaft implementation or a combination. The shaft controlled adapter is also a two-copy or a combination of a single virtual feed shaft implementation. When the servo motor driver is combined, the identification information of the third-party servo motor driver to be controlled is required to be written in the control instruction, so that the corresponding third-party servo motor driver is controlled to work based on the user demand.
It should be noted that, each third party servomotor in fig. 5 and 6 is controlled by a corresponding third party servomotor driver, and a plurality of third party servomotors may be controlled by a shaft-controlled adapter, such as a shaft-controlled adapter controlling third party servomotors B and C.
In addition to the need to develop the second program a second time on the numerical control system, a shaft control adapter capable of adapting to the second program needs to be arranged between the third party servo motor driver and the second program. The shaft control adapter is used for receiving a control instruction of the second program and controlling the third-party servo motor driver to work. The third-party servo motor driver drives the servo motor to move, so that the feeding shaft is driven to move.
It should be noted that, in fig. 5, the second program communicates with the shaft control adapter through the IO bus communication manner. In this embodiment, since the IO bus of the numerical control system is generally used for communicating with the external input/output IO module, only the input/output IO data inside the numerical control system can be read and written through the IO bus communication of the numerical control system, and the feeding shaft data in the numerical control system cannot be directly read and written, so that the shaft control adapter cannot directly read and write the feeding shaft information in the numerical control system through the IO bus, only the second program can be developed, and the indirect data communication between the shaft control adapter and the first program in the numerical control system is realized through the second program.
The second program realizes data reading and writing of the virtual feeding shaft through a secondary development interface in the numerical control system, namely a preset communication interface, and the second program realizes data communication with the shaft control adapter through an IO bus of the numerical control system. The shaft control adapter is communicated and controlled with the third-party servo motor driver through an IO interface and a communication interface of the third-party servo motor driver, and the third-party servo motor driver is connected with the third-party servo motor through a power line and an encoder line to control the third-party servo motor.
When the IO bus is used for communication, the shaft control adapter is required to be connected to the IO bus of the numerical control system in advance, and a data interface of the shaft control adapter is mapped to an unused input/output IO data area of the numerical control system on the numerical control system, so that high-speed and high-reliability bidirectional data communication between the shaft control adapter and the numerical control system is realized.
Referring to fig. 7, the servo control method includes:
s11, acquiring target operation information of a target virtual feed shaft through a preset communication interface configured in the numerical control system.
Wherein the target virtual feed axis is at least one of all virtual feed axes.
In practical application, motion control operation can be performed on at least one target virtual feed shaft, and during control, identification of the target virtual feed shaft to be subjected to motion control can be preconfigured, so that motion of the corresponding at least one target virtual feed shaft can be controlled based on the identification. When one virtual feed shaft movement is controlled, reference may be made to fig. 5, and when two virtual feed shafts movement is controlled, reference may be made to fig. 6.
Referring to fig. 5, the preset communication interface in the present embodiment is a communication interface developed on the first program, through which the second program can read the target operation information of the target virtual feed axis, where the target operation information is control information of the target virtual feed axis, such as a target coordinate value, and the target coordinate value is a mechanical coordinate value. In addition, the method can further comprise an operation speed, and the following embodiments take target operation information as target coordinate values for illustration. And if the target virtual feed shafts are a plurality of, reading the target operation information of each target virtual feed shaft.
The target operation information may be input by the user through the original operation panel of the machine tool, or may be calculated by the first program based on the target position expected by the user.
The second program may have two implementations when reading the target operation information of the target virtual feed axis. One is that the target operation information of all feed shafts is transmitted in the preset communication interface, and the second program needs to screen the target operation information of the target virtual feed shaft from the target operation information based on the feed shaft identification. And the other is that the target operation information of the target virtual feed shaft is transmitted in the preset communication interface, and the target operation information is directly read at the moment.
S12, servo operation information is acquired, and position control information of the servo motor is determined based on the target operation information under the condition that the servo operation information meets preset servo control conditions.
In this embodiment, the servo operation information refers to operation state information of the third party servo motor driver and the third party servo motor, for example, may be on-off state information of a motion following enabling switch and alarm state information of a target servo motor driver controlling the motion of the target virtual feed shaft. The servo operation information may be obtained from the adaptive controller, the second program, or the target servo motor drive.
Wherein the motion following enabling switch is used for controlling whether the target servo motor driver performs motion enabling, namely whether the motion following operation is performed. The motion following enabling switch can be controlled to be opened or closed by a second program, can be controlled to be opened or closed by the shaft control adapter, and can be configured to be opened or closed by the target servo motor driver. When the motion following enabling switch is turned on, the third-party servo motor driver can control the third-party driving motor to drive the target virtual feeding shaft to follow motion based on the target coordinate value output by the first program. When the motion following enable switch is turned off, the target virtual feed shaft stops the motion following.
The alarm state information of the target servo motor driver is the alarm state information of the third-party servo motor driver, the alarm state information can be valid or invalid, and the alarm state information is valid under the conditions of internal faults of the third-party servo motor driver or the third-party servo motor, communication faults of the third-party servo motor driver and the third-party servo motor, and the like. And under the condition that the third-party servo motor driver and the third-party servo motor have no faults, the alarm state information is invalid.
After the servo operation information is obtained, judging whether the servo operation information meets the preset servo control condition. In the present embodiment, when the preset servo control condition is satisfied, the movement following operation of the target virtual feed shaft can be performed.
In practical application, the switch state information of the motion following enabling switch and the alarm state information of the target servo motor driver are limited in the preset servo control conditions, specifically, when the switch state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the servo motor driver and the servo motor are considered to work normally at the moment, and motion following is allowed at the moment, the preset servo control conditions are considered to be met, and motion following operation of the target virtual feed shaft can be performed.
When the motion following operation of the target virtual feed shaft is performed, position control information of a driving motor driving the target virtual feed shaft needs to be determined, the position control information of the driving motor is generally position pulse control information, and at the moment, each position pulse corresponds to one position increment of the target virtual feed shaft. In addition, the position control information may be other communication type position control information.
And under the condition that the switch state information is on and the alarm state information is invalid, the target equipment determines the position control information of the servo motor based on the target operation information. Specifically, interpolation operation may be performed based on the target operation information to determine position control information of the servo motor.
The target device in this embodiment may be the shaft-controlled adapter in fig. 5, or may write the running program of the shaft-controlled adapter in fig. 5 into the target servo motor driver, where the target device is the target servo motor driver, that is, the target servo motor driver directly communicates with the second program and receives the control of the second program, specifically referring to fig. 8. A specific implementation of the position control information is now described using fig. 5 as an example. The detailed implementation process of the interpolation operation is as follows:
1) And calculating the difference value between the target coordinate value and the coordinate value of the previous control period.
Specifically, taking the target operation information as an example of the target coordinate value, the target coordinate value is the coordinate of the position point which is wanted to be reached in the control period, and the coordinate difference value which is needed to be moved by the target virtual feed axis is needed to be calculated because the target virtual feed axis is needed to be controlled to be moved from the coordinate value of the previous control period to the target coordinate value in the control period, and the coordinate difference value is specifically calculated as the difference between the target coordinate value and the coordinate value of the previous control period, so that the movement of the target virtual feed axis can be controlled according to the coordinate difference value. Meanwhile, the target coordinate value of the period is stored and used as the coordinate value of the previous period of the next control period.
2) And performing interpolation operation on the difference value to obtain the position control information of the servo motor.
Specifically, assuming that the difference is 1, when interpolation operation is performed, the interpolation operation is subdivided into 1000 position increments, each position increment is a position pulse, and 1000 forward position control pulses are uniformly output in the present period.
After the position control information of the servo motor is determined, the position control information is used to cause the target servo motor driver to control the servo motor based on the position control information to perform a motion following operation of the target virtual feed shaft. The target servo motor driver is used for controlling the movement of the target virtual feeding shaft.
In this embodiment, referring to fig. 5, when the target device is the axis control adapter, the axis control adapter realizes communication and control with the third party servo motor driver based on the IO interface and the communication interface, and then the IO interface and the communication interface may be used to transmit the position control information to the third party servo motor driver. And then the third-party servo motor driver controls the third-party driving motor to move through a power line and an encoder line based on the position control information, so that the target virtual feed shaft is driven to move. When the position control information is position pulse control information, the position pulse control information comprises a plurality of position pulses, and the position points of the target virtual feed shaft are continuously adjusted in real time through the plurality of position pulses, so that the movement of the target virtual feed shaft can be accurately controlled.
It should be noted that, the other feeding shafts than the target virtual feeding shaft are still controlled by the factory servo motor driver, but when the multi-axis linkage is performed, the first program can output the target coordinate value of each feeding shaft at the same time, the other feeding shafts except the target virtual feeding shaft are controlled to act by the factory servo motor driver, and the target virtual feeding shaft is controlled to act by the third party servo motor driver, so that the multi-axis linkage is realized.
In addition, fig. 5 shows that the shaft control adapter determines the position control information of the servo motor and controls the third party servo motor driver to work, so as to drive the servo motor to drive the target virtual feeding shaft to move. In fig. 8, the third party servo motor driver directly determines the position control information of the servo motor, and then directly drives the servo motor to drive the target virtual feed shaft to move.
In this embodiment, when a preset servo motor driver is used, for example, when the preset servo motor driver is not used, parameters of all target feed shafts controlled by the preset servo motor driver in the numerical control system are set as virtual feed shaft parameters, so that the target feed shafts are configured as virtual feed shafts, the virtual feed shafts are not controlled by the preset servo motor driver through the original non-open servo communication bus, but are controlled by the preset servo motor driver in the invention, thus, the target operation information of the target virtual feed shafts can be read through the preset communication interface configured in the numerical control system, and the motion following operation of the virtual feed shafts is performed through the target servo motor driver based on the target operation information of the target virtual feed shafts, so that the purpose that the numerical control system controls the servo motor to work through the non-specified servo motor driver is achieved, and the user experience is improved.
In addition, in this embodiment, the feeding shaft of the factory-like servo motor driver to be replaced is set as the target virtual feeding shaft, and the function related to the feeding shaft of the target virtual feeding shaft in the numerical control system is the same as the actual feeding shaft of the other adaptive factory-like servo motor driver, and is not different, so that the target virtual feeding shaft can be used as the feeding shaft of the factory-like servo motor driver. The original operation panel of the machine tool can be used for manually operating the target virtual feed shaft without using an additional manual operation unit, so that the machine tool is convenient to use. The target virtual feeding shaft can be positioned in a single shaft mode and can be linked with feeding shafts of other servo motor drivers of other configuration factories, and the position coordinates of the target virtual feeding shaft are directly displayed on a numerical control system coordinate picture, so that the use is convenient.
In addition, in the embodiment, the original feeding shaft functions of the numerical control system (such as standard G code shaft control instruction, shaft coordinate display, shaft coordinate offset, multi-shaft linkage, manual and automatic shaft feeding multiplying power, 360-degree coordinate circulation, near positioning, unidirectional positioning, cylindrical interpolation and the like) are available, so that the numerical control system is convenient to use, and can meet the requirements of various application scenes.
In addition, in the embodiment, an additional manual operation unit is not needed to be connected with the input/output IO point of the numerical control machine tool, the connection is simple, and the site implementation is convenient.
In the above embodiment, the second program in the numerical control system communicates with the target device through the IO bus, and may also communicate through the ethernet port. Therefore, in this embodiment, the numerical control system is set to communicate with the target device through a preset communication mode. The preset communication mode is an IO bus communication mode or an Ethernet communication mode. The application diagram of the IO bus communication method may refer to fig. 5, fig. 6 and fig. 8, and the ethernet communication method may refer to fig. 9, fig. 10 and fig. 11. In this embodiment, the target device performs bidirectional data communication with the numerical control system through the high-speed and high-reliability IO bus or the ethernet interface, and the communication mode is not easily interfered, fast, stable and reliable, and the IO bus is an expandable bus and is not limited by the occupation of the existing interface.
In this embodiment, when the IO bus communication mode is adopted, since the target device cannot directly read and write the feed axis information in the control system through the IO bus, only the second program can be developed on the numerical control system, and indirect data communication between the target device and the first program is realized through the second program.
The target device can directly read the feed shaft information in the numerical control system through the Ethernet communication mode, so that the second program is not developed on the numerical control system when the feed shaft information is communicated through the Ethernet communication mode, but the function executed by the second program is required to be combined on the target device so as to realize the communication with the first program.
Therefore, when the communication modes of the numerical control system and the target equipment are different, different processing flows exist, and the explanation is now given respectively.
An implementation of the IO bus communication scheme is described by taking fig. 5 as an example. The target device in fig. 5 is an axis control adapter. Referring to fig. 5, in the case where the preset communication mode is the IO bus communication mode, a first program and a second program are configured in the numerical control system. The first program is a numerical control system control software program communicated through a servo bus, and the second program is a program which is secondarily developed on the numerical control system and is used for assisting in virtual feed shaft control. The corresponding description of the first program and the second program is referred to above.
When a first program and a second program are configured in the numerical control system, the second program reads target running information of a target virtual feed shaft based on a preset communication interface of the first program and sends the target running information to the shaft control adapter. And then under the condition that the switch state information is on and the alarm state information is invalid, the shaft control adapter performs interpolation operation based on the target operation information so as to determine the position control information of the servo motor. Then, the shaft control adapter outputs position control information to the target servo motor driver to control the servo motor to perform a motion following operation of the target virtual feed shaft according to the position control information.
If the target equipment is a target servo motor driver, determining the position control information of the servo motor by the target servo motor driver, and making the servo motor perform the motion following operation of the target virtual feeding shaft according to the position control information.
In this embodiment, the switch state information of the motion following enabling switch may be embodied in the form of an instruction valid or invalid, for example, the instruction is a motion following valid or invalid instruction, and if the instruction is valid, the switch state information of the motion following enabling switch is considered to be open. If the instruction is invalid, the switch state information of the motion following enabling switch is considered to be closed.
In practical application, taking fig. 5 as an example, the second program reads the target coordinate value of the target virtual feeding axis in real time and sends the target coordinate value to the axis control adapter, and the axis control adapter performs the following processing according to the current state:
when a motion following effective instruction exists and the alarm state information of the target servo motor driver is invalid, the shaft control adapter performs shaft motion interpolation calculation and control in a fixed control period, firstly calculates a change value of mechanical coordinates of a target virtual feed shaft in a current control period and a previous control period, namely the difference value, and takes the change value as an increment of motion of the target virtual feed shaft in the current period, and then immediately starts to perform motion interpolation operation and outputs a position pulse to the target servo motor driver, namely a third-party servo motor driver. And the third-party servo motor driver drives the third-party servo motor to move to the target position after receiving the position pulse, and finally high-speed real-time movement following of the third-party servo motor to the target virtual feed shaft is realized.
When a motion following invalid instruction exists or the alarm state information of the target servo motor driver is valid, the fact that motion following is not allowed or a fault exists at the moment is indicated, the shaft control adapter does not conduct shaft motion interpolation calculation and control, namely the shaft control adapter does not output position pulses to the third-party servo motor driver, and the third-party servo motor is kept motionless.
In this embodiment, the second program reads the target coordinate value, and makes the axis control adapter determine whether to perform the motion following operation according to the current running state, so as to implement the motion following of the target virtual feeding axis. In this embodiment, the shaft control adapter performs bidirectional data communication with the second program through the high-speed high-reliability IO bus, and the communication mode is not easy to be interfered, fast, stable and reliable, and the IO bus is an expandable bus and is not limited by occupation of the existing interface.
In addition to the above-described motion following operation, an scram condition monitoring operation can be performed. Specifically, the user can trigger the scram operation, and the original operation panel of the machine tool is provided with a scram button, if the user presses the button, the scram state is effective, and if the user releases the button after pressing the button, the scram state is changed from effective to ineffective. If the user has not pressed the button, the scram condition is invalid.
When the user selects to press the scram button, the feed shaft controlled to scram may be selected, for example, the target virtual feed shaft can be controlled to scram, or other non-target virtual feed shafts can be controlled to scram.
In this embodiment, taking fig. 5 as an example, when the second program indirectly controls the target virtual feeding shaft, the second program needs to monitor and read the emergency stop state of the target virtual feeding shaft in real time, and execute different processing steps according to different emergency stop states, which is specifically as follows:
and outputting an effective scram control instruction to the shaft control adapter under the condition that the scram state of the target virtual feed shaft is determined to be effective. The active scram control command may be a servo-enabled disable command and a motion-following disable command. The servo enabling invalidation instruction is used for controlling the third-party servo motor not to conduct servo enabling operation, and the motion following invalidation instruction is used for controlling the shaft control adapter not to conduct motion following operation.
And after the shaft control adapter receives the instruction, adjusting the enabling signal value of the target servo motor driver to be a first preset enabling value, and stopping the coordinate following control operation. And when the enabling signal value of the target servo motor driver is a first preset enabling value, the motion following enabling switch is closed.
The first preset enabling value represents that an enabling signal of the target servo motor driver is in a closed state. The first preset enable value may be represented by a number, such as 0 for off. Or, the first preset enabling value is turned off directly. And when the emergency stop state of the target virtual feed shaft is effective, the shaft control adapter closes the target servo motor driver, namely closes a third-party servo motor driver enabling signal, so that the servo motor is powered off and is not excited, and meanwhile, the shaft coordinate interpolation following control of the shaft control adapter is stopped, so that the third-party servo motor driver and the servo motor are ensured not to drive the target virtual feed shaft to move.
And the second program outputs an invalid emergency stop control instruction to the shaft control adapter when the second program determines that the emergency stop state of the target virtual feed shaft is invalid after the emergency stop state is adjusted from valid to invalid and indicates that the user wants to enable the target virtual feed shaft which is in emergency stop to continue working. The invalid emergency stop control command may be a servo enable valid command, that is, a command that allows the third party servo motor to perform a servo operation, when the axis control adapter adjusts the enable signal value of the target servo motor driver to a second preset enable value. The second preset enabling value represents that the enabling signal of the target servo motor driver is in an on state, the second preset enabling value corresponds to the first preset enabling value, and the second preset enabling value is 1 or is on. And after receiving the invalid emergency stop control instruction, the shaft control adapter starts a third-party servo motor driver enabling signal to enable the servo motor to be electrified and excited. The shaft control adapter then obtains or reads the position value of the servo motor from the third party servo motor driver and sends feedback to the second program. And simultaneously sending shaft readiness information to the second program to enable the second program to control the shaft control adapter to perform shaft control operation.
Thereafter, the second program transmits the position value of the servo motor to the first program based on the preset communication interface, so that the first program adjusts the actual coordinate value of the target virtual feed shaft according to the position value of the servo motor.
Specifically, after receiving the shaft ready state information, the second program writes back the position value of the servo motor to the mechanical coordinate of the target virtual feeding shaft through the interface function of the first program in the numerical control system, so that the mechanical coordinate of the target virtual feeding shaft is synchronous with the position of the actual servo motor.
In another embodiment of the present invention, after the second program sends the position value of the servo motor to the first program based on the preset communication interface, the second program outputs a motion following start instruction to the axis control adapter, where the motion following start instruction may be a start motion following enable switch, and the motion following valid instruction is triggered, so that the axis control adapter starts the coordinate following control operation authority, and further, the axis motion interpolation following operation can be performed based on the control of the second program.
The second program does not perform any processing when it is determined that the scram state of the target virtual feed shaft is invalid and unchanged.
In this embodiment, the second program can monitor the scram state of the target virtual feed shaft, and control the shaft control adapter to perform corresponding operation, so as to timely respond to the scram control of the user, and improve the user experience.
In another embodiment of the present invention, the alarm stop processing of the target virtual feed shaft can also be realized. Specifically, taking fig. 5 as an example, the shaft control adapter reads alarm state information of the target servo motor driver in real time, and performs the following processing according to different alarm state information:
and under the condition that the alarm state information is valid, indicating that fault information needing to be alarmed exists, wherein the alarm information output by the shaft control adapter can comprise shaft alarm valid state information and shaft alarm number information. The shaft alarm number specifically refers to the identification number of the failed feed shaft or the alarm identification corresponding to the failure of the feed shaft. The shaft control adapter outputs alarm information to the second program, and the second program controls the first program to generate alarm prompt information, specifically, the first program is controlled to generate corresponding alarm information on the numerical control system according to the shaft alarm number, and the first program is enabled to control all feed shafts to stop moving, so that faults are prevented from affecting the movement of each feed shaft, and the safety and reliability of the feed shafts are protected.
Under the condition that the alarm state information is invalid, the shaft control adapter outputs alarm clearing information to a second program, the alarm clearing information can be specifically in a shaft alarm invalid state, the second program controls the first program to clear alarm prompt information, corresponding alarm information on the numerical control system can be specifically cleared, and all feed shafts of the numerical control system can be used for running.
In this embodiment, when an alarm exists, the feeding shaft is controlled to stop moving in time, so that the safety of the feeding shaft is protected. After the alarm is cleared, the feeding shaft is controlled to start moving so as to move to the target position as soon as possible, and the user demand is ensured.
Through the embodiment, the adaptive connection between the third-party servo motor driver and the target virtual feeding shaft is finally realized, and the full-function replacement of the original factory servo motor driver is realized.
In fig. 5, the target device is taken as an example of the axis control adapter, and if the target device is a target servo motor driver, the function of the axis control adapter is implemented by the target servo motor driver.
In the above embodiment, the interaction process between the second program and the target device is based on the IO bus communication mode, and in another embodiment of the present invention, if the second program is based on the ethernet communication mode, the second program may be omitted, but the function of the second program needs to be combined into the target device. With particular reference to fig. 9, 10 and 11. Fig. 9 is a target virtual feed axis, such as feed axis B, and fig. 10 is two target virtual feed axes. In practical applications, the present embodiment supports control of at least one target virtual feed axis, and when there are multiple target virtual feed axes, such as two, referring to feed axes B and C of fig. 10, the axis control adapter is a copy or a combination of two copies of a single target virtual feed axis. When the servo motor driver is combined, the identification information of the third-party servo motor driver to be controlled is required to be written in the control instruction, so that the corresponding third-party servo motor driver is controlled to work based on the user demand. In addition, the invention can be the shaft control adapter (refer to fig. 9 and 10) or the target servo motor driver (refer to fig. 11) as well as the IO bus communication mode, and when the target device is the target servo motor driver, the function of the shaft control adapter is realized by the target servo motor driver.
When the communication mode is based on the Ethernet, the whole working flow is similar to the working flow based on the IO bus communication mode, the configuration of the target virtual feed shaft is the same, but the communication with the numerical control system is changed from the IO bus to the Ethernet, meanwhile, the preset communication interface is an internal secondary development interface under the communication mode based on the IO bus, and the preset communication interface is an Ethernet interface under the Ethernet communication mode. At this time, the target device can realize data reading and writing of the target virtual feed shaft through the Ethernet interface of the numerical control system, and the data is not required to be returned through the input/output IO point. The target equipment realizes communication and control with the third-party servo motor driver through the IO interface and the communication interface of the third-party servo motor driver, and the third-party servo motor driver is connected with the third-party servo motor through a power line and an encoder line to realize control.
Under the condition of the Ethernet communication mode, the functions of motion following, emergency stop control and alarm control are realized, and the functions are respectively described.
And a first program is configured in the numerical control system at the time of motion following, wherein the first program is a numerical control system control software program communicated through a servo bus. At this time, the target device does not acquire the target operation information by the second program, but acquires the target operation information of the target virtual feed shaft based on a preset communication interface configured in the numerical control system, and the target device acquires the servo operation information and determines the position control information of the servo motor based on the target operation information under the condition that the servo operation information meets a preset servo control condition. Specifically, the servo operation information includes on-off state information of the motion following enabling switch and alarm state information of the target servo motor driver controlling the movement of the target virtual feed shaft, and in the case that the on-off state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the target device performs interpolation operation based on the target operation information to determine position control information of the servo motor. When the target operation information comprises the target coordinate value, the specific interpolation operation is to calculate the difference value between the target coordinate value and the coordinate value of the previous control period, and to perform interpolation operation on the difference value to obtain the position control information of the servo motor.
In detail, when a motion following effective instruction exists and alarm state information of a target servo motor driver is invalid, the target equipment performs shaft motion interpolation calculation and control in a fixed control period, firstly calculates a change value of coordinates of a target virtual feed shaft in a current control period and a previous control period, takes the change value as an increment of motion of the target virtual feed shaft in the current period, immediately starts to execute motion interpolation operation and outputs a position pulse to a third-party servo motor driver, and the third-party servo motor driver drives the third-party servo motor to move to a target position after receiving the position pulse, so that high-speed real-time motion following of the third-party servo motor to the target virtual feed shaft is finally realized.
When a motion following invalid instruction exists or the alarm state information of the target servo motor driver is valid, the target equipment does not conduct shaft motion interpolation calculation and control, namely the target equipment does not output position pulses to the third-party servo motor driver, and the third-party servo motor is kept motionless.
And when the emergency stop control is performed, the target equipment reads the emergency stop state of the target virtual feed shaft, and adjusts the enabling signal value of the target servo motor driver to be a first preset enabling value under the condition that the emergency stop state of the target virtual feed shaft is determined to be effective, and stops the coordinate following control operation, wherein the first preset enabling value represents that the enabling signal of the target servo motor driver is in a closed state.
And under the condition that the emergency stop state of the target virtual feed shaft is changed from effective adjustment to ineffective adjustment, the enabling signal value of the target equipment adjustment target servo motor driver is a second preset enabling value, and the second preset enabling value represents that the enabling signal of the target servo motor driver is in an on state.
The target device obtains a position value of the servo motor and outputs the position value to the first program, so that the first program adjusts an actual coordinate value of the target virtual feed shaft according to the position value of the servo motor.
The target device opens the coordinate following control operation authority.
Specifically, the target device reads the emergency stop state of the target virtual feed shaft in real time, and performs the following processing according to different emergency stop states:
when the emergency stop state of the target virtual feed shaft is effective, the target equipment closes a third-party servo motor driver enabling signal to enable the servo motor to be powered off and not excited, and meanwhile, the shaft coordinate interpolation following control is stopped.
When the emergency stop state of the target virtual feed shaft is changed from effective to ineffective, the target equipment starts a third-party servo motor driver enabling signal to enable the servo motor to be electrified and excited, then reads the position value of the servo motor from the third-party servo motor driver and writes the value back to the mechanical coordinate of the target virtual feed shaft through a first program, so that the mechanical coordinate of the target virtual feed shaft is synchronous with the position of the actual servo motor, and meanwhile, the coordinate following control operation authority is started, namely, a motion following enabling switch is started to conduct shaft motion interpolation following.
When the scram state of the target virtual feed shaft is invalid and unchanged, the target apparatus does not perform any processing.
And when the alarm control is performed, the target equipment reads the alarm state information of the target servo motor driver, and under the condition that the alarm state information is valid, the target equipment outputs the alarm information to the first program so as to enable the first program to generate alarm prompt information and control all the feed shafts to stop moving. And under the condition that the alarm state information is invalid, the target equipment outputs alarm clearing information to the first program so that the first program clears the alarm prompt information.
Specifically, the target device reads the alarm state of the third-party servo motor driver in real time, and performs the following processing according to different alarm states:
when the alarm state of the third-party servo motor driver is effective, the target equipment sends corresponding alarm to a first program in the numerical control system according to the shaft alarm number, and the first program generates corresponding alarm prompt information and stops running of all feed shafts.
When the alarm state of the third-party servo motor driver is invalid, the target equipment sends an alarm clearing signal to a first program in the numerical control system, the first program clears corresponding alarm prompt information on the numerical control system, and all feed shafts of the numerical control system can be used for running.
Through the realization, the adaptive connection of the third-party servo motor driver and the target virtual feed shaft is finally realized, and the full-function replacement of the original factory servo motor driver is realized.
In a manner based on IO bus communication, another embodiment of the present invention provides a servo control system, including a numerical control system and a target device, where a first program and a second program are configured in the numerical control system, and the second program and the target device are configured to cooperatively execute the servo control method described above. Wherein the target device comprises a shaft-controlled adapter or a target servo motor driver. Specific structural diagrams can be referred to in fig. 5, 6 and 8, and corresponding explanation refers to the corresponding parts described above.
In the case of ethernet communication, another embodiment of the present invention provides a servo control system, which includes a numerical control system and a target device for executing the above-mentioned servo control method, where the target device includes a shaft control adapter or a target servo motor driver. Specific structural views refer to fig. 9, 10 and 11, and corresponding explanations refer to the corresponding parts described above.
In this embodiment, when a preset servo motor driver is used, for example, when the preset servo motor driver is not used, parameters of all target feed shafts controlled by the preset servo motor driver in the numerical control system are set as virtual feed shaft parameters, so that the target feed shafts are configured as virtual feed shafts, the virtual feed shafts are not controlled by the preset servo motor driver through the original non-open servo communication bus, but are controlled by the preset servo motor driver in the invention, thus, the target operation information of the target virtual feed shafts can be read through the preset communication interface configured in the numerical control system, and the motion following operation of the virtual feed shafts is performed through the target servo motor driver based on the target operation information of the target virtual feed shafts, so that the purpose that the numerical control system controls the servo motor to work through the non-specified servo motor driver is achieved, and the user experience is improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (16)
1. A servo control method characterized in that parameters of all target feed shafts controlled by a preset servo motor driver in a numerical control system are set as virtual feed shaft parameters through parameter configuration operation in advance, so that all the target feed shafts are configured as virtual feed shafts;
the servo control method includes:
acquiring target operation information of a target virtual feed shaft through a preset communication interface configured in the numerical control system; the target virtual feed shaft is at least one of all the virtual feed shafts;
acquiring servo operation information, and determining position control information of a servo motor based on the target operation information under the condition that the servo operation information meets preset servo control conditions;
The position control information for causing a target servo motor driver to control the servo motor based on the position control information to perform a motion following operation of the target virtual feed shaft; the target servo motor driver is used for controlling the target virtual feed shaft to move.
2. The servo control method according to claim 1, wherein the numerical control system communicates with the target device by a preset communication method; under the condition that the preset communication mode is an IO bus communication mode, a first program and a second program are configured in the numerical control system; the first program is a numerical control system control software program communicated through a servo bus; the second program is a program which is secondarily developed on the numerical control system and is used for assisting in virtual feed shaft control; the target device comprises a shaft control adapter or a target servo motor driver;
the method for obtaining the target operation information of the target virtual feed shaft through the preset communication interface configured in the numerical control system comprises the following steps:
the second program reads target operation information of a target virtual feed shaft based on a preset communication interface of the first program and sends the target operation information to the target device.
3. The servo control method according to claim 2, wherein the servo operation information includes on-off state information of a motion following enable switch and alarm state information of a target servo motor driver that controls the motion of the target virtual feed shaft;
determining, based on the target operation information, position control information of a servo motor in a case where the servo operation information satisfies a preset servo control condition, including:
and under the condition that the switch state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the target equipment performs interpolation operation based on the target operation information so as to determine the position control information of the servo motor.
4. The servo control method according to claim 3, wherein the target operation information includes a target coordinate value;
performing interpolation operation based on the target operation information to determine position control information of the servo motor, including:
calculating the difference value between the target coordinate value and the coordinate value of the previous control period;
and performing interpolation operation on the difference value to obtain the position control information of the servo motor.
5. The servo control method according to claim 2, characterized by further comprising:
the second program reads the scram state of the target virtual feed shaft, and outputs an effective scram control instruction to the target device when the scram state of the target virtual feed shaft is determined to be effective;
the target equipment adjusts the enabling signal value of the target servo motor driver to be a first preset enabling value, and stops coordinate following control operation; the first preset enabling value characterizes that an enabling signal of the target servo motor driver is in a closed state.
6. The servo control method according to claim 5, further comprising:
the second program outputs an invalid scram control instruction to the target device when determining that the scram state of the target virtual feed shaft is invalid from valid adjustment;
the target equipment adjusts the enabling signal value of the target servo motor driver to be a second preset enabling value, obtains the position value of the servo motor and sends the position value to the second program; the second preset enabling value represents that an enabling signal of the target servo motor driver is in an on state;
The second program sends the position value of the servo motor to the first program based on the preset communication interface, so that the first program adjusts the actual coordinate value of the target virtual feeding shaft according to the position value of the servo motor.
7. The servo control method according to claim 6, further comprising, after the second program transmits the position value of the servo motor to the first program based on the preset communication interface:
and the second program outputs a motion following start instruction to the target device so as to enable the target device to start the coordinate following control operation authority.
8. The servo control method according to claim 2, characterized by further comprising:
the target equipment reads the alarm state information of the target servo motor driver and outputs the alarm information to the second program under the condition that the alarm state information is valid;
the second program controls the first program to generate alarm prompt information and controls all feeding shafts to stop moving;
and under the condition that the alarm state information is invalid, the target equipment outputs alarm clearing information to the second program so that the second program controls the first program to clear alarm prompt information.
9. The servo control method according to claim 2, wherein, in the case where the preset communication mode is an ethernet communication mode, a first program is configured in the numerical control system; the first program is a numerical control system control software program communicated through a servo bus;
the method for obtaining the target operation information of the target virtual feed shaft through the preset communication interface configured in the numerical control system comprises the following steps:
and the target equipment acquires target operation information of a target virtual feed shaft based on a preset communication interface configured in the numerical control system.
10. The servo control method according to claim 9, wherein the servo operation information includes on-off state information of a motion following enable switch and alarm state information of a target servo motor driver that controls the motion of the target virtual feed shaft;
determining, based on the target operation information, position control information of a servo motor in a case where the servo operation information satisfies a preset servo control condition, including:
and under the condition that the switch state information of the motion following enabling switch is on and the alarm state information of the target servo motor driver is invalid, the target equipment performs interpolation operation based on the target operation information so as to determine the position control information of the servo motor.
11. The servo control method according to claim 10, wherein the target operation information includes a target coordinate value;
performing interpolation operation based on the target operation information to determine position control information of the servo motor, including:
calculating the difference value between the target coordinate value and the coordinate value of the previous control period;
and performing interpolation operation on the difference value to obtain the position control information of the servo motor.
12. The servo control method according to claim 9, further comprising:
the target device reads the scram state of the target virtual feed shaft;
under the condition that the emergency stop state of the target virtual feeding shaft is determined to be effective, the target equipment adjusts the enabling signal value of the target servo motor driver to be a first preset enabling value, and stops coordinate following control operation; the first preset enabling value characterizes that an enabling signal of the target servo motor driver is in a closed state.
13. The servo control method of claim 12, further comprising:
under the condition that the sudden stop state of the target virtual feed shaft is determined to be invalid from effective adjustment, the target equipment adjusts the enabling signal value of the target servo motor driver to be a second preset enabling value; the second preset enabling value represents that an enabling signal of the target servo motor driver is in an on state;
The target equipment acquires a position value of the servo motor and outputs the position value to the first program so that the first program adjusts an actual coordinate value of the target virtual feed shaft according to the position value of the servo motor;
and the target equipment starts the coordinate following control operation authority.
14. The servo control method according to claim 9, further comprising:
the target equipment reads alarm state information of the target servo motor driver;
under the condition that the alarm state information is valid, the target equipment outputs alarm information to the first program so that the first program generates alarm prompt information and controls all feed shafts to stop moving;
and under the condition that the alarm state information is invalid, the target equipment outputs alarm clearing information to the first program so that the first program clears the alarm prompt information.
15. The servo control system is characterized by comprising a numerical control system and target equipment, wherein a first program and a second program are configured in the numerical control system; the second program is used in cooperation with the target device to execute the servo control method according to any one of claims 1 to 8; the target device includes a shaft-controlled adapter or a target servo motor driver.
16. A servo control system comprising a numerical control system and a target device for performing the servo control method of any one of claims 1, 9-14; the target device includes a shaft-controlled adapter or a target servo motor driver.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311026425.5A CN116736798B (en) | 2023-08-15 | 2023-08-15 | Servo control method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311026425.5A CN116736798B (en) | 2023-08-15 | 2023-08-15 | Servo control method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116736798A true CN116736798A (en) | 2023-09-12 |
CN116736798B CN116736798B (en) | 2023-11-07 |
Family
ID=87901637
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311026425.5A Active CN116736798B (en) | 2023-08-15 | 2023-08-15 | Servo control method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116736798B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006281330A (en) * | 2005-03-31 | 2006-10-19 | Nachi Fujikoshi Corp | Robot simulation device |
CN101154101A (en) * | 2006-09-29 | 2008-04-02 | 沈阳高精数控技术有限公司 | Closed-loop virtual system of numerically-controlled machine tool and its control method |
CN101424936A (en) * | 2006-09-29 | 2009-05-06 | 沈阳高精数控技术有限公司 | Control method for closed-loop virtual system for numerically controlled machine |
CN105763553A (en) * | 2016-03-18 | 2016-07-13 | 上海新时达电气股份有限公司 | Self-adaptive servo encoder compatible method and self-adaptive servo encoder interface device |
CN214474976U (en) * | 2020-08-19 | 2021-10-22 | 福建杰嘉科技有限公司 | High-compatibility servo motor communication card |
CN114952826A (en) * | 2022-04-27 | 2022-08-30 | 广州高新兴机器人有限公司 | Method, device and medium for automatically identifying robot driver |
CN115576236A (en) * | 2022-09-29 | 2023-01-06 | 北京东土科技股份有限公司 | Data adaptation method, device, system, equipment and medium for servo driver |
-
2023
- 2023-08-15 CN CN202311026425.5A patent/CN116736798B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006281330A (en) * | 2005-03-31 | 2006-10-19 | Nachi Fujikoshi Corp | Robot simulation device |
CN101154101A (en) * | 2006-09-29 | 2008-04-02 | 沈阳高精数控技术有限公司 | Closed-loop virtual system of numerically-controlled machine tool and its control method |
CN101424936A (en) * | 2006-09-29 | 2009-05-06 | 沈阳高精数控技术有限公司 | Control method for closed-loop virtual system for numerically controlled machine |
CN105763553A (en) * | 2016-03-18 | 2016-07-13 | 上海新时达电气股份有限公司 | Self-adaptive servo encoder compatible method and self-adaptive servo encoder interface device |
CN214474976U (en) * | 2020-08-19 | 2021-10-22 | 福建杰嘉科技有限公司 | High-compatibility servo motor communication card |
CN114952826A (en) * | 2022-04-27 | 2022-08-30 | 广州高新兴机器人有限公司 | Method, device and medium for automatically identifying robot driver |
CN115576236A (en) * | 2022-09-29 | 2023-01-06 | 北京东土科技股份有限公司 | Data adaptation method, device, system, equipment and medium for servo driver |
Also Published As
Publication number | Publication date |
---|---|
CN116736798B (en) | 2023-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR880002772Y1 (en) | Operation control apparatus for industrial robot | |
JP5951200B2 (en) | Processing related data processing system | |
JPH06110739A (en) | Computer system | |
JP4044105B2 (en) | Numerical control device having function of switching operation means for each system | |
CN116736798B (en) | Servo control method and system | |
WO2003102765A2 (en) | A wizard for programming an intelligent module | |
US6290403B1 (en) | Sequence program execution control system | |
CN106959694B (en) | Robot linear motion control method and system | |
US20180329391A1 (en) | Numerical controller | |
JPH04235610A (en) | Abnormality detector for industrial robot | |
CN114101850B (en) | Intelligent welding system based on ROS platform and working method thereof | |
US20050267626A1 (en) | Numerical controller | |
JP2003225783A (en) | Method and device for resuming laser beam machining after midway stoppage | |
CN212135182U (en) | Laser machine operating system | |
KR100952472B1 (en) | The Monitoring and Control System and Method of Welding Robot for Component assembly in Shipbuilding | |
JPH11161312A (en) | Numerical controller | |
JP2003022109A (en) | Numerical controller | |
CN212372765U (en) | Servo positioning system for mask forming machine and mask forming machine | |
JPH0822313A (en) | Numerical controller | |
KR100188683B1 (en) | Direct numerical control system for machine tools | |
TWI810502B (en) | Motion control system and method | |
CN216748517U (en) | Device convenient for debugging of multiple servo systems in additive manufacturing equipment | |
JPH10105220A (en) | Machining simulation method for numerically controlled machining | |
JP3195040B2 (en) | Robot control device | |
KR101052543B1 (en) | Network-based servo management method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |