Difference between revisions of "EtherCAT:EC SDO READ DOUBLE/zh-hans"
(Created page with "{{Languages}} == 描述 == Similar to EC_SDO_READ, this function allows reading DOUBLE values.<br/> To read data from the slave you must specify an S...") |
|||
Line 1: | Line 1: | ||
− | {{Languages}} | + | {{Languages|EtherCAT:EC_SDO_READ_DOUBLE}} |
== 描述 == | == 描述 == | ||
− | + | 与[[EtherCAT:EC SDO READ|EC_SDO_READ]]类似,此功能允许读取DOUBLE值。<br/> | |
− | + | ||
− | + | 要从从站读取数据,您必须指定SDO索引和子索引.<br/> | |
− | + | 第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。<br/> | |
+ | 读取值从函数返回,可以设置为变量。<br/> | ||
{{Note/Important| | {{Note/Important| | ||
− | + | 只能读取32位变量.}} | |
<br/> | <br/> | ||
== 输入 == | == 输入 == | ||
Line 17: | Line 18: | ||
== 返回值 == | == 返回值 == | ||
− | + | 从从站读取的值。 | |
== 声明 == | == 声明 == | ||
Line 32: | Line 33: | ||
== 例子 == | == 例子 == | ||
− | retVal = EC_SDO_READ_DOUBLE(ax.Dadd, 0x2027, 0, 32) ' | + | retVal = EC_SDO_READ_DOUBLE(ax.Dadd, 0x2027, 0, 32) ' 读取 CDHD驱动器kvp |
== 参见 == | == 参见 == |
Latest revision as of 16:54, 6 May 2017
语言: | English • 中文(简体) |
---|
描述
与EC_SDO_READ类似,此功能允许读取DOUBLE值。
要从从站读取数据,您必须指定SDO索引和子索引.
第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。
读取值从函数返回,可以设置为变量。
IMPORTANT | |
只能读取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