EtherCAT:EC PDO READ N

From SoftMC-Wiki
Revision as of 12:19, 4 January 2015 by Nigeller (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Read via PDO an object of N bytes in size. This function is designed for objects larger that 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