EtherCAT:EC USER SAFEOP CONFIG/zh-hans

From SoftMC-Wiki
< EtherCAT:EC USER SAFEOP CONFIG
Revision as of 08:59, 7 May 2017 by Chi (talk | contribs) (Created page with "{{Languages}} == 描述 == EtherCAT从站配置必须小心。 一些配置必须在从站处于PREOP模式时进行,有些配置在从站处于SAFEOP模式时完成。 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: [[::EtherCAT:EC USER SAFEOP CONFIG|English]]  • [[::EtherCAT:EC USER SAFEOP CONFIG/zh-hans|中文(简体)‎]]

描述

EtherCAT从站配置必须小心。 一些配置必须在从站处于PREOP模式时进行,有些配置在从站处于SAFEOP模式时完成。

该函数及其对应的EC_USER_PREOP_CONFIGEC_USER_OP_CONFIG在库EC_USER.LIB中实现。 这些功能的目的是允许用户添加自己的代码来执行EtherCAT从站的特定配置。

EC_STARTMASTER完成工作并且所有从站都处于OP模式后,EC USER SAFEOP CONFIG(从站地址)被调用。 因此,通过将从站模式更改为SAFEOP开始,然后执行必要的配置,然后将从站恢复为OP模式。


输入

Slave address

输出

None

返回值

成功返回0, 失败返回-1. 用户可以更改

声明

public function EC_USER_SAFEOP_CONFIG(byval slave_addr as long) as long

格式

retVal = EC_USER_SAFEOP_CONFIG(<Slave address>)

例子

for i = 1 to NUM_OF_SLAVES
	retVal = EC_USER_SAFEOP_CONFIG(i)
next

参见