# c_load_64()

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.

## Prototype

c_load_64(board_num, reg_num, load_value)

## Parameters

board_num (int)

The number associated with the board when it was installed with InstaCal or created with create_daq_device().

reg_num (int)

The register to load the count to. Set it to one of the constants in the "reg_num parameter values" section below.

load_value (int)

The value to be loaded. Must be between 0 and 2resolution – 1 of the counter. For example, a 16-bit counter is 216 – 1, or 65,535.

The counter to read the current count from. Valid values are in the range of 0 to 20, depending on the device and the number of counters available on the device; refer to board-specific information.

### reg_num parameter values

LOADREG0 to LOADREG20 | Load registers 0 through 20. This may span several chips.
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

- You cannot load a count-down-only counter with less than 2.
- Counter Types: There are several counter types supported. Refer to the counter chip's data sheet for the registers that are available.
- c_load() vs c_load_32()
- Although the c_load() and c_load_32() functions perform the same operation, c_load_32() is the preferred function to use.
- The only difference between the two is that c_load() loads a 16-bit count value, and c_load_32() loads a 32-bit value. The only time you need to use c_load_32() is to load counts that are larger than 32-bits (counts >4,294,967,295).