B&B Electronics 232OPSDA manual initComPort, hComDev, BYTE modAddr, WORD lines, WORD

Models: 232OPSDA

1 28
Download 28 pages 11.94 Kb
Page 22
Image 22
hComDev, BYTE modAddr, WORD lines, WORD

B232OPSDA_SetDigitalOutput

Purpose: This function sets the states of the digital output lines.

Syntax:

C:

BOOL B232OPSDA_SetDigitalOutput (WORD

 

 

 

 

hComDev, BYTE modAddr, WORD lines, WORD

 

 

states);

 

Pascal:

function B232OPSDA_ReadDigitalOutput

 

 

(hComDev : word; modAddr : byte; lines :

 

 

word; states : word);

 

BASIC:

FUNCTION B232OPSDAReadDigitalOutput

 

 

(BYVAL hComDev AS INTEGER, BYVAL modAddr

 

 

AS INTEGER, BYVAL lines AS INTEGER, BYVAL

 

 

states AS INTEGER)

Remarks:

hComDev is the handle to a serial port where the

 

module is connected. This is the value returned by

 

initComPort. modAddr is the module address. This

 

is always 30H (48 decimal) for 232OPSDA module.

 

lines is a bit mask of the digital outputs to change. This

 

will always be 01H (1 decimal) of the 232OPSDA,

 

because it only has one digital output line. states is the

 

new state of the digital outputs specified in lines. This

 

can be either zero for OFF or non-zero for ON.

Returns:

FALSE (zero) if the function fails, otherwise it returns

 

TRUE (non-zero).

deinitComPort

Purpose:

Removes the serial communications port driver.

Syntax:

C:

void deinitComPort (WORD hComDev);

 

 

 

Pascal:

procedure deinitComPort (hComDev : word);

 

BASIC:

sub deinitComPort (BYVAL hComDev AS

 

 

INTEGER);

Remarks:

This function must be called after a serial

 

communications port is installed with initComPort to

 

remove the interrupt service routine that it installs.

Returns:

Nothing.

 

See Also:

initComPort

initComPort

Purpose: Installs a serial communications port driver.

Documentation Number 232OPSDA1397 Manual

21

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5105

Page 22
Image 22
B&B Electronics 232OPSDA initComPort, hComDev, BYTE modAddr, WORD lines, WORD, BYVAL hComDev AS INTEGER, BYVAL modAddr