Discussion:
digital waveform output
(too old to reply)
andrikoscy
2008-02-11 21:10:06 UTC
Permalink
sorry,i forgot the attachments..


front_panel.jpg:
Loading Image...


waveform.jpg:
Loading Image...
Nathan_R
2008-02-13 00:40:05 UTC
Permalink
Hi andrikoscy,

With the VI you wrote it is only going to
output your waveform once. The digital output will be left at the last value in
the waveform. For example, if you end the waveform in a 1 then the line will stay
high. In order to see the waveform with your scope you can set the scope to do
a single acquisition on a rising edge trigger. Set the trigger level, start the
scope, and then run your VI. This should show you the two pulses in your
waveform.

For more examples of digital output I would
recommend looking at the digital generation examples in LabVIEW. These can be
found by going to the Help menu and selecting Find Examples.... Once the NI Example Finder is open select Hardware Input and
Output»DAQmx»Digital Generation. Also if
all you need to do is output a square wave I would recommend using a counter
output task assuming your card supports it. A good example of using a counter
to generate a square wave can be found in the NI Example Finder under Hardware Input and
Output»DAQmx»Generating Digital Pulses»Gen Dig Pulse Train-Continous.vi.

Thanks,

Nathan
Nathan_R
2008-02-14 23:10:06 UTC
Permalink
Hey andrikoscy,

            If
you want to output a continuous waveform to a digital output I would recommend
looking at the Cont Write Dig Port-Ext Clk-Non Regeneration.vi example vi. This
vi can be found by going to the Help
menu and selecting Find
Examples.... Once the NI Example Finder is
open select Hardware
Input and Output»DAQmx»Digital Generation»Cont Write Dig Port-Ext Clk-Non
Regeneration.vi. You can change the write type
of this VI to use waveforms instead of U32 data. You will need to provide an
external clock to time the output. You can use a counter output pulse
generation task to generate this clock. You would then select the counters
internal output as the source for the sample clock. Let me know if this helps
you.

Thanks,

Nathan

Continue reading on narkive:
Loading...