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...")
 
m
Line 2: Line 2:
  
 
|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=

Revision as of 14:32, 13 January 2015

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