LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using signal generator function, how do I dial the frequency lower than 1 while keeping the entire waveform, phase and wavelength?

Using the signal generator function, how do I increase the duration so that I can use the entire waveform with a frequency under 1 Hz?

Right now, at 1 Hz or greater, the entire waveform shows up.  However, at 0.5 Hz, only the top half of the waveform is shown.  Any idea how to get around this?  Thanks, Jonathan

0 Kudos
Message 1 of 14
(4,046 Views)

Which signal generator function are you using? Maybe you could attach your code.

 

This is what I get...

siggenduration.PNG

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 2 of 14
(4,033 Views)

Hi Troy,

 

Thank you so much for your help.  I was able to create a vi similar to the one you have, and I was able to generate a waveform with 0.5 Hz as you have shown.  However, when I send that waveform to my speaker, (I am powering a speaker with the AO mult pt function), it still runs at 1 Hz.  Any way around this?  I have included a picture of my code.

 

Also, I am seeing a buffering error message Error - 10843 occured at AO wait: AO buffer write.

NI-DAQ LV system bus-bandwidth limitations, the driver could not write fast enough to keep up with the throuput.  The onboard device reported an underflow error.  Also, any way around this?

 

Thank you again,

 

Jonathan

0 Kudos
Message 3 of 14
(4,013 Views)

What version of LabVIEW are you using? I haven't seen those VIs on your block diagram for many years.

What version of DAQ are you using? Is that the old traditional (Legacy) NI-DAQ or DAQmx.

What hardware are you using? How do you configure it to output the data at the correct rate?

 

I'm not sure I will be able to help you with the old school NI-DAQ, it's been too long since I've used it.

 

You may need to see if there are any examples included in your installation or search around ni.com for traditional or legacy NI-DAQ tutorials.

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 4 of 14
(4,010 Views)

Hi Troy,

 

I am using Labview version 8.2 copyright 2006.  The image I showed you was from a previous version that I recreated on my office computer, however I am using the 8.2 in the lab (and the icons look similar to the ones you are using.)

I am using the Traditional Legacy DAQ NI DAQ card-6036E.

I am using MAX explorer to configure the hardware.  I was able using that explorer to output 0.5 Hz, which is very promising.  Which tells me that may be something to do with my vi programming.  It seems like its taking the waveform segment and outputing it in a 1 second time loop, no matter what duration is prescribed.  Could there be something to do with the while loop or where/how its going into the AO subvi?

 

Let me know if you can still help.  Thank you!

 

-Jonathan

 

0 Kudos
Message 5 of 14
(4,004 Views)

Hi Troy,

 

I am using Labview version 8.2 copyright 2006.  The image I showed you was from a previous version that I recreated on my office computer, however I am using the 8.2 in the lab (and the icons look similar to the ones you are using.)

I am using the Traditional Legacy DAQ NI DAQ card-6036E.

I am using MAX explorer to configure the hardware.  I was able using that explorer to output 0.5 Hz, which is very promising.  Which tells me that may be something to do with my vi programming.  It seems like its taking the waveform segment and outputing it in a 1 second time loop, no matter what duration is prescribed.  Could there be something to do with the while loop or where/how its going into the AO subvi?

 

Let me know if you can still help.  Thank you!

 

-Jonathan

 

0 Kudos
Message 6 of 14
(4,004 Views)
You say you are using the obsolete traditional DAQ and that is the function you show in the image you attached. Please install DAQmx and try that. If you have that and used MAX to configure a task, you can simply run that task in LabVIEW.
Message 7 of 14
(3,997 Views)

Sir Dennis is right of course. Moving to DAQmx is the best way to proceed. You will be able to do more and get more help with it and it will be easier.

 

If you are left with no choice though, this ran with no errors on my pc. (I don't have a scope handy to check the output.)

 

TraditionalAOwriteWave.png

 

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
Message 8 of 14
(3,991 Views)

Hi all,

 

Dennis - turns out that I did have DAQmx installed.  I used MAX to configure the task, however, I am not sure how to run that task in labview.  I tried to drag the task into the vi window and connect it to the AO mult pt vi, however the wires show an error of different types.  The max I/O is a user def ref tag and the AO mult pt is a traditional DAQ channel.  Am I trying to access the task in the proper way?  How do you simply run the task in LavVIEW?

 

Troy - I will try to proceed with DAQmx, however, I would still like to know how to create your vi just in case that doesn't work out.  I have several questions/troubleshooting errors.  

  • Is the number of samples the same as the update rate? (I get # of samples when I create a constant/control at that wiring input on the signal generator vi.)
  • What is the control next to the input output control?
  • How do you get F icon and the icon (of 3 types) next to the left shift register?
  • How do you get error out icon?
  • And I get an error from AO cont gain, it says a cluster of 3 elem is connected to a sink boolean and is giving me trouble.

Thanks for you input guys,

 

Jonathan

0 Kudos
Message 9 of 14
(3,974 Views)

You CANNOT use a DAQmx task with the old AO multi point. You have to use DAQmx functions. I would suggest you go to the DAQmx Getting Started page. At the very simplest, you place a DAQmx Read on the block diagram, right click on the task input, select create constant, click on the constant and select your task.

Message 10 of 14
(3,972 Views)