Bus communication protocol

Application case of NiMotion integrated motor in PLC---TCP to CAN communication
Release Date : 2019-03-08 14:08:38

NiMotion integrated closed-loop stepper motor combines the technical advantages of stepper motor and servo motor. It operates quieter and less vibration than standard stepper motor. At the same time, it integrates 14-bit high-resolution encoder to realize closed-loop control of position feedback. ,

Without losing step, it maintains a stable position after positioning, no oscillation, and automatically adjusts the current output according to the load to reduce the temperature rise. It can replace the traditional stepping motor when it meets the requirements of energy saving and high load bearing. At the same time


The closed-loop stepper motor integrates I/O functions to facilitate user-expanded functions and simplify system complexity.



Traditional stepper motor application


Disadvantages of traditional stepper motor applications:

• 1. Low integration, large space, troublesome wiring, troublesome installation, and high cost;

• 2. Open loop control accuracy is usually low, no automatic corrective ability;

• 3. High failure rate and high maintenance cost;

• 4. Internal I/O is not integrated, requiring users to increase hardware expansion and increase user costs;

• 5. It is necessary to find zero point every time it is turned on, and it does not support power-down maintenance;

• 6. Self-diagnosis cannot be performed.

In response to the above problems in the application of stepper motors, NiMotion has introduced an integrated stepper motor with CAN bus function, covering 42 series 57 series and 86 series, which can be controlled by PLC with CAN bus module.

NiMotion's integrated motor. Considering that the CANopen bus special module is relatively expensive, NiMotion introduces an Ethernet to CAN communication protocol converter that can replace the CANopen module, and only the user PLC has its own Ethernet port.

Can realize CAN bus control of integrated stepping motor. The perfect replacement of the CANopen bus special module reduces the user's use cost and greatly simplifies the engineering design and engineering implementation.

 

 

NiMotion integrated closed-loop stepper motor application


Main features of NiMotion integrated stepper motor:

• 1. Rich motion control instructions: MOVE instruction, GOTO instruction, GOHOME instruction, forward and reverse instructions, etc.
 
• 2. Position mode, OPR mode and speed mode are available for the user to select;
 
• 3. Closed-loop control: adjust the output according to position feedback to achieve precise positioning and PID correction system response, perform adjustment control
 
• 4. CANOPEN and Modbus bus connection, distributed control;
 
• 5. Internal I/O for easy local control signal feedback control;
 
• 6. Integrated stepper motor driver;
 
• 7. Rich alarm function;
 
• 8. Unique and efficient method of origin return setting;
 
• 9. Online upgrade program.


This example NiMotion integrated closed-loop stepper motor TCP/IP communication example introduces engineering hardware connection, instance message, Ethernet to CAN communication converter, summary. Focus on PLC TCP/IP communication extension


The interface sends 4 messages to the Ethernet to CAN communication protocol converter to convert the TCP/IP message into CANopen message, and the converter sends the converted 4 CANopen messages to the integrated closed-loop motor to realize the integrated closed loop step. The motor enters the 10step position accurately in position mode. It makes it easier for users to understand the motion control of Ethernet to CAN communication protocol converter and NiMotion integrated closed-loop stepper motor.


In this example, the integrated stepping motor of NiMotion STM42 series, STM57 series and STM86 series is applied. The PLC adopts the power generation (LS) PLC model as XGB as the TCP/IP server. TCP/IP to CAN communication using Ethernet to CAN communication protocol converter. The NiMotion integrated motor acts as a CANopen client. CANopen is an application layer protocol for a network transmission system based on CAN serial bus, following the ISO/OSI standard model.


2. Hardware connection

Hardware catalog:


• 1. Integrated closed-loop stepper motor: STM5776A-CAN-1FH-A
 
• 2. Ethernet to CAN communication protocol converter: SCM-ETHCAT
 
• 3.LS XGB PLC TCP/IP communication interface
 
• 4. Several power cords
 
• 5. Integrated closed-loop stepper motor CAN communication line
 
• 6. 1 connection terminal
 
• 7. One cable

 

 

3. Integrated closed-loop stepper motor CAN bus communication parameter setting 
 


• 1. Integrated closed-loop stepper motor CAN communication parameter setting motor address: 01, baud rate: 1Mbps;

• 2. Motor address setting range: 1-127;
Note: If you need to change the integrated closed-loop stepper motor address, baud rate and other parameters, please refer to the "Integrated Closed-Loop Stepper Motor CAN Bus User Manual"


3.1 Example Message

In this example, the integrated closed-loop stepping motor is operated by 10 steps from the current position by transmitting 4 messages in the position mode.
Send a motion command message as follows:



Ethernet to CAN communication protocol converter


4.SCM-ETHCAT Introduction

SCM-ETHCAT is an industrial grade Ethernet CAN bus data conversion device developed by Beijing Limax Control Technology Co., Ltd. It integrates two CAN bus interfaces and one EtherNet interface and TCP/IP protocol stack. Users can use it. The interconnection between the CAN bus network and the EtherNet network can be easily completed, and the CAN bus network range can be further expanded.    


SCM-ETHCAT is an industrial grade product that can operate over a temperature range of -25 ° C to 75 ° C. It has 10M/100M adaptive Ethernet interface, CAN port communication maximum baud rate 1Mbps, TCPSever, TCP Client, UDP and other working modes, each CAN interface supports 2 TCP connections or up to 3x254 UDP connections. The configuration software allows users to flexibly set configuration parameters.



SCM-ETHCAT typical application diagram



4.1SCM-ETHCAT communication interface settings

• 1. Electrical interface: standard Ethernet
 
• 2. Communication method: TCP/IP server
 
• 3. Default server IP address: 192168.250.120
 
• 4. Default server number: 4001


4.2 SCM-ETHCAT Data Conversion Protocol 

An Ethernet packet contains 1 to 50 CAN frames, and a CAN frame has 13 bytes. The data description of a CAN frame is shown below.




Frame information (0th byte)


• 1. Frame ID (1st byte to 4th byte)
       
  The length is 4 bytes and the high byte is first. The standard frame 11 bits are valid, and the extended frame 29 bits are valid.


• 2. Frame data (5th byte ~ 12th byte)
     
   The length is 8 bytes, and the effective length is determined by the frame information (Bit0~3 of the frame information). When the effective length is less than 8, all subsequent bytes are ignored.



4.3 frame data example

Example of integrated closed-loop stepper motor MOVE instruction frame data:
 
       The MOVE command is moved from the current position to the opposite target position. When the control word Bit6 is set to 1, and bit4 generates a trigger of 0->1, it will be executed.
For example, if the node ID is 1, the complete frame message (TCP packet) is:


• 08 00 00 04 01 06 00 00 00 00 00 00 00 State machine conversion ready to power on
• 08 00 00 06 01 02 01 00 00 01 00 00 00 Operating mode switches to position mode
• 08 00 00 04 01 07 00 00 00 00 00 00 00 The state machine is switched to power-on and the motor is locked.
• 08 00 00 04 01 4F 00 00 00 00 00 00 00 State machine is converted to run command


Send motion command (CAN message):

1 0x400 + node ID 06 00 00 00 00 00 00 00 State machine conversion ready to power on
2 0x600 + node ID 02 01 00 00 01 00 00 00 Operation mode switches to position mode
3 0x400 + node ID 07 00 00 00 00 00 00 00 The state machine is switched to power-on and the motor is locked.
4 0x400 + node ID 4F 00 00 00 00 00 00 00 state machine converted to run command




Message conversion diagram


5. Summary
 

According to the above example, the NiMotion integrated stepping motor has high integration degree, which can greatly reduce wiring and easy installation compared with the conventional motion scheme, and can fully save the installation space, prevent burnout and other damage protection measures, and is particularly suitable for replacing multiple Motor equipment use, integrated IO and synchronization functions, CANopen and Modbus bus connections, distributed control. It is convenient for users to monitor the production process, collect data and analyze data to form a highly flexible, personalized and networked production chain. To meet the development needs of Industry 4.0, Industrial Internet, Internet of Things, and cloud computing, it provides a solution to replace the traditional stepping motor for the intelligent manufacturing of users while saving user costs. At the same time, SCM-ETHCAT, launched by Beijing Limaisheng Control Technology Co., Ltd., provides a flexible solution for Ethernet to CAN communication protocol. It no longer requires users to order expensive CAN bus communication modules, and only requires user support. TCP protocol can realize TCP/IP to CAN communication protocol, not only limited to PLC, CAN device host computer can also be TCP/IP touch screen, notebook, industrial computer, single chip and so on.



XML 地图 | Sitemap 地图