EtherCAT:EC SDO WRITE/zh-hans

From SoftMC-Wiki
< EtherCAT:EC SDO WRITE
Revision as of 17:27, 6 May 2017 by Chi (talk | contribs) (Created page with "{{Languages}} == 描述 == 该函数允许写入大小为8,16和32位的整数值。<br/> 要与特定从站进行通信,请使用其地址和功能[[EtherCAT:EC SDO READ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: English  • 中文(简体)‎

描述

该函数允许写入大小为8,16和32位的整数值。
要与特定从站进行通信,请使用其地址和功能 EC_SDO_READ,EC_SDO_WRITE。 EC_SDO_WRITE通过特定的SDO向数据库发送数据。 您必须指定SDO索引,子索引,大小和要写入从属端的新值。 第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。

输入

Slave address, SDO index, SDO sub-index, SDO size in bits, the new value to be written.

输出

None

返回值

Void

声明

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

格式

call EC_SDO_WRITE(<Slave address>, <SDO index>, <SDO sub-index>, <SDO size in bits>, <new value>)

例外

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(1, 0x6040, 0, 16, 128) 'clear faults

参见