# cbStopBackground()

Stops one or more subsystem background operations that are in progress for the specified board. Use this function to stop any function that is running in the background. This includes any function that was started with the BACKGROUND option, as well as cbCStoreOnInt() (which always runs in the background).

Execute cbStopBackground() after normal termination of all background functions to clear variables and flags.

## Function Prototype

C/C++

int cbStopBackground(int BoardNum, int FunctionType)

Visual Basic

Function cbStopBackground(ByVal BoardNum&, ByVal FunctionType&) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99.

FunctionType

Specifies which background operation to stop. Specifies which scan to retrieve status information about. Refer to the FunctionType argument values section below.

## Returns

- Error code or 0 if no errors

### FunctionType argument values

AIFUNCTION | Specifies analog input scans started with cbAInScan() or cbAPretrig().
AOFUNCTION | Specifies analog output scans started with cbAOutScan().
DIFUNCTION | Specifies digital input scans started with cbDInScan().
DOFUNCTION | Specifies digital output scans started with cbDOutScan().
CTRFUNCTION | Specifies counter background operations started with cbCStoreOnInt() or cbCInScan().
DAQIFUNCTION | Specifies a synchronous input scan started with cbDaqInScan().
DAQOFUNCTION | Specifies a synchronous output scan started with cbDaqOutScan().