Instruction manual

AMPDIO DRIVERS
Page 160
where h short: board handle as issued by the
registerBoardEx function.
hPWMT short: pulse width modulated pulse train
generator handle, as issued by the
TCsetPWMTrain function.
trainGate short: gate input source for the train rate
generator (if the board has gate connection
registers). One of the following pre-defined
constants may be used:
GAT_VCC = 0 (gate on/high)
GAT_GND = 1 (gate off/low)
GAT_EXT = 2 (gate from external
input)
GAT_OUTN_2 = 3 (gate from inverted
output of a timer
channel offset by -2
from train channel)
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
TCsetPWMTrain
See Also TCfreePWMTrain
TCchangePWMTrainFreq
TCchangePWMTrainDutyCycle
TCcontrolPWMTrain
6.4.8.33 Change Pulse Width Modulated Pulse Train Generator's Frequency TCchangePWMTrainFreq
Changes the frequency and duration of the pulses for the pulse width modulated pulse train
generator, preserving the duty cycle.
SUPPORTED IN VERSION 4.42 ONWARDS.
If the 'pulse' channel uses an automatically chosen internal clock, there may be a glitch when
the frequency is changed.
i = TCchangePWMTrainFreq (h, hPWMT, trainFreq)
where h short: board handle as issued by the
registerBoardEx function.
hPWMT short: pulse width modulated pulse train
generator handle, as issued by the
TCsetPWMTrain function.
trainFreq double: desired train frequency in Hz. The
actual frequency will be rounded to an integral
division of the train clock frequency.