Digital I/O

Showing results for 
Search instead for 
Did you mean: 

Triggering on Dynamic Acquisition using 6551

I am using two 6551 waveform generators - one for dynamic acquisition and one for dynamic generation.  I am able to trigger on a specific data pattern coming in through channels 0 & 1 on the dynamic acquisition 6551.  My problem is that I need to IMMEDIATELY (under 2msec time constraint) send a "response" out on the dynamic generation 6551.  I have it down to the following steps in my Labview code: niHSDIO Configure Trigger (looking for the pattern expected in the first bit!), then set up my buffer size using niHSDIO Configure Acquisition Size (the size of the number of samples I expect to collect from the input) and finally I use niHSDIO Read Waveform to collect my data.  Right after that, I use niHSDIO Initiate on the transmitting 6551 to send the response pattern.  The delays are too long from when I get the pattern match to when I see the data pattern coming out.  It is on the order of 25 msec.  My device under test will time out long before that!  I have even tried to make the amount of data to capture be something smaller, but then I do not get all of the data I am expecting (a second call to read the waveform fails).
Problem:  I need to start the niHSDIO Initiate as soon as the pattern is matched and NOT wait for the rest of the data to be read via the niHSDIO Read Waveform in order to perform the write.  Is this possible?
I have attached a snippet of the code to show the flow I need.....this gives you the idea of what I am trying to accomplish.
0 Kudos
Message 1 of 2

On thing I might suggest is to export your start trigger from the acquisition device to the generation device in order to gain better synchronization.  When your acquisition device registers a pattern match, it generates a start event.  In the "Dynamic Acquisition Triggers and Events" section of the help file, your acquisition devices says that it can export this start event to one of its trigger lines (PFI, RTSI, etc).  You can then connect this to one of the trigger lines of your generation device and use that as a "Start Trigger".  According to the documentation you can use any of the PFI or dedicated triggers lines.  If you're in PXI you can use one of the PXI_TRIG lines to easily send the signal from device to device.  Likewise, in PCI, you could use RTSI.

In this fashion, when the pattern is received and matches, the acquisition will start and generate an event.  This event will be connected to the generation device and will be used to start the generation.  Since this is all hardware timed, your level of synchronization will be purely based on clock rates and propagation delays rather than software.

I hope this helps!

Happy Holidays
Message 2 of 2