当前位置:网站首页>Dry!Teach you to use industrial raspberries pie combining CODESYS configuration EtherCAT master station
Dry!Teach you to use industrial raspberries pie combining CODESYS configuration EtherCAT master station
2022-08-05 06:21:00 【hongke_iiot】
前言
Industrial Raspberry Pi can be combinedCODESYSas a small industrial computer,Supports multiple fieldbus protocol applications,例如EtherNET/IP、Profinet、EtherCAT等.其中,通过与CODESYS结合的方式实现EtherCAT,Supports industrial Raspberry Pi as EtherCAT主站,控制EtherCAT IO模块或者EtherCAT伺服电机.This article will share how to configure the industrial Raspberry Pi as EtherCAT主站,and communicate with the servo drive.
一、 所需工具
1. 一个工业树莓派核心模块/控制器模块,本次测试使用 Connect+feat. CODESYS 模块
2. a servo motor
3. CODESYS 多核授权(树莓派版本)
二、 操作步骤
1. Add servo motor description file
点击“工具”->“Device repository”,点击“安装”,Select the device description file for the servo motor


2. 新建工程

3. 工程类型
测试使用的codesys授权是多核版本,所以选择CODESYS Control for Raspberry Pi MC SL;如果是单核版本请选择CODESYS Control for Raspberry Pi SL.

4. 添加设备-控制器
右击“Device”,选择添加设备,找到“其他项”,选择添加使用的控制器模块,点击“添加设备”.(本次测试使用的是Connect模块)

5. 添加EtherCAT主站
a. 右击“Device”,选择添加设备,找到“现场总线”,选择添加“EtherCAT”->“EtherCAT Master”.

b. 右击“EtherCAT_Master”,Add servo motors,That is, the device that appears after adding the description file.

c. 右击“EP3E_EC”,添加“SoftMotion CiA402轴”.

d. 双击“EtherCAT_Master”,选择“通用”,选择“按MACAddress selection network”,Click on the source address“浏览”,Select the Ethernet port where the servo motor is connected to the industrial Raspberry PiIP地址.(本次测试使用的是B口,即eth1)

e. 双击“EP3E-EC”,点击“通用”,勾选“专家设置“,Set up a distributed clock.

f. 点击“启动参数”,点击“添加”,分别添加“Max torque”和“Max motor speed”.

g. 分别设置“Max torque”和“Max motor speed”的值为1000和4000.

h. 打开“SM_Drive_GenericDSP402 ”设置页.
i. 打开SoftMotion驱动:缩放/映射.
j. Rotate the motor once,The encoder increment is set to 1000.

6. 程序编写
a. 打开PLC_PRG,Click on the blank space in the variable declaration area.

b. 按F2key to call up the input assistant,Click Text Search,Enter the enable function block keyword:power,Select function blockSMC_Basic.MC_Power,点击确定.

c. 实例化MC_Power功能块.

d. 同样的方式添加MC_Jog功能块,并实例化MC_Jog功能块.

e. Click in the program editing area,按F2 键,Call up the input assistant,Click on the instance call to select the instancefbMC_Power,点击确定.

f. Fill in the relevant variables.

g. Configure in the same wayMC_Jog功能块.

h. 将PLC_PRG从MainTask任务中,拖放到EtherCAT_Task任务中,如图所示.

7. Program download and device login
8. 调试
a. 尝试修改lVel的值,双击“lVel”,修改为100,点击确认,快捷键Ctrl+F7,确认写入.查看是否有变化.


b. 双击“bPower”,查看是否有变化.

9. 测试完毕.
三、 总结
Industrial Raspberry Pi bindingCODESYS不仅仅支持EtherCAT主站,还可以支持Modbus TCP/RTU 主站/从站、CANopen主站/从站,Later, I will gradually share the corresponding configuration documents with you.
更多资讯: 虹科工业物联网--Your Industrial IoT Expert
边栏推荐
- 5分钟完成mysql离线安装
- 入职前,没想到他们玩的这么花
- Spark source code-task submission process-6.2-sparkContext initialization-TaskScheduler task scheduler
- 千亿IT运维市场,产品要凭实力说话
- Spark source code-task submission process-6.1-sparkContext initialization-create spark driver side execution environment SparkEnv
- What?CDN cache acceleration only works for accelerating static content?
- 初识网页与浏览器
- 云计算——osi七层与TCP\IP协议
- The Servlet to jump to the JSP page, forwarding and redirection
- [Problem has been resolved]-Virtual machine error contains a file system with errors check forced
猜你喜欢
随机推荐
VRRP principle and command
ROS2下使用ROS1 bag的方法
What impact does CIPU have on the cloud computing industry?
原生JS带你了解数组方法实现及使用
Mina的长连接和短连接
传输层协议(TCP3次握手)
selenium模块的操作之拉钩
云计算——osi七层与TCP\IP协议
IP packet format (ICMP protocol and ARP protocol)
From "dual card dual standby" to "dual communication", vivo took the lead in promoting the implementation of the DSDA architecture
Tencent greetings function SCF - entry instructions
IP数据包格式(ICMP协议与ARP协议)
微信小程序页面跳转传参
Hugo builds a personal blog
spark operator-textFile operator
One-arm routing and 30% switch
VLAN介绍与实验
config.js相关配置汇总
The Servlet to jump to the JSP page, forwarding and redirection
By solving these three problems, the operation and maintenance efficiency will exceed 90% of the hospital









