SSC快速开始参考《EtherCAT Slave Design Quick Guide》
字段内容直接参考SSC工具右侧Description,本文未填写。中文也可直接参考:《https://blog.csdn.net/g360250466/article/details/129847081》
① Select EL9800 | 8Bit Digital I/O, 16Bit Analog Input
一、SSC-Device信息介绍
1.Slaveinformation
配置从站的一些设备信息,因为是测试代码可以直接使用默认的选项。实际产品要更加产品信息配置。注:各个厂商需要向EtherCAT协会申请全球唯一标志VendorID(免费的,这也是EtherCAT能迅速占领一定市场的原因)。
② Set DEVICE_NAME = “MyApplication” (Node Slave Information )
默认:
VENDOR_ID 0x1
VENDOR_NAME 1
PRODUCT_CODE 0x26483052
REVISION_NUMBER 0x00020111
SERIAL_NUMBER 0x00000000
DEVICE_PROFILE_TYPE 0x00001389
DEVICE_NAME SSC-Device
DEVICE_HW_VERSION n.a.
DEVICE_SW_VERSION 5.11
例子:
名称 | 值 | 描述 |
VENDOR_ID | 0x9 | |
VENDOR_NAME | × | |
PRODUCT_CODE | 0x26483052 | |
REVISION_NUMBER | 0x00020111 | |
SERIAL_NUMBER | 0x00000000 | |
DEVICE_PROFILE_TYPE | 0x00001389 | |
DEVICE_NAME | "SSC-Device" | |
DEVICE_HW_VERSION | "n.a." | |
DEVICE_SW_VERSION | "5.11" |
2.Generic
通用选项。
SYSTEM_HEADER_FILE
EXPLICIT_DEVICE_ID 0
ESC_SM_WD_SUPPORTED 1
STATIC_OBJECT_DIC 0
ESC_EEPROM_ACCESS_SUPPORT 0
名称 | 值 | 描述 |
SYSTEM_HEADER_FILE | × | |
EXPLICIT_DEVICE_ID | 0 | |
ESC_SM_WD_SUPPORTED | 1 | |
STATIC_OBJECT_DIC | 0 | |
ESC_EEPROM_ACCESS_SUPPORT | 0 |
3.Hardware
EL9800_HW 1
MCI_HW 0
FC1100_HW 0
HW_ACCESS_FILE
CONTROLLER_16BIT 1
CONTROLLER_32BIT 0
_PIC18 0
_PIC24 1
ESC_16BIT_ACCESS 1
ESC_32BIT_ACCESS 0
MBX_16BIT_ACCESS 1
BIG_ENDIAN_16BIT 0
BIG_ENDIAN_FORMAT 0 //端序
EXT_DEBUGER_INTERFACE 0
UC_SET_ECAT_LED 0
ESC_SUPPORT_ECAT_LED 0
ESC_EEPROM_EMULATION 0
CREATE_EEPROM_CONTENT 0
ESC_EEPROM_SIZE 0x800
EEPROM_READ_SIZE 0x8
名称 | 值 | 描述 |
EL9800_HW | 1 | |
MCI_HW | 0 | |
FC1100_HW | 0 | |
HW_ACCESS_FILE | × | |
CONTROLLER_16BIT | 1 | |
CONTROLLER_32BIT | 0 | |
MBX_16BIT_ACCESS | 1 | |
BIG_ENDIAN_16BIT | 0 | |
BIG_ENDIAN_FORMAT | 0 | |
EXT_DEBUGER_INTERFACE | 0 | |
UC_SET_ECAT_LED | 0 | |
ESC_SUPPORT_ECAT_LED | 0 | |
ESC_EEPROM_EMULATION | 0 | |
CREATE_EEPROM_CONTENT | × | |
ESC_EEPROM_SIZE | 0x800 | |
EEPROM_READ_SIZE | 0x8 |
4.EtherCAT State Machine
EtherCAT状态机(ESM)。
BOOTSTRAPMODE_SUPPORTED 0
OP_PD_REQUIRED 1
PREOPTIMEOUT 0x7D0
SAFEOP2OPTIMEOUT 0x2328
名称 | 值 | 描述 |
BOOTSTRAPMODE_SUPPORTED | 0 | |
OP_PD_REQUIRED | 1 | |
PREOPTIMEOUT | 0x7D0 | |
SAFEOP2OPTIMEOUT | 0x2328 |
5.Synchronisation
同步管理相关选项。
AL_EVENT_ENABLED 1
DC_SUPPORTED 1
ECAT_TIMER_INT 0
MIN_PD_CYCLE_TIME 0x7A120
MAX_PD_CYCLE_TIME 0xC3500000
PD_OUTPUT_DELAY_TIME 0x0
PD_OUTPUT_CALC_AND_COPY_TIME 0x0
PD_INPUT_CALC_AND_COPY_TIME 0x0
PD_INPUT_DELAY_TIME 0x0
名称 | 值 | 描述 |
AL_EVENT_ENABLED | 1 | |
DC_SUPPORTED | 1 | |
ECAT_TIMER_INT | 1 | 有差异 |
MIN_PD_CYCLE_TIME | 0x7A120 //500us | |
MAX_PD_CYCLE_TIME | 0xC3500000 | |
PD_OUTPUT_DELAY_TIME | 0x0 | |
PD_OUTPUT_CALC_AND_COPY_TIME | 0x0 | |
PD_INPUT_CALC_AND_COPY_TIME | 0x0 | |
PD_INPUT_DELAY_TIME | 0x0 |
6.Application
应用层相关选项。
③ Set EL9800_APPLICATION = 0 (Node Application )
④ Set APPLICATION_FILE = “#include “MyApplication.h“” (Node Application )
TEST_APPLICATION 0
EL9800_APPLICATION 1
CiA402_DEVICE 0
SAMPLE_APPLICATION 0
SAMPLE_APPLICATION_INTERFACE 0
APPLICATION_FILE
USE_DEFAULT_MAIN 1
名称 | 值 | 描述 |
TEST_APPLICATION | 0 | |
EL9800_APPLICATION | 1 | |
CiA402_DEVICE | 0 | |
SAMPLE_APPLICATION | 0 | |
SAMPLE_APPLICATION_INTERFACE | 0 | |
APPLICATION_FILE | × | |
USE_DEFAULT_MAIN | 1 |
7.ProcessDate
PDO配置选项
MIN_PD_WRITE_ADDRESS 0x1000
DEF_PD_WRITE_ADDRESS 0x1100
MAX_PD_WRITE_ADDRESS 0x2FFF
MIN_PD_READ_ADDRESS 0x1000
DEF_PD_READ_ADDRESS 0x1400
MAX_PD_READ_ADDRESS 0x2FFF
MAX_PD_INPUT_SIZE 0x0044
MAX_PD_OUTPUT_SIZE 0x044
名称 | 值 | 描述 |
MIN_PD_WRITE_ADDRESS | 0x1000 | |
DEF_PD_WRITE_ADDRESS | × | |
MAX_PD_WRITE_ADDRESS | 0x2FFF | |
MIN_PD_READ_ADDRESS | 0x1000 | |
DEF_PD_READ_ADDRESS | × | |
MAX_PD_READ_ADDRESS | 0x2FFF | |
MAX_PD_INPUT_SIZE | 0x0044 | |
MAX_PD_OUTPUT_SIZE | 0x044 |
8.Mailbox
邮箱配置选项
MAILBOX_QUEUE 1
AOE_SUPPORTED 0
COE_SUPPORTED 1
COMPLETE_ACCESS_SUPPORTED 1
SEGMENTED_SDO_SUPPORTED 1
SDO_RES_INTERFACE 1
BACKUP_PARAMETER_SUPPORTED 0
STORE_BACKUP_PARAMETER_IMMEDIATELY 0
DIAGNOSIS_SUPPORTED 0
MAX_DIAG_MSG 0x14
EMERGENCY_SUPPORTED 0
MAX_EMERGENCIES 0x1
VOE_SUPPORTED 0
SOE_SUPPORTED 0
EOE_SUPPORTED 0
STATIC_ETHERNET_BUFFER 0
FOE_SUPPORTED 0
FOE_SAVE_FILES 0
MAX_FILE_SIZE 0x180
MAX_MBX_SIZE 0x0100
MIN_MBX_WRITE_ADDRESS 0x1000
DEF_MBX_WRITE_ADDRESS 0x1000
MAX_MBX_WRITE_ADDRESS 0x2FFF
MIN_MBX_READ_ADDRESS 0x1000
DEF_MBX_READ_ADDRESS 0x1080
MAX_MBX_READ_ADDRESS 0x2FFF
名称 | 值 | 描述 |
MAILBOX_QUEUE | 1 | |
AOE_SUPPORTED | 0 | |
COE_SUPPORTED | 1 | |
COMPLETE_ACCESS_SUPPORTED | 1 | |
SEGMENTED_SDO_SUPPORTED | 1 | |
SDO_RES_INTERFACE | 1 | |
BACKUP_PARAMETER_SUPPORTED | 0 | |
STORE_BACKUP_PARAMETER_IMMEDIATELY | 0 | |
DIAGNOSIS_SUPPORTED | 0 | |
MAX_DIAG_MSG | 0x14 | |
EMERGENCY_SUPPORTED | 0 | |
MAX_EMERGENCIES | 0x1 | |
VOE_SUPPORTED | 0 | |
SOE_SUPPORTED | 0 | |
EOE_SUPPORTED | 0 | |
STATIC_ETHERNET_BUFFER | 0 | |
FOE_SUPPORTED | 0 | |
FOE_SAVE_FILES | 0 | |
MAX_FILE_SIZE | 0x180 | |
MAX_MBX_SIZE | 0x0100 | |
MAX_MBX_WRITE_ADDRESS | 0x2FFF | |
MIN_MBX_READ_ADDRESS | 0x1000 | |
DEF_MBX_READ_ADDRESS | × | |
MAX_MBX_READ_ADDRESS | 0x2FFF |
⑤ Save the project in “your path” (File->Save)
二、创建Excel(一个新应用)
⑥ Create a new application description file (Tool-> Application->Create new)
⑦ Add the following object descriptions to the Excel® file
如果出现解析失败,是因为没有微软的Excel,需要整一个激活的版
⑧ Save the Excel file (in the default location)
⑨ Close the import application dialog
⑩ Create the slave files (Project -> “Create new Slave Files”) and close the SSC Tool
创建成功如上,文件结构如下:
三、TinCAT3加载效果
XAE加载xml流程不再详述。Xml位于ecatCreate文件夹内。
应该是板子里程序不对,两个对不上导致的。不是预期效果。
如需文章中的资料文档可在公众号后台留言“资料文档”.
希望大家看一手资料,减少歧义理解。
欢迎关注留言:
往期相关回顾:
EtherCAT开发_1_软硬件环境介绍
1_工业总线开发方案概述
工业以太网三剑客之——EtherNet/IP
工业以太网三剑客之——Profinet