Register Setting of Preset Value

The "Preset value load" is the function that the next preset value is automatically loaded each time a comparison count match occurs.

The figure above shows an action example when using "Preset value load". The comparison count value is fixed at 2000 in this example.
After counter action starts, 0 is loaded as the first preset data.
When the counter value reaches 2000, a comparison count match occurs, the next preset data 500 is loaded, and the count value jumps to 500. In the same, the array values are set in turn each time a comparison count match occurs.

After the last value of the array is loaded, you can repeat it again to load the first data of the array.
In addition, the method does not perform load afterward without repeating (preset value remains at 1500) is also possible.

Use function AioSetCntPresetReg to set "Preset value load".

Ret = AioSetCntPresetReg ( Id , CntChannel , PresetNumber, PresetCount , Flag )

Sets the channel number of counter in the CntChannel. 0 is fixed now.

Specifies the total number of preset value to be load in the PresetNumber.

Specifies the pointer to the array that stores the preset value data in the PresetCount.

Specifies whether to repeat the load in the Flag.

If the preset value is fixed, please set PresetNumber = 1 and Flag = 1.