CN109416530B - Input and output control method of slave equipment, master control equipment and numerical control system - Google Patents

Input and output control method of slave equipment, master control equipment and numerical control system Download PDF

Info

Publication number
CN109416530B
CN109416530B CN201780037079.7A CN201780037079A CN109416530B CN 109416530 B CN109416530 B CN 109416530B CN 201780037079 A CN201780037079 A CN 201780037079A CN 109416530 B CN109416530 B CN 109416530B
Authority
CN
China
Prior art keywords
slave
input
equipment
slave device
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.)
Active
Application number
CN201780037079.7A
Other languages
Chinese (zh)
Other versions
CN109416530A (en
Inventor
佟荣磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen A&E Intelligent Technology Institute Co Ltd
Original Assignee
Shenzhen A&E Intelligent Technology Institute Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen A&E Intelligent Technology Institute Co Ltd filed Critical Shenzhen A&E Intelligent Technology Institute Co Ltd
Publication of CN109416530A publication Critical patent/CN109416530A/en
Application granted granted Critical
Publication of CN109416530B publication Critical patent/CN109416530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical 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/414Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
    • G05B19/4142Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller characterised by the use of a microprocessor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical 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/414Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34013Servocontroller

Abstract

The embodiment of the invention discloses an input and output control method of slave equipment, master control equipment and a numerical control system, wherein the control method is used for controlling the slave equipment by the master control equipment in the numerical control system, and specifically comprises the following steps: acquiring input/output interface information of connected slave equipment; allocating addresses to input/output interfaces of the slave devices according to the input/output interface information; the input and/or output interfaces of the slave device are controlled and managed according to the address. By the method, the configuration flow of the master device and the slave device of the numerical control system is simplified, and the control efficiency of the sensor and the switching value in industrial application is improved.

Description

Input and output control method of slave equipment, master control equipment and numerical control system
Technical Field
The embodiment of the invention relates to the field of numerical control, in particular to an input and output control method of slave equipment, master control equipment and a numerical control system.
Background
In an industrial field, a variety of production devices are used, and the input and output of the production devices are mostly switching values, such as cooling liquid, working lamps and safety doors in cutting and processing equipment, start-stop and lighting in industrial production line control equipment, limit switches in robot application and the like. All the production devices are connected to the main control device, and the main control device controls and completes a specific production process. However, due to the complex environment of the industrial site and the numerous input/output of other production devices, after the main control device is connected to other production devices, it is not possible to accurately distinguish all the input/output of other production devices, and thus it is difficult to achieve accurate and timely control of the input/output of other devices.
Disclosure of Invention
The embodiment of the invention provides an input and output control method of slave equipment, master control equipment and a numerical control system, and aims to solve the problems that in the numerical control system in the prior art, the configuration of master and slave equipment is complicated, and the control efficiency of a sensor and the switching value is low.
In order to solve the above technical problem, one technical solution adopted by the embodiments of the present invention is: the input and output control method of the slave device is used for the control of the master control device to the slave device in the numerical control system, and comprises the following steps: acquiring input/output interface information of connected slave equipment; allocating addresses to input/output interfaces of the slave devices according to the input/output interface information; the input and/or output interfaces of the slave device are controlled and managed according to the address.
In order to solve the above technical problem, another technical solution adopted in the embodiments of the present invention is: there is provided a master device for controlling input and output of a slave device, the master device including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of: acquiring input/output interface information of connected slave equipment; allocating addresses to input/output interfaces of the slave devices according to the input/output interface information; the input and/or output interfaces of the slave device are controlled and managed according to the address.
In order to solve the above technical problem, another technical solution adopted in the embodiments of the present invention is: there is provided a numerical control system including the master device provided above and a plurality of slave devices connected to the master device through a bus.
In order to solve the above technical problem, another technical solution adopted by the embodiment of the present invention is: there is provided a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, realizes the steps of the input-output control method of the slave device as provided above.
The embodiment of the invention has the beneficial effects that: the input and output control method of the slave device provided by the embodiment of the invention comprises the following steps: acquiring input/output interface information of connected slave equipment; allocating addresses to input/output interfaces of the slave devices according to the input/output interface information; the input and/or output interfaces of the slave device are controlled and managed according to the address. Through the mode, the slave equipment can be added through the master control equipment, and the address can be automatically allocated to the slave equipment after the slave equipment is added, so that the configuration flow of the master equipment and the slave equipment of the numerical control system is simplified, and the control efficiency of the sensor and the switching value in industrial application is improved.
Drawings
FIG. 1 is a flow chart illustrating an embodiment of an input/output control method for a slave device according to the present invention;
FIG. 2 is a ladder diagram illustrating an embodiment of an input/output control method for a slave device according to the present invention;
FIG. 3 is a flow chart illustrating an input/output control method for a slave device according to another embodiment of the present invention;
FIG. 4 is a flow chart illustrating an input/output control method for a slave device according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of a human-computer interaction interface in another embodiment of the input and output control method of the slave device provided by the invention;
FIG. 6 is a schematic diagram of a slave device adding area in another embodiment of the input and output control method of the slave device provided by the present invention;
fig. 7 is a schematic diagram of a slave device information area in a further embodiment of the input/output control method of a slave device according to the present invention;
fig. 8 is a schematic structural diagram of an embodiment of a master device provided in the present invention;
fig. 9 is a schematic structural diagram of another embodiment of a master control device provided in the present invention;
FIG. 10 is a schematic structural diagram of an embodiment of a numerical control system provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of an embodiment of an input/output control method for a slave device, where the method is used for controlling the slave device by a master device in a numerical control system.
A Numerical Control System (i.e., a digital Control System) is a dedicated computer System that performs a part or all of the digital Control functions according to a Control program stored in a computer memory and is provided with an interface circuit and a servo drive device. The numerical control system comprises a plurality of devices with Programmable Logic Controllers (PLC), wherein one device is defined as a master device, and the other devices are defined as slave devices. All the slave devices communicate with the main control device through serial port communication, Ethernet communication, field bus and other modes, and each slave device completes its task. Bus protocols that CAN be used by the fieldbus include, but are not limited to, CAN (Controller Area Network), ModBus, EtherCat (ethernet Control Automation technology), RTEX (Real Time Express, motion Control protocol), and the like.
The input/output control method of the slave device of the present embodiment includes:
s11: input/output interface information of the connected slave device is acquired.
The input/output interface is a connection circuit for exchanging information between the slave device and the external device, and is called an I/O interface for short. The I/O interface is classified into a bus interface and a communication interface.
The I/O interface information may include, among other things, the type of I/O interface, the functionality of the I/O interface, the number of I/O interface pins, the type of slave device, and so forth.
S12: and allocating an address to the input/output interface of the slave device according to the input/output interface information.
Optionally, in an embodiment, step S12 may specifically be: and acquiring the interface type of the input/output interface according to the input/output interface information, and then allocating addresses to the input/output interface of the slave equipment in sequence from the addresses corresponding to the interface type.
S13: and controlling and managing the input and/or output interface of the slave equipment according to the address.
In an embodiment, when the master device and the slave device communicate with each other by using a bus protocol, the master device and the slave device perform periodic communication by using a request/response method. And the master control equipment transmits a bus protocol frame containing an output data packet to the address so as to scan the input and output switching value of the slave equipment, and then receives the protocol frame containing the input data packet from the address so as to acquire the input and output switching value information of the slave equipment.
Optionally, in an embodiment, the step S13 may further: firstly, ladder diagram editing is carried out on the address to control the logical relation of input and output of the input/output interface of the slave equipment, and then, command receiving and/or issuing are carried out on the address according to the logical relation so as to achieve the control and management of the switching value of the input/output interface corresponding to the slave equipment.
The above embodiments are described in detail below with a specific example:
after the master device is connected with the slave devices, since the master device and the slave devices communicate with each other by using a bus protocol, the number of the slave devices cannot exceed the upper limit required by the bus protocol, that is, the number of the slave devices cannot exceed 32 slave devices, and the number of the input/output pins of the slave devices externally connected with sensors or switching values cannot exceed 32. Therefore, the band switch setting slave device serial number on the BIO (block input output) needs to be adjusted. Specifically, in an industrial field, the installation configuration of the slave equipment can be selected according to requirements, the serial number of the slave equipment set by the equipment band switch is adjusted, and the field assembly process is simplified.
Next, configuring the slave device in a PDE (PLC development Environment), first acquiring information of an input/output interface of the slave device, where the information includes an input/output type (interface type) of the slave device, how many input/output pins are, and the like. The PDE automatically assigns an address to the slave based on this information.
In this embodiment, after the information of the Input/Output interface is obtained, the type of the slave device, for example, a BDIO (Bus Digital Input/Output) device, specifically including a BDO (Bus Digital Output) device and a BDI (Bus Digital Input) device, may be defined according to the definition of the Input/Output interface of the slave device. Therefore, when allocating the address, the address may be allocated to the input/output interface of the slave device in order from the address corresponding to the interface type. Suppose the PDE has X-type addresses X10-X49 and Y-type addresses Y10-Y49. When the address needs to be allocated to the BDIO, the address of the corresponding type is automatically allocated to each slave device from the owned addresses according to the type of the BDIO.
For example, if the first slave device is of BDI type, it may be assigned addresses X10, X11, if the second slave device is also of BDI type, it may be assigned addresses X12, X13, if the third slave device is of BDO type, it may be assigned address Y10, and so on.
Specifically, in the present embodiment, the address is edited by a ladder diagram to perform a logical relationship of input and output for controlling the input/output interface of the slave device. As shown in fig. 2, the uploading of the slave device input corresponds to the X address of the logic control, and the issuing of the slave device output corresponds to the Y address of the logic control. The PLC is used for executing a ladder diagram file written by a user and executing according to a preset logic cycle, wherein X is input, Y is output, the logic relation between the input and the output is represented by a ladder diagram, and the ladder diagram can be understood as the conversion relation between the X and the Y.
For example, in fig. 2, the effect is that Y1.0 is ═ X1.0, so that when X1.0 is 0, Y1.0 is 1, whereas when X1.0 is 1, Y1.0 is 0. Thus, for a PLC, the external input and output can be completely abstracted to its X, Y address.
After the address assignment is completed, the master device may receive and/or issue an instruction to an I/O interface of a corresponding slave device according to the assigned address.
The input/output control method of the slave device disclosed in the present embodiment includes: acquiring input/output interface information of connected slave equipment; allocating addresses to input/output interfaces of the slave devices according to the input/output interface information; the input and/or output interfaces of the slave device are controlled and managed according to the address. By the mode, the master control equipment can automatically allocate addresses to the slave equipment after the slave equipment is added, so that the configuration flow of the master equipment and the slave equipment of the numerical control system is simplified, and the control efficiency of the sensors and the switching value in industrial application is improved.
Referring to fig. 3, fig. 3 is a schematic flow chart of another embodiment of a method for controlling input and output of a slave device, the method including:
s31: type information of the slave device is acquired.
S32: and inquiring the input/output interface information of the slave equipment according to the type information of the slave equipment.
The slave devices often include various types of I/O interfaces, such as a numerical control machine tool, which requires tens or even tens of external inputs and outputs, and an automatic welding robot may require hundreds of external trigger point switches, such as a coolant, a working lamp, a safety door in numerical control cutting, start/stop in an industrial production line, lighting, a limit switch in robot application, and the like. These external input output devices need to be connected to the master device through an I/O interface.
Optionally, the type of I/O interface includes, but is not limited to, analog input, floating input, pull-down input, pull-up input, open-drain output, push-pull output, multiplexed open-drain output, multiplexed push-pull output.
S33: and receiving a slave device adding instruction input by a user.
Optionally, in an embodiment, the main control device may include a display device, and the display device is configured to display a human-computer interaction interface, where the human-computer interaction interface generally includes an instruction input area and a state display area, the instruction input area is configured to receive an instruction input by a user to control the operation of the numerical control system, and the state display area is configured to display an operating state of the numerical control system or a data result obtained by the operation of the numerical control system.
It can be understood that, since the master device is connected with the slave devices and transmits data through the bus and the I/O interface connection, the display device can obtain data of all other slave devices (including the master device) from the master device and display the data.
Specifically, the master device may read the slave devices with which communication connection is established, and display all the slave devices, for example, may display type information of the slave devices in a form of a list; and the user selects and adds the required slave equipment in the list through the man-machine interaction interface. The slave device adding instruction may be a selection of a slave device type displayed in the list, which includes an instruction input from an input device such as a mouse, a keyboard, a touch screen, or the like. In addition, the corresponding slave device can be searched for addition by inputting the type information of the slave device.
S34: the number of slave devices added and the used number of addresses are acquired.
S35: and calculating the number of addresses required by the slave equipment according to the input/output interface information of the slave equipment.
S36: and judging whether the added slave equipment is smaller than a preset limited threshold of the number of slave equipment, and whether the number of addresses required by the slave equipment is smaller than the difference value between the limited threshold of the number of addresses and the used number of addresses.
S37: and if so, adding the slave equipment according to the slave equipment adding instruction.
It can be understood that the number of slave devices that can be added by the master device and the number of addresses that can be allocated by the master device to the slave devices are generally limited, and in this embodiment, it is further necessary to determine whether the number of remaining slave devices that can be added by the master device and the remaining addresses that can be allocated by the master device can meet the requirements of the number of slave devices and the number of addresses.
Specifically, taking the BDIO as an example, assuming that the number of slave devices that can be added by the master device is 64, the addresses that can be allocated reserved by the master device are X10-X49 and Y10-Y49, because the BDI corresponds to two X address bits and the BDO corresponds to one Y address bit, the reserved addresses are 60.
In a specific example, if the number of slave devices that have been added by the master device is 32 and the used address is 30, the number of the newly added slave devices should be less than or equal to 32, and the I/O interfaces of the newly added slave devices should be less than or equal to 30.
It can be understood that when looking at the allocatable addresses reserved by the master device, the X addresses and the Y addresses should be further distinguished, for example, the remaining X addresses are 10, the remaining Y addresses are 30, and the newly added slave device needs 20X addresses, so that the addition still cannot be realized.
S38: and allocating an address to the input/output interface of the slave device according to the input/output interface information.
S39: and controlling and managing the input and/or output interface of the slave equipment according to the address.
Step S38 and step S39 are similar to the above embodiments and will not be described here.
Referring to fig. 4, fig. 4 is a schematic flowchart of a method for controlling input and output of a slave device according to another embodiment of the present invention, where the method includes:
s401: and displaying a human-computer interaction interface.
The main control device may include a touch display screen, the touch display screen is used for displaying a human-computer interaction interface, the human-computer interaction interface generally includes an instruction input area and a state display area, the instruction input area is used for receiving an instruction input by a user to control the operation of the numerical control system, and the state display area is used for displaying the operation state of the numerical control system or a data result obtained by the operation of the numerical control system.
Alternatively, the human-computer interface may be as shown in fig. 5, wherein the document device type selection area is used for receiving a user instruction to select a corresponding document device type. The address field setting area is used for receiving user instructions to select or input a required address field. And if the selection is not carried out, the BDIO device selection area and the BDIO address allocation area are not displayed. Wherein, the man-machine interface also comprises a slave device adding area 52 and a slave device information area 54.
S402: and displaying a slave device adding area on the human-computer interaction interface, and displaying a slave device adding button in the slave device adding area.
S403: and receiving an operation instruction of a user for adding a button to the slave equipment.
Optionally, step S403 may specifically include:
and displaying a slave device adding selection button and a slave device adding confirmation button near the slave device adding button, selecting the corresponding slave device after receiving an operation instruction of the slave device adding selection button from a user, and adding the selected slave device after receiving an operation instruction of the slave device adding confirmation button from the user.
Referring also to fig. 6, the slave device add area 52 is used to display slave device add buttons, which specifically include a slave device add select button 521 and a slave device add confirm button 522. Optionally, upon receiving an operation instruction of the slave device addition selection button 521 from the user, a pull-down menu appears for the user to select a slave device to be added, such as slave device 1 (APLC-DI-24 DC-16-B in fig. 6); when receiving an operation of the slave device addition confirmation button 522 corresponding to the slave device addition selection button 521 by the user, the addition of the slave device 1 is confirmed. The slave device add confirmation button 522 is shown as a "+" sign, but in other embodiments, other symbols or text may be used.
Alternatively, the type of the added slave device may be displayed on the slave device addition selection button, for example, the above-described "slave device 1" is replaced with the type of the slave device, so that the user selects a slave device of a desired type.
S404: and displaying a slave equipment information area on the man-machine interaction interface, wherein a slave equipment information bar is displayed in the slave equipment information area.
S405: displaying information of a slave device to the slave device information bar, the information of the slave device comprising: slave serial number, slave type, address of input/output interface.
S406: and adding the slave equipment according to the operation instruction, and displaying the slave equipment in the slave equipment adding area.
S407: the slave device is added according to the slave device addition instruction.
S408: input/output interface information of the connected slave device is acquired.
S409: and allocating an address to the input/output interface of the slave device according to the input/output interface information.
Referring also to fig. 7, the slave device information area 54 displays a slave device information bar. The information of the slave device comprises a serial number of the slave device, a type of the slave device and an address of the input/output interface.
After step S403, the information of the slave device is directly displayed in the slave device information area 54, and after an address is assigned to the information of the slave device, the corresponding address is also displayed in the slave device information area 54.
It is to be understood that, in the above embodiment, after the selection confirmation, the address may be assigned first, and then the slave device serial number, the slave device type, and the address of the input/output interface may be displayed together in the slave device information area 54.
Optionally, in a specific embodiment, a dragging instruction of the user may be further received, the display order of the slave device information displayed by the slave device field is adjusted according to the dragging instruction of the slave device field by the user, and the serial number and the address of the slave device in the slave device information area 54 are reassigned according to the adjusted display order.
For example, referring to fig. 7, after receiving an instruction to drag the "02" number from the device upward, the original "02" number is reassigned from the device to the slave device serial number: 01. address: x10, X11, reassign slave device serial number for original "01" slave device: 02. address: x12, X13.
Optionally, in a specific embodiment, the added slave device may be deleted according to a slave device deletion instruction input by a user through a human-computer interaction interface, and a slave device serial number and an address may be reassigned to the remaining added slave devices.
For example, referring to fig. 7, a delete button 541 is displayed in the slave device information area 54 corresponding to each slave device field, and the added slave device in the slave device field corresponding to the delete button is deleted according to the operation of the delete button by the user. For example, upon receiving an operation of a delete button corresponding to the "01" number slave device by the user, the "01" number slave device is deleted, and the remaining slave devices are reassigned with slave device numbers and addresses, for example, the original "02" number slave device is reassigned with a slave device number: 01. address: x10, X11, and so on. The delete button is shown as a "-" symbol, but in other embodiments, other symbols may be used.
Optionally, in another embodiment, a reset button 542 is further included in the slave device information area 54, and all the added slave devices are deleted after receiving a reset instruction generated by the user touching the reset button 542.
Referring to fig. 5 again, optionally, a determination button and a cancel button may also be displayed on the human-computer interaction interface, and when receiving an operation of the user on the cancel button, the added slave device is not saved, and the human-computer interaction interface is closed; and when the operation of the user on the determined button is received, saving the added slave equipment, and closing the human-computer interaction interface.
Optionally, in another embodiment, the added slave device and the assigned slave device serial number and address may also be output as a text file.
Specifically, structured data is generated in the text file for each added slave device according to the added slave device and the assigned slave device serial number and address, and the structured data comprises the number of slave devices, the slave device serial number, the slave device type, the address type and the address number.
S410: and controlling and managing the input and/or output interface of the slave device according to the address.
Step S410 is similar to the above embodiments, and is not described herein again.
The above embodiments are explained below by taking a Modbus protocol as an example, where the Modbus protocol is a half-duplex communication protocol based on a master-slave device mechanism, the master control device and the slave devices perform periodic communication in a request/response manner, and package input data to be uploaded by the slave devices or output data to be issued by the master control device into a bus protocol frame for transceiving, so as to scan external input/output switching values in an industrial field.
After the slave devices are installed and the connection between the slave devices and the master control device is realized, the band switches on the bio (block input output) are required to be adjusted to set the serial numbers of the slave devices, the number of the slave devices cannot exceed the upper limit required in the Modbus bus protocol, that is, the number of the slave devices cannot exceed 32 slave devices, and input/output pins of the slave devices are externally connected with sensors or switching values.
Next, the slave device is configured in a PDE (PLC development Environment), and first, slave device type information is required, where the slave device type information includes an input/output type of the slave device and the number of input/output pins. The PDE automatically assigns X, Y addresses to the newly created slave based on this information, which addresses can be configured either from 1 when the ladder is newly created or modified when the ladder is modified.
A user adds BDIO (brain-based input/output) of BDI, BDO or BDIO with other specifications to a PDE, the PDE sets serial numbers of slave devices according to the adding sequence (the user needs to ensure the correctness of field installation of a BDIO dial switch), and X, Y addresses are automatically allocated, and the addresses need to be available values.
The present invention provides a computer-readable storage medium for storing a computer program for execution by a processor to implement the methods provided in the above-described embodiments. It is understood that the method executed by the computer program stored in the readable storage medium in this embodiment is similar to the method provided in the foregoing embodiments, and the principle and steps thereof are the same, and are not described herein again.
Wherein the storage medium comprises: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a master device, where the master device 80 is configured to control input and output of a slave device, the master device 80 includes a memory 81, a processor 82, and a computer program stored in the memory and capable of running on the processor 81, and when executed by the processor 82, the computer program implements the following steps:
acquiring input/output interface information of connected slave equipment; allocating an address to the input/output interface of the slave device according to the input/output interface information; and controlling and managing the input and/or output interface of the slave device according to the address.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: acquiring the interface type of the input/output interface according to the input/output interface information; and allocating addresses to the input/output interfaces of the slave equipment in sequence from the addresses corresponding to the interface types.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: ladder editing the address to control the logical relationship of input and output of the input/output interface of the slave device; and receiving and/or issuing instructions to an input/output interface corresponding to the slave equipment according to the address.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: receiving a slave device adding instruction input by a user; and adding the slave device according to the slave device adding instruction.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: acquiring type information of the slave equipment; and inquiring the input/output interface information of the slave equipment according to the type information of the slave equipment.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: acquiring the number of the added slave devices and the used number of the addresses; calculating the number of addresses required by the slave equipment according to the input/output interface information of the slave equipment; judging whether the added slave equipment is smaller than a limit threshold of a preset number of slave equipment; and adding the slave device and allocating an address to the input/output interface of the slave device when the number of the added slave devices is less than the defined threshold of the number of the slave devices and the number of the required addresses of the slave devices is less than the difference value between the defined threshold of the number of the addresses and the used number of the addresses.
Optionally, as shown in fig. 9, in another embodiment, the main control device 80 further includes a display device 83, the display device 83 is configured to display a human-computer interaction interface, and the computer program, when executed by the processor 82, is further configured to perform: displaying a slave equipment adding area on the human-computer interaction interface, and displaying a slave equipment adding button in the slave equipment adding area; receiving an operation instruction of a user for adding a button to the slave equipment; and adding the slave equipment according to the operation instruction, and displaying the slave equipment in the slave equipment adding area.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: displaying a slave device addition selection button and a slave device addition confirmation button near the slave device addition button; when an operation instruction of adding a selection button to the slave equipment by a user is received, selecting the corresponding slave equipment; and adding the selected slave equipment after receiving an operation instruction of adding a confirmation button to the slave equipment by a user.
Optionally, in another embodiment, the computer program is further configured to, when executed by the processor 82: displaying a slave equipment information area on the human-computer interaction interface, wherein a slave equipment information bar is displayed in the slave equipment information area; displaying information of the slave device to the slave device information bar, wherein the information of the slave device comprises: slave serial number, slave type, address of input/output interface.
It can be understood that the working principle and implementation steps of the above-described embodiment of the master control device are similar to those of the above-described embodiment, and are not described herein again.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of the numerical control system provided in the present invention, where the numerical control system 100 includes a master device 101 and a slave device 102.
In practical application, any one of the input and output devices may be used as a master device, and the other input and output devices may be used as slave devices. In another embodiment, the display device may be connected to an input/output device that needs to be added as a master control device, and a master station addition instruction is input through a human-computer interaction interface in a programming environment of the device PLC, and the device is added as the master control device.
It can be understood that the working principle and implementation steps of the embodiment of the numerical control system are similar to those of the embodiment provided above, and are not described again here.
It is to be understood that in the several embodiments provided herein, the disclosed methods and apparatus may be embodied in other forms. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units in the other embodiments described above may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (12)

1. An input and output control method of a slave device is used for a master control device to control the slave device in a numerical control system, and is characterized by comprising the following steps:
acquiring input/output interface information of connected slave equipment;
allocating an address to the input/output interface of the slave device according to the input/output interface information;
controlling and managing an input and/or output interface of the slave device according to the address;
the step of obtaining the input/output interface information of the connected slave device further comprises the following steps:
receiving a slave device adding instruction input by a user;
adding the slave device according to the slave device adding instruction;
before the step of receiving the instruction added from the equipment input by the user, the method further comprises the following steps:
acquiring type information of the slave equipment;
inquiring input/output interface information of the slave equipment according to the type information of the slave equipment;
the step of receiving a slave device adding instruction input by a user specifically comprises the following steps:
displaying a human-computer interaction interface;
displaying a slave equipment adding area on the human-computer interaction interface, and displaying a slave equipment adding button in the slave equipment adding area;
receiving an operation instruction of a user for adding a button to the slave equipment;
adding the slave equipment according to the operation instruction, and displaying the slave equipment in the slave equipment adding area;
after the step of receiving an operation instruction of adding a button to the slave device by a user, the method further comprises the following steps:
displaying a slave equipment information area on the human-computer interaction interface, wherein a slave equipment information bar is displayed in the slave equipment information area;
displaying information of the slave device to the slave device information bar, wherein the information of the slave device comprises: serial number of slave device, type of slave device, address of input/output interface;
after the step of displaying the information of the slave device to the slave device information bar, the method further comprises the following steps:
receiving a dragging instruction of a user to a slave equipment field;
and adjusting the display sequence of the slave equipment information displayed by the slave equipment column according to the dragging instruction, and reallocating the slave equipment serial number and the address to the slave equipment in the slave equipment information area according to the adjusted display sequence.
2. The method according to claim 1, wherein the step of assigning an address to the input/output interface of the slave device according to the input/output interface information specifically comprises:
acquiring the interface type of the input/output interface according to the input/output interface information;
and allocating addresses to the input/output interfaces of the slave device in sequence from the addresses corresponding to the interface types.
3. The method according to claim 1, wherein the step of controlling and managing the input and/or output interface of the slave device according to the address specifically comprises:
ladder editing the address to control the logical relationship of input and output of the input/output interface of the slave device;
and receiving and/or issuing instructions to an input/output interface corresponding to the slave equipment according to the address.
4. The method according to claim 1, further comprising, before said adding said slave device according to said slave device add instruction, the step of:
acquiring the number of the added slave devices and the used number of the addresses;
calculating the number of addresses required by the slave equipment according to the input/output interface information of the slave equipment;
judging whether the added slave equipment is smaller than a limit threshold of a preset number of slave equipment;
and when the number of the added slave devices is smaller than the limited threshold of the number of the slave devices, and the number of the addresses required by the slave devices is smaller than the difference value between the limited threshold of the number of the addresses and the used number of the addresses, adding the slave devices and allocating the addresses to the input/output interfaces of the slave devices.
5. The method according to claim 1, wherein the step of receiving an operation instruction of adding a button to the slave device by a user further comprises the following steps:
displaying a slave device addition selection button and a slave device addition confirmation button near the slave device addition button;
when an operation instruction of adding a selection button to the slave equipment by a user is received, selecting the corresponding slave equipment;
and adding the selected slave equipment after receiving an operation instruction of adding a confirmation button to the slave equipment by a user.
6. A master device for controlling input and output of a slave device, the master device comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of:
acquiring input/output interface information of connected slave equipment;
allocating an address to the input/output interface of the slave device according to the input/output interface information;
controlling and managing an input and/or output interface of the slave device according to the address;
the computer program, when executed by the processor, further implements the following steps, prior to the step of obtaining input/output interface information of a connected slave device:
receiving a slave device adding instruction input by a user;
adding the slave device according to the slave device adding instruction;
the computer program when executed by the processor further implementing, prior to the step of receiving user input adding instructions from a device, the steps of:
acquiring type information of the slave equipment;
inquiring input/output interface information of the slave equipment according to the type information of the slave equipment;
the main control equipment also comprises a display device used for displaying a human-computer interaction interface;
the computer program, when executed by the processor, implementing the step of receiving user input add from device instruction, comprising the steps of:
displaying a slave equipment adding area on the human-computer interaction interface, and displaying a slave equipment adding button in the slave equipment adding area;
receiving an operation instruction of a user for adding a button to the slave equipment;
adding the slave equipment according to the operation instruction, and displaying the slave equipment in the slave equipment adding area;
when executed by the processor, the computer program further implements, after the step of receiving an operation instruction of adding a button to the slave device by a user, the steps of:
displaying a slave equipment information area on the human-computer interaction interface, wherein a slave equipment information bar is displayed in the slave equipment information area;
displaying information of the slave device to the slave device information bar, wherein the information of the slave device comprises: serial number of slave device, type of slave device, address of input/output interface;
the computer program, when executed by the processor, further implements, after the step of displaying the information of the slave device to the slave device information bar, the steps of:
receiving a dragging instruction of a user to a slave equipment field;
and adjusting the display sequence of the slave equipment information displayed by the slave equipment column according to the dragging instruction, and reallocating the slave equipment serial number and the address to the slave equipment in the slave equipment information area according to the adjusted display sequence.
7. The master device of claim 6, wherein the computer program, when executed by the processor, further performs the steps of:
acquiring the interface type of the input/output interface according to the input/output interface information;
and allocating addresses to the input/output interfaces of the slave device in sequence from the addresses corresponding to the interface types.
8. The master device of claim 6, wherein the computer program, when executed by the processor, further performs the steps of:
ladder editing the address to control the logical relationship of input and output of the input/output interface of the slave device;
and receiving and/or issuing instructions to an input/output interface corresponding to the slave equipment according to the address.
9. The master device of claim 6, wherein the computer program, when executed by the processor, further performs the steps of:
acquiring the number of the added slave devices and the used number of the addresses;
calculating the number of addresses required by the slave equipment according to the input/output interface information of the slave equipment;
judging whether the added slave equipment is smaller than a limit threshold of a preset number of slave equipment;
and when the number of the added slave devices is smaller than the limited threshold of the number of the slave devices, and the number of the addresses required by the slave devices is smaller than the difference value between the limited threshold of the number of the addresses and the used number of the addresses, adding the slave devices and allocating the addresses to the input/output interfaces of the slave devices.
10. The master device of claim 6, wherein the computer program, when executed by the processor, further performs the steps of:
displaying a slave device addition selection button and a slave device addition confirmation button near the slave device addition button;
when an operation instruction of adding a selection button to the slave equipment by a user is received, selecting the corresponding slave equipment;
and adding the selected slave equipment after receiving an operation instruction of adding a confirmation button to the slave equipment by a user.
11. A numerical control system comprising a master device according to any one of claims 6 to 10 and a plurality of slave devices connected to the master device via a bus.
12. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, implements the steps of the input-output control method of a slave device according to any one of claims 1 to 5.
CN201780037079.7A 2017-07-26 2017-07-26 Input and output control method of slave equipment, master control equipment and numerical control system Active CN109416530B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/094469 WO2019019051A1 (en) 2017-07-26 2017-07-26 Input and output control method for slave device, master control device and numerical control system

Publications (2)

Publication Number Publication Date
CN109416530A CN109416530A (en) 2019-03-01
CN109416530B true CN109416530B (en) 2021-07-09

Family

ID=65039215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780037079.7A Active CN109416530B (en) 2017-07-26 2017-07-26 Input and output control method of slave equipment, master control equipment and numerical control system

Country Status (2)

Country Link
CN (1) CN109416530B (en)
WO (1) WO2019019051A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112415930A (en) * 2020-11-20 2021-02-26 苏伊士水务工程有限责任公司 Interface list, instance program intelligent generation method and automatic integrated intelligent system
CN115759444B (en) * 2022-11-24 2023-10-20 北京国电通网络技术有限公司 Power equipment distribution method, device, electronic equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108205A (en) * 2006-10-27 2008-05-08 Brother Ind Ltd Numerical control device
CN102170401A (en) * 2011-05-27 2011-08-31 杭州华三通信技术有限公司 Method and device of data processing
CN105242601A (en) * 2015-10-09 2016-01-13 贵州智达科技有限责任公司 Multi-compatibility bidirectional communication protocol of serial port of electric warming oven
CN106060182A (en) * 2016-05-03 2016-10-26 杭州华三通信技术有限公司 Address allocation method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005277655A (en) * 2004-03-24 2005-10-06 Sony Corp Input/output terminal, master apparatus, slave apparatus, information processing system and method, and program for input/output terminal, master apparatus and slave apparatus
WO2008120120A2 (en) * 2007-03-29 2008-10-09 Philips Intellectual Property & Standards Gmbh Networked control system using logical addresses

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108205A (en) * 2006-10-27 2008-05-08 Brother Ind Ltd Numerical control device
CN102170401A (en) * 2011-05-27 2011-08-31 杭州华三通信技术有限公司 Method and device of data processing
CN105242601A (en) * 2015-10-09 2016-01-13 贵州智达科技有限责任公司 Multi-compatibility bidirectional communication protocol of serial port of electric warming oven
CN106060182A (en) * 2016-05-03 2016-10-26 杭州华三通信技术有限公司 Address allocation method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于PLC与组态王的交通灯控制系统设计;豆丁网;《https://www.docin.com/touch/detail.do?id=1224387782》;20150716;第9-31页 *
豆丁网.一种基于PLC与组态王的交通灯控制系统设计.《https://www.docin.com/touch/detail.do?id=1224387782》.2015,第9-31页. *

Also Published As

Publication number Publication date
CN109416530A (en) 2019-03-01
WO2019019051A1 (en) 2019-01-31

Similar Documents

Publication Publication Date Title
CN109557890B (en) Control device
CN104076763A (en) State machine configurator
JP4994517B1 (en) Engineering equipment
CN109416530B (en) Input and output control method of slave equipment, master control equipment and numerical control system
US20160125037A1 (en) Information processing apparatus, information processing method, information processing program, and storage medium
JP2015176191A (en) controller
WO2012102472A1 (en) Apparatus and method for inputting cutting shape using interactive program in computer numerical control machine tool
EP2946252A1 (en) Automated input simulation for simulated programmable logic controller
US8494664B2 (en) Integrated drive management and configuration using instantiated objects
Berger Automating with SIMATIC S7-1500: configuring, programming and testing with STEP 7 Professional
GB2527668A (en) Method and device for managing and configuring field devices in an automation installation
US20140306642A1 (en) Engineering tool
EP3865959A1 (en) Control device
JP2006243841A (en) Plc tool device
US20210064275A1 (en) Control System, Development Assistance Device, and Development Assistance Program
KR102029152B1 (en) Unified Interface System For Heterogeneous Machine Tool Controller
CN109765850A (en) Control system
JP2011175351A (en) Screen data preparation device, screen data preparation method, and screen data preparation program
CN107329459B (en) Numerical control system integrating motion control and logic control
US11500429B2 (en) Input signal coordination and method for use with an expansion module
JP3939518B2 (en) Input / output address setting device, input / output address setting program and recording medium recording the same
JP2002278666A (en) Control panel for controlling facility
EP3032362B1 (en) Automatic generation of hardware configuration for an automation system
CN102540972B (en) Remote control method supporting multi-point cross-platform communication for numerical control machine
CN109962788B (en) Multi-controller scheduling method, device and system and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 518063 23 Floor (Room 2303-2306) of Desai Science and Technology Building, Yuehai Street High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen AANDE Intelligent Technology Research Institute Co., Ltd.

Address before: 518104 Shajing Industrial Co., Ltd. No. 3 Industrial Zone, Hexiang Road, Shajing Street, Baoan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen AANDE Intelligent Technology Research Institute Co., Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant