当前位置:网站首页>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
边栏推荐
- Call the TensorFlow Objection Detection API for object detection and save the detection results locally
- ACLs and NATs
- 5分钟完成mysql离线安装
- 网络不通?服务丢包?看这篇就够了
- el-autocomplete使用
- Spark source code - task submission process - 4-container to start executor
- spark source code - task submission process - 1-sparkSubmit
- Introduction to Network Layer Protocols
- 解决这三大问题,运维效率将超90%的医院
- LeetCode Interview Questions
猜你喜欢

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

监控系统的内卷,有什么讲究?

network issue?Service packet loss?This is enough

网络不通?服务丢包?看这篇就够了

传输层协议

解决这三大问题,运维效率将超90%的医院

Autoware--Beike Tianhui rfans lidar uses the camera & lidar joint calibration file to verify the fusion effect of point cloud images

Operation and maintenance engineer, come and pick up the wool

IP数据包格式(ICMP协议与ARP协议)
随机推荐
Wechat applet page jump to pass parameters
Four ways to obtain Class objects through reflection
Switch principle
spark source code - task submission process - 1-sparkSubmit
正则表达式小实例--验证邮箱地址
spark source code - task submission process - 5-CoarseGrainedExecutorBackend
To TrueNAS PVE through hard disk
初识网页与浏览器
The method of using ROS1 bag under ROS2
[Day1] VMware software installation
Call the TensorFlow Objection Detection API for object detection and save the detection results locally
markdown editor template
What are some things that you only know when you do operation and maintenance?
IP packet format (ICMP protocol and ARP protocol)
disabledDate 日期选择器 datePicker
交换机原理
路由器和静态路由的配置
监控系统的内卷,有什么讲究?
The idea of commonly used shortcut key
What?CDN cache acceleration only works for accelerating static content?