当前位置:网站首页>Based on am335x development board arm cortex-a8 -- acontis EtherCAT master station development case
Based on am335x development board arm cortex-a8 -- acontis EtherCAT master station development case
2022-06-28 02:19:00 【Tronlong】
front said
This document mainly describes TL335x-EVM-S The evaluation board is based on Germany Acontis company EtherCAT The method of master station protocol stack controlling servo motor , The content includes EC-Master、EC-Engineer brief introduction 、EtherCAT Master station development case test 、EtherCAT Master station development case compilation 、EC-Engineer To configure ENI Document method, etc .
This document is applicable to the development environment :
Windows development environment :Windows 7 64bit、Windows 10 64bit
Kernel:Linux-RT-4.9.65
Acontis EtherCAT Master station protocol stack development kit :EC-Master-V2.9-Linux_armv6-vfp-eabihf-Eval.tar.zip
Acontis EtherCAT Network information configuration tool :EC-Engineer
Servo drive :SANYO RS2A03A0KA4W00
Servo motor :SANYO R2AA08075FXH00W
because EtherCAT The master station protocol stack requires high real-time performance of the system , Therefore use Linux-RT Real time kernel for testing .
Chuang long technology TL335x-EVM-S It's based on TI Sitara series AM3352/AM3354/AM3359 ARM Cortex-A8 Evaluation board for high performance and low power processor design .

Evaluation board interface resources are rich , Lead out dual Gigabit network port 、LCD、HDMI、GPMC、CAN Such as the interface , It is convenient for users to quickly carry out product scheme evaluation and technology pre research , Application in communication management 、 Data collection 、 human-computer interaction 、 Motion control 、 Typical fields such as intelligent power .
EC-Master、EC-Engineer brief introduction

chart 1 EtherCAT System architecture
EtherCAT( Ethernet control automation technology ) It's an open architecture , Fieldbus System Based on Ethernet , Its name is CAT To control automation technology (Control Automation Technology) An abbreviation for the initials .EtherCAT It's deterministic Industrial Ethernet . Automation generally requires a shorter data update time for communication ( Or cycle time )、 The communication jitter during data synchronization is low , And the cost of hardware is lower ,EtherCAT The purpose of development is to make Ethernet can be used in automation applications .
Germany Acontis The company is EtherCAT Senior member of the technical association ,Acontis around EtherCAT Developed by agreement EtherCAT Master protocol stack EC-Master、EtherCAT Network information configuration tool EC-Engineer and Windows OS real time extension core EC-Win And other products have been used in many internationally renowned robots ( Such as KUKA) And the products of automation companies , The reliability and performance of its products are recognized and respected by the industry .
The following for EC-Master and EC-Engineer brief introduction . For more introductory information , Accessible Acontis Official website of China general agent Beijing Mengtong Technology Co., Ltd :www.motrotech.com, Or check out Acontis EtherCAT Master station protocol stack development kit Doc In the catalog EC-Master_ClassB.pdf file .
EC-Master brief introduction
Acontis EtherCAT Master protocol stack EC-Master contain :
- EtherCAT-Master-Core:EtherCAT The main functions of the master station are Core Layer . All protocol processing is also performed here , Such as process data transfer and mailbox protocol (CoE,EoE,FoE,SoE,AoE).
- EtherCAT-Link-Layer: Data exchange between master and slave stations , Zero copy (Zero Copy) And polling (Polling) Technology and Core Layers are used together , Achieve the best real-time performance and minimize CPU load .
- OS layer : Operating system calls are encapsulated in OS layer . In order to achieve the best performance , Most functions are simple to use C Language macro writing .

chart 2 EC-Master frame
EC-Engineer brief introduction
EtherCAT Network information configuration tool EC-Engineer By Acontis Developed a powerful tool for EtherCAT Software tools for network configuration and diagnosis , It can help users handle engineering and diagnostic tasks quickly and comfortably . The clear and intuitive user interface ensures that users can EtherCAT Get a smooth experience in network diagnosis and configuration .

chart 3

chart 4
EtherCAT Master station development case test
Please connect the servo driver through the network cable CN0 EtherCAT(IN) The Internet port is connected to the evaluation board RGMII1 ETH Gigabit Internet port (ETH0). If needed RGMII2 ETH so (ETH1) To control the motor , Please connect the servo driver through the network cable CN0 EtherCAT(IN) The Internet port is connected to the evaluation board RGMII2 ETH Gigabit Internet port . And connect the servo motor , The hardware connections are as follows .

chart 5
Put the product information “4- Software data \Demo\tl_EcMasterDemoDCmotor\bin\” In the catalog eni_SANYO_motor.xml、tl_EcMasterDemoDcMotor and “4- Software data \Demo\tl_EcMasterDemoDCmotor\lib\” In the catalog libemllCPSW.so Copy the file to the same directory of the evaluation board file system .
The servo driver is powered on to start operation . The evaluation board is powered on to enter the file system, and the following commands are executed to uninstall ti_cpsw Gigabit network port driver . perform ifconfig With the command, you can view the corresponding eth0、eth1 The network card has been uninstalled .
Target# rmmod ti_cpsw

chart 6
Execute the following command to load EtherCAT Master station network interface drive , It can be done by lsmod Command to check whether the driver is loaded successfully .
Target# modprobe atemsys

chart 7
In the executable program tl_EcMasterDemoDcMotor The file is in the path , Execute the following command to view the instructions and parameter resolution of the executable program .
Target# ./tl_EcMasterDemoDcMotor --help

chart 8
CPU The default configuration of frequency adjustment mode is ondemand( The initial frequency is 300MHz), At this time, the system will regularly check the load , Adjust the frequency according to the load . because EtherCAT Yes CPU High frequency requirements , Therefore, execute the following command to CPU The frequency adjustment mode is configured as performance, At this point, the system will CPU The frequency is fixed to 800MHz.
Target# echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
Target# cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq

chart 9
Execute the following command , adopt EtherCAT The master station protocol stack controls the servo motor to perform forward and reverse rotation , Set the communication cycle of the master station to 1000us, The serial port terminal prints the following information .
Target# ./tl_EcMasterDemoDcMotor -f eni_SANYO_motor.xml -auxclk 1000 -v 2 -t 30000 -perf -cpsw 1 1 1 m custom am33XX 0 1 0
Parameter description :
-f eni_SANYO_motor.xml // Load network configuration eni.xml file
-auxclk 1000 //cycle time, That is, the communication cycle of the master station is 1000us
-v 2 // The information printing level is 2
-t 30000 // The duration of the
-perf // Print performance parameters
-cpsw 1 1 1 m custom am33XX 0 1 0 // The network port type is TI Of CPSW,“1 1 1” Express port1,Polling Pattern ,high priority,“m” Express Master.
If you want to use RGMII ETH2 The network port controls the motor , You need to execute the following command .
Target# ./tl_EcMasterDemoDcMotor -f eni_SANYO_motor.xml -auxclk 1000 -v 2 -t 30000 -perf -cpsw 2 1 1 m custom am33XX 1 1 0

chart 10

chart 11
From the picture above , The average communication period of the master station is about 997.8us, The maximum value is 1054.2us. The maximum jitter value of the communication cycle of the master station is 1054.2us-1000us=54.2us.
tl_EcMasterDemoDcMotor The program will automatically detect and load EtherCAT Master protocol stack license. If not license, The program runs 60min It will stop automatically after , The prompt information is shown in the figure below .

chart 12
If you have purchased license, stay tl_EcMasterDemoDcMotor Files are created in the same directory license file , And will license The key is added to this text file .
remarks : The following offers are based on our company TL570x-EVM Evaluation board add license Test screenshot of as a reference .

chart 13
Rerun tl_EcMasterDemoDcMotor Program , Valid if read successfully license, The program will run stably for a long time . meanwhile , The serial port terminal will print the following similar information .

chart 14
EtherCAT Master station development case compilation
take tl_EcMasterDemoDcMotor Copy the entire folder to Ubuntu, And enter EC_Master_SDK Catalog , Execute the following command to delete the development package in this directory EC-Master-V2.9-Linux_armv6-vfp-eabihf-Eval.tar.zip Unzip to the current path .
Host# cd tl_EcMasterDemoDcMotor/EC_Master_SDK/
Host# unzip EC-Master-V2.9-Linux_armv6-vfp-eabihf-Eval.tar.zip

chart 15
After the development package is unzipped, it will be generated in the current directory EC-Master-V2.9-Linux_armv6-vfp-eabihf-Eval.tar Folder , The directory structure is shown in the figure below . Case compilation depends on the library file of this development package . To learn more EcMaster EtherCAT Case study , Please check the... Of the development package Examples Catalog .

chart 16
Get into tl_EcMasterDemoDcMotor Of src Source directory , stay Makefile Specify the platform in the file Linux Processor SDK The actual path of the cross compilation tool chain .
Host# cd ../src/
Host# vim Makefile

chart 17
CROSS_COMPILE ?= /home/tronlong/ti-processor-sdk-linux-rt-am335x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- // Cross compile tool chain path

chart 18
Save and exit after modification , perform make Command compilation generates executable programs tl_EcMasterDemoDcMotor file .
Host# make

chart 19

chart 20
EC-Engineer To configure ENI Document method
This chapter mainly describes the adoption of Acontis EtherCAT Network information configuration tool EC-Engineer Tool configuration ENI(EtherCAT Network Information Format) Method of file .ENI The document mainly describes EtherCAT Bus topology and other information .
Put the product information “4- Software data \Tools\Windows\” In the catalog EC-Engineer_Eval_[ Version number ].zip stay Windows Unzip and install .
Make sure PC The machine can normally connect to the Internet , Double-click to open EC-Engineer Tools . The system will detect through the network EC-Engineer Of license Is it overdue , Failure to access the Internet will result in failure to open . Connect the servo driver to the through the network cable PC Direct connection ( here PC The machine can disconnect from the Internet ), stay EC-Engineer Choose Device Editor Interface Class A Engineering options , As shown in the figure below .

chart 21
Click on “File -> ESI Manager”, open ESI Manager Interface .

chart 22
add to SANYO Matched with servo driver .xml file , This document is provided by the servo driver manufacturer .

chart 23

chart 24

chart 25

chart 26
Cycle Time choice 1000us, stay Network Adapter Select the network card connected to the slave station in the options bar , Press Select Connect , After connection, the button changes to

.Cycle Time The size of may affect the jitter of the servo motor , It is set according to the actual situation of the servo motor , Use here 1000us.

chart 27
Click on “Network -> Scan EtherCAT Network” Scanning servo device .

chart 28

chart 29
After the servo device is successfully scanned , Select it ( This operation is SANYO servo ). Click on “Export ENI” Button to regenerate the servo device .xml Format ENI file . The file name can be customized , Here the file name is set to eni_SANYO_motor, choice “Diagnosis Mode” Option to observe servo device information .

chart 30

chart 31
At this time, the... Will be generated in the current path eni_SANYO_motor.xml The configuration file , This file records the configuration information of the slave station , File configuration Cycle Time by 1000us.
边栏推荐
- Jenkins - Copy Artifact 插件 Build 之间数据共享传递
- 【ELT.ZIP】OpenHarmony啃论文俱乐部—数据密集型应用内存压缩
- Description du format geojson (détails du format)
- Class initialization and callback usage
- TI AM3352/54/59 工业核心板硬件说明书
- [Yocto RM]1 - System Requirements
- Jenkins - built in variable access
- Appium自动化测试基础 — ADB常用命令(一)
- Self supervised learning and drug discovery
- Evaluation - rank sum ratio comprehensive evaluation
猜你喜欢

树莓派实现温控风扇智能降温

数据库查询优化:主从读写分离及常见问题

Original | 2025 to achieve the "five ones" goal! The four products of Jiefang power are officially released

【牛客討論區】第四章:Redis

ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)

Numpy----np.tile()函数解析

Class initialization and callback usage

Numpy----np.meshgrid()

Intranet penetration with FRP

Using redis bitmap to realize personnel online monitoring
随机推荐
Implementation of timed tasks in laravel framework
[Niuke discussion area] Chapter 4: redis
Take n multiple table names of a database as the values of a column in another table (the range can be a table in another database)
Jenkins - access the Jenkins user-defined parameter variable, and handle the variable value containing spaces
对比学习中的4种经典训练模式
Numpy----np.reshape()
要搞清楚什么是同步,异步,串行,并行,并发,进程,线程,协程
How to study efficiently
Numpy----np. reshape()
geojson 格式說明(格式詳解)
Evaluation - grey correlation analysis
Hi, you have a code review strategy to check!
Jenkins - Pipeline syntax
Cesium Click to draw polygons (dynamically draw polygons)
Cesium obtains the latitude and longitude range of the screen
frp实现内网穿透
利用redis bitmap实现人员在线情况监控
[Yocto RM]9 - QA Error and Warning Messages
Cesium 多边形增加文字标签(polygon 加 label)多边形中心点偏移问题解决
Numpy----np. Tile() function parsing