Difference between revisions of "EtherCAT:EC PDO READ"

From SoftMC-Wiki
Jump to: navigation, search
m (Text replace - "Axystems:" to "")
Line 1: Line 1:
{{Axystems:Template:EtherCAT-Function
+
{{Template:EtherCAT-Function
  
 
|DESCRIPTION=
 
|DESCRIPTION=

Revision as of 09:13, 22 May 2014

While the system is running we are able to read and write specific PDOS without interfering with the realtime functionality
of the system.
This function retrieves the value of a specific PDO within the current cycle.

Input

Slave address, PDO index, PDO sub-index.

Output

None

Return Value

Value that is read from the PDO.

Declaration

public function EC_PDO_READ(byval slaveaddres as long, byval index as long, byval subindex as long) as long

Syntax

retVal = EC_PDO_READ(<Slave address>, <PDO index>, <PDO sub-index>)

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(2, 0x6041, 0) ' Read status word
retVal = EC_PDO_READ(2, EC_STATUS_INDEX, EC_STATUS_SUBINDEX)

See Also