Difference between revisions of "EtherCAT:EC PDO READ N"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Template:EtherCAT-Function |DESCRIPTION= Read via PDO an object of N bytes in size. This function is designed for objects larger that 32 bits. |INPUT= Slave address, PDO i...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
{{Languages|EtherCAT:EC_PDO_READ_N}}
 
{{Template:EtherCAT-Function
 
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=
Read via PDO an object of N bytes in size. This function is designed for objects larger that 32 bits.
+
Reads via PDO an object of N bytes in size. This function is designed for objects larger than 32 bits.
  
 
|INPUT=
 
|INPUT=

Latest revision as of 18:09, 5 May 2017

Language: English  • 中文(简体)‎

Reads via PDO an object of N bytes in size. This function is designed for objects larger than 32 bits.

Input

Slave address, PDO index, PDO sub-index

Output

An array of longs

Return Value

0 on success, -1 on failure.

Declaration

public function EC_PDO_READ_N(byval slaveaddres as long, byval index as long, byval subindex as long, retVal_array[*] as long) as long

Syntax

retVal = EC_PDO_READ_N(<Slave address>, <PDO index>, <PDO sub-index>, <array of longs>)

Exceptions

EC_SLAVE_ADDRESS_ERROR - "SLAVE ADDRESS ERROR" 20032
EC_PDO_PARMS_ERROR - "INVAILD PDO PARAMETERS" 20040
EC_PDO_DIRECTION_ERROR - "PDO WRONG DIRECTION (INPUT/OUTPUT)" 20046

Examples

retVal = EC_PDO_READ_N(2, 0x6041, 1, retVal_array) ' Read analong inputs into retVal_array

See Also