Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

pattern trigger for acquisition session using PCI-6541

I am running simultaneous acquisition and generation sessions using the PCI-6541.  My generation session seems to be working fine, but for some reason my acquisition session never recognizes the pattern, and the Read Waveform VI times out.  When I look at my waveforms on the logic analyzer, I can see that the waveforms are as I would expect them -- the generated waveform is a clock for my device, and the device responds while the clock is running.  However, the acquisition session never sees the response from my device.
 
I think this is a timing issue...  I've tried putting the VIs in different orders, using the Fetch VI, etc., but so far I have not been able to figure out how to make the synchronization any better.  Because of the way my hardware is set up, I am unable to use the PFI lines, so I don't think a hardware trigger is possible.
 
I would appreciate any insights you might have!  I've attached a screenshot of how I've configured my generation and acquisition sessions.
 
Regards,
Michelle
0 Kudos
Message 1 of 3
(3,240 Views)
Michelle,

Thanks for the screenshot, that helps alot.  As you have it coded, you have the ReadWaveform and the Initiate Generation execute in parallel so you have no guarantee which happens first.  It may be the case that you are generating the pattern before you actually start to look for the trigger.  If you need your acquisition to trigger on your generation then you need to make sure that you initiate your acquisition before you start to generate. 

You can use the exact same Initiate VI that you used in the generation code.  By explicitly calling initiate, you can use the FETCH waveform vi rather than the READ waveform.  The READ waveform essentially combines the two operations so you do not have as fine a control over when the session initiate relative to other VI's in your code.  There are a couple of examples that ship with LabVIEW and CVI that better illustrate the difference between the two functions and how they are used.

In this fashion, you can start your acquisition and have it waiting on the pattern match trigger.  You then start your generation which will be registered by the acquisition session which will then trigger and acquire the data into memory.

Does this help?  If not, there are some other tricks we might can try that will get the two sessions to be more in synch.

Have a great weekend
Ryan
0 Kudos
Message 2 of 3
(3,231 Views)

Ryan,

That certainly helps me clarify what I should be shooting for.  I'm headed off for the weekend, but I'll be back at it on Monday.  I'll let you know how things go!

 

Regards,

Michelle  Robot Very Happy

0 Kudos
Message 3 of 3
(3,226 Views)