11-12-2013 06:13 PM
I'd like to start by stating I'm using a PCIe-6323 card, which should be able to write out at the rates I'm requiring.
My external clock consists of a 1ns pulse with a 40KHz frequency. I'd like to change the output voltage at the same rate, however using a timing loop and changing values sequentially causes a lot of overhead, slowing the entire process down (if you know how to do this without slowdown then please let me know).
To remedy this I decided to create an arbitrary waveform (staircase) that contains 20 steps from 0-1. The idea was that I'd pass this waveform to my write out command every 20th pulse received from my external timing source. By writing a waveform instead of a single number, I'd be cutting the overhead in effect by 20. A major issue that I've run in to is getting everything to line up. On an oscilloscope I'd obviously want to see each 1ns pulse fall on the edge of one of the steps. Each step, corresponding to the 40KHz, is 25us long. This isn't happening.
Do I need to break down and get an FPGA module? I just don't think the hardware is fast enough to read in a signal and write it back out without being given a waveform, but I can't seem to get the waveform to generate with enough resolution and speed.
Thanks in advance...there's a lot here in one post.
Andrew
11-13-2013 12:53 AM
What I would do (Not sure if this is what you are doing)
Use a Counter timer connected to an external input (PFI) as clock source. You will find each timer has a default input, you can change it with a property node if necessary.
Link the AO Clock source to the above counter timer.
The rest will be done by hardware. You can have higher resolution waveform if you want.
I am not familiar with the newer hardware, it may be possible to route the PFI direct to the AO souce, it wasn't possible on the 62xx series devices.
11-13-2013 10:17 AM
Thanks for replying.
That is actually what I'm doing. My signal I am timing off of is going into PFI 0 (and using a counter) and I am counting the rising edges from that source. My timed looped is set to fire every 20th edge...but everything just can't seem to keep up with one another.
As a test a while ago I did the exact same thing, but instead of creating a waveform I did a bitwise and to send either a 1 or 0 dependent upon the edge counter. The output should resemble a square wave. The fastest response I could get from the system was around 14KHz. As this is very traceable to what I'm doing now...I think I'm running into the same issue.
I am either not understanding something very fundamental regarding timing loops and the speed at which these cards can read an input and then write, or I am doing something that simply requires too much processing over a short period. Which is why I bring up FPGA.
Andrew
11-13-2013 10:50 AM
I may have just answered my own question. Use of the DAQmx sampling clock set to continuous samples with my PFI line set as the timer fixed everything. It seems the simplest solution is always the best.