Class Ecat

Class Documentation

class Ecat

This class contains Ec API functions.

Public Functions

Ecat(WMX3Api *f)

Constructor to initialize an object of this class. The device created by the WMX3Api object passed to this constructor is used to execute API functions. Also see Devices.

Ecat(const Ecat &src)

Copy constructor to initialize an object of this class based on an existing object of this class. Also see Copy Operators.

Ecat &operator=(const Ecat &src)

Copy assignment operator to initialize an object of this class based on an existing object of this class. Also see Copy Operators.

Ecat()

Constructor to initialize an object of this class with a self device. Also see Self Devices.

Ecat(DeviceType::T type)

Constructor to initialize an object of this class with a self device of the specified device type. Also see Self Devices.

~Ecat()

Destructor for this class.

bool IsDeviceValid()

Return TRUE if this class object has access to a device, and FALSE otherwise. A device is required to execute most functions in this class. If this function returns FALSE, a device can be created by calling the CreateDevice function from the WMX3Api object that was passed to the constructor of this class.

Return TRUE if this class object has access to a device, and FALSE otherwise. A device is required to execute most functions in this class. If this function returns FALSE, a device can be created by calling the CreateDevice function from the WMX3Api object that was passed to the constructor of this class.

ECAPIFUNC GetVersion(int *pMajorVersion, int *pMinorVersion, int *pRevisionVersion, int *pFixVersion)

Get the version of the module rtdll.

Get the version of the module rtdll.

Parameters:
  • pMajorVersion[out] The major version number.

  • pMinorVersion[out] The minor version number.

  • pRevisionVersion[out] The revision version number.

  • pFixVersion[out] The fix version number.

ECAPIFUNC ScanNetwork()

Scan the network topology.

Scan the network topology.

The scan result updates the master information obtained by function

GetMasterInfo.

Remark

ECAPIFUNC ScanNetwork(int masterId)

Scan the network topology.

Scan the network topology.

The scan result updates the master information obtained by function

GetMasterInfo.

Remark

Parameters:

masterId[in] ID of the master whose network will be scanned.

ECAPIFUNC ChangeSlaveState(int slaveId, EcStateMachine::T state, int *errorCode)

Change the specified slave state.

Change the specified slave state.

Parameters:
  • slaveId[in] ID of the slave whose state will be changed.

  • state[in] The state to change the specified slave to.

  • errorCode[out] AL status code when slave state change failed.

ECAPIFUNC ChangeSlaveState(int masterId, int slaveId, EcStateMachine::T state, int *errorCode)

Change the specified slave state.

Change the specified slave state.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose state will be changed.

  • state[in] The state to change the specified slave to.

  • errorCode[out] AL status code when slave state change failed.

ECAPIFUNC StartHotconnect()

Start hot connect.

Start hot connect.

ECAPIFUNC StartHotconnect(int masterId)

Start hot connect.

Start hot connect.

Parameters:

masterId[in] ID of the master to execute hot connect.

ECAPIFUNC ResetRefClockInfo()

Reset the reference clock information.

Reset the reference clock information.

After this function is called, the statistics information of

minRefClockInterval, maxRefClockInterval, avgRefClockInterval, diffFromNextDcClock, minDiffFromNextDcClock, and maxDiffFromNextDcClock in EcMasterStatisticsInfo will be reset.

Remark

ECAPIFUNC ResetRefClockInfo(int masterId)

Reset the reference clock information.

Reset the reference clock information.

After this function is called, the statistics information of

minRefClockInterval, maxRefClockInterval, avgRefClockInterval, diffFromNextDcClock, minDiffFromNextDcClock, and maxDiffFromNextDcClock in EcMasterStatisticsInfo will be reset.

Remark

Parameters:

masterId[in] ID of the master whose clock information will be reset.

ECAPIFUNC ResetTransmitStatisticsInfo()

Reset the transmission statistics information.

Reset the transmission statistics information.

After this function is called, the statistics information of

txDelay, minTxDelay, maxTxDelay, packetLoss, and packetTimeout in EcMasterStatisticsInfo will be reset.

Remark

ECAPIFUNC ResetTransmitStatisticsInfo(int masterId)

Reset the transmission statistics information.

Reset the transmission statistics information.

After this function is called, the statistics information of

txDelay, minTxDelay, maxTxDelay, packetLoss, and packetTimeout in EcMasterStatisticsInfo will be reset.

Remark

Parameters:

masterId[in] ID of the master whose transmission statistics information will be reset.

ECAPIFUNC SetUpdatePeriod(unsigned int period)

Set the master info update period.

Set the master info update period.

The default update period of master info is 10ms. Specifying a small period by this API can update master info faster but cost more system resource. If the master info does not need to be updated so often, system resource use can be reduced by specifying a larger period to reduce the update frequency.

Remark

Parameters:

period[in] New master info update period in unit ms.

ECAPIFUNC DiagnosisScan()

Start diagnosis scan.

Start diagnosis scan.

Diagnosis scan can be used to detect if there is a weird or broken slave on the network. It will take same time to scan the network. The current state of diagnosis scan can be check by the

diagnosisScanState in EcMasterStatisticsInfo. After the diagnosis scan, the bit3 of EcSlaveInfo::portState portState of corresponding port of the normal slave connecting to the broken slave will be set to 1.

Remark

ECAPIFUNC DiagnosisScan(int masterId)

Start diagnosis scan.

Start diagnosis scan.

This function is a variation of

DiagnosisScan() that accepts master id.

Remark

Parameters:

masterId[in] ID of the master whose network will be diagnosis scanned.

ECAPIFUNC GetMasterInfo(EcMasterInfo *master)

Read the current master information from the engine.

Read the current master information from the engine.

Parameters:

master[out] A pointer to a EcMasterInfo class that will be filled in with the current master information.

ECAPIFUNC GetMasterInfo(int masterId, EcMasterInfo *master)

Read the specified master information from the engine.

Read the specified master information from the engine.

Parameters:
  • masterId[in] ID of the master whose information will be obtained.

  • master[out] A pointer to a EcMasterInfo class that will be filled in with the specified master information.

ECAPIFUNC GetMasterInfoList(EcMasterInfoList *masters)

Read the master list information from the engine.

Read the master list information from the engine.

Parameters:

masters[out] A pointer to a EcMasterInfoList class that will be filled in with the master list information.

ECAPIFUNC GetEniFilePath(int slaveId, char *path, int len)

Get the ENI file path for specified slave.

Get the ENI file path for specified slave.

Retrieve the eni file path of specified slave. Eni file path can be retrieved after scanning network or starting communication. Tip: As of WMX3 3.6, the scan network will not search for special paths defined in the def file by the user.

Remark

Parameters:
  • slaveId[in] ID of the slave whose ENI file path will be get.

  • path[out] Buffer used to retrieve the eni file path in char type string.

  • len[in] Length of the buffer.

ECAPIFUNC GetEniFilePath(int slaveId, wchar_t *path, int len)

Get the ENI file path for specified slave.

Get the ENI file path for specified slave.

This function is a variation of

GetEniFilePath(int slaveId, char* path, int len) that retrieve a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave whose ENI file path will be get.

  • path[out] Buffer used to retrieve the eni file path in unicode type string.

  • len[in] Length of the buffer.

ECAPIFUNC GetEniFilePath(int masterId, int slaveId, char *path, int len)

Get the ENI file path for specified slave.

Get the ENI file path for specified slave.

Retrieve the eni file path of specified slave of specified master. Eni file path can be retrieved after scanning network or starting communication. Tip: As of WMX3 3.6, the scan network will not search for special paths defined in the def file by the user.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose ENI file path will be get.

  • path[out] Buffer used to retrieve the eni file path in char type string.

  • len[in] Length of the buffer.

ECAPIFUNC GetEniFilePath(int masterId, int slaveId, wchar_t *path, int len)

Get the ENI file path for specified slave.

Get the ENI file path for specified slave.

This function is a variation of

GetEniFilePath(int masterId, int slaveId, char* path, int len) that retrieve a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose ENI file path will be get.

  • path[out] Buffer used to retrieve the eni file path in unicode type string.

  • len[in] Length of the buffer.

ECAPIFUNC SetEniFilePath(int slaveId, char *path, unsigned char oneshot = 1)

Set the ENI file path for specified slave.

Set the ENI file path for specified slave.

The default ENI file search path is the folder “C:\eni”. Using the “UseDef” or “EniFile[]” setting in ec_network.def can also change the ENI file search path. If ENI file path should be changed dynamically by API, this function can be used. If 1 is specified to the “oneshot” parameter, the specified ENI file is used only once, regardless of whether communication is started successfully or not. If 0 is specified, the specified ENI file is used until the engine is restarted.

Remark

Parameters:
  • slaveId[in] ID of the slave whose ENI file path will be set.

  • path[in] File path specified as a null-terminated char type string.

  • oneshot[in] Whether the specified file path should be used as a one-shot or permanently.

ECAPIFUNC SetEniFilePath(int slaveId, wchar_t *path, unsigned char oneshot = 1)

Set the ENI file path for specified slave.

Set the ENI file path for specified slave.

This function is a variation of

SetEniFilePath(int slaveId, char* path, unsigned char oneshot = 1) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave whose ENI file path will be set.

  • path[in] File path specified as a null-terminated wchar_t type string.

  • oneshot[in] Whether the specified file path should be used as a one-shot or permanently.

ECAPIFUNC SetEniFilePath(int masterId, int slaveId, char *path, unsigned char oneshot = 1)

Set the ENI file path for specified slave.

Set the ENI file path for specified slave.

The default ENI file search path is the folder “C:\eni”. Using the “UseDef” or “EniFile[]” setting in ec_network.def can also change the ENI file search path. If ENI file path should be changed dynamically by API, this function can be used. If 1 is specified to the “oneshot” parameter, the specified ENI file is used only once, regardless of whether communication is started successfully or not. If 0 is specified, the specified ENI file is used until the engine is restarted.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose ENI file path will be set.

  • path[in] File path specified as a null-terminated char type string.

  • oneshot[in] Whether the specified file path should be used as a one-shot or permanently.

ECAPIFUNC SetEniFilePath(int masterId, int slaveId, wchar_t *path, unsigned char oneshot = 1)

Set the ENI file path for specified slave.

Set the ENI file path for specified slave.

This function is a variation of

SetEniFilePath(int masterId, int slaveId, char* path, unsigned char oneshot = 1) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose ENI file path will be set.

  • path[in] File path specified as a null-terminated wchar_t type string.

  • oneshot[in] Whether the specified file path should be used as a one-shot or permanently.

ECAPIFUNC RegisterWrite(int slaveId, int regAddr, int len, unsigned char *data)

Write data to the specified slave register address.

Write data to the specified slave register address.

Parameters:
  • slaveId[in] ID of the slave whose register data will be written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be written.

ECAPIFUNC RegisterWrite(int masterId, int slaveId, int regAddr, int len, unsigned char *data)

Write data to the specified slave register address.

Write data to the specified slave register address.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose register data will be written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be written.

ECAPIFUNC RegisterRead(int slaveId, int regAddr, int len, unsigned char *buff)

Read data from the specified slave register address.

Read data from the specified slave register address.

Parameters:
  • slaveId[in] ID of the slave whose register data will be read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • buff[out] A pointer to an array to which read data will be filled in.

ECAPIFUNC RegisterRead(int masterId, int slaveId, int regAddr, int len, unsigned char *buff)

Read data from the specified slave register address.

Read data from the specified slave register address.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose register data will be read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • buff[out] A pointer to an array to which read data will be filled in.

ECAPIFUNC RegisterWrite(int slaveId, int regAddr, int len, unsigned char *data, EcRegisterWriteCallBack callbackFunc, unsigned int waitTime)

Write data to the specified slave register address.

Write data to the specified slave register address.

Parameters:
  • slaveId[in] ID of the slave whose register data will be written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be written.

  • callbackFunc[in] A pointer to a callback function which will be called when the register write process is done.

  • waitTime[in] An error will be returned if the register write process is not finished within the specified wait time.

ECAPIFUNC RegisterWrite(int masterId, int slaveId, int regAddr, int len, unsigned char *data, EcRegisterWriteCallBack callbackFunc, unsigned int waitTime)

Write data to the specified slave register address.

Write data to the specified slave register address.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose register data will be written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be written.

  • callbackFunc[in] A pointer to a callback function which will be called when the register write process is done.

  • waitTime[in] An error will be returned if the register write process is not finished within the specified wait time.

ECAPIFUNC RegisterRead(int slaveId, int regAddr, int len, EcRegisterReadCallBack callbackFunc, unsigned int waitTime)

Read data from the specified slave register address.

Read data from the specified slave register address.

Parameters:
  • slaveId[in] ID of the slave whose register data will be read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the register read process is done.

  • waitTime[in] An error will be returned if the register read process is not finished within the specified wait time.

ECAPIFUNC RegisterRead(int masterId, int slaveId, int regAddr, int len, EcRegisterReadCallBack callbackFunc, unsigned int waitTime)

Read data from the specified slave register address.

Read data from the specified slave register address.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose register data will be read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the register read process is done.

  • waitTime[in] An error will be returned if the register read process is not finished within the specified wait time.

ECAPIFUNC RegisterBroadcastWrite(int regAddr, int len, unsigned char *data, unsigned short *wkc)

Broadcast write data to all slaves’ register addresses.

Broadcast write data to all slaves’ register addresses.

Parameters:
  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be broadcasted.

  • wkc[out] A pointer to an unsigned short type to which the broadcast working count will be filled in.

ECAPIFUNC RegisterBroadcastWrite(int masterId, int regAddr, int len, unsigned char *data, unsigned short *wkc)

Broadcast write data to all slaves’ register addresses.

Broadcast write data to all slaves’ register addresses.

Parameters:
  • masterId[in] ID of the master whose slaves will be broadcast written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be broadcasted.

  • wkc[out] A pointer to an unsigned short type to which the broadcast working count will be filled in.

ECAPIFUNC RegisterBroadcastRead(int regAddr, int len, unsigned char *buff, unsigned short *wkc)

Broadcast read data from all slaves’ register addresses.

Broadcast read data from all slaves’ register addresses.

Parameters:
  • regAddr[in] Register address.

  • len[in] Data length.

  • buff[out] A pointer to an array which read data will be filled in.

  • wkc[out] A pointer to an unsigned short type to which the broadcast working count will be filled in.

ECAPIFUNC RegisterBroadcastRead(int masterId, int regAddr, int len, unsigned char *buff, unsigned short *wkc)

Broadcast read data from all slaves’ register addresses.

Broadcast read data from all slaves’ register addresses.

Parameters:
  • masterId[in] ID of the master whose slaves will be broadcast read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • buff[out] A pointer to an array which read data will be filled in.

  • wkc[out] A pointer to an unsigned short type to which the broadcast working count will be filled in.

ECAPIFUNC RegisterBroadcastWrite(int regAddr, int len, unsigned char *data, EcRegisterBroadcastWriteCallBack callbackFunc, unsigned int waitTime)

Broadcast write data to all slaves’ register addresses.

Broadcast write data to all slaves’ register addresses.

Parameters:
  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be broadcasted.

  • callbackFunc[in] A pointer to a callback function which will be called when the register broadcast write process is done.

  • waitTime[in] An error will be returned if the register broadcast write process is not finished within the specified wait time.

ECAPIFUNC RegisterBroadcastWrite(int masterId, int regAddr, int len, unsigned char *data, EcRegisterBroadcastWriteCallBack callbackFunc, unsigned int waitTime)

Broadcast write data to all slaves’ register addresses.

Broadcast write data to all slaves’ register addresses.

Parameters:
  • masterId[in] ID of the master whose slaves will be broadcast written.

  • regAddr[in] Register address.

  • len[in] Data length.

  • data[in] Data array containing the data to be broadcasted.

  • callbackFunc[in] A pointer to a callback function which will be called when the register broadcast write process is done.

  • waitTime[in] An error will be returned if the register broadcast write process is not finished within the specified wait time.

ECAPIFUNC RegisterBroadcastRead(int regAddr, int len, EcRegisterBroadcastReadCallBack callbackFunc, unsigned int waitTime)

Broadcast read data from all slaves’ register addresses.

Broadcast read data from all slaves’ register addresses.

Parameters:
  • regAddr[in] Register address.

  • len[in] Data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the register broadcast read process is done.

  • waitTime[in] An error will be returned if the register broadcast read process is not finished within the specified wait time.

ECAPIFUNC RegisterBroadcastRead(int masterId, int regAddr, int len, EcRegisterBroadcastReadCallBack callbackFunc, unsigned int waitTime)

Broadcast read data from all slaves’ register addresses.

Broadcast read data from all slaves’ register addresses.

Parameters:
  • masterId[in] ID of the master whose slaves will be broadcast read.

  • regAddr[in] Register address.

  • len[in] Data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the register broadcast read process is done.

  • waitTime[in] An error will be returned if the register broadcast read process is not finished within the specified wait time.

ECAPIFUNC SdoDownload(int slaveId, int index, int subindex, int sdoDataSize, unsigned char *sdoData, unsigned int *errCode, unsigned int waitTime = 0)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

This function will download SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

ECAPIFUNC SdoDownload(int masterId, int slaveId, int index, int subindex, int sdoDataSize, unsigned char *sdoData, unsigned int *errCode, unsigned int waitTime = 0)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

This function will download SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

ECAPIFUNC SdoUpload(int slaveId, int index, int subindex, int sdoBuffSize, unsigned char *sdoBuff, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

This function will upload SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoBuffSize[in] Size of sdoBuff which is used to obtain the uploaded SDO data.

  • sdoBuff[out] A pointer to an array to which the uploaded SDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actual uploaded SDO data size will be filled in.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

ECAPIFUNC SdoUpload(int masterId, int slaveId, int index, int subindex, int sdoBuffSize, unsigned char *sdoBuff, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

This function will upload SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoBuffSize[in] Size of sdoBuff which is used to obtain the uploaded SDO data.

  • sdoBuff[out] A pointer to an array to which the uploaded SDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actual uploaded SDO data size will be filled in.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

ECAPIFUNC SdoDownload(int slaveId, int index, int subindex, int sdoDataSize, unsigned char *sdoData, EcSdoDownloadCallBack callbackFunc, unsigned int waitTime)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

This function will download SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO download process is done.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

ECAPIFUNC SdoDownload(int masterId, int slaveId, int index, int subindex, int sdoDataSize, unsigned char *sdoData, EcSdoDownloadCallBack callbackFunc, unsigned int waitTime)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

This function will download SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO download process is done.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

ECAPIFUNC SdoUpload(int slaveId, int index, int subindex, EcSdoUploadCallBack callbackFunc, unsigned int waitTime)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

This function will upload SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO upload process is done.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

ECAPIFUNC SdoUpload(int masterId, int slaveId, int index, int subindex, EcSdoUploadCallBack callbackFunc, unsigned int waitTime)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

This function will upload SDO by expedited type in which SDO size just can be 1, 2 and 4 byte.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO upload process is done.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

ECAPIFUNC SdoDownload(int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoDataSize, unsigned char *sdoData, unsigned int *errCode, unsigned int waitTime = 0, BOOL complete = FALSE)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

Parameters:
  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO download type.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoDownload(int masterId, int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoDataSize, unsigned char *sdoData, unsigned int *errCode, unsigned int waitTime = 0, BOOL complete = FALSE)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO download type.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoUpload(int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoBuffSize, unsigned char *sdoBuff, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0, BOOL complete = FALSE)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

Parameters:
  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO upload type.

  • sdoBuffSize[in] Size of sdoBuff which is used to obtain the uploaded SDO data.

  • sdoBuff[out] A pointer to an array to which the uploaded SDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actual uploaded SDO data size will be filled in.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoUpload(int masterId, int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoBuffSize, unsigned char *sdoBuff, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0, BOOL complete = FALSE)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO upload type.

  • sdoBuffSize[in] Size of sdoBuff which is used to obtain the uploaded SDO data.

  • sdoBuff[out] A pointer to an array to which the uploaded SDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actual uploaded SDO data size will be filled in.

  • errCode[out] A pointer to an int type to which an SDO abort code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoDownload(int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoDataSize, unsigned char *sdoData, EcSdoDownloadCallBack callbackFunc, unsigned int waitTime, BOOL complete = FALSE)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

Parameters:
  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO download type.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO download process is done.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoDownload(int masterId, int slaveId, int index, int subindex, EcSdoType::T sdoType, int sdoDataSize, unsigned char *sdoData, EcSdoDownloadCallBack callbackFunc, unsigned int waitTime, BOOL complete = FALSE)

Download data to the specified slave SDO.

Download data to the specified slave SDO.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SDO data will be downloaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO download type.

  • sdoDataSize[in] SDO data size.

  • sdoData[in] SDO data.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO download process is done.

  • waitTime[in] An error will be returned if the SDO download process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoUpload(int slaveId, int index, int subindex, EcSdoType::T sdoType, EcSdoUploadCallBack callbackFunc, unsigned int waitTime, BOOL complete = FALSE)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

Parameters:
  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO upload type.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO upload process is done.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC SdoUpload(int masterId, int slaveId, int index, int subindex, EcSdoType::T sdoType, EcSdoUploadCallBack callbackFunc, unsigned int waitTime, BOOL complete = FALSE)

Upload data from the specified slave SDO.

Upload data from the specified slave SDO.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SDO data will be uploaded.

  • index[in] SDO index.

  • subindex[in] SDO subindex.

  • sdoType[in] SDO upload type.

  • callbackFunc[in] A pointer to a callback function which will be called when the SDO upload process is done.

  • waitTime[in] An error will be returned if the SDO upload process is not finished within the specified wait time.

  • complete[in] Enable the complete access.

ECAPIFUNC GetSdoInfoODList(int slaveId, EcObjectDescriptionListType::T type, EcSlaveSdoInfoObjectDescriptionList *list)

Get the OD list from the specified slave.

Get the OD list from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which the OD list will be obtained.

  • type[in] OD list type.

  • list[out] A pointer to EcSlaveSdoInfoObjectDescriptionList to which the obtained OD List will be filled in.

ECAPIFUNC GetSdoInfoODList(int masterId, int slaveId, EcObjectDescriptionListType::T type, EcSlaveSdoInfoObjectDescriptionList *list)

Get the OD list from the specified slave.

Get the OD list from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which the OD list will be obtained.

  • type[in] OD list type.

  • list[out] A pointer to EcSlaveSdoInfoObjectDescriptionList to which the obtained OD List will be filled in.

ECAPIFUNC GetSdoInfoEDList(int slaveId, int index, EcSlaveSdoInfoEntryDescriptionList *list)

Get the ED list from the specified slave’s OD index.

Get the ED list from the specified slave’s OD index.

Parameters:
  • slaveId[in] ID of the slave from which the ED list will be obtained.

  • index[in] OD index from which the ED list will be obtained.

  • list[out] A pointer to EcSlaveSdoInfoEntryDescriptionList to which the obtained ED List will be filled in.

ECAPIFUNC GetSdoInfoEDList(int masterId, int slaveId, int index, EcSlaveSdoInfoEntryDescriptionList *list)

Get the ED list from the specified slave’s OD index.

Get the ED list from the specified slave’s OD index.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which the ED list will be obtained.

  • index[in] OD index from which the ED list will be obtained.

  • list[out] A pointer to EcSlaveSdoInfoEntryDescriptionList to which the obtained ED List will be filled in.

ECAPIFUNC GetSdoInfoODList(int slaveId, EcObjectDescriptionListType::T type, EcSdoInfoGetODListCallBack callbackFunc, unsigned int waitTime)

Get the OD list from the specified slave.

Get the OD list from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which the OD list will be obtained.

  • type[in] OD list type.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of getting the OD list is done.

  • waitTime[in] An error will be returned if the OD list getting process is not finished within the specified wait time.

ECAPIFUNC GetSdoInfoODList(int masterId, int slaveId, EcObjectDescriptionListType::T type, EcSdoInfoGetODListCallBack callbackFunc, unsigned int waitTime)

Get the OD list from the specified slave.

Get the OD list from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which the OD list will be obtained.

  • type[in] OD list type.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of getting the OD list is done.

  • waitTime[in] An error will be returned if the OD list getting process is not finished within the specified wait time.

ECAPIFUNC GetSdoInfoEDList(int slaveId, int index, EcSdoInfoGetEDListCallBack callbackFunc, unsigned int waitTime)

Get the ED list from the specified slave’s OD index.

Get the ED list from the specified slave’s OD index.

Parameters:
  • slaveId[in] ID of the slave from which the ED list will be obtained.

  • index[in] OD index from which the ED list will be obtained.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of getting the ED list is done.

  • waitTime[in] An error will be returned if the ED list getting process is not finished within the specified wait time.

ECAPIFUNC GetSdoInfoEDList(int masterId, int slaveId, int index, EcSdoInfoGetEDListCallBack callbackFunc, unsigned int waitTime)

Get the ED list from the specified slave’s OD index.

Get the ED list from the specified slave’s OD index.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which the ED list will be obtained.

  • index[in] OD index from which the ED list will be obtained.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of getting the ED list is done.

  • waitTime[in] An error will be returned if the ED list getting process is not finished within the specified wait time.

ECAPIFUNC TxPdoWrite(int slaveId, int index, int subindex, int pdoDataSize, unsigned char *pdoData, unsigned int mask = 0)

Write data to the specified slave’s Tx PDO.

Write data to the specified slave’s Tx PDO.

Parameters:
  • slaveId[in] ID of the slave to which the Tx PDO data will be written.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

  • pdoDataSize[in] PDO size.

  • pdoData[in] A pointer to the PDO data array.

  • mask[in] Mask to decide which bits of pdoData will be written. All bits will be written if zero.

ECAPIFUNC TxPdoWrite(int masterId, int slaveId, int index, int subindex, int pdoDataSize, unsigned char *pdoData, unsigned int mask = 0)

Write data to the specified slave’s Tx PDO.

Write data to the specified slave’s Tx PDO.

PDO Index

Name

0x6040

ControlWord

0x6060

ModesOfOperation

0x607A

TargetPosition

0x60FF

TargetVelocity

0x6071

TargetTorque

0x6072

MaxTorque

0x60E0

PositiveTorqueLimit

0x60E1

NegativeTorqueLimit

0x60B8

TouchProbeFunction

0x607F

MaxProfileVelocity

0x60B1

VelocityOffset

0x60B2

TorqueOffset

0x6080

MaxMotorSpeed

0x60FE

DigitalOutput

Remark

If AllowPdoReadWrite:1 is not defined in the eni file, this function returns an error.

The value to be written is the logical conjunction of pdoData and mask. However, the masks 0x00000000 and 0xFFFFFFFFFF have the same meaning.

This function returns an error if a specific PDO Index is given in the argument index, if AllowPdoReadWrite:1 is defined in the eni file but the mask is 0x00000000. This is a safety mechanism to prevent overwriting of variables used in motion control.

To enable PDO write in all cases, in addition to defining AllowPdoReadWrite:1 in the eni file, provide 0xFFFFFFFFFF for the argument mask.

The specific PDO Indexes are as follows:

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which the Tx PDO data will be written.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

  • pdoDataSize[in] PDO size.

  • pdoData[in] A pointer to the PDO data array.

  • mask[in] Mask to decide which bits of pdoData will be written. All bits will be written if zero.

ECAPIFUNC ClearTxPdoWrite(int slaveId, int index, int subindex)

Clear the data which is being written to Tx PDO.

Clear the data which is being written to Tx PDO. Instead, the internal Tx PDO data of EcPlatform will be written.

PDO Index

Name

0x6040

ControlWord

0x6060

ModesOfOperation

0x607A

TargetPosition

0x60FF

TargetVelocity

0x6071

TargetTorque

0x6072

MaxTorque

0x60E0

PositiveTorqueLimit

0x60E1

NegativeTorqueLimit

0x60B8

TouchProbeFunction

0x607F

MaxProfileVelocity

0x60B1

VelocityOffset

0x60B2

TorqueOffset

0x6080

MaxMotorSpeed

0x60FE

DigitalOutput

Remark

If AllowPdoReadWrite:1 is not defined in the eni file, this function returns an error.

The value to be written is the logical conjunction of pdoData and mask. However, the masks 0x00000000 and 0xFFFFFFFFFF have the same meaning.

This function returns an error if a specific PDO Index is given in the argument index, if AllowPdoReadWrite:1 is defined in the eni file but the mask is 0x00000000. This is a safety mechanism to prevent overwriting of variables used in motion control.

To enable PDO write in all cases, in addition to defining AllowPdoReadWrite:1 in the eni file, provide 0xFFFFFFFFFF for the argument mask.

The specific PDO Indexes are as follows:

Parameters:
  • slaveId[in] ID of the slave to which the Tx PDO data will be written.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

ECAPIFUNC ClearTxPdoWrite(int masterId, int slaveId, int index, int subindex)

Clear the data which is being written to Tx PDO.

Clear the data which is being written to Tx PDO. Instead, the internal Tx PDO data of EcPlatform will be written.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which the Tx PDO data will be written.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

ECAPIFUNC PdoRead(int slaveId, int index, int subindex, int pdoBuffSize, unsigned char *pdoBuff, unsigned int *actualSize)

Read data from the specified slave’s Rx or Tx PDO.

Read data from the specified slave’s Rx or Tx PDO.

Parameters:
  • slaveId[in] ID of the slave from which Rx or Tx PDO data will be read.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

  • pdoBuffSize[in] Size of pdoBuff.

  • pdoBuff[out] A pointer to an array to which the read PDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actually read PDO size will be filled in.

ECAPIFUNC PdoRead(int masterId, int slaveId, int index, int subindex, int pdoBuffSize, unsigned char *pdoBuff, unsigned int *actualSize)

Read data from the specified slave’s Rx or Tx PDO.

Read data from the specified slave’s Rx or Tx PDO.

Remark

If AllowPdoReadWrite:1 is not defined in the eni file, this function returns an error.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which Rx or Tx PDO data will be read.

  • index[in] PDO index.

  • subindex[in] PDO subindex.

  • pdoBuffSize[in] Size of pdoBuff.

  • pdoBuff[out] A pointer to an array to which the read PDO data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actually read PDO size will be filled in.

ECAPIFUNC SetOutputBit(int slaveId, int byte, int bit, unsigned char data)

Set the value of an output bit for a slave.

Set the value of an output bit for a slave.

Remark

If AllowPdoReadWrite:1 is not defined in the eni file, this function returns an error.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to set.

  • bit[in] The bit offset of the bit to set.

  • data[in] The value to set the bit to.

ECAPIFUNC SetOutputBit(int masterId, int slaveId, int byte, int bit, unsigned char data)

Set the value of an output bit for a slave.

Set the value of an output bit for a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to set.

  • bit[in] The bit offset of the bit to set.

  • data[in] The value to set the bit to.

ECAPIFUNC SetOutputByte(int slaveId, int byte, unsigned char data)

Set the value of an output byte for a slave.

Set the value of an output byte for a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to set.

  • data[in] The value to set the byte to.

ECAPIFUNC SetOutputByte(int masterId, int slaveId, int byte, unsigned char data)

Set the value of an output byte for a slave.

Set the value of an output byte for a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to set.

  • data[in] The value to set the byte to.

ECAPIFUNC SetOutputBytes(int slaveId, int byte, int size, unsigned char *pData)

Set the value of multiple output bytes for a slave.

Set the value of multiple output bytes for a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to set.

  • pData[in] A pointer to a char array that contains the values to set the bytes to. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC SetOutputBytes(int masterId, int slaveId, int byte, int size, unsigned char *pData)

Set the value of multiple output bytes for a slave.

Set the value of multiple output bytes for a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to set.

  • pData[in] A pointer to a char array that contains the values to set the bytes to. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC SetOutputBits(int slaveId, int *pByte, int *pBit, unsigned char *pData, int count)

Set the value of multiple output bits for a slave.

Set the value of multiple output bits for a slave.

This function is equivalent to calling the

SetOutputBit function multiple times, but can be faster due to the reduced overhead. There is no limit to the number of bits that may be specified at once. pByte[0], pBit[0], and pData[0] specify the first output bit to set, pByte[1], pBit[1], and pData[1] specify the second output bit to set, and so on. The bits can be specified in any order.

Remark

Parameters:
  • slaveId[in] ID of the slave.

  • pByte[in] A pointer to an int array that contains the byte addresses (within the slaves) of the output bits. The size of the array must be equal to the count parameter.

  • pBit[in] A pointer to an int array that contains the bit addresses of the output bits. The size of the array must be equal to the count parameter.

  • pData[in] A pointer to an unsigned char array that contains the values to set the bits to. The size of the array must be equal to the count parameter.

  • count[in] The number of bits to set.

ECAPIFUNC SetOutputBits(int masterId, int slaveId, int *pByte, int *pBit, unsigned char *pData, int count)

Set the value of multiple output bits for a slave.

Set the value of multiple output bits for a slave.

This function is equivalent to calling the

SetOutputBit function multiple times, but can be faster due to the reduced overhead. There is no limit to the number of bits that may be specified at once. pByte[0], pBit[0], and pData[0] specify the first output bit to set, pByte[1], pBit[1], and pData[1] specify the second output bit to set, and so on. The bits can be specified in any order.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • pByte[in] A pointer to an int array that contains the byte addresses (within the slaves) of the output bits. The size of the array must be equal to the count parameter.

  • pBit[in] A pointer to an int array that contains the bit addresses of the output bits. The size of the array must be equal to the count parameter.

  • pData[in] A pointer to an unsigned char array that contains the values to set the bits to. The size of the array must be equal to the count parameter.

  • count[in] The number of bits to set.

ECAPIFUNC GetInputBit(int slaveId, int byte, int bit, unsigned char *pData)

Get the value of an input bit from a slave.

Get the value of an input bit from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to get.

  • bit[in] The bit offset of the bit to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetInputBit(int masterId, int slaveId, int byte, int bit, unsigned char *pData)

Get the value of an input bit from a slave.

Get the value of an input bit from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to get.

  • bit[in] The bit offset of the bit to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetInputByte(int slaveId, int byte, unsigned char *pData)

Get the value of an input byte from a slave.

Get the value of an input byte from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetInputByte(int masterId, int slaveId, int byte, unsigned char *pData)

Get the value of an input byte from a slave.

Get the value of an input byte from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetInputBytes(int slaveId, int byte, int size, unsigned char *pData)

Get the value of multiple input bytes from a slave.

Get the value of multiple input bytes from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to get.

  • pData[out] A pointer to a char array that will receive the data. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC GetInputBytes(int masterId, int slaveId, int byte, int size, unsigned char *pData)

Get the value of multiple input bytes from a slave.

Get the value of multiple input bytes from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to get.

  • pData[out] A pointer to a char array that will receive the data. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC GetOutputBit(int slaveId, int byte, int bit, unsigned char *pData)

Get the value of an output bit from a slave.

Get the value of an output bit from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to get.

  • bit[in] The bit offset of the bit to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetOutputBit(int masterId, int slaveId, int byte, int bit, unsigned char *pData)

Get the value of an output bit from a slave.

Get the value of an output bit from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the bit to get.

  • bit[in] The bit offset of the bit to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetOutputByte(int slaveId, int byte, unsigned char *pData)

Get the value of an output byte from a slave.

Get the value of an output byte from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetOutputByte(int masterId, int slaveId, int byte, unsigned char *pData)

Get the value of an output byte from a slave.

Get the value of an output byte from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the byte to get.

  • pData[out] A pointer to a char that will receive the data.

ECAPIFUNC GetOutputBytes(int slaveId, int byte, int size, unsigned char *pData)

Get the value of multiple output bytes from a slave.

Get the value of multiple output bytes from a slave.

Parameters:
  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to get.

  • pData[out] A pointer to a char array that will receive the data. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC GetOutputBytes(int masterId, int slaveId, int byte, int size, unsigned char *pData)

Get the value of multiple output bytes from a slave.

Get the value of multiple output bytes from a slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave.

  • byte[in] The byte address (within the slave) of the head byte.

  • size[in] The number of bytes to get.

  • pData[out] A pointer to a char array that will receive the data. The size of the array must be greater than or equal to the size parameter.

ECAPIFUNC FoERead(int slaveId, wchar_t *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

This function is a variation of

FoERead(int slaveId, char* filePath, char* fileName, unsigned int password, unsigned int* errCode) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoERead(int masterId, int slaveId, wchar_t *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

This function is a variation of

FoERead(int masterId, int slaveId, char* filePath, char* fileName, unsigned int password, unsigned int* errCode) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoEWrite(int slaveId, wchar_t *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

This function is a variation of

FoEWrite(int slaveId, char* filePath, char* fileName, unsigned int password, unsigned int* errCode) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoEWrite(int masterId, int slaveId, wchar_t *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

This function is a variation of

FoEWrite(int masterId, int slaveId, char* filePath, char* fileName, unsigned int password, unsigned int* errCode) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoERead(int slaveId, wchar_t *filePath, char *fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

This function is a variation of

FoERead(int slaveId, char* filePath, char* fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE read is done.

  • waitTime[in] An error will be returned if the FoE read process is not finished within the specified wait time.

ECAPIFUNC FoERead(int masterId, int slaveId, wchar_t *filePath, char *fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

This function is a variation of

FoERead(int masterId, int slaveId, char* filePath, char* fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE read is done.

  • waitTime[in] An error will be returned if the FoE read process is not finished within the specified wait time.

ECAPIFUNC FoEWrite(int slaveId, wchar_t *filePath, char *fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

This function is a variation of

FoEWrite(int slaveId, char* filePath, char* fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE write is done.

  • waitTime[in] An error will be returned if the FoE write process is not finished within the specified wait time.

ECAPIFUNC FoEWrite(int masterId, int slaveId, wchar_t *filePath, char *fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

This function is a variation of

FoEWrite(int masterId, int slaveId, char* filePath, char* fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime) that accepts a wchar_t file path. Use this function when using Unicode character sets.

Remark

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE write is done.

  • waitTime[in] An error will be returned if the FoE write process is not finished within the specified wait time.

ECAPIFUNC FoERead(int slaveId, char *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoERead(int masterId, int slaveId, char *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoEWrite(int slaveId, char *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoEWrite(int masterId, int slaveId, char *filePath, char *fileName, unsigned int password, unsigned int *errCode)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • errCode[out] A pointer to an unsigned int type to which the FoE error code from the slave will be filled in if there is any.

ECAPIFUNC FoERead(int slaveId, char *filePath, char *fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE read is done.

  • waitTime[in] An error will be returned if the FoE read process is not finished within the specified wait time.

ECAPIFUNC FoERead(int masterId, int slaveId, char *filePath, char *fileName, unsigned int password, EcFoEReadCallBack callbackFunc, unsigned int waitTime)

Read FoE data from the specified slave.

Read FoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which FoE data will be read.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE read is done.

  • waitTime[in] An error will be returned if the FoE read process is not finished within the specified wait time.

ECAPIFUNC FoEWrite(int slaveId, char *filePath, char *fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE write is done.

  • waitTime[in] An error will be returned if the FoE write process is not finished within the specified wait time.

ECAPIFUNC FoEWrite(int masterId, int slaveId, char *filePath, char *fileName, unsigned int password, EcFoEWriteCallBack callbackFunc, unsigned int waitTime)

Write FoE data to the specified slave.

Write FoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which FoE data will be written.

  • filePath[in] FoE file path.

  • fileName[in] FoE file name.

  • password[in] FoE password.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of FoE write is done.

  • waitTime[in] An error will be returned if the FoE write process is not finished within the specified wait time.

ECAPIFUNC SIIWrite(int slaveId, int siiAddr, int len, unsigned char *data, bool checkSum = false)

Write data to the specified slave’s SII EEPROM.

Write data to the specified slave’s SII EEPROM.

Parameters:
  • slaveId[in] ID of the slave to which SII EEPROM data will be written.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • data[in] A pointer to the data array containing the data to be written to SII EEPROM.

  • checkSum[in] Also write check sum after SII data write.

ECAPIFUNC SIIWrite(int masterId, int slaveId, int siiAddr, int len, unsigned char *data, bool checkSum = false)

Write data to the specified slave’s SII EEPROM.

Write data to the specified slave’s SII EEPROM.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SII EEPROM data will be written.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • data[in] A pointer to the data array containing the data to be written to SII EEPROM.

  • checkSum[in] Also write check sum after SII data write.

ECAPIFUNC SIIRead(int slaveId, int siiAddr, int len, unsigned char *buff)

Read data from the specified slave’s SII EEPROM.

Read data from the specified slave’s SII EEPROM.

Parameters:
  • slaveId[in] ID of the slave from which SII EEPROM data will be read.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • buff[out] A pointer to the buffer to which the read SII EEPROM data will be filled in.

ECAPIFUNC SIIRead(int masterId, int slaveId, int siiAddr, int len, unsigned char *buff)

Read data from the specified slave’s SII EEPROM.

Read data from the specified slave’s SII EEPROM.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SII EEPROM data will be read.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • buff[out] A pointer to the buffer to which the read SII EEPROM data will be filled in.

ECAPIFUNC SIIWrite(int slaveId, int siiAddr, int len, unsigned char *data, EcSIIWriteCallBack callbackFunc, unsigned int waitTime, bool checkSum = false)

Write data to the specified slave’s SII EEPROM.

Write data to the specified slave’s SII EEPROM.

Parameters:
  • slaveId[in] ID of the slave to which SII EEPROM data will be written.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • data[in] A pointer to the data array containing the data to be written to SII EEPROM.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SII EEPROM write is done.

  • waitTime[in] An error will be returned if the SII EEPROM write process is not finished within the specified wait time.

  • checkSum[in] Also write check sum after SII data write.

ECAPIFUNC SIIWrite(int masterId, int slaveId, int siiAddr, int len, unsigned char *data, EcSIIWriteCallBack callbackFunc, unsigned int waitTime, bool checkSum = false)

Write data to the specified slave’s SII EEPROM.

Write data to the specified slave’s SII EEPROM.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SII EEPROM data will be written.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • data[in] A pointer to the data array containing the data to be written to SII EEPROM.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SII EEPROM write is done.

  • waitTime[in] An error will be returned if the SII EEPROM write process is not finished within the specified wait time.

  • checkSum[in] Also write check sum after SII data write.

ECAPIFUNC SIIRead(int slaveId, int siiAddr, int len, EcSIIReadCallBack callbackFunc, unsigned int waitTime)

Read data from the specified slave’s SII EEPROM.

Read data from the specified slave’s SII EEPROM.

Parameters:
  • slaveId[in] ID of the slave from which SII EEPROM data will be read.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SII EEPROM read is done.

  • waitTime[in] An error will be returned if the SII EEPROM read process is not finished within the specified wait time.

ECAPIFUNC SIIRead(int masterId, int slaveId, int siiAddr, int len, EcSIIReadCallBack callbackFunc, unsigned int waitTime)

Read data from the specified slave’s SII EEPROM.

Read data from the specified slave’s SII EEPROM.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SII EEPROM data will be read.

  • siiAddr[in] SII address.

  • len[in] SII data length.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SII EEPROM read is done.

  • waitTime[in] An error will be returned if the SII EEPROM read process is not finished within the specified wait time.

ECAPIFUNC AoERead(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned char *readAoEBuff, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Read AoE data from the specified slave.

Read AoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which AoE data will be read.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • readAoEBuff[out] A pointer to the buffer to which the read AoE data will be filled in.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoERead process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoERead.

ECAPIFUNC AoERead(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned char *readAoEBuff, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Read AoE data from the specified slave.

Read AoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which AoE data will be read.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • readAoEBuff[out] A pointer to the buffer to which the read AoE data will be filled in.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoERead process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoERead.

ECAPIFUNC AoEWrite(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Write AoE data to the specified slave.

Write AoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • writeLength[in] AoE data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEWrite process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWrite.

ECAPIFUNC AoEWrite(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Write AoE data to the specified slave.

Write AoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • writeLength[in] AoE data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEWrite process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWrite.

ECAPIFUNC AoEWriteControl(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned short aoeState, unsigned short deviceState, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Write AoE control data to the specified slave.

Write AoE control data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • aoeState[in] AoE state.

  • deviceState[in] Device state.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEWriteControl process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWriteControl.

ECAPIFUNC AoEWriteControl(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned short aoeState, unsigned short deviceState, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Write AoE control data to the specified slave.

Write AoE control data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • aoeState[in] AoE state.

  • deviceState[in] Device state.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEWriteControl process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWriteControl.

ECAPIFUNC AoEReadWrite(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned char *readAoEBuff, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Read and write AoE data from and to the specified slave.

Read and write AoE data from and to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • readAoEBuff[out] A pointer to the buffer to which the read AoE data will be filled in.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEReadWrite process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEReadWrite.

ECAPIFUNC AoEReadWrite(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned char *readAoEBuff, unsigned int writeLength, unsigned char *writeAoEData, unsigned int *errCode, unsigned int waitTime = 0, EcAoESender *sender = NULL)

Read and write AoE data from and to the specified slave.

Read and write AoE data from and to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • readAoEBuff[out] A pointer to the buffer to which the read AoE data will be filled in.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • errCode[out] A pointer to an unsigned int type to which the AoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the AoEReadWrite process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEReadWrite.

ECAPIFUNC AoERead(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, EcAoEReadCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Read AoE data from the specified slave.

Read AoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which AoE data will be read.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE read is done.

  • waitTime[in] An error will be returned if the AoE read process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoERead.

ECAPIFUNC AoERead(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, EcAoEReadCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Read AoE data from the specified slave.

Read AoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which AoE data will be read.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE read is done.

  • waitTime[in] An error will be returned if the AoE read process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoERead.

ECAPIFUNC AoEWrite(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int writeLength, unsigned char *writeAoEData, EcAoEWriteCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Write AoE data to the specified slave.

Write AoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • writeLength[in] AoE data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE write is done.

  • waitTime[in] An error will be returned if the AoE write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWrite.

ECAPIFUNC AoEWrite(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int writeLength, unsigned char *writeAoEData, EcAoEWriteCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Write AoE data to the specified slave.

Write AoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • writeLength[in] AoE data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE write is done.

  • waitTime[in] An error will be returned if the AoE write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWrite.

ECAPIFUNC AoEWriteControl(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned short aoeState, unsigned short deviceState, unsigned int writeLength, unsigned char *writeAoEData, EcAoEWriteControlCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Write AoE control data to the specified slave.

Write AoE control data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • aoeState[in] AoE state.

  • deviceState[in] Device state.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE control data write is done.

  • waitTime[in] An error will be returned if the AoE control data write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWriteControl.

ECAPIFUNC AoEWriteControl(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned short aoeState, unsigned short deviceState, unsigned int writeLength, unsigned char *writeAoEData, EcAoEWriteControlCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Write AoE control data to the specified slave.

Write AoE control data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • aoeState[in] AoE state.

  • deviceState[in] Device state.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE control data write is done.

  • waitTime[in] An error will be returned if the AoE control data write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEWriteControl.

ECAPIFUNC AoEReadWrite(int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned int writeLength, unsigned char *writeAoEData, EcAoEReadCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Read and write AoE data from and to the specified slave.

Read and write AoE data from and to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE read and write is done.

  • waitTime[in] An error will be returned if the AoE read and write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEReadWrite.

ECAPIFUNC AoEReadWrite(int masterId, int slaveId, unsigned char targetNetId[6], unsigned short targetPort, unsigned int indexGroup, unsigned int indexOffset, unsigned int readLength, unsigned int writeLength, unsigned char *writeAoEData, EcAoEReadCallBack callbackFunc, unsigned int waitTime, EcAoESender *sender = NULL)

Read and write AoE data from and to the specified slave.

Read and write AoE data from and to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which AoE control data will be written.

  • targetNetId[in] Target NetId.

  • targetPort[in] Target port.

  • indexGroup[in] Index group.

  • indexOffset[in] Index offset.

  • readLength[in] AoE data length to read.

  • writeLength[in] AoE control data length to write.

  • writeAoEData[in] A pointer to the data which will be written to AoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of AoE read and write is done.

  • waitTime[in] An error will be returned if the AoE read and write process is not finished within the specified wait time.

  • sender[in] Use the specified sender info for AoEReadWrite.

ECAPIFUNC SoERead(int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int buffSize, unsigned char *readSoEBuffer, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0)

Read SoE data from the specified slave.

Read SoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which SoE data will be read.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • buffSize[in] Size of the buffer that is filled in with the read SoE data.

  • readSoEBuffer[out] A pointer to the buffer to which the read SoE data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actually read SoE data size will be filled in.

  • errCode[out] A pointer to an unsigned int type to which the SoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC SoERead(int masterId, int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int buffSize, unsigned char *readSoEBuffer, unsigned int *actualSize, unsigned int *errCode, unsigned int waitTime = 0)

Read SoE data from the specified slave.

Read SoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SoE data will be read.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • buffSize[in] Size of the buffer that is filled in with the read SoE data.

  • readSoEBuffer[out] A pointer to the buffer to which the read SoE data will be filled in.

  • actualSize[out] A pointer to an unsigned int type to which the actually read SoE data size will be filled in.

  • errCode[out] A pointer to an unsigned int type to which the SoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC SoEWrite(int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int dataSize, unsigned char *writeSoEData, unsigned int *errCode, unsigned int waitTime = 0)

Write SoE data to the specified slave.

Write SoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which SoE data will be written.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • dataSize[in] Size of the SoE data to be written.

  • writeSoEData[in] A pointer to the data which will be written to SoE.

  • errCode[out] A pointer to an unsigned int type to which the SoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SoE write process is not finished within the specified wait time.

ECAPIFUNC SoEWrite(int masterId, int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int dataSize, unsigned char *writeSoEData, unsigned int *errCode, unsigned int waitTime = 0)

Write SoE data to the specified slave.

Write SoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SoE data will be written.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • dataSize[in] Size of the SoE data to be written.

  • writeSoEData[in] A pointer to the data which will be written to SoE.

  • errCode[out] A pointer to an unsigned int type to which the SoE error code from the slave will be filled in if there is any.

  • waitTime[in] An error will be returned if the SoE write process is not finished within the specified wait time.

ECAPIFUNC SoERead(int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, EcSoEReadCallBack callbackFunc, unsigned int waitTime)

Read SoE data from the specified slave.

Read SoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which SoE data will be read.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SoE read is done.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC SoERead(int masterId, int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, EcSoEReadCallBack callbackFunc, unsigned int waitTime)

Read SoE data from the specified slave.

Read SoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which SoE data will be read.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SoE read is done.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC SoEWrite(int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int dataSize, unsigned char *writeSoEData, EcSoEWriteCallBack callbackFunc, unsigned int waitTime)

Write SoE data to the specified slave.

Write SoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which SoE data will be written.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • dataSize[in] Size of the SoE data to be written.

  • writeSoEData[in] A pointer to the data which will be written to SoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SoE read is done.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC SoEWrite(int masterId, int slaveId, unsigned char driveNo, unsigned char elementFlags, unsigned short idn, unsigned int dataSize, unsigned char *writeSoEData, EcSoEWriteCallBack callbackFunc, unsigned int waitTime)

Write SoE data to the specified slave.

Write SoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which SoE data will be written.

  • driveNo[in] Drive No.

  • elementFlags[in] Element flags.

  • idn[in] IDN.

  • dataSize[in] Size of the SoE data to be written.

  • writeSoEData[in] A pointer to the data which will be written to SoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of SoE read is done.

  • waitTime[in] An error will be returned if the SoE read process is not finished within the specified wait time.

ECAPIFUNC VoERead(int slaveId, unsigned int *vendorId, unsigned short *vendorType, unsigned int buffSize, unsigned char *readVoEBuffer, unsigned int *actualSize, unsigned int waitTime = 0)

Read VoE data from the specified slave.

Read VoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which VoE data will be read.

  • vendorId[out] Read vendor ID.

  • vendorType[out] Read vendor type.

  • buffSize[in] Size of the buffer that is filled in with the read VoE data.

  • readVoEBuffer[out] A pointer to an unsigned int type to which the actually read VoE data size will be filled in.

  • actualSize[out] A pointer to an unsigned int type which actually read VoE data size will be filled in.

  • waitTime[in] An error will be returned if the VoE read process is not finished within the specified wait time.

ECAPIFUNC VoERead(int masterId, int slaveId, unsigned int *vendorId, unsigned short *vendorType, unsigned int buffSize, unsigned char *readVoEBuffer, unsigned int *actualSize, unsigned int waitTime = 0)

Read VoE data from the specified slave.

Read VoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which VoE data will be read.

  • vendorId[out] Read vendor ID.

  • vendorType[out] Read vendor type.

  • buffSize[in] Size of the buffer that is filled in with the read VoE data.

  • readVoEBuffer[out] A pointer to an unsigned int type to which the actually read VoE data size will be filled in.

  • actualSize[out] A pointer to an unsigned int type which actually read VoE data size will be filled in.

  • waitTime[in] An error will be returned if the VoE read process is not finished within the specified wait time.

ECAPIFUNC VoEWrite(int slaveId, unsigned int vendorId, unsigned short vendorType, unsigned int dataSize, unsigned char *writeVoEData, unsigned int waitTime = 0)

Write VoE data to the specified slave.

Write VoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which VoE data will be written.

  • vendorId[in] Write vendor ID.

  • vendorType[in] Write vendor type.

  • dataSize[in] Size of the VoE data to be written.

  • writeVoEData[in] A pointer to the data which will be written to VoE.

  • waitTime[in] An error will be returned if the VoE write process is not finished within the specified wait time.

ECAPIFUNC VoEWrite(int masterId, int slaveId, unsigned int vendorId, unsigned short vendorType, unsigned int dataSize, unsigned char *writeVoEData, unsigned int waitTime = 0)

Write VoE data to the specified slave.

Write VoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which VoE data will be written.

  • vendorId[in] Write vendor ID.

  • vendorType[in] Write vendor type.

  • dataSize[in] Size of the VoE data to be written.

  • writeVoEData[in] A pointer to the data which will be written to VoE.

  • waitTime[in] An error will be returned if the VoE write process is not finished within the specified wait time.

ECAPIFUNC VoERead(int slaveId, EcVoEReadCallBack callbackFunc, unsigned int waitTime)

Read VoE data from the specified slave.

Read VoE data from the specified slave.

Parameters:
  • slaveId[in] ID of the slave from which VoE data will be read.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of VoE read is done.

  • waitTime[in] An error will be returned if the VoE read process is not finished within the specified wait time.

ECAPIFUNC VoERead(int masterId, int slaveId, EcVoEReadCallBack callbackFunc, unsigned int waitTime)

Read VoE data from the specified slave.

Read VoE data from the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave from which VoE data will be read.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of VoE read is done.

  • waitTime[in] An error will be returned if the VoE read process is not finished within the specified wait time.

ECAPIFUNC VoEWrite(int slaveId, unsigned int vendorId, unsigned short vendorType, unsigned int dataSize, unsigned char *writeVoEData, EcVoEWriteCallBack callbackFunc, unsigned int waitTime)

Write VoE data to the specified slave.

Write VoE data to the specified slave.

Parameters:
  • slaveId[in] ID of the slave to which VoE data will be written.

  • vendorId[in] Write vendor ID.

  • vendorType[in] Write vendor type.

  • dataSize[in] Size of the VoE data to be written.

  • writeVoEData[in] A pointer to the data which will be written to VoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of VoE write is done.

  • waitTime[in] An error will be returned if the VoE write process is not finished within the specified wait time.

ECAPIFUNC VoEWrite(int masterId, int slaveId, unsigned int vendorId, unsigned short vendorType, unsigned int dataSize, unsigned char *writeVoEData, EcVoEWriteCallBack callbackFunc, unsigned int waitTime)

Write VoE data to the specified slave.

Write VoE data to the specified slave.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave to which VoE data will be written.

  • vendorId[in] Write vendor ID.

  • vendorType[in] Write vendor type.

  • dataSize[in] Size of the VoE data to be written.

  • writeVoEData[in] A pointer to the data which will be written to VoE.

  • callbackFunc[in] A pointer to a callback function which will be called when the process of VoE write is done.

  • waitTime[in] An error will be returned if the VoE write process is not finished within the specified wait time.

ECAPIFUNC SetAxisMode(int slaveId, int axisId, EcOperationMode::T mode)

Set the axis operation mode for a specified slave axis.

Set the axis operation mode for a specified slave axis. The operation mode set by this function overrides the operation mode generated by the CoreMotion module (including the mode changed by SetAxisCommandMode function) until NONE is set by this function.

Parameters:
  • slaveId[in] ID of the slave with the axis whose operation mode will be set.

  • axisId[in] ID of the axis to which the operation model will be set.

  • mode[in] Operation mode.

ECAPIFUNC SetAxisMode(int masterId, int slaveId, int axisId, EcOperationMode::T mode)

Set the axis operation mode for a specified slave axis.

Set the axis operation mode for a specified slave axis. The operation mode set by this function overrides the operation mode generated by the CoreMotion module (including the mode changed by SetAxisCommandMode function) until NONE is set by this function.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis whose operation mode will be set.

  • axisId[in] ID of the axis to which the operation model will be set.

  • mode[in] Operation mode.

ECAPIFUNC StartAxisPP(int slaveId, int axisIndex, int targetPos, unsigned int profileVel, unsigned int profileAcc, unsigned int profileDec, char immediately = -1, char relative = -1)

Start the PP operation for a specified slave axis.

Start the PP operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which PP operation will be started.

  • axisIndex[in] ID of axis for which PP operation will be started.

  • targetPos[in] Target position.

  • profileVel[in] Profile velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

  • immediately[in] Start profile immediately. If -1, use previous setting. If 0, start profile after previous profile motion end. If 1, start profile immediately which will override previous profile motion.

  • relative[in] Position specified by targetPos is a relative motion. If -1, use previous setting. If 0, position specified by targetPos is an absolute position. If 1, position specified by targetPos is a relative motion.

ECAPIFUNC StartAxisPP(int masterId, int slaveId, int axisIndex, int targetPos, unsigned int profileVel, unsigned int profileAcc, unsigned int profileDec, char immediately = -1, char relative = -1)

Start the PP operation for a specified slave axis.

Start the PP operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which PP operation will be started.

  • axisIndex[in] ID of axis for which PP operation will be started.

  • targetPos[in] Target position.

  • profileVel[in] Profile velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

  • immediately[in] Start profile immediately. If -1, use previous setting. If 0, start profile after previous profile motion end. If 1, start profile immediately which will override previous profile motion.

  • relative[in] Position specified by targetPos is a relative motion. If -1, use previous setting. If 0, position specified by targetPos is an absolute position. If 1, position specified by targetPos is a relative motion.

ECAPIFUNC StartAxisPV(int slaveId, int axisIndex, int targetVel, unsigned int profileAcc, unsigned int profileDec)

Start the PV operation for a specified slave axis.

Start the PV operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which PV operation will be started.

  • axisIndex[in] ID of axis for which PV operation will be started.

  • targetVel[in] Target velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

ECAPIFUNC StartAxisPV(int masterId, int slaveId, int axisIndex, int targetVel, unsigned int profileAcc, unsigned int profileDec)

Start the PV operation for a specified slave axis.

Start the PV operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which PV operation will be started.

  • axisIndex[in] ID of axis for which PV operation will be started.

  • targetVel[in] Target velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

ECAPIFUNC StartAxisPV(int slaveId, int axisIndex, int targetVel, unsigned int profileAcc, unsigned int profileDec, unsigned short maxTorque)

Start the PV operation for a specified slave axis.

Start the PV operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which PV operation will be started.

  • axisIndex[in] ID of axis for which PV operation will be started.

  • targetVel[in] Target velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

  • maxTorque[in] Maximum torque.

ECAPIFUNC StartAxisPV(int masterId, int slaveId, int axisIndex, int targetVel, unsigned int profileAcc, unsigned int profileDec, unsigned short maxTorque)

Start the PV operation for a specified slave axis.

Start the PV operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which PV operation will be started.

  • axisIndex[in] ID of axis for which PV operation will be started.

  • targetVel[in] Target velocity.

  • profileAcc[in] Profile acceleration.

  • profileDec[in] Profile deceleration.

  • maxTorque[in] Maximum torque.

ECAPIFUNC StartAxisTQ(int slaveId, int axisIndex, short targetTrq)

Start the TQ operation for a specified slave axis.

Start the TQ operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which TQ operation will be started.

  • axisIndex[in] ID of axis for which TQ operation will be started.

  • targetTrq[in] Target torque.

ECAPIFUNC StartAxisTQ(int masterId, int slaveId, int axisIndex, short targetTrq)

Start the TQ operation for a specified slave axis.

Start the TQ operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which TQ operation will be started.

  • axisIndex[in] ID of axis for which TQ operation will be started.

  • targetTrq[in] Target torque.

ECAPIFUNC StartAxisTQ(int slaveId, int axisIndex, short targetTrq, unsigned int maxMotorSpeed)

Start the TQ operation for a specified slave axis.

Start the TQ operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which TQ operation will be started.

  • axisIndex[in] ID of axis for which TQ operation will be started.

  • targetTrq[in] Target torque.

  • maxMotorSpeed[in] Maximum motor speed.

ECAPIFUNC StartAxisTQ(int masterId, int slaveId, int axisIndex, short targetTrq, unsigned int maxMotorSpeed)

Start the TQ operation for a specified slave axis.

Start the TQ operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which TQ operation will be started.

  • axisIndex[in] ID of axis for which TQ operation will be started.

  • targetTrq[in] Target torque.

  • maxMotorSpeed[in] Maximum motor speed.

ECAPIFUNC StartAxisHM(int slaveId, int axisIndex, int method, unsigned int switchSpeed, unsigned int zeroSpeed, unsigned int hmAcc)

Start the HM operation for a specified slave axis.

Start the HM operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which HM operation will be started.

  • axisIndex[in] ID of axis for which HM operation will be started.

  • method[in] Homing method (refer to manual of servo).

  • switchSpeed[in] Operation velocity until the switch signal is detected.

  • zeroSpeed[in] Operation velocity until the home position is detected.

  • hmAcc[in] Acceleration and deceleration during the HM mode.

ECAPIFUNC StartAxisHM(int masterId, int slaveId, int axisIndex, int method, unsigned int switchSpeed, unsigned int zeroSpeed, unsigned int hmAcc)

Start the HM operation for a specified slave axis.

Start the HM operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which HM operation will be started.

  • axisIndex[in] ID of axis for which HM operation will be started.

  • method[in] Homing method (refer to manual of servo).

  • switchSpeed[in] Operation velocity until the switch signal is detected.

  • zeroSpeed[in] Operation velocity until the home position is detected.

  • hmAcc[in] Acceleration and deceleration during the HM mode.

ECAPIFUNC StartAxisHM(int slaveId, int axisIndex, int method, unsigned int switchSpeed, unsigned int zeroSpeed, unsigned int hmAcc, int homeOffset)

Start the HM operation for a specified slave axis.

Start the HM operation for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which HM operation will be started.

  • axisIndex[in] ID of axis for which HM operation will be started.

  • method[in] Homing method (refer to manual of servo).

  • switchSpeed[in] Operation velocity until the switch signal is detected.

  • zeroSpeed[in] Operation velocity until the home position is detected.

  • hmAcc[in] Acceleration and deceleration during the HM mode.

  • homeOffset[in] home offset after homing done.

ECAPIFUNC StartAxisHM(int masterId, int slaveId, int axisIndex, int method, unsigned int switchSpeed, unsigned int zeroSpeed, unsigned int hmAcc, int homeOffset)

Start the HM operation for a specified slave axis.

Start the HM operation for a specified slave axis.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave with the axis for which HM operation will be started.

  • axisIndex[in] ID of axis for which HM operation will be started.

  • method[in] Homing method (refer to manual of servo).

  • switchSpeed[in] Operation velocity until the switch signal is detected.

  • zeroSpeed[in] Operation velocity until the home position is detected.

  • hmAcc[in] Acceleration and deceleration during the HM mode.

  • homeOffset[in] home offset after homing done.

ECAPIFUNC HaltAxis(int slaveId, int axisIndex)

Halt the specified slave axis.

Halt the specified slave axis.

Parameters:
  • slaveId[in] ID of the slave with the axis for which will be halted.

  • axisIndex[in] ID of the axis for which will be halted.

ECAPIFUNC HaltAxis(int masterId, int slaveId, int axisIndex)

Halt the specified slave axis.

Halt the specified slave axis.

Parameters:
  • masterId[in] ID of the master of the slave with the axis for which will be halted.

  • slaveId[in] ID of the slave with the axis for which will be halted.

  • axisIndex[in] ID of the axis for which will be halted.

ECAPIFUNC HaltAxisRelease(int slaveId, int axisIndex)

Release the halt state for a specified slave axis.

Release the halt state for a specified slave axis.

Parameters:
  • slaveId[in] ID of the slave whose axis halt state will be released.

  • axisIndex[in] ID of the axis for which halt state will be released.

ECAPIFUNC HaltAxisRelease(int masterId, int slaveId, int axisIndex)

Release the halt state for a specified slave axis.

Release the halt state for a specified slave axis.

Parameters:
  • masterId[in] ID of the master of the slave whose axis halt state will be released.

  • slaveId[in] ID of the slave whose axis halt state will be released.

  • axisIndex[in] ID of the axis for which halt state will be released.

ECAPIFUNC OpenSerialChannel(int slaveId, int chnlId, wchar_t *comName, DCB *dcb, COMMTIMEOUTS *timeout, unsigned int *error = NULL)

Open a serial channel to the specified slave.

Open a serial channel to the specified slave.

This function is a variation of

OpenSerialChannel(int slaveId, int chnlId, char* comName, DCB* dcb, COMMTIMEOUTS* timeout, unsigned int* error) that accepts a wchar_t COM name. Use this function when using Unicode character sets.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • slaveId[in] ID of the slave whose serial channel will be opened.

  • chnlId[in] ID of the channel which will be opened.

  • comName[in] The name of the COM port that will be opened for this channel.

  • dcb[in] Parameters used to open the COM port.

  • timeout[in] Wait timeout for opening the COM port.

  • error[out] A pointer to an unsigned int type to which the error code will be filled in if there is any.

ECAPIFUNC OpenSerialChannel(int masterId, int slaveId, int chnlId, wchar_t *comName, DCB *dcb, COMMTIMEOUTS *timeout, unsigned int *error = NULL)

Open a serial channel to the specified slave.

Open a serial channel to the specified slave.

This function is a variation of

OpenSerialChannel(int masterId, int slaveId, int chnlId, char* comName, DCB* dcb, COMMTIMEOUTS* timeout, unsigned int* error) that accepts a wchar_t COM name. Use this function when using Unicode character sets.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose serial channel will be opened.

  • chnlId[in] ID of the channel which will be opened.

  • comName[in] The name of the COM port that will be opened for this channel.

  • dcb[in] Parameters used to open the COM port.

  • timeout[in] Wait timeout for opening the COM port.

  • error[out] A pointer to an unsigned int type to which the error code will be filled in if there is any.

ECAPIFUNC OpenSerialChannel(int slaveId, int chnlId, char *comName, DCB *dcb, COMMTIMEOUTS *timeout, unsigned int *error = NULL)

Open a serial channel to the specified slave.

Open a serial channel to the specified slave.

This function can only be called from a Windows application, and cannot be called from an RTX application built using the RTX SDK.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • slaveId[in] ID of the slave whose serial channel will be opened.

  • chnlId[in] ID of the channel which will be opened.

  • comName[in] The name of the COM port that will be opened for this channel.

  • dcb[in] Parameters used to open the COM port.

  • timeout[in] Wait timeout for opening the COM port.

  • error[out] A pointer to an unsigned int type to which error code the will be filled in if there is any.

ECAPIFUNC OpenSerialChannel(int masterId, int slaveId, int chnlId, char *comName, DCB *dcb, COMMTIMEOUTS *timeout, unsigned int *error = NULL)

Open a serial channel to the specified slave.

Open a serial channel to the specified slave.

This function can only be called from a Windows application, and cannot be called from an RTX application built using the RTX SDK.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose serial channel will be opened.

  • chnlId[in] ID of the channel which will be opened.

  • comName[in] The name of the COM port that will be opened for this channel.

  • dcb[in] Parameters used to open the COM port.

  • timeout[in] Wait timeout for opening the COM port.

  • error[out] A pointer to an unsigned int type to which the error code will be filled in if there is any.

ECAPIFUNC CloseSerialChannel(int slaveId, int chnlId)

Close an opened serial channel for the specified slave.

Close an opened serial channel for the specified slave.

This function can only be called from a Windows application, and cannot be called from an RTX application built using the RTX SDK.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • slaveId[in] ID of the slave whose serial channel will be closed.

  • chnlId[in] ID of the channel which will be closed.

ECAPIFUNC CloseSerialChannel(int masterId, int slaveId, int chnlId)

Close an opened serial channel for the specified slave.

Close an opened serial channel for the specified slave.

This function can only be called from a Windows application, and cannot be called from an RTX application built using the RTX SDK.

Remark

When calling this function from the C++ library, the library must be linked.

Parameters:
  • masterId[in] ID of the master whose slave will be operated.

  • slaveId[in] ID of the slave whose serial channel will be closed.

  • chnlId[in] ID of the channel which will be closed.

Public Static Functions

static ECAPIFUNC ErrorToString(int errCode, char *pString, unsigned int size)

Get a string representation of the specified error code.

Get a string representation of the specified error code.

This function returns a string representation of the specified error code. The error code must be defined in the

EcErrorCode enum or the ErrorCode enum in the WMX3Api.h header. All errors returned by functions in class Ecat will be defined in one of these enums. Errors returned by functions in other classes may not be defined in one of these enums, and when such errors are passed to this function, an ErrorCodeNotDefined error will be returned and pString will contain the string representation of this error.

Remark

If pString is too small to contain the entire string representation of the error code, pString will be set to an empty string. An array size of 256 characters will be enough to hold all string representations.

This function is static, and may be called without declaring an instance of the Ecat class or creating a device.

Parameters:
  • errCode[in] The error code to get the string representation of.

  • pString[in] A char array that will contain the string representation of the error.

  • size[in] The size of the char array in number of characters.

static ECAPIFUNC ErrorToString(int errCode, wchar_t *pString, unsigned int size)

Get a string representation of the specified error code.

Get a string representation of the specified error code.

This function is a variation of

ErrorToString that accepts a wchar_t array. Use this function when using Unicode character sets.

Remark

Parameters:
  • errCode[in] The error code to get the string representation of.

  • pString[in] A wchar_t array that will contain the string representation of the error.

  • size[in] The size of the wchar_t array in number of characters.

static ECAPIFUNC ApiLogToString(unsigned char *pLogData, unsigned int logDataSize, char *pString, unsigned int size)

Get a string representation of the raw data of an API log.

Get a string representation of the raw data of an API log.

This function converts the raw data for one API function call that was extracted from the API log with the

GetApiLogData function.

Remark

Parameters:
  • pLogData[in] A char array containing the raw data.

  • logDataSize[in] The size of the pLogData char array. This size must be equal to or greater than the size of the raw data.

  • pString[out] A char array that will contain the string representation of the raw data of the API log.

  • size[in] The size of the pString char array in number of characters.

static ECAPIFUNC ApiLogToString(unsigned char *pLogData, unsigned int logDataSize, wchar_t *pString, unsigned int size)

Get a string representation of the raw data of an API log.

Get a string representation of the raw data of an API log.

This function is a variation of

ApiLogToString that accepts a wchar_t array. Use this function when using Unicode character sets.

Remark

Parameters:
  • pLogData[in] A char array containing the raw data.

  • logDataSize[in] The size of the char array. This size must be equal to or greater than the size of the raw data.

  • pString[out] A wchar_t array that will contain the string representation of the raw data of the API log.

  • size[out] The size of the pString wchar_t array in number of characters.

static ECAPIFUNC GetLibVersion(int *pMajorVersion, int *pMinorVersion, int *pRevisionVersion, int *pFixVersion)

Get the library version information of EcApi.lib.

Get the library version information of EcApi.lib.

This function is used to retrieve the version information of the library used to compile the application. This function is static, and may be called without declaring an instance of the

Ecat class or creating a device. The function GetVersion is used to retrieve the version information of the loaded EcPlatform.rtdll, which could be different from the library. The version of the EcPlatform.rtdll is determined by the rtdll file that is loaded by WMX3Engine.

Remark

Parameters:
  • pMajorVersion[out] The major version number.

  • pMinorVersion[out] The minor version number.

  • pRevisionVersion[out] The revision version number.

  • pFixVersion[out] The fix version number.