EtherCAT:EC PDO WRITE/zh-hans

From SoftMC-Wiki
Jump to: navigation, search
语言: English  • 中文(简体)‎

描述

系统正在运行时,您可以使用系统的实时功能来读取和写入PDO不干扰实时性
该子程序在当前周期内将值写入特定的PDO。

输入

Slave address, PDO index, PDO sub-index, new value to be written.

输出

None

返回值

Void

声明

public sub EC_PDO_WRITE(byval slaveaddress as long, byval index as long, byval subindex as long, byval new_val as long)

格式

call EC_PDO_WRITE(<Slave address>, <PDO index>, <PDO sub-index>, <new value>)

例外规则

EC_SLAVE_ADDRESS_ERROR - "SLAVE ADDRESS ERROR" 20032
EC_PDO_PARMS_ERROR - "INVAILD PDO PARAMETERS" 20040
EC_PDO_DIRECTION_ERROR - "PDO WRONG DIRECTION (INPUT/OUTPUT)" 20046

例子

call EC_PDO_WRITE(2, 0x6071,0, 5) ' Write VCMD PDO


参见