Library.CoeWriteSdoObject Method
Writes data to a SubDevice using the CANopen over EtherCAT (CoE) SDO method.
Namespace:
IntervalZero.MaxRT.Ecat.Api.NetApi
Assembly:
IntervalZero.MaxRT.Ecat (in IntervalZero.MaxRT.Ecat.dll) Version: 1.0.0.0 (File version: 1.1.0)
Syntax
public CommandStatus CoeWriteSdoObject(
EcatHandle subDevice,
ushort obIndex,
byte obSubIndex,
bool completeAccess,
byte[] value
)
Parameters
subDevice
Type: EcatHandle
A handle to a SubDevice. To retrieve the corresponding handle, use OpenSubDeviceByIndex, OpenSubDeviceByStationAddress, or OpenSubDeviceByExplicitId.
obIndex
Type: UInt16
An object index in the object dictionary.
obSubIndex
Type: Byte
An object subindex in the object dictionary.
completeAccess
Type: Boolean
true to write all subindexes, false to write a single subindex.
value
Type: Byte[]
A buffer that contains the data to write to the SubDevice.
Return Value
This method returns a CommandStatus class. If an error occurs, property State in CommandStatus is set to ecatCommandError, and the error code is stored in property ErrorId.
Possible errors:
| Error code | Meaning |
|---|---|
|
ecatErrNoError |
The function succeeded. |
|
ecatErrWrongParameter |
One of the following conditions occurred:
|
|
ecatErrMainDeviceNotReady |
The MainDevice is not ready. |
|
ecatErrFeatureUnavailable |
The SubDevice doesn't support CoE. |
See Also: