DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
28
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.
Calling
DqAdv650SetAMZCMode
configures AM zero-crossing parameters:
•
CT650_ZCCFG_ZAV(N)
– number of samples in average for ADC data
•
CT650_ZCCFG_ZCAZ
– =1-use "auto zero" if it auto-calculated zero
level is within of the 1/8 of "zero_level" (ZCL_Dx)
•
CT650_ZCCFG_ZCZD
– Select direction of the crossing for min/max
detection (1=rising)
•
CT650_ZCCFG_ZCAS(N)
– 0=1, 1=2, 2=4, 3=8, 4=16, 5=32, 6=64,
7=128, 8=256
•
CT650_ZCCFG_ZCSC(N)
– 0=1, 1=2, 2=4, 3=8, 4=16, 5=32, 6=64,
7=128, 8=256
To completely take control over input timecode parameters, use this call:
int DqAdv650SetTimecodeInputEx(int hd, int devn, uint32 mode,
uint32 input,
pCT650_IRIG_PRM_DEF pPrmDef,
pCT650_IRIG_CODE_DEF pDataDef,
pCT650_IRIG_SIG_DEF pSigDef,
uint32 sigDefMask);
<pPrmDef>
and
<pDataDef>
need to be set to the same tables as in
DqA-
dv650SetTimecodeInput()
, however most of the automatically calculated
parameters can be overwritten. Additionally,
<pSigDef>
is defined as:
typedef struct {
// user-defined part
double ppx;
// time between time codes (for
// most IRIG-x == 1pps)
uint32 pph;
// pulses per hour, 1PPS=3600PPH
uint32 in_freq;
// input carier frequency
uint32 rx_ici;
// ct650_rx_ici - pulses per bit
uint32 dbcnt;
// ct650_dbcnt (debouncing counter
// only in NRZ input mode in 10ns)
uint32 rxmsg_len;
// ct650_rxmsg_len input message
// length
uint32 pi_min;
// ct650_pi_min - minimum number of
// pulses in position identifier
uint32 pi_max;
// ct650_pi_max - maximum number of
// pulses in position identifier
uint32 l0_min;
// ct650_l0_min - minimum number of
// pulses in level 0 position
uint32 l0_max;
// ct650_l0_max - maximum number of
// pulses in level 0 position
uint32 l1_min;
// ct650_l1_min - minimum number of
// pulses in level 1 position
uint32 l1_max;
// ct650_l1_max - maximum number of
// pulses in level 1 position
// system-defined part
uint32 cr_tol_min;
// ct650_cr_tol_min (signal
// tolerance - MAN2 mode only)