09-19-2008 10:26 AM
Hey everyone, I'm new here, but been using this site for quiet some time to aid in my work. This time however, I have a question. I am trying to construct a .vi which does the following:
1. A trigger of x Hz comes in (via a BNC 2110 to a PCI 6221 card) to a LUT. In effect a timer.
2. This LUT is then called upon to send pulses to create a sine or a sawtooth wave, but its freq. Is divided by an 8th of the value of the lookup table. Example 64hz coming in to an 8hz freq. out.
3. The output waveform waits in a loop to make sure the output does not shift and if a pulse is off then the loop waits till the next pulse, or some time x afterwards to remain consistent with the period of the waveform,(ie if a single pulse is lost, or misplaced, the loop waits till the next period).
I initially was using continuous waveform generation with an external trigger. But during my test it appeared as if our signal was shifting but a small amount. I was thinking the using a LUT in replace of a function generator, with pulses tied to a voltage point would perhaps be more accurate as each pulse can be synced if need be in a loop while it waits to get fit into the period correctly if the triggering falters.
Thanks. Let me know if you need more info. or programs etc...
09-22-2008 10:49 AM - edited 09-22-2008 10:50 AM
Hello dbrittain,
I was wondering if there is any reason, other than difficulties in getting it to work, for switching from continuous generation to a Lookup Table? It should be possible to link the frequency of your output to the frequency of the input signal on your timer. If you could post your code using the continuous generation on the forum so I could take a look at it, I may be able to give you some suggestions to get everything working.
Regards,
Dan_K
Regards,
Dan King