Description of the mca communication dll – GBS Elektronik MCA-166 Communication DLL User Manual

Page 5

Advertising
background image

Description of the MCA Communication DLL

Name

COMM_INIT_SELECT

Description

The function initializes the communication with any MCA. The function detects all available MCA's.

Declaration

short CALLBACK COMM_INIT_SELECT(MCA_COMM_INIT* init,clock_t lTimeOut,
int nTryAgain,HWND hWnd);

init

Pointer to a MCA_COMM_INIT structure.

lTimeOut

Time out [milliseconds] for the communication. It should be set to about 1000 milliseconds, because
there are commands that run a short measurement before they return. The parameter can be set to a
higher value if needed.

nTryAgain

Number of tries to send the command

hWnd

Handle to the parent window

Return value

If the function succeeds, the return value is nonzero.

Name

MCA_COMM_INIT

Description

A pointer of the structure has to be passed to the

COMM_INIT_SELECT

function.

Declaration

struct MCA_COMM_INIT

{ unsigned short unSize;
unsigned short unNumberToFind;

VB_BOOL bMca166;
unsigned short unMca166FwVersion;

VB_BOOL bMca527;
unsigned short unMca527FwVersion;

VB_BOOL bShowLogo;
VB_BOOL bUserInterface;

unsigned short unInterfaceId;
unsigned long ulBaudrate;

};

unSize

Size of the structure.

unNumberToFind

[In] If this number is nonzero, the function tries to initializes the communication to the MCA with the
corresponding serial number. If the communication with this MCA is possible, the communication is
initialized and the function return. If the corresponding MCA is not detected or not usable, all detected
MCA are listed within a dialog window.
If this number is zero, all detected MCA are always listed within a dialog window.

bMca166

[In] If this parameter is nonzero, the MCA-166 is assumed to be applicable.

unMca166FwVersion

[In] This parameter sets the earliest MCA-166 firmware version that is assumed to be applicable.

bMca527

[In] If this parameter is nonzero, the MCA-166 is assumed to be applicable.

unMca527FwVersion

[In] This parameter sets the earliest MCA-527 firmware version that is assumed to be applicable.

bShowLogo

[In] If this parameter is nonzero, the function displays the MCA logo.

bUserInterface

[In] If this parameter is nonzero, the function displays message windows for signaling the work progress.

unInterfaceId

[In] If this parameter is unequal to 0xFFFF, it determines the communication port that shall be used.
[Out] This parameter returns the ID of the used communication port.

ulBaudrate

[Out] If the communication port is RS232 or USB, the parameter returns the current baud rate.

Name

COMM_CLOSE

Description

The function closes the communication.

Declaration

void CALLBACK COMM_CLOSE();

5

Advertising
This manual is related to the following products: