EtherCAT:EC PDO READ N

From SoftMC-Wiki
Revision as of 18:09, 5 May 2017 by Chi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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