Setup the folder path of Log output files.
BOOL FAS_SetLogPath(LPCTSTR lpPath);
lpPath
Folder path Character string of Log output file.
If the folder name is not exist or can not access, return FALSE.
This function have to be called before FAS_Connect library.
If the lpPath value is NULL or the length is 0, the Log path is selected to
Ezi-MOTION Plus-R Library folder. The default value for Log path is NULL that the
current library and program exist folder.
#include "FAS_ EziMOTIONPlusR.h"
void funcEnableLog()
{
BYTE nPortNo = 1; // COMM Port number
// Log output.
FAS_EnableLog(TRUE);
if (!FAS_SetLogPath(_T(“C:\\Logs\\”))) // C:\Logs folder exist.
{
// Log path does not exist.
Return;
}
// All Log output is stored in C: \Logs folder.
// Try to connect.
if (FAS_Connect(nPortNo, 115200) == FALSE)
{
// Connection fail.
// cab be different Port or different Baudrate.
return;
}
// Close connect.
FAS_Close(nPortNo);
}