0
\$\begingroup\$

I have created the following LabVIEW GUI to generate a square pulse train waveform:

enter image description here

As you move the frequency and pulse width knobs the waveform changes accordingly (pulse width is now 2ms).

enter image description here

I used the following back panel diagram to drive the logic:

enter image description here

I have a PCIe-6259 DAQ card that is supposed to convert the waveforms above into analog output.

I used this video tutorial to design the wiring diagram logic shown above.

If you look at the "AO Voltage" control in the wiring diagram you will see it has "Dev1/ao1" selected for analog output.

The DAQ is connected to a BNC 2110 that has the Analog Output #1 terminal.

I wired the Analog Output terminal #1 to the oscilloscope to channel 1 but I do not see any square wave pulses. What am I doing wrong?

How do you debug something like this?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

I would start by disconnecting the square wave generator and replicating exactly what was done in the video. If you can make the sine wave appear, at least you know the rest of the VI is working.

You can also wrap the whole VI in a while loop and let it execute perpetually while you're fiddling with the DAQ view, instead of pressing play over and over again.

\$\endgroup\$
3
  • \$\begingroup\$ I will try see if I can replicate what was done in the video. Also, another question. In the video they use Analog Output, but does it make sense for me to be using AO? Basically I just need pulse waveform controlled from labview but displayed on the o-scope. \$\endgroup\$ Commented Apr 5, 2013 at 2:45
  • \$\begingroup\$ Some scopes do allow upload of waveform data, but the whole purpose of the exercise is to have the DAQ card output an analog signal which is picked up by a physical scope, so I don't see how you have any choice but use AO. \$\endgroup\$ Commented Apr 5, 2013 at 12:04
  • \$\begingroup\$ I scrapped my VI and used the one provided as an example on this page: ni.com/white-paper/2991/en and it worked perfectly. I configured "CO Pulse Freq" to point to "Dev1/ctr0". Then I connected the oscilloscope's Channel #1 to BNC 2110 Trigger / Counter block counter #0 and I could see the pulse wave form. Furthermore, if I stopped the VI, modified the frequency and started it again, the waveform on the oscilloscope changed to the frequency I desired. Thanks for your help. \$\endgroup\$ Commented Apr 6, 2013 at 16:05
2
\$\begingroup\$

I'd start by using NIDAQ just to prove the board is working and you're not missing something simple, like looking at the wrong channel or incorrectly triggering the scope

\$\endgroup\$
2
  • \$\begingroup\$ I will look into NIDAQ. Do you think I should configure the DAQ for AI or AO (Analog Input or Analog Output)? The video tutorial I watched suggested using AO but do you think this applies to me? I just want the pulse waveforms shown above displayed on my oscilloscope. \$\endgroup\$ Commented Apr 5, 2013 at 2:49
  • \$\begingroup\$ AO is what you're trying to generate, but stepping back to NIDAQ is not for the purpose of putting your waveform on your scope, its about making sure you have the tools working in order to move on. \$\endgroup\$ Commented Apr 5, 2013 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.