DAC2_Init


Initialize and reset the DAC-2 controller. This will open the com port, initialize settings, and reset the display.

BOOL WINAPI DAC2_Init(
    LPCTSTR szPort,

    BOOL bEmulate
);

Parameters

szPort

The com port that the DAC-2 is connected to.

bEmulate

Enable the DAC-2 emulator

Return value
If successful, TRUE is returned, else FALSE is returned. Use DAC2_ErrorGetCode to get the error code.

Remarks
You can supply the port number that the DAC-2 is connected to or you can choose to use the emulator if you wish by passing in TRUE to the emulate parameter. If you would like to only like to run the emulator then you can pass in NULL to the port parameter.

Example
Initialize the DAC-2 library

//Initialize the DAC-2 Library for COM4 only

DAC2_Init(“COM4”);

//Initialize the DAC-2 Library for emulation mode only

DAC2_Init(NULL, TRUE);

//Initialize the DAC-2 Library for emulation and the real DAC-2

DAC2_Init(“COM4”, TRUE);