LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to supply multiple square wave to my circuit with different configurations (frequencies) using NI-DAQ-USB-6001

Hi,

I am new to Labview and NI-DAQ-USB-6001.

I needed help supplying multiple square waves to my circuit with different configurations (600 Hz, 1000 Hz, 250 Hz, 750 Hz) using the Analog output ports A0 & A1 and Digital counter output ports- PF0 & PF1 at the same time.

Could someone help me with an example or documentation I could read to help me build the circuit?

Thank You So Much!

Any help will be really appreciated.

 

Regards,

Devansh

0 Kudos
Message 1 of 8
(281 Views)

Hi, Devansh

 

that will not be possible, because:

1) the USB-6001 has only one counter, you would need two counters for two PWM-signals.

2) and more important, the counter of the USB-6001 can only be used for Edge counting, rising or falling, cf. the USB-6001 specs manual. 

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 2 of 8
(249 Views)

Hi  JensG69,

Thank You for your reply.

But I don't intend to use the counter output as of now. I am planning to use the 2 analog output ports given in the DAQ-USB-6001 board.

It also has 2 counter output ports, which I can use later if I need to generate 4 square waves.

 

I want to generate 2 square waves at two different frequencies (1k Hz and 600 Hz) at the same time. I need to supply these square waves to 2 IR emitters at the same time.

 

So, could you help me with any examples of circuits and documentation to refer to and generate the output?

 

Thank You So Much for all the help!

 

Regards,

Devansh

 

0 Kudos
Message 3 of 8
(202 Views)

Hi dshukla,

 


@dshukla wrote:
But I don't intend to use the counter output as of now. I am planning to use the 2 analog output ports given in the DAQ-USB-6001 board.

It also has 2 counter output ports, which I can use later if I need to generate 4 square waves.

 

I want to generate 2 square waves at two different frequencies (1k Hz and 600 Hz) at the same time. I need to supply these square waves to 2 IR emitters at the same time.

 

So, could you help me with any examples of circuits and documentation to refer to and generate the output?


Please read the datasheet again: the USB6001 only has one (1) counter!

 

You can use both AO channels independently, with upto 5kS/s per channel.

Just use the examples coming with LabVIEW to learn about outputting a waveform on an analog output channel!

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 4 of 8
(200 Views)

Hi 

I am sorry, but I thought PFI 0 and PFI1 were counter outputs. But you are right; the datasheet says that it just has just 1 counter output. 

 https://www.ni.com/documentation/en/multifunction-io-device/latest/usb-6001/pinout/ 

 

Also, could you suggest me which example exactly would help me generating square waveforms at the analog output, please?

Since I am new to LabView, that would really help me a lot!

 

Sorry for all the trouble, Thank You So Much for all the help!

 

Regards,

Devansh.

 

0 Kudos
Message 5 of 8
(146 Views)

Hi  ,

Thank You for your solution!

I had a look at the LabVIEW examples, and I found an example that would be helpful to me. But I am unable to execute it.

Could you help me with that, please?

I selected my DAQ device but when I connect it to an oscilloscope to see the waveform, I cannot see anything.

0 Kudos
Message 6 of 8
(157 Views)

Hi dshukla,

 


@dshukla wrote:

I found an example that would be helpful to me. But I am unable to execute it.

Could you help me with that, please?

I selected my DAQ device but when I connect it to an oscilloscope to see the waveform, I cannot see anything.


How should I help?

Why can't you execute the VI? Do you get any error when trying to start the VI?

Why don't you see anything on your scope? How did you connect your DAQ device with that scope?

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 7 of 8
(147 Views)

So I have connected the DAQ boards ports to my IR Emitter circuit and the oscilloscope is connected to the emitter.

The connections are made correct because when I use the DAQ Assistant to supply test frequency, it shows correctly on the oscilloscope.

But when I use the voltage-continuous output.vi example as it is, it does not show up any waveform.

Do we have to make any changes to the circuit or something like that in order for it to run?

 

I have attached 2 videos that I have taken which may make things clear to you.

 

Also, could you explain to me what should I set up as "sample rate" and "actual sample rate" if I want a frequency of 4000 Hz for each sample. I don't understand that relation as well.

 

Thank You So Much for all the help.

 

Regards,

Devansh

 

https://drive.google.com/file/d/1K9VCkW_tVY96r77Has2YRT5DiWghy84n/view?usp=sharing 

 

https://drive.google.com/file/d/1JyqUPhH5hOG8JLAZtl0OgxRaCrGifUaC/view?usp=sharing 

 

 

0 Kudos
Message 8 of 8
(134 Views)