Motor rapid deployment method based on CAN bus

By managing CAN bus motors uniformly through a gateway, using a unified default CAN ID broadcast and Hall sensor to detect rotation, and dynamically assigning ordered CAN IDs, the complexity of motor CAN ID allocation and communication anomalies are solved, enabling rapid and orderly motor deployment and simplified equipment replacement.

CN121056264APending Publication Date: 2025-12-02KENGIC INTELLIGENT TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511191460.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

In the field of logistics and warehousing, the existing technology for motor CAN ID allocation is complex and highly random, which leads to significant risks of communication anomalies and makes equipment replacement inconvenient.

Method used

The gateway manages CAN bus motors uniformly, using a unified default CAN ID broadcast and Hall sensor to detect rotation, dynamically assigning ordered CAN IDs to ensure that each motor is uniquely matched.

Benefits of technology

It enables rapid and orderly allocation of motor CAN IDs, reduces operational complexity and the risk of communication anomalies, simplifies equipment replacement processes, and lowers costs and skill requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121056264A_ABST
    Figure CN121056264A_ABST
Patent Text Reader

Abstract

The invention provides a motor rapid deployment method based on a CAN bus, and belongs to the field of information data and electrical automation. The gateway and the CAN bus motor form a deployment system, and the gateway uniformly and dynamically implements CAN ID distribution of the CAN bus motor. Comprising the following steps: step (1), a gateway and a CAN bus motor are located in the same CAN communication network during deployment; the gateway broadcasts the message, and all motors enter a configuration mode; (2) for CAN bus motors with normal communication, whether motor bodies rotate or not is detected one by one in sequence; if yes, entering a CAN ID request state, sending a message to a gateway by the motor based on a default motor CAN ID, and requesting to distribute the CAN ID; (3) after receiving the request message sent by the motor, the gateway distributes a CAN ID for the first motor; step (4), turning back to the step (2) to continue execution until all CAN bus motors are distributed with CAN IDs, and turning to the following step (5); and step (5), pressing down a gateway key, and ending the configuration of the gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application proposes a system and method for rapid on-site allocation of motor CAN IDs based on CAN bus, belonging to the field of information data and electrical automation. Background Technology

[0002] Currently, CAN communication interface-based devices are used in the logistics and warehousing field, such as box conveyor systems including linear roller conveyors and curved roller conveyors. The drive motors of these devices are controlled by I / O or fieldbus, and communicate with the PLC through a gateway. The gateway has protocol conversion capabilities, converting the PLC's Ethernet protocol into I / O control signals or fieldbus protocols to control the speed and start / stop of each motor. Motors controlled via CAN bus communication offer advantages such as saving wiring harnesses, convenient inspection, easy monitoring of motor status, and easy online parameter modification, thus leading to their widespread application. Specifically, each motor is a node and requires a unique CAN ID for communication. Therefore, when deploying motors in the field, each motor must be assigned a correct CAN ID, and the CAN ID must correspond to the actual physical device to ensure normal communication and correct control.

[0003] The aforementioned domestic patent application, application number CN201811342569.0, entitled "CAN Bus Address Allocation Method and Apparatus Based on a Master-Multiple-Slave Module," describes a scheme where all CAN devices are added to the network and then automatically assigned CAN IDs. In step S2-1, the module sends contention information to the bus. Each CAN node device must have a CAN ID to send data to the bus. Devices without assigned CAN IDs use the same CAN ID when sending contention information to the bus. If multiple devices send simultaneously, communication will be abnormal, posing a potential risk. Furthermore, after all CAN IDs are assigned, the CAN ID list needs to be exported from the master device. This still requires mapping CAN IDs to actual devices, as each device's CAN ID is unordered and random, making the one-to-one mapping of actual devices to CAN IDs even more complex.

[0004] For example, a previously filed and published domestic patent, application number CN202211693381.7, entitled "Multi-machine Communication System and Method Based on Automatic ID Allocation of CAN Bus," uses the AD value of a floating pin plus the MCU's internal serial number to generate random CAN IDs. If the generated CAN IDs are identical, communication anomalies are likely to occur. The more motors there are, the higher the probability of identical CAN IDs and the greater the probability of anomalies. This solution requires multiple rounds of CAN ID contention to complete the allocation of CAN IDs for all devices, making the progress uncontrollable. Furthermore, after all device CAN IDs are allocated, the CAN ID list needs to be exported from the master device, still requiring the mapping of CAN IDs to actual devices. Because each device's CAN ID is random, this one-to-one mapping becomes even more complex. Moreover, the random CAN IDs also cause inconvenience if devices are replaced later. In view of the above, this patent application is hereby filed. Summary of the Invention

[0005] The CAN bus-based rapid motor deployment method described in this application aims to solve the problems existing in the prior art by constructing a deployment system consisting of a gateway and CAN bus motors. The gateway can uniformly and dynamically implement the CAN ID allocation of the CAN bus motors, and achieve the purpose of parsing PLC control commands after successful deployment to control the start, stop and speed parameters of all motors.

[0006] To achieve the above design objectives, the CAN bus-based rapid motor deployment method described in this application comprises a deployment system consisting of a gateway and an array of parallel CAN bus motors, and includes the following implementation steps: Step (1): During deployment, the gateway and the array of CAN bus motors are in the same CAN communication network. The gateway uses the default gateway CAN ID, and all CAN bus motors use the same default CAN ID. Press the gateway button, and the gateway broadcasts a message. After receiving the message, all CAN bus motors enter the configuration mode. The LED indicator on the motor flashes at a specific frequency to indicate that all CAN bus motors have entered the configuration mode. At the same time, this is used to check whether the communication of all CAN bus motors is normal. Step (2): For CAN bus motors with normal communication, Hall sensors will detect whether the motor body is rotating one by one. If so, it will enter the CAN ID request state. The motor will send a message to the gateway based on the default motor CAN ID to request the allocation of a CAN ID. At this time, other motors do not send messages, so there is no situation where devices with the same CAN ID send messages at the same time, causing CAN communication abnormality. Step (3): After the gateway receives the request message sent by the motor, it assigns a message with CAN ID=1 to the first motor. At the same time, the gateway increments the number of motors by 1 and the CAN ID list by 1. After the first motor receives the message, it parses the assigned CAN ID as 1 and saves it. The motor rotates for a few seconds to indicate that the motor has been assigned. Other motors that do not request CAN ID status do not respond to this message. Step (4): Return to step (2) and continue until all CAN bus motors have been assigned CAN IDs, then proceed to step (5) below. Step (5): Press the gateway button to end the gateway configuration; the gateway has automatically calculated the number of motors N, and the CAN ID list is from 1 to N; then the CAN IDs assigned to the first motor to the Nth motor are also from 1 to N, thus completing the CAN ID distribution and the one-to-one allocation of each CAN ID to the same number of actual motors.

[0007] Furthermore, the deployment system executing the deployment method has a gateway with the Profinet communication protocol for CAN communication control. The gateway communicates with the PLC and with the CAN motors. After successfully assigning a CANID to each group of CAN bus motors, the gateway parses the PLC control commands to control the start / stop and speed parameters of all CAN bus motors. The gateway includes an Ethernet interface, through which it communicates with the PLC. The Ethernet interface supports ProfiNet and EtherCAT communication protocols. The gateway MCU has an Ethernet interface and a CAN interface, and supports EtherCAT, ProfiNet, and Ethernet / IP communication protocols by burning different firmware. The gateway CA... The N interface is used to establish a transceiver connection with the CAN bus motor; a gateway button; a gateway LED indicator, which defaults to normal communication mode after the gateway starts, flashes a breathing light in configuration mode, and flashes rapidly several times when switching between entering and exiting configuration mode; the CAN bus motor includes a motor CAN interface for establishing a transceiver connection with the gateway; a motor LED, which flashes for several seconds in normal communication mode and flashes a breathing light in configuration mode; a motor MCU with a built-in sensor-based FOC motor control program; a Hall sensor for identifying the position information of the motor winding phase and converting this position information into an electrical signal; a motor body, which adopts a brushless DC motor (BLDC); and a current sensor for real-time current detection for overcurrent protection.

[0008] Furthermore, the gateway MCU, after the MCU program is powered on, defaults to normal communication mode. First, it loads the CAN ID list and the number of motors from the storage area. Then, the LED flashes at a frequency of at least 1 second, converting the PLC's ProFiNet, EtherCAT, and Ethernet / IP communication protocols into CAN communication messages to control the motor's speed, direction, and start / stop. Subsequently, the gateway parses the CAN bus motor response messages and sends the motor status, such as online status and fault information, to the PLC. After the gateway MCU detects that a button has been pressed and held for several seconds, it enters configuration mode. First, it periodically sends start configuration messages to the CAN bus and receives CAN ID request messages from the CAN bus motors. Then, it sends CAN ID allocation messages and counts the number of CAN bus motors, accumulating and updating the CAN ID list. When the MCU02 detects that a button has been pressed and held for several seconds, it saves the CAN ID list and the number of CAN bus motors, exits configuration mode, and enters normal communication mode.

[0009] Furthermore, the motor MCU, after power-on, defaults to normal communication mode. First, it reads the CAN ID from the storage area, responds to the gateway's control message, and sends a message to the bus. Then, when it receives the gateway's "Enter Configuration Mode" message, the motor MCU enters configuration mode, stops the motor rotation, and the motor's LED breathing light flashes. When the Hall sensor detects motor rotation, it sends a "Request CAN ID" message to the bus, the LED flashes rapidly several times, waiting for the gateway's configuration message. Subsequently, after receiving the gateway's "Assign CAN ID" message, it parses the CAN ID and saves it to the storage area, the LED flashes rapidly several times, controls the motor to rotate for a few seconds, indicating that the motor has been assigned an ID. Finally, the motor MCU receives the gateway's "Exit Configuration Mode" command to exit the CAN ID process.

[0010] Furthermore, the motor MCU obtains the rotor position information by reading the output level signal of the Hall element; the logic switch completes the correct commutation according to the rotor position information of the motor, and supplies current to the corresponding winding of the motor to form an air gap rotating magnetic field so that the motor runs continuously.

[0011] As described above, the CAN bus-based rapid motor deployment method has the following advantages: 1. This application proposes a method for rapid deployment of motors based on CAN bus, and innovatively proposes to quickly assign CAN IDs on site to ensure that the CAN ID corresponds to the motor, which can effectively solve the technical hidden danger of potential communication anomalies caused by the same CAN ID;

[0012] 2. The deployment method proposed in this application can ensure that the process of allocating CAN ID is implemented and completed synchronously with the process corresponding to the actual motor equipment. This not only significantly saves working time, but also ensures that the CAN ID is ordered, thus significantly reducing the complexity of the corresponding process. The ordered CAN ID also facilitates later maintenance and replacement. 3. This application requires no additional hardware configuration, which can effectively reduce costs and does not occupy the MCU pin resources of the motor; 4. The configuration process implemented in this application only requires one engineer to monitor on-site, and there is no need to configure host computer software or perform corresponding PLC debugging work, which reduces the workload and lowers the skill requirements of personnel. Attached Figure Description

[0013] The present application will now be further illustrated with reference to the following figures.

[0014] Figure 1 This is a system schematic diagram for implementing the CAN bus-based rapid motor deployment method described in this application; Figure 2 This is a flowchart of a rapid motor deployment method based on CAN bus implemented with manual assistance; Figure 3 This is a flowchart of an automated deployment method without human assistance; Detailed Implementation

[0015] Example 1, such as Figure 1 As shown, the CAN bus-based rapid motor deployment method is implemented based on the following deployment system, which consists of a gateway acting as the master and an array of CAN bus motors connected in parallel as slaves.

[0016] The gateway uses the Prifinet communication protocol for CAN communication control, communicating with the PLC above and with the CAN motor below. After the gateway successfully assigns a CAN ID to each group of CAN bus motors, the gateway parses the PLC control commands to control the start, stop and speed parameters of all CAN bus motors. Gateway 00 includes the following components: Ethernet interface 01, the gateway 00 communicates with the PLC through Ethernet interface 01, Ethernet interface 01 supports ProfiNet and EtherCAT communication protocols. The gateway MCU02, with a main frequency of up to 400MHz, features three Ethernet interfaces and two CAN interfaces. It supports EtherCAT, ProFiNet, and Ethernet / IP communication protocols through different firmware programming. After the MCU program is powered on, it defaults to normal communication mode. First, it loads the CAN ID list and the number of motors from the storage area. Then, the LED blinks at a frequency of 1 second to convert the PLC's ProFiNet, EtherCAT, and Ethernet / IP communication protocols into CAN communication messages to control the motor's speed, direction, start, and stop. Subsequently, the gateway parses the CAN bus motor response messages and sends the motor's status, such as online status and fault information, to the PLC. After MCU02 detects that button 04 has been pressed and held for 3 seconds, it enters configuration mode. First, it periodically sends start configuration messages to the CAN bus and receives CAN ID request messages from CAN bus motors. Then, it sends CAN ID allocation messages and counts the number of CAN bus motors, and updates the CAN ID list. When MCU02 detects that button 04 has been pressed and held for 10 seconds, it saves the CAN ID list and the number of CAN bus motors, exits configuration mode, and enters normal communication mode. The gateway CAN interface 03 is used to establish a transceiver with the CAN bus motor, and can communicate at a data rate of up to 2 Mbit / s. Gateway button 04, when pressed and held for 3 seconds, enters CAN ID configuration mode; press and hold again for 3 seconds to exit configuration mode without saving the currently configured information; after being pressed and held for 10 seconds, the configuration is completed, and the number of drivers and the list of driver CAN IDs are saved to the gateway's storage area. Gateway LED indicator 05: After the gateway starts up, it defaults to normal communication status and the LED blinks at a frequency of 1 second. In configuration mode, it blinks as a breathing light. When switching between entering and exiting configuration mode, the LED blinks 4 times rapidly. Each CAN bus motor 10 includes the following components: The motor CAN interface 11 is used to establish an information transceiver with the gateway, and can communicate at a data rate of up to 2 Mbit / s. The motor LED12 blinks at a frequency of 1 second in normal communication mode; in configuration mode, it blinks as a breathing light. When the Hall sensor detects that the motor is rotating, it blinks 4 times quickly, and when it receives a gateway allocation message, it blinks 4 times quickly.

[0017] The MCU13 motor controller has a main frequency of up to 72MHz and a built-in sensor-based FOC motor control program; including... After the motor MCU13 powers on, it defaults to normal communication mode. First, it reads the CAN ID from the storage area, responds to the gateway's control messages (such as controlling the motor's speed, direction, start / stop, etc.), and sends messages to the bus containing the motor's status. Then, when it receives the gateway's "Enter Configuration Mode" message, the motor MCU13 enters configuration mode, stops the motor from rotating, and the motor's LED12 flashes. When the Hall sensor 14 detects the motor's rotation, it sends a "Request CAN ID" message to the bus, and the LED flashes four times rapidly, waiting for the gateway's configuration message. Subsequently, after receiving the gateway's "Assign CAN ID" message, it parses the CAN ID and saves it to the storage area, the LED flashes four times rapidly, and the motor rotates for 2 seconds to indicate that the assignment for this motor has been completed. Finally, the motor MCU13 receives the gateway's "Exit Configuration Mode" command to exit the CAN ID process. Hall sensor 14 is used to identify the position information of the motor winding phase and convert the position information into an electrical signal; motor MCU 13 obtains the rotor position information by reading the output level signal of the Hall element; the logic switch completes the correct commutation according to the rotor position information of the motor, and supplies current to the corresponding winding of the motor to form an air gap rotating magnetic field so that the motor runs continuously. The motor body 15 adopts a brushless DC motor (BLDC). The current sensor 16 is used to detect the current magnitude in real time for overcurrent protection; specifically, the current sensor 16 distinguishes different states of the motor, such as no-load, on-load, and stall, by detecting the current value and sudden change value.

[0018] Based on the above deployment system, the rapid deployment method for motors based on the CAN bus includes the following steps: Step (1): During project deployment, the gateway and the array of CAN bus motors are in the same CAN communication network. The gateway uses the default gateway CAN ID, and all CAN bus motors use the same default CAN ID. Press the gateway button, and the gateway broadcasts a message. After receiving the message, all CAN bus motors enter the configuration mode. The LED indicator on the motor flashes at a specific frequency to indicate that all CAN bus motors have entered the configuration mode. At the same time, this is used to check whether the communication of all CAN bus motors is normal. Step (2): For CAN bus motors with normal communication, Hall sensors will detect whether the motor body 15 is rotating one by one; if so, it will enter the CAN ID request state. The motor sends a message to the gateway based on the default motor CAN ID to request the allocation of a CAN ID. At this time, other motors do not send messages, so there is no situation where devices with the same CAN ID send messages at the same time, causing CAN communication abnormality. Step (3): After the gateway receives the request message sent by the motor, it assigns a message with CAN ID=1 to the first motor. At the same time, the gateway increments the number of motors by 1 and the CAN ID list by 1. After the first motor receives the message, it parses the assigned CAN ID as 1 and saves it. The motor rotates for a few seconds to indicate that the motor has been assigned. Other motors that do not request CAN ID status do not respond to this message. Step (4): Return to step (2) and continue until all CAN bus motors have been assigned CAN IDs, then proceed to step (5) below. Step (5): Press the gateway button to end the gateway configuration; the gateway has automatically calculated the number of motors N, and the CAN ID list is from 1 to N; then the CAN IDs assigned to the first motor to the Nth motor are also from 1 to N, thus completing the CAN ID distribution and the one-to-one allocation of each CAN ID to the same number of actual motors.

[0019] like Figure 2 As shown, the semi-automated CAN bus-based rapid motor deployment method implemented with manual assistance includes the following execution flow: (1) Press and hold the gateway button for 3 seconds to enter the “configuration mode”. The LED flashes in a breathing light state and periodically sends a “start configuration mode” message to the CAN bus (once every 2 seconds). The message CANID=0x101, starts listening to messages on the CAN bus, waits for the “request CAN ID” message sent by the motor, initializes the CAN ID list, and starts counting the number of motors; (2) The motor (MCU) constantly monitors the CAN bus. Upon receiving the "Start Configuration Mode" message, it enters "Configuration Mode". The LED flashes in a breathing light mode, reads Hall sensor data, and detects the motor status. If the "Start Configuration Mode" message is not received for more than 5 seconds via an internal timer, it considers itself offline, exits configuration mode, and the LED resumes flashing at a frequency of 1 second (this timeout mechanism can be used to test whether the communication is normal). If the "Start Configuration Mode" message is received every two seconds, it considers itself not offline and maintains configuration mode. In configuration mode, it only responds to the "Start Configuration Mode" message and the "Exit Configuration Mode" message.

[0020] (3) The staff will rotate the first motor according to the designed sequence. The Hall sensor detects that the motor body is rotated and enters the "Request CANID" state. The LED flashes quickly 4 times and then returns to the breathing light state. The "Request CANID" message is sent to the bus. The message CANID = 0x100. Then, it waits for the gateway's "Assign CAN ID" message. (4) When the gateway receives the “Request CANID” message, the LED flashes 4 times to indicate that the message has been received. The CANID list is queried. CANIDs are assigned starting from 1. The CAN ID of the first motor is 0x01. The gateway sends a “Assign CANID” message to the bus. The gateway counts the number of motors and increments the count by 1. Then it waits for the next “Request CANID” message.

[0021] (5) The first motor is in the "Request CANID" state and responds to the "Assign CAN ID" message. Other motors do not respond. The "Assign CAN ID" message is parsed to obtain the CAN ID, which is saved to the storage area. The LED flashes 4 times quickly, and the motor rotates continuously for 2 seconds as feedback that the CAN ID has been assigned. The on-site staff can then know that the motor has completed the CAN ID configuration. The first motor enters the "Configuration Mode".

[0022] (6) The staff then proceeds to the next motor in sequence, rotating it according to the same steps, waiting for the LED to flash 4 times, and the motor to continue rotating for 2 seconds. Repeat steps (3), (4), and (5) to complete the configuration of N motors. In accordance with the designed sequence, there are a total of N motors, with CAN IDs ranging from 1 to N. This achieves the allocation of CAN IDs and quickly and conveniently completes the correspondence between CAN IDs and actual physical devices.

[0023] (7) Press and hold the gateway button for 10 seconds. The gateway LED will flash 4 times quickly. The CAN ID list and the number of motors will be saved to the storage area. The LED flashing frequency is 1 second. The "Start Configuration Mode" message will be sent periodically. The gateway will send the "Exit Configuration Mode" message and enter the "Normal Communication Mode".

[0024] (8) All motors receive the “Exit Configuration Mode” message, exit “Configuration Mode”, and enter normal communication mode.

[0025] like Figure 3 As shown, the rapid deployment method for motor automation based on CAN bus includes the following execution flow: (1) Press and hold the gateway button for 3 seconds to enter the “configuration mode”. The LED flashes in a breathing light state and periodically sends a “start configuration mode” message to the CAN bus (once every 2 seconds). The message CANID=0x101, starts listening to messages on the CAN bus, waits for the “request CAN ID” message sent by the motor, initializes the CAN ID list, and starts counting the number of motors; (2) The motor (MCU) constantly monitors the CAN bus. Upon receiving the "Start Configuration Mode" message, it enters "Configuration Mode". The LED flashes in a breathing light mode, and the motor rotates at the lowest speed. The MCU detects that the motor is rotating stably at a low speed, the no-load current is stable, and it constantly detects sudden current changes, such as a sudden increase in current from no-load to on-load. If it does not receive the "Start Configuration Mode" message for more than 5 seconds through its internal timer, it considers itself offline, exits configuration mode, and the LED resumes flashing at a frequency of 1 second (this timeout mechanism can be used to test whether the communication is normal). If it receives the "Start Configuration Mode" message once every two seconds, it considers itself not offline and maintains configuration mode; in configuration mode, it only responds to the "Start Configuration Mode" message and the "Exit Configuration Mode" message.

[0026] (3) A load of a certain weight is placed on the conveyor line. The load will slowly pass through each motor in sequence. Each motor will detect a sudden change in current in sequence, that is, from no load to load. The motors will enter the "Request CANID" state in the order in which the packages pass through. The LED will flash 4 times quickly and then return to the breathing light state. The "Request CANID" message will be sent to the bus. The message CANID=0x100. The motor will wait for the "Assign CAN ID" message from the gateway. The motor will stop rotating and the package will stop on the current motor. (4) When the gateway receives the “Request CANID” message, the LED flashes 4 times to indicate that the message has been received. The CANID list is queried. CANIDs are assigned starting from 1. The CAN ID of the first motor is 0x01. The gateway sends a “Assign CANID” message to the bus. The gateway counts the number of motors and increments the count by 1. Then it waits for the next “Request CANID” message.

[0027] (5) The first motor is in the "Request CANID" state and responds to the "Assign CAN ID" message. Other motors do not respond. The "Assign CAN ID" message is parsed to obtain the CAN ID, which is saved to the storage area. The LED flashes 4 times quickly, and the motor stops rotating after 5 seconds. The load is then transferred to the next motor position as feedback that the CAN ID has been assigned. On-site personnel can then know that the motor has completed the CAN ID configuration. The first motor enters the "Configuration Mode".

[0028] (6) After the first motor is assigned a CANID, the load is moved to the next motor. The same steps (3), (4), and (5) are repeated to complete the configuration of N motors. In accordance with the design order, there are a total of N motors, and the CAN ID list is 1~N. The CAN ID assignment is realized, and the correspondence between CAN ID and actual physical device is completed quickly and conveniently.

[0029] (7) Press and hold the gateway button for 10 seconds. The gateway LED will flash 4 times quickly. The CAN ID list and the number of motors will be saved to the storage area. The LED flashing frequency is 1 second. The "Start Configuration Mode" message will be sent periodically. The gateway will send the "Exit Configuration Mode" message and enter the "Normal Communication Mode".

[0030] (8) All motors receive the “Exit Configuration Mode” message, exit “Configuration Mode”, and enter normal communication mode.

[0031] As described above, the embodiments given in conjunction with the accompanying drawings are merely preferred solutions for achieving the objectives of this invention. Those skilled in the art can draw inspiration from this and directly derive other alternative structures that conform to the design concept of this invention. Other structural features derived therefrom should also fall within the scope of the solutions described in this invention.

Claims

1. A method for rapid deployment of motors based on CAN bus, characterized in that: The deployment system, consisting of a gateway and an array of parallel CAN bus motors, includes the following implementation steps: Step (1): During deployment, the gateway and the array of CAN bus motors are in the same CAN communication network. The gateway uses the default gateway CAN ID, and all CAN bus motors use the same default CAN ID. Press the gateway button, and the gateway broadcasts a message. After receiving the message, all CAN bus motors enter the configuration mode. The LED indicator on the motor flashes at a specific frequency to indicate that all CAN bus motors have entered the configuration mode. At the same time, this is used to check whether the communication of all CAN bus motors is normal. Step (2): For CAN bus motors with normal communication, Hall sensors will detect whether the motor body is rotating one by one. If so, it will enter the CAN ID request state. The motor will send a message to the gateway based on the default motor CAN ID to request the allocation of a CAN ID. At this time, other motors do not send messages, so there is no situation where devices with the same CAN ID send messages at the same time, causing CAN communication abnormality. Step (3): After the gateway receives the request message sent by the motor, it assigns a message with CAN ID=1 to the first motor. At the same time, the gateway increments the number of motors by 1 and the CAN ID list by 1. After the first motor receives the message, it parses and saves the assigned CAN ID as 1, and the motor rotates for a few seconds to indicate that the motor has been assigned. Other motors that have not requested CAN ID status will not respond to this message; Step (4): Return to step (2) and continue until all CAN bus motors have been assigned CAN IDs, then proceed to step (5) below. Step (5): Press the gateway button to end the gateway configuration; the gateway has automatically calculated the number of motors N, and the CAN ID list is from 1 to N; then the CAN IDs assigned to the first motor to the Nth motor are also from 1 to N, thus completing the CAN ID distribution and the one-to-one allocation of each CAN ID to the same number of actual motors.

2. The method for rapid deployment of motors based on CAN bus according to claim 1, characterized in that: The deployment system that executes the deployment method has a gateway with the Prifinet communication protocol for CAN communication control. The gateway communicates with the PLC and with the CAN motors. After the gateway successfully assigns a CAN ID to each group of CAN bus motors, it parses the PLC control commands to control the start, stop and speed parameters of all CAN bus motors. The gateway includes, Ethernet interface: The gateway communicates with the PLC via the Ethernet interface, which supports ProfiNet and EtherCAT communication protocols. The gateway MCU has an Ethernet interface and a CAN interface, and supports EtherCAT, ProfiNet, and Ethernet / IP communication protocols by burning different firmware. The gateway CAN interface is used to establish a transceiver connection with the CAN bus motor. Gateway button; The gateway LED indicator light is in normal communication mode by default after the gateway is started. In configuration mode, the light flashes and enters configuration mode and exits configuration mode. The LED flashes rapidly several times when switching between configuration mode and configuration mode. The CAN bus motor includes, The motor's CAN interface is used to establish a transceiver connection with the gateway. The motor LED blinks for a few seconds in normal communication mode; in configuration mode, it blinks as a breathing light. Motor MCU with built-in sensor-based FOC motor control program; Hall effect sensors are used to identify the position information of the motor winding phase and convert that position information into an electrical signal. The motor body adopts a brushless DC motor (BLDC). A current sensor is used to detect the magnitude of current in real time for overcurrent protection.

3. The method for rapid deployment of motors based on CAN bus according to claim 2, characterized in that: The gateway MCU, after the MCU program is powered on, defaults to normal communication mode. First, it loads the CAN ID list and the number of motors from the storage area. Then, the LED blinking frequency is at least 1 second to convert the PLC's ProFiNet, EtherCAT, and Ethernet / IP communication protocols into CAN communication messages to control the speed, direction, start and stop of the motors. Subsequently, the gateway parses the CAN bus motor response message and sends the motor status, such as online status and fault information, to the PLC. After the gateway MCU detects that the button has been pressed and held for several seconds, it enters the configuration mode. First, it periodically sends start configuration messages to the CAN bus and receives CAN ID request messages from the CAN bus motors. Then, it sends CAN ID allocation messages, counts the number of CAN bus motors, and updates the CAN ID list. When MCU02 detects that the button has been pressed and held for several seconds, it saves the CANID list and the number of CAN bus motors, and exits the configuration mode to enter the normal communication mode.

4. The method for rapid deployment of motors based on CAN bus according to claim 2, characterized in that: The motor MCU, after being powered on, defaults to normal communication mode; first, it reads the CAN ID from the storage area, responds to the control message from the gateway, and sends a message to the bus. Then, when the gateway receives the "Enter Configuration Mode" message, the motor MCU enters configuration mode, stops the motor from rotating, and the motor's LED breathing light flashes. When the Hall sensor detects the motor rotating, it sends a "Request CAN ID" message to the bus, causing the LED to flash rapidly several times while waiting for the gateway's configuration message. Subsequently, upon receiving the gateway's "Assign CAN ID" message, it parses the CAN ID and saves it to the storage area, causing the LED to flash rapidly several times and controlling the motor to rotate for a few seconds, indicating that the motor has been assigned an ID. Finally, the motor MCU receives the gateway's "Exit Configuration Mode" command to exit the CAN ID process.

5. The method for rapid deployment of motors based on CAN bus according to claim 2, characterized in that: The motor MCU obtains the rotor position information by reading the output level signal of the Hall element; the logic switch completes the correct commutation according to the rotor position information of the motor, and supplies current to the corresponding winding of the motor to form an air gap rotating magnetic field so that the motor runs continuously.

Citation Information

Patent Citations

  • Multi-machine communication system and method for automatic ID distribution based on CAN bus

    CN116800719A

  • Automatic configuration method for CAN bus slave node identifiers in automatic testing device

    CN104320320A

  • 5G-based integrated BCM vehicle body control system and an automobile

    CN109905465A

  • CAN bus address allocation method and device based on one-master multi-slave module

    CN111182086A

  • Controller backboard communication method and system based on CAN

    CN119472386A