Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with sweeping Acquisition timing using ConfigureDataPositionDelay

Solved!
Go to solution

I do not believe that my cards are accepting input from the "ConfigureDataPositionDelay" function as expected when I created a loop to "sweep" acquisition delay.  (I'm trying to find optimal strobe placement.)

 

I have a PXI system with 3 PXI-6552 cards. (only the first two cards capture DUT data)

 

My waveform is running at 40MHz.

 

I am not use HWC because I want the option to leave the drivers on (driving 0V) so I can utilize their 50ohm impedance as line terminations.

 

I am using HSDIO driver version v1.6.  There are compatability problems with some NI488.2 and NIDAQ-Tradition legacy code in my test environment that yields "Visual C++ Run Time error (R6030 - CRT not initialized)" if I try to use v1.7

 

Here is a snippet of psuedo code for my sweep:

 

Loop strobe_placement from 0.0 to 0.9 in 0.1 steps:

  niHSDIO_ConfigureDataPositionDelay(card1acq, pin_list, strobe_placement)
  niHSDIO_ConfigureDataPositionDelay(card2acq, pin_list, strobe_placement)
  niHSDIO_Initiate(card1acq)
  niHSDIO_Initiate(card2acq)
  niTClk_Initiate(3, gen_array)

  niHSDIO_WaitUntilDone(card1acq, 2000)

  niHSDIO_FetchMultiRecordU32(card1acq, data_rec_len, 1000, 1, 1, samp_data, wfm_info)
  niHSDIO_FetchMultiRecordU32(card2acq, data_rec_len, 1000, 1, 1, samp_data, wfm_info)

 

 

Now, I know that the "ConfigureDataPositionDelay" function works fine as part of my system initialization code when my application first loads up.  This initialization code sets MANY features on all my cards and uses MANY different driver calls.  Perhaps I need to call some other driver function AFTER the "ConfigureDataPositionDelay" call to force the hardware to make the change?

 

 

0 Kudos
Message 1 of 2
(3,209 Views)
Solution
Accepted by topic author broke

Ooops.  It's always the simple things.

 

I had ConfigureDataPosition set to NIHSDIO_VAL_SAMPLE_CLOCK_RISING_EDGE during my sweep

instead of  NIHSDIO_VAL_DELAY_FROM_SAMPLE_CLOCK_RISING_EDGE like it should be.

 

Now my sweep is working fine.

0 Kudos
Message 2 of 2
(3,202 Views)