CN115529205A - Communication interaction method between motor drivers and two-for-one twister system - Google Patents

Communication interaction method between motor drivers and two-for-one twister system Download PDF

Info

Publication number
CN115529205A
CN115529205A CN202211072157.6A CN202211072157A CN115529205A CN 115529205 A CN115529205 A CN 115529205A CN 202211072157 A CN202211072157 A CN 202211072157A CN 115529205 A CN115529205 A CN 115529205A
Authority
CN
China
Prior art keywords
slave
host
communication
data
master
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
Application number
CN202211072157.6A
Other languages
Chinese (zh)
Other versions
CN115529205B (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.)
Shanghai Jingtai Technology Co ltd
Original Assignee
Shanghai Jingtai Technology 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 Shanghai Jingtai Technology Co ltd filed Critical Shanghai Jingtai Technology Co ltd
Priority to CN202211072157.6A priority Critical patent/CN115529205B/en
Publication of CN115529205A publication Critical patent/CN115529205A/en
Application granted granted Critical
Publication of CN115529205B publication Critical patent/CN115529205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P1/00Arrangements for starting electric motors or dynamo-electric converters
    • H02P1/16Arrangements for starting electric motors or dynamo-electric converters for starting dynamo-electric motors or dynamo-electric converters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40195Flexible bus arrangements involving redundancy by using a plurality of nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40202Flexible bus arrangements involving redundancy by using a plurality of master stations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Small-Scale Networks (AREA)
  • Control Of Multiple Motors (AREA)

Abstract

A communication interaction method between motor drivers and a two-for-one twister system for executing the method comprise a host and a slave which are connected through a CAN bus, wherein the host comprises a first host and a second host, the second host CAN be used as the host or the slave of the first host, the host and the slave carry out data interaction through CAN messages, the parameters of the host and the slave are set firstly, the communication parameters are set by the host, and the host prepares control data required to be sent by the communication according to writing command codes; the host sends the target node address to the slave according to the control data; then, the slave receives control data sent by the host, and when the address of the slave is consistent with the address of the target node, the slave correspondingly executes the control command of the host; the slave computer prepares feedback data which needs to reply to the host computer according to the reading code; and finally, the master machine acquires the feedback data sent by the slave machine and responds according to the feedback data. The invention gives CAN communication, realizes multi-stage master-slave control and improves the communication speed.

Description

Communication interaction method between motor drivers and two-for-one twister system
Technical Field
The invention relates to the field of low-voltage electrical appliances, in particular to a communication interaction method between motor drivers and a two-for-one twister system.
Background
A conventional two-for-one twister system generally comprises a human-machine interaction interface (HMI), a traversing driver, a winding driver and a spindle driver, wherein double-motor conditions exist on winding and spindles, a large number of internal devices exist in the whole two-for-one twister system, self data interaction needs to be completed among the internal devices for realizing integrated control, at present, a PLC control system or an RS485 communication control system is mostly adopted for the control technology of the two-for-one twister, but the two systems have defects, when the PLC control is adopted, the wiring method of analog input/output and digital input/output terminals used in the two-for-one twister system has the problems of complex wiring, easy error of line sequence and the like, and the communication speed is slow, the communication is unstable and the like when the RS485 control system is adopted for communication, so that the accidental conditions of device disconnection, line drop and the like are easily caused, and the production efficiency is influenced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide a communication interaction method between motor drivers and a two-for-one twister system applying the communication interaction method.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method of communication interaction between motor drives, characterized by: the method comprises a plurality of devices which are connected through a CAN bus, wherein the devices comprise a host and a slave, the host comprises a first host and a second host, the second host CAN be used as the host or the slave of the first host, and the host and the slave perform data interaction through CAN messages, and the method comprises the following steps:
step S1: setting local station parameters of a host and a slave respectively, and setting communication parameters by the host;
step S2: the host prepares control data required to be sent by the communication according to the writing command codes, wherein the control data comprises control words and a data area;
and step S3: the host sends the target node address in the control data to the slave;
and step S4: the slave receives control data sent by the host, and when the address of the slave is consistent with the address of the target node, the slave correspondingly executes the control command of the host;
step S5: the slave computer prepares feedback data needing to reply to the host computer according to the reading code, wherein the feedback data comprises state words and a data area;
step S6: the master machine acquires feedback data sent by the slave machine and responds according to the feedback data.
Further, in steps S2 to S6, if the master does not acquire the feedback data of the slave after the master continuously transmits the control data to the slave at the same target node address N times, it is determined that the slave is in the failure state.
Further, after the slave is determined to be in the failure state, the first master transmits a shutdown signal to all the slaves.
Furthermore, the communication address of the first master is constant, and the communication addresses of the second master and the slave are freely set and are different from the communication address of the first master.
Further, the communication address of the first master is constantly 1, and the communication addresses of the devices other than the first master are freely set to natural numbers of 1 or more, the first master may simultaneously transmit control data to a plurality of slaves having communication addresses other than 1, and the first master may simultaneously acquire feedback data transmitted by a plurality of slaves having communication addresses other than 1.
Further, the communication address of the second master is set to 2, and the second master can simultaneously transmit control data to a plurality of slaves except the own station and receive feedback data transmitted by the plurality of slaves.
Further, the CAN message comprises a 29Bit CANID, wherein Bit 28-25 is a Head identifier, and Bit24 is a Status question and answer identifier; the bits 23-20 are word coding bits, the host prepares to send data according to the word coding bits, the bits 19-16 are Rorder coding bits, the slave prepares to feed back data according to the Rorder coding bits, the bits 15-18 are target node addresses, and the bits 7-0 are communication addresses of the slave.
Further, when the host and the slave perform CAN message interaction, when the target node address in the received CAN message is consistent with the address of the host station and the Head identifier is the same, the host or the slave performs read-write operation according to the word encoding bit/the Rorder encoding bit, otherwise, the host or the slave discards the received CAN message.
Further, the CAN message comprises a data field, the data field in the CAN message sent by the host comprises a control word command for controlling the slave and a data area requiring the slave to adjust parameters, and the data field in the CAN message sent by the slave comprises a status word command for replying the host and a data area for feeding back the current slave operation parameters.
The invention also provides a two-for-one twister system which comprises a traversing driver and a plurality of frequency converters, wherein the traversing driver and the frequency converters are connected through a CAN bus and used for executing the communication method, the traversing driver serves as a first main machine, one frequency converter serves as a second main machine, and the other frequency converters serve as slave machines.
Preferably, one of the frequency converters is only used as a slave of the second master, and the slave and the second master perform data interaction.
Preferably, the control word command sent by the traverse driver is used for controlling the start-stop, steering and obstacle codes of the second host and/or the slave, the data area sent by the traverse driver is used for setting the rotating speed, frequency and torque of the second host and/or the slave, the state word sent by the second host and/or the slave is used for replying to the first host, and the data area sent by the second host and/or the slave is used for feeding back the current rotating speed, frequency, output current and fault information to the first host.
Preferably, the control word sent by the second master is used for controlling the start-stop, steering and obstacle codes of the sub-slave, the data area sent by the second master is used for setting the speed, frequency and torque of the sub-slave, the status word command sent by the sub-slave is used for replying to the second master, and the data area sent by the sub-slave is used for feeding back the current rotating speed, frequency, output current and fault information to the second master.
Preferably, the second master machine and the sub-slave machines thereof drive the double-spindle synchronous motor.
According to the communication interaction method between the motor drivers, the second host CAN be set as the host or the slave, multi-level master-slave control is achieved, information interaction between the host and the slave is based on CAN communication, and the CAN communication has the advantages of small wiring amount, high communication speed and stability, so that the wiring amount of a two-for-one twister system applying the communication interaction method is reduced, the communication speed is improved, and the communication quality is guaranteed.
Drawings
FIG. 1 is a schematic diagram of a communication establishment procedure in the present invention;
FIG. 2 is a schematic diagram of a communication flow in the present invention;
FIG. 3 is a schematic diagram of CAN message processing in the present invention;
FIG. 4 is a schematic diagram of a two-for-one twister system of the present invention.
Detailed Description
The following describes the embodiments of the communication interaction method between the motor drivers and the two-for-one twister system according to the present invention with reference to the embodiments shown in fig. 1 to 4. The communication interaction method between the motor drivers and the two-for-one twister system of the present invention are not limited to the description of the following embodiments.
A communication interaction method between motor drivers comprises a plurality of devices which are connected through a CAN bus, wherein the devices comprise a host and a slave, the host comprises a first host and a second host, the second host CAN be used as the host or the slave of the first host, and the host and the slave perform data interaction through CAN messages, and the method comprises the following steps:
step S1: setting local station parameters of a host and a slave respectively, and setting communication parameters by the host;
step S2: the host prepares control data required to be sent by the communication according to the writing command codes, wherein the control data comprises control words and a data area;
and step S3: the host sends the target node address to the slave according to the control data;
and step S4: the slave receives control data sent by the host, and when the address of the slave is consistent with the address of the target node, the slave correspondingly executes the control command of the host;
step S5: the slave computer prepares feedback data which needs to reply to the host computer according to the reading code, wherein the feedback data comprises a state word and a data area;
step S6: the master acquires feedback data sent by the slave and responds according to the feedback data.
According to the communication interaction method between the motor drivers, the second host CAN be set as the host or the slave, multi-level master-slave control is achieved, information interaction between the host and the slave is based on CAN communication, and the CAN communication has the advantages of small wiring amount, high communication speed and stability, so that the wiring amount of a two-for-one twister system applying the communication interaction method is reduced, the communication speed is improved, and the communication quality is guaranteed.
Particularly, the second host is arranged, so that the second host can be in communication control with the target slave, the data processing amount required by the first host is reduced, the transmission cycle of the first host is prevented from being prolonged due to excessive communication data, and the real-time performance of data of each slave is ensured.
Referring to fig. 1-3, a communication interaction method between motor drivers is described in detail, where a plurality of devices are connected through a CAN bus, and in this embodiment, 16 devices are connected through the CAN bus, where each device includes a microcontroller, a CAN controller, and a CAN transceiver, where the microcontroller is configured to analyze and process data and output a control instruction to the CAN controller, and the CAN controller is configured to access data and filter the data, convert data to be received and transmitted into a CAN message meeting a specification, and perform data interaction with other devices connected to the CAN bus through the CAN transceiver.
In this embodiment, the multiple devices include a master and a slave, where the master includes a first master and a second master, the first master and the second master are manually set, the second master CAN be used as both the master and the slave of the first master, and the master and the slave perform data interaction through a CAN message, including the following steps:
step S1: setting local station parameters of a host and a slave respectively, wherein the local station parameters of the host and the slave respectively comprise a communication address of the host and a communication address of the slave, and the host sets the communication parameters, wherein the communication parameters comprise baud rate, sending period, ID codes and the like;
preferably, the communication address of the master is constant, the communication address of the slave is freely set to a communication address different from the master, that is, the communication address of the first master is constant, and the second master and the slave are freely set, for example, the communication address of the first master is constant at 1, and the communication addresses of the other devices except the first master are freely set to natural numbers of 1 or more, so that the first master can simultaneously transmit control data to a plurality of slaves having communication addresses different from 1, the first master can simultaneously acquire feedback data transmitted by a plurality of slaves having communication addresses different from 1, that is, in this embodiment, the communication addresses of the second master and the slaves can be set within a range of 2 to 16, the first master can simultaneously transmit control data to the second master and the slaves having communication addresses of 2 to 16, and transmit data to 14 devices at most, and the first master can receive the feedback data transmitted by the second master and the slaves having communication addresses of 2 to 16.
The communication address of the second master is set to 2, the second master can transmit control data to the slaves with the communication address ranges of 2 to 16 except the own station, and transmit control data to 13 slaves at most, and meanwhile, the second master can receive feedback data transmitted by the slaves with the communication addresses of 2 to 16 except the own station, in the embodiment, the communication address of the slave is preferably set to 3; preferably, one of the slaves is a slave of the second master, the slave exchanges data only with the second master, and the communication address of the slave is set to 3.
Step S2: the host prepares control data to be sent for the communication according to the writing command code, wherein the control data is 64 bits and comprises control words and a data area;
and step S3: the host sends the target node address in the control data to the slave;
and step S4: the slave receives control data sent by the host, and when the address of the slave is consistent with the address of the target node, the slave correspondingly executes the control command of the host;
step S5: the slave prepares feedback data which needs to reply to the host according to the reading code, the feedback data is 64bit, and the feedback data comprises a state word and a data area;
step S6: the master acquires feedback data sent by the slave and responds according to the feedback data.
In steps S2 to S6, if the master does not acquire the feedback data of the slave after sending control data to the slave at the same target node address N times in succession, it is determined that the slave is in a fault state, where N is a positive integer greater than 1, for example, N is 10, preferably, after the master sends control data to the slave at the same target node address 10 times in succession, the cycle for sending 10 frames of data is usually set to 5ms, and the master does not acquire the feedback data sent by the slave, and determines that the slave is in a fault state, for example, it is determined that the slave is in a drop state, and a specific fault handling manner may be designed according to different requirements.
For example, when the slave machines are determined to be in a disconnection fault, the first master machine sends shutdown signals to all the slave machines, so that the whole system directly enters a synchronous shutdown mode, specifically, when the first master machine determines that a certain slave machine (including the second master machine) is in the disconnection fault, the first master machine sends shutdown signals to all the slave machines; when the second host judges that the sub-slave is in the line-dropping fault, the sub-slave is automatically stopped, the second host feeds back a fault signal to the first host, and the first host sends a stop signal to all the slaves, so that the communication data between the motor drivers is fast and stable, the line-dropping detection response is fast, after the line-dropping fault occurs to one slave of the motor drivers, the line-dropping slave is automatically stopped, the host sends a stop signal to all the slaves, the whole system can directly enter a synchronous stop mode to ensure the synchronous action of the whole system.
In steps S2 to S6, the CAN packet between the master and the slave is an extended data frame, see table 1, where the extended data frame includes a 29-Bit CAN id (that is, a 29-Bit extended packet identifier of an arbitration field in the CAN packet) and a data field, in the 29-Bit CAN id, bits 28 to 25 are Head identifiers, in this embodiment, the Head identifiers are fixed to 0 × 1000, and Bit24 is a Status question and answer identifier, where the master sends 1 and the slave replies 0; bit 23-20 is a word coding Bit, the host prepares to send data according to the word coding Bit, bit 19-16 is a Rorder coding Bit, the slave prepares to feed back data according to the Rorder coding Bit, bit 15-18 is a DesAdr target node address, the target node address is a target address sent by a message, bit 7-0 is a locaddr local station communication address, for example, the host local station communication address (Bit 7-0) included in a CAN ID in a CAN message sent by the host to the slave, the slave communication address is a target node address, and after the slave receives the CAN message sent by the host, the slave automatically sets the received host communication address as the target node address.
As shown in fig. 3, when the host and the slave perform CAN message interaction, and when the target node address in the received CAN message is identical to the home address and the Head identifier is the same, in this embodiment, the Head identifier is fixed, and the host or the slave performs read-write operation according to the word encoding bit/the Rorder encoding bit, otherwise, the host or the slave discards the received CAN message.
And the data field in the CAN message sent by the slave machine comprises a control word command for controlling the slave machine and a data area for adjusting parameters of the slave machine, and the data field in the CAN message sent by the slave machine comprises a status word command for replying the master machine and a data area for feeding back the current operating parameters of the slave machine. Usually, a data field of a frame of CAN message is a 64-bit data area, which is divided into 4 sub-data according to 16 bits, wherein 0-16 bits are defined as a control word command or a status word command, and at most 4 kinds of required data CAN be transmitted \ read at one time.
The specific transmission \ read data content can be set by the application layer code through the read \ write code, for example: writing code 1: transmitting data 1, data 2, data 3 and data 4; write code 2: transmitting data 5, data 6, data 7, data 8; reading code 1: reading slave data 1, data 2, data 3 and data 4; reading code 2: reading data 5, data 6, data 7 and data 8; the transmission \ reading data is self-defined according to different applications.
The CAN message definition between the master and the slave is detailed in table 1.
Figure BDA0003830801380000071
TABLE 1 CAN message definition between a master and a slave
In combination with fig. 4, a two-for-one twister system is provided, where the two-for-one twister system includes a plurality of devices connected via a CAN bus, the plurality of devices includes a master and a slave, and data interaction is performed between the master and the slave via CAN messages, where the master includes a first master and a second master, the second master is controlled by the first master as the slave of the first master, the second master CAN control other slaves as the master, and the master and the slaves execute the communication interaction method between the motor drivers, so that compared with existing control system communication via PLC control or RS485, the two-for-one twister system has the advantages of less wiring amount, high communication rate, and stable communication quality.
As shown in fig. 4, in the present embodiment, the two-for-one twister system includes a traverse driver (traverse servo) for controlling the servo motor of the two-for-one twister, and a plurality of frequency converters, wherein two frequency converters are a main frequency converter and a slave frequency converter respectively for controlling the permanent magnet synchronous motor, and the other frequency converter is used as a winding frequency converter for controlling the servo motor or the asynchronous motor.
In this embodiment, the traverse actuator is set as a first master, the master frequency converter is set as a second master, and the remaining frequency converters are set as slaves, that is, both the slave frequency converter and the winding frequency converter are set as slaves. It should be noted that, in this embodiment, the second master and the sub-slaves thereof drive the dual-spindle sub-synchronous motor, and the driver used by the dual-spindle sub-synchronous motor is the frequency converter, so the frequency converter serves as the second master, which is an important improvement point of this embodiment. In addition, application layer codes used for communication between the first host and the controller (HMI) are written in the servo driver program, and when the frequency converter is required to serve as the first host, only the relevant application codes need to be added. According to the communication interaction method between the motor drivers, the communication address of the first host is constant, the communication addresses of the second host and the slave are freely set and are different from the communication address of the first host, that is, the communication addresses of the second host and the slave can be freely set to natural numbers different from the communication address of the first host, preferably, the communication addresses of the second host and the slave are different, so that the first host can simultaneously perform data interaction with the second host and the plurality of slaves, and the second host can simultaneously perform data interaction with the plurality of slaves.
In the control data sent by the traverse driver, the control word command is used for controlling the start-stop, steering and obstacle codes of the second host and/or the slave, the data area is used for setting the rotating speed, frequency and torque of the second host and/or the slave, the state word of the feedback data sent by the second host and/or the slave is used for replying the first host, and the data area is used for feeding back the current rotating speed, frequency, output current and fault information to the first host.
The second host machine, namely the main frequency converter, can receive the control data sent by the first host machine as the slave machine of the first host machine, and execute the control command of the first host machine to the start-stop, steering and obstacle codes of the main frequency converter according to the control data and adjust the rotating speed, frequency, output current and the like of the main frequency converter, and meanwhile, the second host machine feeds back the current running state to the first host machine; in the present embodiment, the control word is used for controlling start-stop, turning and obstacle codes of the slave, the data area is used for setting speed, frequency and torque of the slave, in the feedback data sent by the slave, the state word command is used for replying to the second master, and the data area is used for feeding back current rotation speed, frequency, output current and fault information to the second master.
In this embodiment, the interaction method between the traverse driver and the main frequency converter, between the traverse driver and the winding frequency converter, between the main frequency converter and the slave frequency converter, and between the main frequency converter and the winding frequency converter, which is used to describe the information interaction process in the two-for-one twister system by taking the information interaction between the main frequency converter and the slave frequency converter as an example, specifically includes the following steps:
step S1: setting local station parameters of a main frequency converter and a slave frequency converter respectively, and setting communication parameters by the main frequency converter;
the parameters of the main frequency converter and the slave frequency converter are set as follows:
in setting the parameters of the frequency converter, the CAN function enabling parameter FC-00: FC-00 of the main frequency converter and FC-00 of the slave frequency converter are both 2, which indicates that an online mode is selected; the address of the station selects FC-01: the FC-1=2 of the master frequency converter indicates that the communication address of the master frequency converter at the station is 2, and the FC-1=3 of the slave frequency converter indicates that the communication address of the slave frequency converter at the station is 3; the destination node address selects FC-16, and when FC-16 is not greater than 0 xn0004, it indicates that data is to be sent to the device with communication address 3; the command codes of data required to be transmitted in each communication are FC-17, FC-18 and FC-19, for example, when FC-17 is no longer 0X6666, which means that (W \ R command is encoded as 6\6), the control data transmitted by the main frequency converter comprises control words, frequency and torque, and the feedback data transmitted after being received from the frequency converter comprises state words, speed measurement feedback frequency, current and fault codes; the master-slave selection FC-20 is performed, the master frequency converter FC-20=1 represents that the master frequency converter is in the second master mode, and the slave frequency converter FC-20=0 represents that the slave frequency converter is in the slave mode;
step S2: the main frequency converter prepares control data required to be sent by the communication according to the write command codes, wherein the control data comprises control words and a data area, namely the main frequency converter prepares the control data required to be sent by the communication according to FC-17, FC-18 and FC-19, and the control data comprises the control and data area;
and step S3: the main frequency converter sends control data to the slave frequency converter according to the address of the target node in the control data, namely, sends the control data to the slave frequency converter according to FC-16, and it can be understood that in steps S2-S3, the main frequency converter sends the control data to the outside according to FC-16 and FC-17 (FC-18 or FC-19), and FC-16 is set as the communication address of the slave frequency converter;
and step S4: receiving control data sent by a main frequency converter from a slave frequency converter, and correspondingly executing a control command of a host machine by the slave machine, namely correspondingly executing a control word command and referring to a data area adjusting parameter;
step S5: the slave prepares feedback data required by the master according to the read code, the feedback data comprises a status word and a data area, namely, the slave frequency converter sends control data outwards according to FC-16 and FC-17 (FC-18 or FC-19), and the FC-16 is set as a communication address of the master frequency converter;
step S6: the master transducer takes the feedback data sent by the slave transducer and responds according to the feedback data, i.e. according to the status word and the data field. The double-spindle synchronous motor is synchronously driven through the communication between the second host and the sub-slave machines without passing through the first host.
In the present embodiment, the meaning of the parameters of the frequency converter is detailed in table 2:
Figure BDA0003830801380000101
the read \ write command encoding and control word \ status word are defined as follows:
w write command encoding:
5: control word + speed + torque + reservation
6: control word + frequency + torque + reservation
7: reservation
R read command encoding:
5: status word + speed + output current + fault information
6: status word + speed measurement feedback frequency + output current + fault information
7: and (6) reserving.
The read \ write command codes can be combined, for example, when W \ R is 5\5, control words, speed, torque, read status words, speed, current and fault codes are written; when W \ R is 5\6, writing control words, speed and torque, reading state words, high-speed pulse frequency, current and fault codes; and when W \ R is 6\5, writing control words, frequency, torque, reading status words, speed, current and fault codes.
The control word meanings are detailed in table 2:
Figure BDA0003830801380000111
TABLE 3
The status word meanings are detailed in table 3:
Figure BDA0003830801380000112
TABLE 4
In addition, different data transmission can be realized by setting different W \ R codes according to different scene requirements, if the host needs transmission speed and torque and requires the recovery speed current of the slave, the W \ R codes can be set to be 5\5 (the W \ R codes can be set by self according to specific requirements), the flexibility of data transmission between the master control system and the slave control system is enhanced, and more actual requirements are met.
Compared with the existing control system, the control system of the embodiment adopts CAN communication to transmit target frequency and uniformly distribute load to control a plurality of motors, the droop function CAN finely adjust output frequency in real time by sensing the change of output current of the driver, and uniformly distribute a plurality of motor loads, and meanwhile, the control mode of the control system CAN ensure that the loads and rotating speeds of the motors with multiple spindles are consistent, so that the failure of the driver caused by the power generation of the motors is avoided; according to the scheme, the data transmission and data reading required by the communication CAN be freely set by setting the coding bit in the CAN ID, the operations of starting and stopping, steering, fault resetting and the like of the driver CAN be directly controlled through CAN communication through the control word/state word, the driver control is also realized by adopting CAN communication, and the functions are more comprehensive and flexible.
In addition, the host in the control system sends a message containing CAN ID, the slave judges to receive or discard data according to the target node address (bit 15-8) and the local station communication address (bit 7-0) in the received CAN ID, and meanwhile, the current slave CAN receive and process the message matching the CAN ID and the slave address in the CAN bus message when the host is in communication, and the control system is not limited to point-to-point single communication of a specific host.
It should be noted that in the description of the present invention, the terms "upper", "lower", "left", "right", "inner", "outer", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings or orientations or positional relationships conventionally placed in use, and are only for convenience of description, but do not indicate that the referred device or element must have a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish one description from another, and are not to be construed as indicating relative importance.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (14)

1. A method of communication interaction between motor drives, characterized by: the method comprises a plurality of devices which are connected through a CAN bus, wherein the devices comprise a host and a slave, the host comprises a first host and a second host, the second host CAN be used as the host or the slave of the first host, and the host and the slave perform data interaction through CAN messages, and the method comprises the following steps:
step S1: setting local station parameters of a host and a slave respectively, and setting communication parameters by the host;
step S2: the host prepares control data required to be sent by the communication according to the writing command codes, wherein the control data comprises control words and a data area;
and step S3: the host sends the target node address in the control data to the slave;
and step S4: the slave receives control data sent by the host, and when the address of the slave is consistent with the address of the target node, the slave correspondingly executes the control command of the host;
step S5: the slave computer prepares feedback data which needs to reply to the host computer according to the reading code, wherein the feedback data comprises a state word and a data area;
step S6: the master acquires feedback data sent by the slave and responds according to the feedback data.
2. The communication interaction method between motor drivers according to claim 1, characterized in that: in steps S2 to S6, if the master does not acquire the feedback data of the slave after the master continuously transmits the control data to the slave having the same target node address N times, it is determined that the slave is in the failure state.
3. The communication interaction method between motor drivers according to claim 2, characterized in that: after the slave is judged to be in the fault state, the first master sends a shutdown signal to all the slaves.
4. The communication interaction method between motor drivers according to claim 1, characterized in that: the communication address of the first host is constant, and the communication addresses of the second host and the slave are freely set and are different from the communication address of the first host.
5. The communication interaction method between motor drivers according to claim 4, characterized in that: the communication address of the first master is constantly 1, and the communication addresses of the other devices except the first master are freely set to natural numbers of more than 1, the first master can simultaneously transmit control data to a plurality of slaves with communication addresses of 1, and the first master can simultaneously acquire feedback data transmitted by a plurality of slaves with communication addresses of 1.
6. The communication interaction method between motor drivers according to claim 3, characterized in that: the communication address of the second master is set to 2, and the second master can simultaneously transmit control data to a plurality of slaves except the own station and receive feedback data transmitted by the plurality of slaves.
7. The communication interaction method between motor drivers according to claim 1, characterized in that: the CAN message comprises a 29Bit CANID, wherein Bit 28-25 is a Head identifier, and Bit24 is a Status question and answer identifier; the bits 23-20 are word coding bits, the host prepares to send data according to the word coding bits, the bits 19-16 are Rorder coding bits, the slave prepares to feed back data according to the Rorder coding bits, the bits 15-18 are target node addresses, and the bits 7-0 are communication addresses of the slave.
8. The communication interaction method between motor drivers according to claim 7, characterized in that: when the host computer and the slave computer carry out CAN message interaction, when the target node address in the received CAN message is consistent with the address of the local station and the Head identifier is the same, the host computer or the slave computer executes read-write operation according to the word coding bit/the roller coding bit, otherwise, the host computer or the slave computer discards the received CAN message.
9. The communication interaction method between motor drivers according to claim 4, characterized in that: the CAN message comprises a data field, the data field in the CAN message sent by the host comprises a control word command for controlling the slave and a data area needing the slave to adjust parameters, and the data field in the CAN message sent by the slave comprises a status word command for replying the host and a data area for feeding back the current running parameters of the slave.
10. A two-for-one twister system, includes transversing drive and a plurality of converter, its characterized in that: the traversing drive and the plurality of frequency converters are connected via a CAN bus for carrying out the communication method according to any of claims 1 to 9, wherein the traversing drive serves as a first master, one of the frequency converters serves as a second master and the remaining frequency converters serve as slaves.
11. The two-for-one twister system of claim 10, wherein: one frequency converter is only used as a sub-slave of the second main machine, and the sub-slave and the second main machine perform data interaction.
12. The two-for-one twister system of claim 11, wherein: the control word command sent by the traverse driver is used for controlling the starting, stopping, turning and obstacle codes of the second host and/or the slave, the data area sent by the traverse driver is used for setting the rotating speed, frequency and torque of the second host and/or the slave, the state word sent by the second host and/or the slave is used for replying the first host, and the data area sent by the second host and/or the slave is used for feeding back the current rotating speed, frequency, output current and fault information to the first host.
13. The two-for-one twister system of claim 11, wherein: the control word sent by the second host is used for controlling the starting, stopping, turning and obstacle codes of the sub-slave, the data area sent by the second host is used for setting the speed, frequency and torque of the sub-slave, the state word command sent by the sub-slave is used for replying to the second host, and the data area sent by the sub-slave is used for feeding back the current rotating speed, frequency, output current and fault information to the second host.
14. The two-for-one twister system of claim 11, wherein: the second host and the sub-slave machines thereof drive the double-spindle synchronous motor.
CN202211072157.6A 2022-09-02 2022-09-02 Communication interaction method between motor drivers and two-for-one twister system Active CN115529205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211072157.6A CN115529205B (en) 2022-09-02 2022-09-02 Communication interaction method between motor drivers and two-for-one twister system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211072157.6A CN115529205B (en) 2022-09-02 2022-09-02 Communication interaction method between motor drivers and two-for-one twister system

Publications (2)

Publication Number Publication Date
CN115529205A true CN115529205A (en) 2022-12-27
CN115529205B CN115529205B (en) 2023-08-11

Family

ID=84696842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211072157.6A Active CN115529205B (en) 2022-09-02 2022-09-02 Communication interaction method between motor drivers and two-for-one twister system

Country Status (1)

Country Link
CN (1) CN115529205B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106451359A (en) * 2016-10-20 2017-02-22 重庆赛能软件技术有限公司 Electric generator static excitation device multi-slave redundancy protection method
CN108199941A (en) * 2017-12-29 2018-06-22 北京纳米维景科技有限公司 A kind of CAN bus communication means based on CAN2.0B
CN112532496A (en) * 2020-11-30 2021-03-19 西安爱生技术集团公司 CAN bus communication network design method for avoiding conflict
CN114371956A (en) * 2022-02-16 2022-04-19 石家庄通合电子科技股份有限公司 Fault processing method and system of host and charging pile

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106451359A (en) * 2016-10-20 2017-02-22 重庆赛能软件技术有限公司 Electric generator static excitation device multi-slave redundancy protection method
CN108199941A (en) * 2017-12-29 2018-06-22 北京纳米维景科技有限公司 A kind of CAN bus communication means based on CAN2.0B
CN112532496A (en) * 2020-11-30 2021-03-19 西安爱生技术集团公司 CAN bus communication network design method for avoiding conflict
CN114371956A (en) * 2022-02-16 2022-04-19 石家庄通合电子科技股份有限公司 Fault processing method and system of host and charging pile

Also Published As

Publication number Publication date
CN115529205B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN212163361U (en) Two main station controller communication systems
CN104008082A (en) Converter of 1553B bus remote terminal (RT) node and controller area network (CAN) bus
CN106406227A (en) Numerical control system interpolation algorithm and numerical control system
CN110622489A (en) Conversion device and control system
CN106888141A (en) A kind of efficient CAN communication means
CN103901814A (en) Multi-shaft motion numerical control system
CN108809949A (en) The method converted and dispatched between profinet, FF H1, CAN and profibus agreements
CN113051204A (en) Serial backplane bus communication method and system
US6792330B1 (en) Drive control system
CN103885393B (en) Cluster control system and its operation method
CN115529205A (en) Communication interaction method between motor drivers and two-for-one twister system
CN212064049U (en) Device for controlling ASI slave station under industrial Ethernet
EP1068708B1 (en) Communication system for a control system over ethernet and ip networks
CN101662369B (en) Universal network adapter
CN111045392B (en) Servo motion control card interface circuit based on FPGA
CN107024875A (en) A kind of motion control real-time communication method based on CAN network
CN107127811A (en) Flexible material cutting robot intelligent digital controller and implementation method
Xu et al. Profibus automation technology and its application in DP slave development
CN202093347U (en) Interface module for EtherCAT bus numerical control system
CN203224756U (en) Cluster control system
CN208255696U (en) A kind of palletizing system based on CAN communication
CN104133447A (en) Engineering machine control system and engineering machine
CN211508950U (en) Stepping motor control system
Liu et al. EtherCAT-based functional safety-integrated communication
CN214236813U (en) Welding controller and robot communication system

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