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.
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)
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.
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 LoadReg20 | Load registers 1 to 20. This can span many chips. |
HoldReg1 to HoldReg20 | Hold registers 0 to 20. This can 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) |
QuadCount1 to QuadCount4 | Used to initialize the counter. (LS7266 only) |
QuadPreset1 to QuadPreset4 | Used to set the upper limit of the counter in some modes. (LS7266 only) |
QuadPrescaler1 to QuadPrescaler4 | Used for clock filtering (valid values: 0 to 255). (LS7266 only) |
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) |