Library.WriteAllSubDeviceEEprom Method

Writes all data into a SubDevice’s EEPROM.

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

Copy
public CommandStatus WriteAllSubDeviceEEprom(
    EcatHandle subDevice,
    string file
)

Parameters

subDevice

Type: EcatHandle
A handle to a SubDevice. To retrieve the corresponding handle, use OpenSubDeviceByIndex, OpenSubDeviceByStationAddress, or OpenSubDeviceByExplicitId.

file

Type: String
A file that contains all data to write into a SubDevice’s EEPROM.

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.

ecatErrNullParameter

Parameter file is null.

ecatErrWrongParameter

Parameter subDevice is invalid.

ecatErrWrongEnvironment

The EEPROM requesting channel is occupied.

ecatErrMainDeviceNotReady

The MainDevice is not ready.

ecatErrWrongSubDeviceState

The method can't be used in the current SubDevice state. It can only be used in the Init state.

ecatErrNoFile

The file path is invalid or inaccessible.

See Also: