Hi to all forum members!
I need to produce a very stable square wave with adjustable frequency (1-50 Hz), duty cycle and amplitude (0-5 V).
For stability reasons I would like to use to counter output of my device (NI 6036E).
The question is the following: how can I transform the TTL pulse train
produced by the counter in an analog output with adjustable amplitude?
I tried to re-acquire the counter square wave as "analog input" and
then, after suitable rescaling, to send it an "analog output" channel,
and for this purpose I changed some Labview given Examples. The
tentative vi is attached (Labview 7.0).
In this vi I have many many triggering and timing problems:
1) I look at the acquired input signal with a chart: is the square wave
in the chart at the same frequency and duty cycle as the counter square
wave?
I know the frequency of the acquired wave depends on the buffer size and sampling rate, but HOW?
In other words: which numbers have I to write in the "analog input timing parameters" box on the front panel?
Is really the sampling rate the same as the wave frequency, as written in the LV example I changed?
2) If I look at both the analog input chart and at the chart that
represents the waveform to be sent to the analog output I can see
an agreement, but what really happens is terrible:
with the counter wave at 40 Hz, in the analog output channel I can see
an extremely instable signal, composed by 3 or 4 wave periods at about
1 KHz, followed by a long continuous high or low state, then some
other wave periods at high frequency, etc.....
Could anybody, please, help me?
Thank you in advance
ely