FMM_OK : Command has been successfully performed.
FMM_NOT_OPEN : The drive has not been connected yet.
FMM_INVALID_PORT_NUM : There is no nPort in the connected ports.
FMM_INVALID_SLAVE_NUM : There is no drive of iSlaveNo in the relevant port.
#include "FAS_EziMOTIONPlusR.h"
void funcModifyParameter()
{
BYTE nPortNo = 1; // COMM Port Number
BYTE iSlaveNo = 0; // Slave No (0 ~ 15)
long lParamVal;
int nRtn;
// Try to connect
if (FAS_Connect(nPortNo, 115200) == FALSE)
{
// Connection failed.
// The port is not connected or the baudrate may be wrong.
return;
}
// Check Axis Start Speed Parameter.
nRtn = FAS_GetParameter(nPortNo, iSlaveNo, STEP_AXISSTARTSPEED, &lParamVal);
if (nRtn != FMM_OK)
{
// Command has not been performed properly.
// Refer to ReturnCodes_Define.h.
_ASSERT(FALSE);
}
else
{
// Parameter value saved in Ezi -STEP Plus-R.
printf("Parameter [before] : Start Speed = %d \n", lParamVal);
}