CLoad()

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.

Member of the MccBoard class.

Function Prototype

VB .NET

Public Function CLoad(ByVal regNum As MccDaq.CounterRegister, ByVal loadValue As Integer) As MccDaq.ErrorInfo



Public Function CLoad(ByVal regNum As MccDaq.CounterRegister, ByVal loadValue As System.UInt32) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo CLoad(MccDaq.CounterRegister regNum, uint loadValue)



public MccDaq.ErrorInfo CLoad(MccDaq.CounterRegister regNum, int loadValue)

Parameters

regNum

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

loadValue

The value to be loaded. This value must be between 0 and 2resolution – 1 of the counter. For example, a 16-bit counter is 216 – 1, or 65,535. Refer to the Visual Basic signed integers.

Returns

regNum parameter values

All of the regNum settings are MccDaq.CounterRegister enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the CounterRegister enumeration (for example, variable = MccDaq.CounterRegister.LoadReg0, variable = MccDaq.CounterRegister.HoldReg1, etc.).

LoadReg0 to LoadReg20Load registers 1 to 20. This can span many chips.
HoldReg1 to HoldReg20Hold registers 0 to 20. This can span several chips. (9513 only)
Alarm1Chip1Alarm register 1 of the first counter chip. (9513 only)
Alarm2Chip1Alarm register 2 of the first counter chip. (9513 only)
Alarm1Chip2Alarm register 1 of the second counter chip. (9513 only)
Alarm2Chip2Alarm register 2 of the second counter chip. (9513 only)
Alarm1Chip3Alarm register 1 of the third counter chip. (9513 only)
Alarm2Chip3Alarm register 2 of the third counter chip. (9513 only)
Alarm1Chip4Alarm register 1 of the fourth counter chip. (9513 only)
Alarm2Chip4Alarm register 2 of the fourth counter chip. (9513 only)
QuadCount1 to QuadCount4Used to initialize the counter. (LS7266 only)
QuadPreset1 to QuadPreset4Used to set the upper limit of the counter in some modes. (LS7266 only)
QuadPrescaler1 to QuadPrescaler4Used for clock filtering (valid values: 0 to 255). (LS7266 only)
MinLimitReg0 to MinLimitReg7Min limit register. (USB-CTR Series and USB-QUAD08 only)
MaxLimitReg0 to MaxLimitReg7Max limit register. (USB-CTR Series and USB-QUAD08 only)
OutputVal0Reg0 to OutputVal0Reg7Output register 0. (USB-CTR Series only)
OutputVal1Reg0 to OutputVal1Reg7Output register 1. (USB-CTR Series only)

Notes