DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
29
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.
uint32 ct_tol_max;
// ct650_ct_tol_max (signal
// tolerance - MAN2 mode only)
uint32 mii_tol;
// ct650_mii_tol 50us @ 100Mhz base
uint32 pps_min;
// ct650_pps_min - flywheel clock
//divider auto-correction low limit
uint32 pps_max;
// ct650_pps_max - flywheel clock
//divider auto-correct’n high limit
uint32 ppsmav;
// ct650_ppsmav 3 = 8 points
} CT650_IRIG_SIG_DEF, *pCT650_IRIG_SIG_DEF
To tell the function which of those parameters needs to be overwritten, use one
of more of the following
<flags>
:
// constant flags to validate each
// member of CT650_IRIG_SIG_DEF
#define CT650_RX_ICIWR (1L<<0)
#define CT650_DBCNTWR (1L<<1)
#define CT650_RXMSG_LENWR (1L<<2)
#define CT650_PI_MINWR (1L<<3)
#define CT650_PI_MAXWR (1L<<4)
#define CT650_L0_MINWR (1L<<5)
#define CT650_L0_MAXWR (1L<<6)
#define CT650_L1_MINWR (1L<<7)
#define CT650_L1_MAXWR (1L<<8)
#define CT650_CR_TOL_MINWR (1L<<9)
#define CT650_CR_TOL_MAXWR (1L<<10)
#define CT650_MII_TOLWR (1L<<11)
#define CT650_PPS_MINWR (1L<<12)
#define CT650_PPS_MAXWR (1L<<13)
#define CT650_PPSMAVWR (1L<<14)
3.2.2.3
Fine-tuning
Input
Parameters &
Registers
The following function may be useful for fine-tuning input timecode parameters
outside of the common timecodes prepackaged for ease of use. Since the use
of this function requires deep knowledge of processes inside time decoding
algorithms and trial-and-error approach, the IRIG-650 API provides a special
low-level function to read internal registers:
int DAQLIB DqAdv650ReadReg(int hd, int devn, uint32 reg,
uint32* value);
Information from the following registers is most useful to find problems with the
input AM timecode signal (ADC produces 2s complement 16-bit data):
#define CT650_ADC_AV 0x2010
// Average of ADC data
// Calculated level of zero (16-bit)
#define CT650_ZCL 0x2084
// Averaged "High"("Mark") amplitude minimum
#define CT650_ZC_AMMAX 0x2088
// Averaged "High"("Mark") amplitude maximum
#define CT650_ZC_AMMIN 0x208C
// Zero crossing "High"("Mark") amplitude maximum
#define CT650_ZC_MMAX 0x2090
// Zero crossing "High"("Mark") amplitude minimum
#define CT650_ZC_MMIN 0x2094
// Zero crossing "Low"("Space") amplitude maximum
#define CT650_ZC_SMAX 0x2098
// Zero crossing "Low"("Space") amplitude minimum
#define CT650_ZC_SMIN 0x209C