LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital waveform output

Hi,

Can someone please explain to me what the daqMX digital waveform out is? I thought I'd be able to set up a digital waveform using the supplied labview vi's and then output these using the daqMX digital waveform vi. My goal was to generate a square wave on 4 of the digital channels, but it doesn't appear to work this way.

Thanks!

Sunny
0 Kudos
Message 1 of 11
(11,448 Views)

Hi, Sunny.

I'll be glad to help you create the output you'd like, but can you tell me a little more about what sort of difficulties you're encountering?

In the meantime, this document from the LabVIEW help talks about the three main components of a waveform:

t0: the start time of the waveform
dt: the time interval, or duration, between data points in the waveform
Y: array containing the data values of a waveform (IE, the values at each interval on the vertical axis)

Hope this helps! Let me know if you're still having trouble.

 
Sarah K.
Search PME
National Instruments
0 Kudos
Message 2 of 11
(11,429 Views)
hi,

Sarahk and anyone, pls, if you can help me..

see the attachments..

the one attachment is the Block diagran and the other the front panel

i want to create a digital waveform without clock. this vi i created , is it true?

i connecteds the output channel with an oscilloscope and i saw, that the DAQ card didn't create the samples.

the
oscilloscope showed only one line at 0 V (if i create more 0's) or in 5 Volts (if i create more 1's samples)

what can i do? any advices or ideas?..

thank you very much!
andrikos



0 Kudos
Message 3 of 11
(11,185 Views)
You are missing the attachments.Smiley Wink
0 Kudos
Message 4 of 11
(11,183 Views)
sorry,

i forgot the attachments..



Download All
0 Kudos
Message 5 of 11
(11,182 Views)

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
NI Chief Hardware Engineer
0 Kudos
Message 6 of 11
(11,139 Views)
first of all, i created the digital waveforms with the counters

but, i want to write these waveforms to the channels..

what can i do?

for example, the pin 17 is the one counter and the pin 37 the port 0 line 0

the p 0.0 is connected with the channel, which , i want to write the waveform

pls, help me..

thanks a lot!

andrikos

0 Kudos
Message 7 of 11
(11,127 Views)

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

Nathan
NI Chief Hardware Engineer
0 Kudos
Message 8 of 11
(11,109 Views)

Hi Nathan,

 

I have a similar question. I am using PCI 6602. The goal here is to get continuous 1MHz square wave output from DIO1~32 sequentially controlled by LabVIEW. I used Ctr0 to generate a 2MHz clock and used Ctr0InternalOutput as sample clock of DIO1~32. I attached the code and screeshots as follows. But when I run it I got an error -200077 (you have requested: sample clock; you can request: on demand). It looks like PCI 6602 doesn't support hardware timing. Is that true? Where can I find this? If it is true, how can I avoid this and get what I want? Thanks!

Yi

Version: LabVIEW 8.2

hardware: PCI 6602

0 Kudos
Message 9 of 11
(10,537 Views)

forgot to say. The code is working on PCIe 6251. But I need 32 DIO which PCIe 6251 doesn't have.

 

0 Kudos
Message 10 of 11
(10,535 Views)