Difference between revisions of "EtherCAT:EC PDO READ"
(15 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{Languages|EtherCAT:EC_PDO_READ}} |
+ | {{Template:EtherCAT-Function | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | While the system is running | + | While the system is running, you can read from and write to PDOs ''without interfering'' with the real-time functionality of the system.<br/> |
− | of the system | + | This function retrieves the value of a specific PDO within the current cycle. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|INPUT= | |INPUT= | ||
− | Slave address, PDO index, PDO sub-index | + | Slave address, PDO index, PDO sub-index. |
|OUTPUT= | |OUTPUT= | ||
Line 20: | Line 13: | ||
|RETURN VALUE= | |RETURN VALUE= | ||
− | Value that is read from the | + | Value that is read from the PDO. |
|DECLARATION= | |DECLARATION= | ||
− | public function | + | public function EC_PDO_READ(byval slaveaddres as long, byval index as long, byval subindex as long) as long |
|SYNTAX= | |SYNTAX= | ||
− | retVal = | + | retVal = EC_PDO_READ(<Slave address>, <PDO index>, <PDO sub-index>) |
+ | |||
+ | |EXCEPTIONS= | ||
+ | EC_SLAVE_ADDRESS_ERROR - "SLAVE ADDRESS ERROR" 20032<br/> | ||
+ | EC_PDO_PARMS_ERROR - "INVAILD PDO PARAMETERS" 20040<br/> | ||
+ | EC_PDO_DIRECTION_ERROR - "PDO WRONG DIRECTION (INPUT/OUTPUT)" 20046<br/> | ||
|EXAMPLE= | |EXAMPLE= | ||
− | retVal = | + | retVal = EC_PDO_READ(2, 0x6041, 0) ' Read status word<br/> |
+ | retVal = EC_PDO_READ(2, EC_STATUS_INDEX, EC_STATUS_SUBINDEX) | ||
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[EtherCAT:EC PDO READ N|EC_PDO_READ_N]] |
+ | * [[EtherCAT:EC PDO WRITE|EC_PDO_WRITE]] | ||
+ | * [[EtherCAT:EC SDO READ|EC_SDO_READ]] | ||
+ | * [[EtherCAT:EC SDO WRITE|EC_SDO_WRITE]] | ||
}} | }} |
Latest revision as of 18:01, 5 May 2017
Language: | English • 中文(简体) |
---|
While the system is running, you can read from and write to PDOs without interfering with the real-time 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)