EtherCAT:EC SLAVE SET STATE/zh-hans

From SoftMC-Wiki
Jump to: navigation, search
语言: [[::EtherCAT:EC SLAVE SET STATE|English]]  • [[::EtherCAT:EC SLAVE SET STATE/zh-hans|中文(简体)‎]]

描述

此功能设置从站的操作状态。
使用EC_SLAVE_NMT_STATESET以翔实的方式设置驱动器的操作模式。

输入

Axis address (example: Ax.dAdd), new state as long where:
EC_STATE_INIT - 0x01
EC_STATE_PREOP - 0x02
EC_STATE_SAFEOP - 0x04
EC_STATE_OP - 0x08

输出

None

返回值

如果成功返回0, 否则为-1

声明

public function EC_SLAVE_SET_STATE(byval addr as long, byval stat as long) as long

例子

retVal = EC_SLAVE_SET_STATE(slave_addr[i], EC_STATE_SAFEOP )

参见