# cbMemReset()

Resets the memory board pointer to the start of the data. The memory boards are sequential devices. They contain a counter which points to the 'current' word in memory. Every time a word is read or written this counter increments to the next word.

## Function Prototype

C/C++

int cbMemReset(int BoardNum)

Visual Basic

Function cbMemReset(ByVal BoardNum&) 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.

## Returns

- Error code or 0 if no errors

## Notes

- This function is used to reset the counter back to the start of the memory. Between successive calls to cbAInScan(), you should call this function so that the second cbAInScan() overwrites the data from the first call. Otherwise, the data from the first cbAInScan() will be followed by the data from the second cbAInScan() in the memory on the card.
- Likewise, anytime you call cbMemRead() or cbMemWrite(), it will leave the counter pointing to the next memory location after the data that you read or wrote. Call cbMemReset() to reset back to the start of the memory buffer before the next call to cbAInScan().