# cbCLoad64()

Loads a value into the specified counter register.

For some devices, the value is directly loaded into the count register. For other devices, the value is first loaded into the load or hold register. Once the counter is enabled, the count is loaded from the appropriate register, generally on the first valid pulse.

## Function Prototype

C/C++

int cbCLoad64(int BoardNum, int RegNum, ULONGLONG LoadValue)

## Arguments

BoardNum

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

RegNum

The register to load the value into. Set it to one of the constants in the "RegNum argument values" section below.

LoadValue

Value to be loaded into RegNum.

## Returns

- Error code or 0 if no error occurs

### RegNum argument values

LOADREG0 to LOADREG20 | Load registers 0 through 20. This may span several chips.
HOLDREG1 to HOLDREG20 | Hold registers 1 through 20. This may span several chips. (9513 only)
ALARM1CHIP1 | Alarm register 1 of the first counter chip. (9513 only)
ALARM2CHIP1 | Alarm register 2 of the first counter chip. (9513 only)
ALARM1CHIP2 | Alarm register 1 of the second counter chip. (9513 only)
ALARM2CHIP2 | Alarm register 2 of the second counter chip. (9513 only)
ALARM1CHIP3 | Alarm register 1 of the third counter chip. (9513 only)
ALARM2CHIP3 | Alarm register 2 of the third counter chip. (9513 only)
ALARM1CHIP4 | Alarm register 1 of the fourth counter chip. (9513 only)
ALARM2CHIP4 | Alarm register 2 of the fourth counter chip. (9513 only)
COUNT1 to COUNT4 | Used to initialize the counter. (LS7266 only) Load this value FIRST if using the PRESETx or PRESCALERx registers.
PRESET1 to PRESET4 | Used to set the upper limit of the counter in some modes. (LS7266 only)
PRESCALER1 to PRESCALER4 | Used for clock filtering (valid values: 0 to 255). (LS7266 only) If using the PRESETx or COUNTx registers, load this value LAST.
MINLIMITREG0 to MINLIMITREG7 | Min limit register. (USB-CTR Series and USB-QUAD08 only)
MAXLIMITREG0 to MAXLIMITREG7 | Max limit register. (USB-CTR Series and USB-QUAD08 only)
OUTPUTVAL0REG0 to OUTPUTVAL0REG7 | Output register 0. (USB-CTR Series only)
OUTPUTVAL1REG0 to OUTPUTVAL1REG7 | Output register 1. (USB-CTR Series only)

## Notes

- cbCLoad() vs cbCLoad64()
- Although the cbCLoad() and cbCLoad64()functions perform the same operation, cbCLoad64() is the preferred function to use.
- The only difference between the two is that cbCLoad() loads a 16-bit count value, and cbCLoad64() loads a 64-bit value. The only time you need to use cbCLoad64() is to load counts that are larger than 32-bits (counts >4,294,967,295).