Difference between revisions of "EtherCAT:EC PDO READ"

From SoftMC-Wiki
Jump to: navigation, search
Line 2: Line 2:
  
 
|DESCRIPTION=
 
|DESCRIPTION=
While the system is running we are able to read and write specific PDOS = without = interfering with the realtime functionality<br/>
+
While the system is running we are able to read and write specific PDOS <big>without</big> interfering with the realtime functionality<br/>
of the system.
+
of the system.<br/>
= one =
+
This function retrieves the value of a specific PDO within the current cycle.
== two9 ==
 
==== four ====
 
<u>three</u>
 
<big>yofi</big>
 
In order to communicate with a specific slave we use its address and the functions EC_SDO_READ, EC_SDO_WRITE.<br/>
 
To read data from the slave we have to specify a PDO index, a sub-index and its size.<br/>
 
The first sub-index is 0. If only one sub-index exists, we still have to specify 0 (we cannot omit this field).<br/>
 
The read value is returned from the function and can be set to a variable.<br/>
 
  
 
|INPUT=
 
|INPUT=
Slave address, PDO index, PDO sub-index, PDO size in bits, the new value to be written.
+
Slave address, PDO index, PDO sub-index.
  
 
|OUTPUT=
 
|OUTPUT=
Line 21: Line 13:
  
 
|RETURN VALUE=
 
|RETURN VALUE=
Value that is read from the slave.
+
Value that is read from the PDO.
  
 
|DECLARATION=
 
|DECLARATION=
public function EC_SDO_READ(byval slaveaddres as long, byval index as long, byval subindex as long,byval size_bits as long) as long
+
public function EC_PDO_READ(byval slaveaddres as long, byval index as long, byval subindex as long) as long
  
 
|SYNTAX=
 
|SYNTAX=
retVal = EC_SDO_READ(<Slave address>, <PDO index>, <PDO sub-index>, <PDO size in bits>)
+
retVal = EC_PDO_READ(<Slave address>, <PDO index>, <PDO sub-index>)
  
 
|EXAMPLE=
 
|EXAMPLE=
retVal = EC_SDO_READ(2, 0x6041,0, 32)  '  Read status word
+
retVal = EC_PDO_READ(2, 0x6041,0)  '  Read status word
  
  
 
|SEE ALSO=
 
|SEE ALSO=
 +
* [[Axystems:EtherCAT:EC_PDO_WRITE|EC_PDO_WRITE]]
 +
* [[Axystems:EtherCAT:EC_SDO_READ|EC_SDO_READ]]
 
* [[Axystems:EtherCAT:EC_SDO_WRITE|EC_SDO_WRITE]]
 
* [[Axystems:EtherCAT:EC_SDO_WRITE|EC_SDO_WRITE]]
  
 
}}
 
}}

Revision as of 15:43, 10 January 2013