Generate n sine waves and add them together
Hi
I'm new to Labview and I want to generate n number of sine waves and add them together to form one signal that can be out put through a DAQ card. Each successive wave frequency will be the multiple of a base wave all will be the same amplitude.
This to me suggested a For loop with a sig generator and a passback in it but when I tried this it threw an error because the dt were different.
Any help will be appreciated.
Thanks
Show us what you did.
LabVIEW Champion . Do more with less code and in less time .
Similar Messages
-
Help needed with generating a sine wave with NI-5640R card
Hi there,
I have created a simple programe using the 5640R card, and i am attaching the programe to this question. Using a "sine generation" function/block i am generating a sine wave and outputting to one of the o/p ports and then i am connecting that o/p port to one of the i/p ports using a cable. Then i am plotting what ever i have recieved through the i/p port (this has to be same as what is generated using "sine generator" ). The graph shows that i am not receiving aything from the i/p port, but when i plot the o/p of the "sine generator", i see that the sine generator is generating the sine wave. Please refer to the attached figure and please tell me what mistake i have made in this simple programe.
Thanks,
Sandeep.
Message Edited by sandeep palreddy on 07-08-2007 12:46 PM
Sandeep Palreddy, Graduate Research Assistance
The Microwave Remote Sensing Laboratory (MIRSL)
University of Massachusetts
151 Holdsworth Way
Amherst MA 01003-9284
Attachments:
figure.doc 27 KB
figure.doc 27 KBHi sandeep
This small segment of code will not work on the NI PCI-5640R. This module does not support running the FPGA Vis directly. A Host VI must be run that calls to the FPGA Vis.
I suggest that you look at the ni5640R Analog Input and Output example that is installed by the NI PCI-5640R software.
Jerry
PS: Make sure that you are using the NI PCI-5640R software version 1.1. -
Sampling sine wave and saving the samples in an array.
helo..
I am new to Labview and i need some help regarding sampling the sine wave.
I have generated the sinewave in labview and now i want to sample it.(do i need an ADC for sampling?) and the samples should be saved in an array.
I dont know how to do this.
Please tell me how to do this or post some related examples..
Thanks in advanceAll of the functions that generate a sine wave in software do save all of the samples in an array. You just need to know how to get them. Since you did not mention the function you used to create the sine wave, lets assume it's the Express VI Simulate Signal. On the signal output, wire a Convert From Dynamic Data type function and select the default 1d Array of Scalars. Right click on the output of this and select Create Indicator. You now have the array. If you are using Sine Waveform which outputs a waveform data type, just wire up a Get Waveform Components function and select the item 'Y'.
For learning the basics, please see the free tutorials
Message Edited by Dennis Knutson on 10-28-2008 08:23 PM
Attachments:
Get Y Array.PNG 4 KB -
I have a 50Hz sine wave and a pulse signal on a same graph. The phase difference between two is between 0-90 degrees.
Now I need to calculate the time difference between (when the sine wave crosses zero volts) and (when the pulse rises). The frequency will stay approximately same for both signals.
The application is for a three phase generator. In simple words, when the time difference between the zero-crossing of sine wave and the pulse rises increases, that means that the load on the generator has increases.
I am a beginner user of LabView (version 9, 2009), maybe it is a very simple problem but I've been pulling my hair out for the last few days and coudln't figure anything out. Any help would be greatly appreciated. I am using DAQ USB-6008 to measure these voltages and pulse from the generator and a sensor
I have attached a jpg (a graph that i just made with excel to explain). The time 't' is what I am trying to measure
Cheers
Awais
Message Edited by awais.h on 03-30-2010 11:20 PM
Message Edited by awais.h on 03-30-2010 11:21 PM
Solved!
Go to Solution.Hi
Thanks for the code but I'm afraid it won't work. Like you said the probability of choosing a value that is on both graphs may not happen. This is something that I would like the code to do automatically.
But I did use the previous code posted and made some modifications to it and it seems to work perfectly. Now the next thing is to be able to get just that one value that tells you the first time difference.
Here is what I get using that code.
As you can see from the t Values. I only need the one that is highlighted. If there is a way to filter out the rest it would be great.
I was thinking of a while loop and as soon as the value is higher than 3E-5 it would store the number and stop the loop, but I'm not too familiar with arrays in labview.
Here is the the code modified.
As you can see, it wasn't that big of a modification and it still is your code.
I will keep trying.
Thanks for the help
Attachments:
FinalShockSpeed.vi 55 KB -
How to create sine wave and step input using cwgraph in VB 6.0
hello..
i'm doing my master's project now. i'm stuck on how to create a sine wave and a step input using the cwgraph using VB 6.0. please help. thanks.hello..thank for the reply.
i'm having problem with my coding using cwgraph. can anyone help. everytime i do the full compile, there's error.but it can still can run, but can't convert to application form.for your info, i'm using RTscope and cwgraph to plot graph.the error is in the cwgraph coding.below are part of the coding with error. and can somebody tell me how to add cwgraph component in the VB? i try adding component, but it's not in the list of component,and i've browse for it already too.i'm doing the software at home, but i'can run it at my lab cause cwgraph component is not listed.please help.
Dim countTime As Integer, count1 As Integer, countFreq As Integer, countVolt As Integer
Private Sub cmdRun_Click()
If cmdRun.CausesValidation = True Then
cmdPause.CausesValidation = False
tmrOsc2.Enabled = True
tmrOsc3.Enabled = True
Else
cmdPause.CausesValidation = False
tmrOsc2.Enabled = False
tmrOsc3.Enabled = False
For count1 = 0 To 100
Data1(count1) = 0
Data2(count1) = 0
RT1.Value(1, count1) = 0
RT1.Value(2, count1) = 0
RT1.Refresh
CWGraph2.Plots(1).PlotY count1 ' THIS CODING HAS AN ERROR ...
CWGraph2.Plots(2).PlotY count1 ' THIS CODING HAS AN ERROR ...
Next count1
End If
End Sub -
Generating a sine wave using PXI 5441
How to generate a sine wave using PXI 5441 (Arbitrary Waveform Generator)?
Can anybody post a vi that generates a sine wave with frequency at a user defined frequencies.
Thanks in advance.Hi Venki,
When using an arbitrary waveform or user-defined
waveform, you provide the actual waveform you want to generate to
the device, so it is easy to also just connect a graph to the waveform
and see what it looks like. Unfortunately, when using standard function generation (which is the method used in this example), you are not providing a signal that is created in software. Because the standard function
generation is happening on the FGEN and not in software, there is
really no way to display the exact signal without measuring
it on a scope or some device. You can, however, simulate the signal in
software such that the parameters which are given to the FGEN functions
are the same parameters that you use to generate a simulated wave. This
would be somewhat complex since you can change parameters such as
frequency and amplitude on-the-fly, and also you would need separate
functions for each of the different signal types available for the
FGEN. You would need to place the software waveform generator in your
inner loop and have a waveform graph connected to it in the loop as
well to display the signal. The main thing to keep in mind is that this
will only be a simulated signal and so it may not exactly match what is
being generated (this also depends on how you program the simulation to
work). Hope this helps,
Daniel S.
National Instruments -
I have an extensive aperture library on my computer's hard drive and I want to break it up into separate smaller libraries on external hard drives. How do I take projects from one library and add them to another one?
Coastal,
Frank gave you the exact answer to your question.
However, I would like to ask if you are indeed asking the right question. Do you really want different libraries? The implications are that you have to "switch" libraries to see what's in the others, and so that your searches don't work across all of your pictures? If so, then you asked the right question. If not, you may be more interested in relocating your masters to multiple hard drives so your library gets smaller, instead of breaking up the library.
nathan -
I have alot of loose photos at home (old) and I would love to make a bunch of iphoto books and make the pages like whole page collages? How do I get my photos into iphoto in order to do this? Can I make a DVD at the drugstore and add them to iphoto?
You can make the collages easily if you have iWork. Just open a letter sized page in landscape mode and drag the photos onto the page, rotate and postiion as necessary. Then do a Print ➙ PDF ➙ Save PDF to iPhoto to get a 200 dpi jpeg version of the Pages page into iPhoto. From there you can add it to your book and use a blank page with the option to have an image as the backbround.
If you have a 3rd party image editor that supports layers you can create the collage with it.
OT -
Can you edit a person from one photo and add them to another photo?
Can you edit a person out of one photo and add them to another photo? Like if you need the head shot from one photo to replace closed eyes in the other photo? Thanks.
Thank you very much! Does this require software to be purchased? I'm new to Photoshop.
From: Bill Hunt <[email protected]>
To: Kittie Gugenheim <[email protected]>
Sent: Monday, April 25, 2011 11:46 AM
Subject: Re: Can you edit a person from one photo and add them to another photo?
Welcome to the forum.
Yes, this is done often. You will need to create a Mask of that person, to separate them from the background of the original Image.
I like to do this with a Layer Mask, as it offers control, and really does not alter the Image, so you can go back and make changes.
Let's say that you have Image 01 w/ the head of your subject, and want to place it into Image 02. In Image 01, make a rough Selection. I would include a bit of extra background, as we will take care of that in a moment. With that Selection active, Copy the head shot. Go to Image 02, and Paste it. It will Paste in its own Layer. Ctrl+T (Free Transform) can be used to Scale and also position that Layer with the head. Once you have that Scaled and positioned about where you want it, create a Layer Mask. In QuickMask Mode, just paint in the additional Mask to remove all traces of the background that came in with the head shot. As you can paint OUT, and also paint IN the Mask, you can work on this, as many times as you wish - even next year.
For getting that Layer Mask looking good, work slowly, also see this http://graphicssoft.about.com/od/photoshop/l/blrbps_5agirl.htm.
I've got another tutorial, that addresses the hair area, and will post that, when I find my bookmark.
Good luck,
Hunt -
How do I delete all my CONTACTS IN ONE GO instead of ONE BY ONE and add them again renewed?
There is an option, under Advanced, on the Info Pane in iTunes to replace all contacts on your phone with what's on your computer for the next sync only. So, edit everything on your computer & use that method.
-
Is there an automated way to scan my multimedia folder for files that are there and not in my i tune library and add them to y existing library ?
I recenty had a damaged i tune library and had to import an old version.
This last one does not have many of the CD I have copied the past months. And I don't know which ones these are either as they are too many of them.This will list files that are in the iTunes DB but the files are not in the media folder…
http://dougscripts.com/itunes/scripts/ss.php?sp=listmias
This will list files that are in the media library, but not in the iTunes DB.
http://dougscripts.com/itunes/scripts/ss.php?sp=musicfolderfilesnotadded2
I think it may misbehave with ringtones & some of the obscure media files, but they are both really powerful for repairing mangled libraries.
I would create a new smart playlist for 'Tracks added since (todays date)' so you can easily find any tracks that you add back to iTunes.
Doug has a lot of scripts for iTunes, spread the karma & donate if they are useful to you -
How do you download albums to i tunes that are compilations and keep them together as a album
how do you download albums to i tunes that are compilations and keep them together as an album i have several discs that have downloaded singley the i tunes is a mess
Steve MacGuire aka turingtest2 - iTunes & iPod Hints & Tips - Grouping Tracks Into Albums - http://www.samsoft.org.uk/iTunes/grouping.asp (older post on Apple Discussions http://discussions.apple.com/message.jspa?messageID=9910895)
Quick answer: Select all the tracks on the album, File > get info, and either give them all a single "album artist", or check the "compilation" flag (as in https://discussions.apple.com/message/17670085).
If these are from multiple-CD sets you may also need to enter the appropriate information in the disc number fields. -
How to use pci 6229 to generate a sine wave?
Dear friends,
I want to use pci 6229 to continuously generate a sine wave by 5000 sampling rate to output to drive a loudspeaker.
Does any one can post an example so that I can learn from it?
Many Thanks
ProbieeDear Denis,
Thank you for your reply. I have done with this following vi. please see the attachment.
please give me some feedback with my vi.
Many Thanks
Probiee
Attachments:
danforum.JPG 119 KB -
Can you explain when using keywords and addding them to various clips pressing ctrl and a number eg. 1 or 2 it simply closes down FCPX. Just to the dock as would the yellow -sign. I am new to this program having only used Final Cut Express 4 previously.
iMac (early 2009) 24in 2.93GHz 4GB 1066MHz DDR3 SDRAM (To be upgraded ot 8GB in the nextfew days) os x 10.7.2 Lion
Re: Why don't my arrows on the time line operate and allow me to move to the start and end of the timeline. Iam using the trial versionCheck System Preferences. I think Control-1 is used by something in the OS now. Switch it off. It's a major p[ain the way the OS is taking over more and more of the keyboard, allowing less options for application use.
-
I somehow erased everything (all important dates) off my ical on my mac and I'm afraid that if I connect my iphone that it will do the same there. Will my iphone sync the dates that are on the phone and add them to the ical? Or will it delete everything
Contacts are designed to be synced to a supported application on the computer or a cloud service.
Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
If you have failed to use the device as designed it may be too late to recovery anything.
Is the device regularly backed up to a computer via iTunes? If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.
Maybe you are looking for
-
How do I transfer content in Dashboard Stickies from one Mac to another?
I've got a new MacBook Air and because the hard drive on it is smaller than the hard drive on the MacBook Pro I had before, I've opted not to use Migration Assistant. But I have a good bit of content in Dashboard Stickies. Does anyone know how I can
-
I was wanting to create a form that would show sample information in a watermark effect that would diappear once the field was clicked onto. Example form question and field below: Rather than the blank fields I wanted them to show some examples (in f
-
External Enclosure for Powerbook
I recently purchased an Addonics external enclosure to use with a G4 Powerbook. I also bought a Maxtor 400gb drive. After having some problems in formatting the drive, I found out the following from Addonics: **For Mac OS only, there have been report
-
Re sending Functional acknowledgement 997
Gurus please help, We are using seeburger with AS2 adapter. How can I resend a functional acknowledgement from PI or Seeburger or Runtime work bench? Please explain the steps. Your help is greatly appreciated. Best regards, Pavan
-
i'm posting the data using HttpsURLConnection to IIS 5.0 web server. The code is working fine for server authentication. Now i want to enable the client authentication option in IIS. How do i send the client certificate from the Java program to the I