EtherCAT:EC SDO READ DOUBLE/zh-hans

From SoftMC-Wiki
< EtherCAT:EC SDO READ DOUBLE
Revision as of 16:54, 6 May 2017 by Chi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
语言: English  • 中文(简体)‎

描述

EC_SDO_READ类似,此功能允许读取DOUBLE值。

要从从站读取数据,您必须指定SDO索引和子索引.
第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。
读取值从函数返回,可以设置为变量。

IMPORTANT.svgIMPORTANT
只能读取32位变量.


输入

Slave address, SDO index, SDO sub-index, Variable size (32 or 64 bits).

输出

None

返回值

从从站读取的值。

声明

public function EC_SDO_READ_DOUBLE(byval slaveaddres as long, byval index as long, byval subindex as long, byval varSize as long) as double

格式

retVal = EC_SDO_READ_DOUBLE(<Slave address>, <SDO index>, <SDO sub-index>, <Variable Size>)

例外

EC_SDO_READ_WRITE_DOUBLE - "SDO READ/WRITE DOUBLE ERROR: Invalid Size. Must be 32 or 64" 20071
EC_SLAVE_ADDRESS_ERROR - "SLAVE ADDRESS ERROR" 20032
EC_SDO_READ_WRITE_ONLY - "SDO READ ERROR: Attempt to read a write-only object" 20060
EC_SDO_READ_SIZE - "SDO READ ERROR: Received an unreasonable amount of data" 20064

例子

retVal = EC_SDO_READ_DOUBLE(ax.Dadd, 0x2027, 0, 32) ' 读取 CDHD驱动器kvp

参见