Uploads data from an EtherCAT slave to the EtherCAT master through SoE (Servo drive profile over EtherCAT).
Syntax
KsCommandStatus SoeReadSsc(
     int SlaveId,
     BYTE DriveNo,
     BYTE ElementFlags,
     USHORT Idn,
     UCHAR* Value,
     ULONG Length
);Parameters
SlaveId: the index of a slave array. When EtherCAT is started, this index has the same value as the SlaveId, which corresponds to the position of the slave in the network. Please note that after EtherCAT is started in the Operational (Op) state, any addition or removal of slaves from the network will change the position of the slaves in the network (SlaveId). Nevertheless, the index of the slave will remain the same. Newly added devices will be added in the back of the slave array. For all slaves after the change, the index and SlaveId will no longer match. This behavior is only available for physical devices; simulated devices are inapplicable. Please refer to the use cases in EnableHotConnect for more details.
DriveNo: the index of a drive.
ElementFlags: which property of an IDN is read.
Idn: the identification number of an object.
Value: the value to be read.
Length: data length.
Return value
Returns the KsCommandStatus structure.
Usable EtherCAT states
ecatPreOp, ecatSafeOp, ecatOp
Example
// SoE element flags:
// Value  Description
// 0x01   Data status
// 0x02   Name(read only)
// 0x04   Attribute
// 0x08   Unit
// 0x10   Minimum
// 0x20   Maximum
// 0x40   Value
// 0x80   Default
UCHAR soeReadData[64] = { 0 };
WaitForCommand(10, TRUE,
               SoeReadSsc(
                   0,       // Slave Id
                   1,       // Drive Number
                   0x40,    // ElementFlags, 0x40: Value
                   79,      // Idn, S-0-0079: Rotational Position Resolution
                   soeReadData,
                   64
               )
              );Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.2 | 4.2 | 
| Header | ksapi.h | ksapi.h | 
| Library | KsApi_Rtss.lib | KsApi.lib | 
See also