EtherCAT:EC SDO WRITE DOUBLE/zh-hans
语言: | English • 中文(简体) |
---|
描述
与EC_SDO_WRITE类似, 该子程序允许写入DOUBLE值。
EC_SDO_WRITE_DOUBLE通过特定的SDO将数据发送到从站。 您必须指定SDO索引,子索引,大小和要写入从站的新值。
第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。
IMPORTANT | |
只能写入32位变量。 |
输入
Slave address, SDO index, SDO sub-index, SDO size in bits, the new value to be written.
输出
None
返回值
Void
声明
public sub EC_SDO_WRITE_DOUBLE(byval slaveaddress as long, byval index as long, byval subindex as long, byval varSize as long, byval new_val as double)
格式
call EC_SDO_WRITE_DOUBLE(<Slave address>, <SDO index>, <SDO sub-index>, <SDO size in bits>, <new value>)
例外
EC_SDO_READ_WRITE_DOUBLE - "SDO READ/WRITE DOUBLE ERROR: Invalid Size. Must be 32 or 64" 20071
EC_SDO_WRITE_READ_ONLY - "SDO WRITE ERROR: Attempt to write a read-only object" 20061
EC_WRITE_VAL_LOW - "SDO WRITE ERROR: Written value too low" 20062
EC_WRITE_VAL_HIGH - "SDO WRITE ERROR: Written value too high" 20063
EC_SDO_GENERAL_ERROR - "SDO WRITE ERROR: Check written value validity" 20065
EC_SDO_WRITE_INVALID_SIZE - "SDO WRITE ERROR: Invalid Bit Size" 20066
例子
call EC_SDO_WRITE_DOUBLE(ax.Dadd, 0x2027, 0, 32, 96) ' Write CDHD kvp