当前位置:网站首页>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
边栏推荐
- Billions of IT operations in the market, the product by strength to speak
- [issue resolved] - jenkins pipeline checkout timeout
- Growth: IT Operations Trends Report
- What are some things that you only know when you do operation and maintenance?
- Call the TensorFlow Objection Detection API for object detection and save the detection results locally
- spark source code - task submission process - 3-ApplicationMaster
- sql server 重复值在后面计数
- I/O性能与可靠性
- H5 的浏览器存储
- 路由器和静态路由的配置
猜你喜欢

disabledDate 日期选择器 datePicker

LinkSLA insists that users come first and creates a sustainable operation and maintenance service plan

正则表达式小实例--验证邮箱地址

ACLs and NATs

config.js相关配置汇总
![[问题已处理]-虚拟机报错contains a file system with errors check forced](/img/07/1222a44dd52b359bf7873e6f3b7ebf.png)
[问题已处理]-虚拟机报错contains a file system with errors check forced

多线程之传递参数

What are some things that you only know when you do operation and maintenance?

教您简单几步实现工业树莓派正确安装RS232转USB驱动

LinkSLA坚持用户第一,打造可持续的运维服务方案
随机推荐
config.js相关配置汇总
微信小程序页面跳转传参
static routing
sql server 重复值在后面计数
markdown编辑器模板
运维工程师,快来薅羊毛
Will intelligent operation and maintenance replace manual operation and maintenance?
Wireshark packet capture and common filtering methods
技术分享杂七杂八技术
媒体查询、rem移动端适配
The spark operator - coalesce operator
618, you may be able to wake up a little bit
markdown editor template
NAT实验
用户和用户组管理、文件权限管理
Spark source code - task submission process - 6-sparkContext initialization
Cloud computing - osi seven layers and TCP\IP protocol
千亿IT运维市场,产品要凭实力说话
VRRP principle and command
Quick question and quick answer - FAQ of Tencent Cloud Server