dm_Start (start direct mode)
Function
int16 dm_Start(uint16 uiPortNo, uchar08 ucSpeed, char08 *cpErrMsg);
Description
Start direct mode between Master and IO-Link device on required speed (COM1 / COM2 / COM3).
Input Parameters
- uchar08 uiPortNo – (virtual) comport number in order to communicate with Master
- uchar08 ucSpeed – direct mode speed (0 - COM0, 1 - COM1, 2 - COM3)
Output parameters
- char08 *cpErrMsg – pointer to buffer to return error message (minimum 256 bytes)
Return value
Zero if success or negative error number.
Example
enum {
 DM_SPEED_COM1 /* 4.8 kBps */,
 DM_SPEED_COM2 /* 38.4 kBps */,
 DM_SPEED_COM3 /* 230.4 kBps */,
};
int16 iRes = dm_Start(iPortNo, DM_SPEED_COM2);