-
5.2.2. Set Relay
Function Description:
There four macro defined for four relay output.
Function call:
BOOL IOC_SetRelay1(BOOL On);
BOOL IOC_SetRelay2(BOOL On);
BOOL IOC_SetRelay3(BOOL On);
BOOL IOC_SetRelay4(BOOL On);
Parameters(Input):
On:
BOOL
: TRUE for relay close
FALSE for relay open.
Return code:
TRUE = Success
FALSE = Unsupported
Example:
#include “ioc_ioctl.h”
…
HANDLE gIOControlDriverHandle;
…
gIOControlDriverHandle = CreateFile(L”IOC1:”, GENERIC_READ |
GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, 0);
If (gIOControlDriverHandle == INVALID_HANDLE_VALUE)
{
// IO device not found, function not supported,
// error process
}
…
IOC_SetRelay1(TRUE);
// close relay 1
IOC_SetRelay4(FALSE);
// open relay 4
…
CloseHandle(gIOControlDriverHandle);
Содержание MR650
Страница 1: ...MR650 Programming Manual V 1 12 1 16 2008 ...
Страница 7: ... 7 13 FUNCTION KEY SETTING ON REGISTRY 65 14 UPDATE NOTES 66 ...
Страница 16: ... it is for internal use send messages ...
Страница 33: ... Be aware to release handles when program ends ...