LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fast scan chain

Hi all,

I have a standard DFF scan chain (single clock, positive edge triggered) on a CMOS chip that I would like to read out as quickly as possible.  I want to assert the scan clock from the DAQ board, and read each output value between rising edges with the same board.  We are working with a NI USB-6259.

Until this point, I have just been going through a loop where I set the scan clock high, then read, then set the clock low, and then repeat.  It works, but it's slow of course.  We want to do this as fast as possible, but are not sure how to do the scanclock/data read timing yet.

I'm looking through examples, but can't tell if I'm on the right path.  Is the "Analog IO Control Loop (HW timed)" something I should be looking at?  (http://zone.ni.com/devzone/cda/epd/p/id/2839).  Is there a better example, or any advice someone can provide?

Thanks for your time.
0 Kudos
Message 1 of 4
(2,475 Views)
Hi Jkeane3,

If I'm fulling understanding the application, I would just export the sample clock from the USB-6259.  This can be accomplished using the DAQmx Export Signals.vi.  This will allow you to clock your D Flip-Flop with the same clock your using to aquire the output from.  If you are seeing analog samples, this can be achieved with a simple continuous or finite voltage example (Help » Find Examples » Hardware Input and Output » DAQmx » Analog Measurement » Voltage) with the added DAQmx Export Signal.vi.  This is assuming you want to clock the DFF with the same clock you're using to acquire the output.

Please let me know if I misunderstood your application.

I hope this helps,
Paul C.

Message Edited by Paul C. on 10-08-2007 06:13 PM

0 Kudos
Message 2 of 4
(2,440 Views)
Thanks for the response Paul.  I do think you understand what I'm trying to do...simply a series of:

1) Send a scanclock pulse
2) Read scandata
3) Repeat.

Right now I am just acheiving this by running through a while loop in which I have three DAQ Assistants.  The first one sets scanclock high, the second takes a single sample of scandata, and the third sets the scanclock low.  I run through the while loop 16 times to get my 16 bits of data.  However, the full scan routine is taking roughly 0.7 seconds if the timers are correct.  I would like to run this on the order of microseconds, or as close to that as possible though.

I looked through the voltage reading examples in the category you suggested, but don't yet see what I am hoping for.  I might just not know how to find that yet though. 

Ideally, I would like to somehow simply offset the scanclock and scandata reads so that I can create the whole 16 bit routine in one shot...without running through a loop where the "while" condition has to be checked (stop if 'i == 15'), the channels have to be set up (or whatever the DAQ Assistants do when they're called), looking for a trigger (since I know when I'm sending that scanclock and can read any time after that), etc...  Is there any way I can do this more efficiently? 

Thank again, and sorry if a solution should be more obvious from your previous post!
0 Kudos
Message 3 of 4
(2,419 Views)
Hi Jkeane3,

I would specifically take a look at the Cont Acq&Graph Voltage-Int Clk.vi example (Help » Find Examples » Hardware Input and Output » DAQmx » Analog Measurement » Voltage).  I modified this example to simply include exporting the internal sample clock so you could use it by connecting to PFI0.  This will allow you to use the same sampling clock for running your flip flops as you are using to take samples with the DAQ card.  My only concern is that the timing might need to be adjusted for this to work.  If we can get this working, you should be able to achieve a much faster hardware timed solution.  In a software timed solution, the operating system, cpu speed, etc. all become a limiting factor on speed.  There might be ways we can increase the speed in a software timed solution, but it would be more on the second to millisecond scale and not microsecond.  I have gone ahead and attached a picture of the example and the modifications that I have made to include the export signals Vi.



Regards,
Paul C.

Message Edited by Paul C. on 10-11-2007 05:19 PM

0 Kudos
Message 4 of 4
(2,400 Views)