当前位置:网站首页>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
边栏推荐
- Operation and maintenance engineer, come and pick up the wool
- The spark operator - coalesce operator
- 从“双卡双待“到”双通“,vivo率先推动DSDA架构落地
- 微信小程序页面跳转传参
- Does flink cdc currently support Gauss database sources?
- To TrueNAS PVE through hard disk
- spark operator-textFile operator
- OpenCV3.0 is compatible with VS2010 and VS2013
- VRRP principle and command
- Spark source code - task submission process - 6-sparkContext initialization
猜你喜欢

VRRP概述及实验

By solving these three problems, the operation and maintenance efficiency will exceed 90% of the hospital

LinkSLA坚持用户第一,打造可持续的运维服务方案

The highlight moment of operation and maintenance starts with intelligence

input详解之文件上传

Small example of regular expression--validate email address

One-arm routing and 30% switch

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

单臂路由实验和三层交换机实验

markdown编辑器模板
随机推荐
Regular expression small example - get number character and repeated the most
Call the TensorFlow Objection Detection API for object detection and save the detection results locally
vim教程:vimtutor
LinkSLA insists that users come first and creates a sustainable operation and maintenance service plan
云计算——osi七层与TCP\IP协议
RAID磁盘阵列
js dynamically get screen width and height
IP数据包格式(ICMP协议与ARP协议)
spark operator-parallelize operator
Spark source code-task submission process-6.2-sparkContext initialization-TaskScheduler task scheduler
Insight into the general trend of the Internet, after reading this article, you will have a thorough understanding of Chinese domain names
618,你也许可以清醒亿点点
[ingress]-ingress使用tcp端口暴露服务
传输层协议
King power volume LinkSLA, realize operations engineer is happy fishing
Autoware--Beike Tianhui rfans lidar uses the camera & lidar joint calibration file to verify the fusion effect of point cloud images
原生JS带你了解数组方法实现及使用
js动态获取屏幕宽高度
[ingress]-ingress exposes services using tcp port
Small example of regular expression--remove spaces in the middle and on both sides of the string