Instruction manual

AMPDIO DRIVERS
Page 136
freq float: desired frequency in Hertz.
The frequency must be at least 0.01 Hz.
The maximum frequency is the highest
available internal clock frequency divided by 2.
For cards with clock connection registers, this
is 5000000 Hz.
For cards with clock connection registers, the
internal input clock frequency is set to the
highest of 1 kHz, 10 kHz, 100 kHz, 1 MHz or
10 Mhz that is no more than the desired
frequency multiplied by 65536.
The pulse width is 1 s divided by the internal
input clock frequency.
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRRANGE
Prior Calls registerBoardEx
See Also TCgenerateFreq
6.4.8.7 Set up a Periodic Pulse Train Generator — TCsetPeriodicPulseTrain
Sets up a periodic pulse train on the specified timer channel. It sets up a hardware-
retriggerable one-shot on another timer channel to set the duration of the pulse train and sets
up a periodic rate generator on a third timer channel (the 'train' channel) to retrigger the one-
shot periodically.
SUPPORTED IN VERSION 4.32 ONWARDS.
The 'one-shot' channel is offset by -2 from the specified 'pulse' channel. The 'train' channel is
offset by -2 from the 'one-shot' channel. All the timer channels on all timer chips are grouped
together to determine a negative offset channel, so this may be on the next lower timer chip. If
there is no next lower timer chip, a wraparound to the highest timer chip will be used to
determine the offset channel.
If the board lacks clock connection and gate connection registers, the clock sources must be
wired up manually. The output of the 'one-shot' channel must be inverted and wired up
manually to the gate input of the 'pulse' channel. The output of the 'train' channel must be
wired up manually to the gate input of the 'one-shot' channel.
For PC214E: Timer Z1 channel 0 provides an inverted output on connector SK1 so this is best
used as the 'one-shot' channel, using Z1 channel 2 as the 'pulse' channel and Z1 channel 1 as
the 'train' channel. Wire Ctr Z1 /OUT0 O/P (pin 54) to Ctr Z1 GAT2 I/P (pin 75), wire Ctr Z1
OUT1 O/P (pin 55) to Ctr Z1 GAT0 I/P (pin 73), set J2 to the 'one-shot' clock source, set J3 to
the 'train' clock source and set J4 to the 'pulse' clock source. The pulse train output is on Ctr
Z1 OUT2 O/P (pin 17).
i = TCsetPeriodicPulseTrain (h, pulseChip, pulseChan, pulseClock,
pulseCount, pulseShape, oneshotClock, oneshotTime, trainClock,
trainGate, trainFreq)