Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

HSDIO StartTrigger Dynamic Generation Delay

I have a PXI-6541 card that I am using to trigger output on a PXIe-6341, using the nihsdio c# wrapper. The 6541 card is configured to be software-triggered and sends a start trigger from PFI0. To test the timing between the two cards, each card outputs a digital pulse on one channel 1ms after the start of the sequence. What I've found is that the 6341 card starts the pulse exactly 1ms after the trigger, but the 6541 card has a fixed delay of around 300us with a sample clock if 100 kHz. This delay increases by a factor of 10 when I reduce the clock frequency by a factor of 10, which makes me suspect it involves the number of clock cycles. The sample clock from the 6541 card, which is derived from its onboard clock, is routed to the 6341 card. I have checked the sequence that is being written to each card and the channel goes high at the same sample index. Is there a way to output a trigger after I call the Initiate() method to see when the sequence starts on the 6541 card or a better way to ensure both cards are triggered at the same time?

0 Kudos
Message 1 of 6
(4,604 Views)

Hi,

 

Is the 6541 starting the pulse 300us after the trigger, or 1.3ms after the trigger (300us after it's supposed to start)?

 

Could you attach your code?

 

Could you maybe give a flow diagram/timing chart of how you expect your program to work, compared to how it is?

 

Thanks,

Amy K
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 6
(4,586 Views)

The pulse starts 300 us after it's supposed to (1.3ms after the start)

 

I've attached the C# code I used to write the data to the HSDIO card. The basic workflow is:

    1. The card is initialised for dynamic generation using HSDIOTask
    2. Based on settings defined elsewhere, the sample clock is configured. The program is set to use the onboard clock and derive a sample frequency of 100 kHz.
    3. This clock signal is exported onto the ClkOut channel, where it is routed to the 6341 card.
    4. The waveform to write to the card is generated using sequenceData. The data for each channel are a bool array, which are used to make a u32 array and written to the card.
    5. After the sequences are written to each card, the HSDIO card is triggered to start using the HSDIOTask.Initate() and a start trigger is sent using HSDIOTask.SendStartTrigger(). This start trigger from this card is routed to a PFI channel on the 6341 card, which is configured to start the sequence on receiving a trigger

I've looked at the output on an oscilloscope, using the start trigger pulse to trigger the scope and saw that the pulse on the 6341 card started 1ms after this trigger. I havne't been able to see when the HSDIO sequence is triggered after calling Initiate().

 

0 Kudos
Message 3 of 6
(4,568 Views)

Hi,

 

What chassis are you using?

 

Are you routing the trigger via the backplane of the chassis, or externally using wires?

Amy K
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 4 of 6
(4,481 Views)

I have a PXIe-1073. At the moment, I am routing the trigger using the DDC_Clk_out because I can't export the sample clock signal to the PXI backplane. Is there another way I could trigger the 6341 card using a signal from the 6541 card?

0 Kudos
Message 5 of 6
(4,434 Views)

Hi, I've found in the manual for the 6541, on p21, next to "Delay from trigger to digital data output", the value is 32 Sample clock periods + 160ns. (http://www.ni.com/pdf/manuals/373771c.pdf)

 

With a 100kHz sample clock, the period is 10us, therefore the delay from trigger to digital output could be up to 320.16us. 

 

I believe this could be the issue which you're seeing, and appears to be a characteristic of the module.

 

I hope this helps!

Amy K
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 6 of 6
(4,347 Views)