Difference between revisions of "EtherCAT:EC SDO READ DOUBLE/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
(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}}
  
 
== 描述 ==
 
== 描述 ==
Similar to [[EtherCAT:EC SDO READ|EC_SDO_READ]], this function allows reading DOUBLE values.<br/>
+
[[EtherCAT:EC SDO READ|EC_SDO_READ]]类似,此功能允许读取DOUBLE值。<br/>
To read data from the slave you must specify an SDO index and a sub-index.<br/>
+
 
The first sub-index is 0. If the object has only one sub-index, you must still specify 0 (this field cannot be omitted).<br/>
+
要从从站读取数据,您必须指定SDO索引和子索引.<br/>
The read value is returned from the function and can be set to a variable.<br/>
+
第一个子索引为0.如果对象只有一个子索引,则仍必须指定0(此字段不能省略)。<br/>
 +
读取值从函数返回,可以设置为变量。<br/>
  
 
{{Note/Important|
 
{{Note/Important|
Only 32 bits variables can be read.}}
+
只能读取32位变量.}}
 
<br/>
 
<br/>
 
== 输入 ==
 
== 输入 ==
Line 17: Line 18:
  
 
== 返回值 ==
 
== 返回值 ==
Value that is read from the slave.
+
从从站读取的值。
  
 
== 声明 ==
 
== 声明 ==
Line 32: Line 33:
  
 
== 例子 ==
 
== 例子 ==
retVal = EC_SDO_READ_DOUBLE(ax.Dadd, 0x2027, 0, 32)  '  Read CDHD kvp
+
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.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

参见