DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
30
Programming with the Low Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: March 2019
DNx-IRIG-650 Chap3x.fm
© Copyright 2019
United Electronic Industries, Inc.
Contact our technical support for other types of low-level information available
for debugging purposes.
Since there is a propagation delay for the signal to travel across a wire, you can
use
DqAdv650SetPropDelay()
to adjust propagation delay of the timecode
signal in the wiring with 10ns resolution (applies onto to DCLS or MII signaling).
3.2.3
Output
programming
For output data definition, the data definition table is also represented in terms
of TREG addressing, and the firmware automatically translates it into an output
format table.
Output automatically appears on AM output line and DCLS signal needs to be
routed to TTL Out lines (see“Layer Connectors and Wiring” on page 9).
To configure the output timecode, use
DqAdv650SetTimecodeOutput()
.
As an example, we use the same timecode parameter and data definition table
as in the input example, but disable the straight binary seconds (SBS) section:
pOutPrm->is_sbs = FALSE;
ret = DqAdv650SetTimecodeOutput(hd, devn, mode, output,
pOutPrm, pDataDef);
<mode>
can be a combination of the following bits:
•
CT650_OUT_DISABLED
– start output in disabled state
•
CT650_OUT_ENABLED
– start output in enabled state
•
CT650_OUT_ONVALID
-
Disable output waveform generation until time
assembler restarts (may take two minutes for sub-PPS codes like IRIG-
E or H) to avoid incorrect output during initial synchronization with exter-
nal time signal source.
•
CT650_OUT_EXTSYNCRQ
-
External Resynchronization required bit –
works as a modifier for the
CT650_OUT_ONVALID
, if this bit is set and
CT650_OUT_ONVALID
as well output waveform is disabled until resyn-
chronization with external source is achieved plus one ta_restart pulse
is received from the time keeper (extra ta_restart period is required
because time keeper re-syncs in the middle of the pps/ppm/pph period.
Note that for time codes that repeat every hour (IRIG-D) the re-synchro-
nization process can take up to three hours.
For example, to start output when input timecode is valid:
mode = CT650_OUT_ONVALID |
// start output when input
CT650_OUT_EXTSYNCRQ;
// timecode is valid
Calling
DqAdv650SetAMOutputLevels(int hd, int devn, uint32
flags, double hi_gain, double low_gain, double offset)
allows
you to adjust the AM output level, low and high signal ratio and signal DC offset.
<hi_gain>
adjusts "logic 1" gain [0..2]
<low_gain>
adjusts "logic 0" gain [0..2]
<offset>
adjusts DC output offset [-0.5..+0.5]
The default high-to-low ratio is 3:1 with zero offset and 2V amplitude.