DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
23
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.
For example, the time code IRIG-B B004/B124 is defined as follows:
// IRIG B -- IRIG parameters structure definition
CT650_IRIG_PRM_DEF irig_b_bcd_cf_sbs_prm = {
"IRIG B",
// encoding name
"B124",
// signal subtype
100.0,
// 100Hz bit rate
1.0,
// 1Hz frame rate
1000.0,
// 1kHz carrier frequency
10,
// 10 cycles per bit
2,
// two "high" for logic 0
5,
// five "high" for logic 1
8,
// eight "high" for position identifier
TRUE,
// TRUE if BCD code is present in the data
TRUE,
// TRUE if CF codes are present
TRUE,
// TRUE if SBS is present
TRUE
// TRUE if CD 50-58 contain BCD year data
};
The
encoding name
and
signal subtype
are used for identification purposes
only and are not cross-checked internally against content of the data table and/
or other paramters.
Bit rate
characterizes number of characters to be received in one second.
Frame rate
specifies how often the code is repeating itself – in case of most
popular IRIG-B code it’s once per second.
Carrier frequency
applies to both DCLS (direct current level shift, also known
as NRZ-L code) and AM timecodes. In case of AM, it is the frequency of the sine
signal. In case of DCLS, it is quantization frequency.
Number of
cycles per bit
is the character length in carrier periods; here it is ten.
For character “0”, each character consists of two “high” and eight “low” periods.
For character “1”, each character consists of five “high” and five “low” periods.
For
position identifier
, each char consists of eight “high” and two “low” periods.
A character consisting of ten periods of the same level (normally “low”) is
considered idle character and is rarely used.
The last four fields of the structure overrides information in the data definition
table and depends on whether actual time code contains
BCD time
information,
control functions fields (
CF
), straight binary seconds (
SBS
) or
year
information
in CF field character. The data definition tables are prepackaged by assumption
that all this information is available in the input or output timecode and these bits
can quickly disable or enable named timecode blocks in accordance with the
actual data.
UEI provides pre-packaged code definitions for IRIG-A/B/D/E/G/H which can be
tweaked by the user to match their actual time code as in this example:
pCT650_IRIG_PRM_DEF pOutPrm;
pOutPrm =
(pCT650_IRIG_PRM_DEF)malloc(sizeof(CT650_IRIG_PRM_DEF));
memcpy(pOutPrm, pPrmDef, sizeof(CT650_IRIG_PRM_DEF));
pOutPrm->is_sbs = FALSE;
// supress SBS in output
ret = DqAdv650SetTimecodeOutput(hd, devn, mode, output,
pOutPrm, pDataDef);