Simulate GHz signal with big number of samples

I would like to simulate 650nm wavelength signal with 3.5ms of pulse duration. So I need very high sampling frequency and big samples in LabVIEW, if I go generate about 1M #s, its very long to generate. Is there any solution for that?
When you feel sad, laugh

Just taking a very quick look at your code, my guess for the increasing CPU over time is how the waveform data is being built. Anytime LabVIEW builds an array by appending, rather than having a predefined array that has the elements modified, the program must keep reallocating memory to store the increasingly bigger array. This takes time and CPU, more and more as the data set gets bigger. I'll try and look at it a little more later and see if an easy solution becomes apparent. I don't use the waveform data type often so it isn't quite as obvious to me.
P.M.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • Different Counter Outputs with different number of samples

    I´m using an 6602 Timing I/O Board and/or a MIO 6281. For timing control of our measurements I use different counters from both boards triggered by a Digital Out for synchronization. The counters are set to CO Pulse Time, implicit timing, digital triggered and finite sample mode.
    Lets assume I use two Ctr´s from the 6602 board. My problem is when setting the number of samples from only one CTR to another value then the second I´m getting an error. The rest works perfect, I can use different starting delays, low or high times, only different sample amounts don´t work. It´s regardless if I use the Timing I/O or Multi I/O board.
    For example:
    Ctr 0 / 6602 _ _ |     |_ _|     |_ _  --> 2 samples
    Ctr 1 / 6602 _ _ |     |_ _
    Somebody any idea or advice?
    Solved!
    Go to Solution.

    Here is my currently used code, perhalps it helps you understanding the problem. Both are doing the same but one is a bit optimized. Hopefully someone can help.
    Attachments:
    Example_1.png ‏70 KB
    Example_2.png ‏90 KB

  • Time consuming with big number of columns in RowSet

    Hi,
    In the SQL Query Editor, i select 3 columns to retrieve from MySQL Database and I set these 3 columns in JSC Table -> OK, GOOD performance
    Now, i select 30 columns in rowset (from the same table database), BUT i show only the 3 same columns in JSC Table -> BAD Performance
    Could you explain me why this phenomena ? When you run the SQL query, there is no this time consuming effect !
    How can optimize it?
    Thx

    Hi,
    How much does the performance suffer when you are selecting 30 columns in the rowset? Approximate times taken for executing the two different SQL statements would be more helpful. There are various factors involved which could be influencing the performance. Please give details.
    Cheers
    Girish

  • What's the reason with big number of entries in SMQ1?

    We are using BI 7.0 to perform Delta loads of SRM Shopping Cart, but found in the source system, there are so many entries when running SMQ1.   Any reason?
    Thanks

    Hi,
    Check table V137 in both servers and also
    check ENHANCEMENT patch level of both the servers
    Thanks
    Diwakar

  • What is the effect of output signal with the same sampling frequency but different number of samples?

    Hi,
    I'm using PXI4461 for audio measurement and there is a question about analog output. I'm using the Basic Multitone vi for generating multitone signal. The sampling rate is 200k and my question is how to determine the number of samples. I used an audio analyzer to measure the distortion of the output signal with 200k and 1k points and there are no different except the update rate. What number of samples is suitable for 200k sampling rate?
    Thanks,
    Bill

    The Sampling Rate determines the maximum frequency that you can see (the rate/2 according to Nyquist).
    The number of samples divided by the rate determines how long you will sample. This sample time can only be determined by you. Do you need .1 seconds worth of data, or 1 second? But note that the MINIMUM frequency that you can detect is 1/(Sample Time) or the Sampling Rate/Number of Samples. So if your system has a minimum and maximum frequency specification use that as your guild.
    [email protected]

  • Pulse train generation fails with certain values for "number of samples"

    I'm generating a retriggerable analog output signal, and so I'm using a counter as the sample clock (see: Retriggerable AI Using Retriggerable Counter). I am finding that, above a certain number of samples, and only for certain values of the number of samples, the counter task gives me error -200305, "Desired finite pulse train generation is not possibe." The error crops up only when actually starting the task.
    The analog signal that I'm trying to generate will be about 800 kHz, so my counter is set to run at the same frequency. I find that the counter task works fine if the number of samples to generate is anywhere between zero and 671,088 samples. Setting the number of samples to 671,089 gives the error above, as does 671,090 samples and so on. However, using 671,096, the counter task works fine. After that, the counter seems to output fine only if the number of samples is divisible by 8.
    The only thing I can think of is that (617088 samples) / (800000 Hz) = 0.839 s. At the internal clock rate of 20 MHz, 0.839 s is 2^24 samples, and it is a 24-bit counter on this hardware. So if it's this internal counter rolling over, that's fine and I can work around that. But if that's the case, what I don't understand is why increasing the number of samples in increments of 8 samples still works.
    The hardware is a PXI-6733 board, running with LabView 7.1.1 and NI-DAQmx 8.1.

    Hmmm,  multiples of 50 & 100?  Now I'm puzzled again.
    Here's how to make sense of the 100 kHz timebase idea though, even if it turns out not to be the right explanation.  For a retriggerable finite pulse train, you actually use a pair of counters.  If you were to program it manually, you could set your output counter to generate a continuous pulsetrain at 800 kHz using the internal 20 MHz timebase.  This output counter would also be configured to use the other counter's output as a digital level-based pause trigger.  So the 800 kHz pulsetrain is only output while the other counter's output is, say, high.
    The other counter is configured for retriggerable pulse generation.  The pulse duration or high time should be set for (# pulses) / (800e3 pulses/sec).  This other counter can be configured to use the 100 kHz timebase, so its high time would then have to be an integer multiple of 10 usec.
    So let's see...  An 800 kHz pulsetrain is possible with a 20 MHz timebase (exactly 25 cycles).  A 700 kHz (28 + 4/7 cycles) or 900 kHz (22 + 2/9 cycles) is not.  So when you request those other frequencies, you actually get a near approximation.  I dunno if DAQmx can be queried for the actual value correctly or not -- I recall an early version that reported back whatever freq you had asked for rather than what it actually used.  Queries based on ticks (rather than time or freq) did return what was actually used, as I recall.
    Let's suppose a request for 700 kHz gets truncated to 28 cycles of the 20 MHz timebase making a 1.4 usec period.  Then 50 of those periods becomes 70 usec, which is evenly divisible by the 100 kHz timebase.  Bingo!  (Note: 70 is the least common multiple of 10 and 1.4)
    Now suppose the request for 900 kHz turns into 22 cycles of the 20 MHz timebase, or a 1.1 usec period.  Now it takes 100 of those periods to get to 110 usec, which is also evenly divisible by the 100 kHz timebase.  Bingo again!  (Note: 110 is the lcm of 10 and 1.1).
    Did you follow the method here?  It should help you figure out expected results for various output freqs and #'s of samples.
    -Kevin P.

  • What is the maximum number of samples that can be acquired with a single trigger using PCI-6036E DAQ card?

    1. My PCI-6036E card has a FIFO of 1024 bytes in AI. Maximum how many samples can be acquired with single trigger for digitizing a waveform?
    2. PCI-6036E DAQ card has got a AO with 10ks/s update rate? Can I generate a pulsed output with the AO of this card? I need a pulse of, say, 5 V and 1 kHz frequency.

    Giri,
    1.The trigger is usually for enabling the acquisition. I mean, when it is logic zero, you acquire nothing; however, when it is logic one, you start acquiring your waveform,and you can acquire continuously without having to worry about how many samples, unless you want to set your program for doing so. You can acquire continuously by implementing buffer acquisition. Finally, the FIFO that is in the board will not affect the buffer acquisition.
    2.Yes, you can do that! You can generate your 5V signal with that specific frequency, and you should not have any problems, because the freq fits in the update rate.
    I hope this information is helpful.
    L Aguila
    Applications Engineer
    National Instruments

  • Retina MacBook Pro is not connecting with Airport Extreme 5 GHz signal

    I believe I have done my due diligence to find the answer to my question here and other places but I must be missing it. I have a Retina MacBook Pro that as far as I know should select the 5 GHz signal from my Airport Extreme (Generation 1 with 7.6.4 firmware) which is literally 3 ft. from my computer. When I click on the Airport icon in the menu bar, it is indicating a 2.4 GHz connection. I have looked at discussions which say I can give separate names to to both the 2.4 GHz and 5 GHz signals. I can't seem to find that. I also read where you can reorder the order of signal preference. I can't seem to find that either. Interestingly, I have an Airport Express that is extending the network. When option clicking on its icon in airport utility, I can see both the 2.4 and 5 GHz information. I don't se that in the Airport Extreme. I am thinking about gettng the newest Airport Extreme but if I don't need to...
    Thanks for any help!

    as far as I know should select the 5 GHz signal from my Airport Extreme (Generation 1 with 7.6.4 firmware) which is literally 3 ft. from my computer
    A Generation 1 AirPort Extreme is not a simultaneous dual band wireless router. It can produce either a 2.4 GHz....or....a 5 GHz wireless network signal, but not both simultaneously.
    If you want the Gen 1 Extreme to produce and deliver a 5 GHz wireless network, it can do so, but any 2.4 GHz devices that you have will not be able to connect to the 5 GHz signal.
    A new simultaneous dual band AirPort Extreme will produce both a 2.4 GHz and 5 GHz signal simultaneously. Wireless devices will automatically connect to the best signal quality based on their capabilities and location in relation to the AirPort Extreme.

  • Why do I get errors when I use pre-trigger scans with a relatively small number of samples?

    I have a PXI6115 (hi mem option) that I am using to collect data at 5 MHz. If I collect about 10,000 samples with 100 pretrigger scans, the acquisition works fine. However, if I collect 1000 samples with 100 pretrigger scans, I get an AI Read error. Likewise, I can collect 10 pretrigger scans with a sample size of 1000 but I get an error if I try to colelct 10 pretrigger scans with only 100 total samples.
    Why is that the case?
    Thanks in advance.

    This sounds familiar.
    I do not remeber the final answer, but this is what I can recomend. Use the Info-LabVIEW search engine
    http://www.searchview.net/
    To search fro everything posted by "Roger Hart" (sometime in the last 3 years).
    I believe he posted a number of e-mails discussing what he found.
    If this approach get you an answer, please summarize the results here.
    Doing what I can to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is it possible to detect low frequency signals with a high sampling rate?

    Hello everyone,
    I'm having an issue detecting low frequency signals with a high sampling rate.  Shouldn't I be able to detect the frequencies as long as the sampling rate is at least 2 times the highest frequency I will measure?  The frequency range I am measuring is 5-25 Hz, and I use Extract Single Tone.vi to measure the frequency.  The sampling setting I am using is 2 samples at 10 kHz.  Is there a method I can use to make this work?
    Attached is the vi.
    Attachments:
    frequencytest.vi ‏21 KB

    You are sampling at 10Ks/S, but only taking two samples. What do you expect to see? If your signals are binary (On or Off) you would only see either an on or an off, or if the rise/fall time was fast and you were Extremely lucky, one of each. If you want to see a waveform you have to sample for at least the period of a waveform. So you should take samples for at least 0.2 seconds to capture an entire waveform at 5Hz, ideally longer.   Think of looking at a tide change at a dock. If you want to see the entire tide change you will probably have to measure repeatedly over 24 hours, not just run out on the dock, measure the height twice and leave. That wouldn't tell you anything other than at that precise moment the tide height was X, but not that it was at high tide, low tide, in between, etc.
    I type too slowly, I see that a more technical answer has been given, so mine will be the philosophical one!
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • I am using Vodafone at Delhi India with my Iphone 5S, 3g is activated with my number but i am not getting 3G signals iphone is also activated with vodafone but still waiting for 3G signals contacted vodafone but wasted my time pls help using APN www

    I am using Vodafone at Delhi India with my Iphone 5S, 3g is activated with my number but i am not getting 3G signals iphone is also activated with vodafone but still waiting for 3G signals contacted vodafone but wasted my time pls help using APN www

    Keep on talking to Vodafone and keep pestering them until you get a satisfactory answer.  Whether you get a 3G signal or not, is entirely the responsibility of Vodafone India because they are your carrier/phone company and nobody here can help you with that on a public user to user technical support forum.
    Contact Vodafone as they are the only ones who can help you.

  • Master-detail reports with variable number of pages in a big report

    I am designing with Reports 6.0.5.32.0 a master-detail report such as a
    combination between a customer with his name, address etc, at the top of
    the page (always 60% of the first page) and then as details lines with his orders.
    For one customer seems relatively OK with the variable number of pages in accordance with the number of his orders.
    When the main query finds more customers I present always the customer at the top of
    a new page (that's easy), but how can I control the number of the next pages for the orders, variable for every customer.
    I can not predict how many pages are necessary for a customer and white pages are
    not desirable. When the number of Max. Vertical Body Pages is too low I can get the next pages for every customer, but appears an
    uncontrollable shift to the left.
    For instance, a customer with 40 orders needs 3 pages, one with 4 orders only 1 page, one with 15 orders 2 pages, etc.
    What's the magic property for a secure and precise layout?

    Hi Andreas,
    did you try setting vertical spacing to expand or variable on master repeating frame (and posible other frames surrounding master repeating frame)?
    Hope this helps

  • Better estimation of phase difference between two signals with variable frequency!

    Hello LabView Gurus, 
    Being a power engineer and having just a little knowledge of signal processing and labview, I have been pulling my hair out for the last couple of days to get a better estimation of phase difference between two signals.
    We have two analog voltage signals; 1. sine wave (50Hz ± 1Hz) and 2. a square wave with exactly half of sine wave frequency at any time.
    At the starting point of operation (and simulation/acquisition) both signals will have no phase difference. However, the square wave's frequency changes unpredictably for a just a few millisecond but then it gets synchronized with sine wave's frequency again. This means that the square wave will be phased out from its original position. The task of the labview is to find the phase difference between the two signals continuously.
    My approach to determine the phase difference is to measure the time when sine wave crosses zero amplitude and the time when the very next square wave changes amplitude from zero volts to +ve voltage (I have a 0.5volts threshold just to avoid any dramas from small line noise). The difference between these times is then divided by the time period and multiplied by 360 to get this phase difference in angles. 
    As this part is just a small block of a big project, I can only allow 5000Hz sampling rate each for both signals. I read 500 samples (which means I read data from 5 cycles of sine wave and 2.5 cycles of square wave).
    Now the problem is, as long as the frequency of sine wave stays constant at exactly 50Hz, I get a good estimation of the phase difference but when the frequency changes even a little (and it will happen in the real scenario i.e 50Hz ± 1Hz  and the square wave's frequency is dependent of sine wave's frequency), the estimation error increases.
    I have attached my labview program. From front panel, you can set the phase of square wave (between -180 and 0) and you should see the labview's calculated phase in the indicator box named 'Phase'. Then you can press 'Real Frequency' switch that would cause the frequency to change like it would in real operation.
    You can observe that the estimation error increases after you push the button. 
    All I need to do is to reduce this estimation error and make it as close to the actual phase difference as possible. Any help would be greatly appreciated.
    I am using LabView 2009 for this task.
    The application is for electric machines and the stability/performance of machines under different faults.
    Thank you for reading this far!
    Regards,
    Awais
    Attachments:
    v603.png ‏320 KB
    v603.vi ‏186 KB

    Jeff Bohrer wrote:
    Basic math gives me a bit of pause on this approach.  You are sampling at 50 times the frequency of interest so you get 50 samples per cycle.  your phase resolution is 1/50th cycle or 7.2 degrees +/- noise.  You will need to samlpe faster to reduce phase resolution or average multiple readings (at a time cost that is signifigant)
    Jeff- (Hardly Working)
    I am sampling at 100 times the sine wave's frequency and 200 times the square wave's frequency.  Increasing the sampling rate completely solves my problem. But since I am acquiring several other inputs, I cannot afford a sampling rate higher than 5kHz.
    F. Schubert wrote:
    I'm not a signal processing expert, but here my basic understanding.
    If you simulate sampling with 5kHz and a frequency of 50 Hz (and both are 'sync' by design), you always get an exact 5 periods. Any variation of your signals frequency gives you a propability to get 4 or 6 'trigger' events. That's an up or down of 20%!
    The one measure to reduce such problems is using 'window functions'. They don't fit your current approach (counting instead of a DSP algorithm), so this needs to be reworked as well.
    My approach would be to use the concept of a Locki-In amplifier. You need to phaseshift your ref-signal by 90°. Then multiply your measurement signal with the ref signal and the phase shifted ref signal. The obtained values for x/y coordinates of a complex number. Calculate the theta of the complex number (with the LV prim). Feed this in a low pass filter.
    The trick on this is, that the square wave has harmonics in it, in this you are interested in the second harmonic which is the sine wave.
    To get rid of the effect that the sync between sampling rate and ref signal frequency gives an error, you then can use the window I mentioned above (place it before the lock-in).
    For a design that really plays well, use a producer-consumer design pattern to get the calculations done in parallel with the DAQ.
    I suggest you to check on wikipedia for some of the keywords I mentioned. Go also for the external links which lead to great tutorials and AppNotes on the signal processing basics.
    Sorry, it's not a simple solution I offer and we will have quite some conversation on this forum if you follow this path. Maybe someone else knows a simpler way.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml
    An interesting view. the sine wave can indeed be looked as a second harmonic of the square wave. I will implement your idea and get back to you as soon as I get some results. But since I have very limited knowledge of signal processing, it might take me a while to get my hear around the solution you mentioned.

  • How to increase the number of samples in my fft?

    Hi,
    In my Labview environment I receive sampled data of a sinus function where one period consists of 4096 samples. How can I increase or control the number of samples which the fft spectrum is using for calculating its results?
    Best regards
    Jonny

    Hi,
    The sinus signal is generated to have a fixed frequency, but as seen in the figures the fft has a big SNDR. I hope do decrease this with adding the number of samples.
    Thanks
    Attachments:
    power_spec.JPG ‏50 KB
    power_spec_block.JPG ‏9 KB

  • Multiple channels acquisition and Number of samples per channel

    Hi,
    I'm a new labview user and I need some help in trasposing an old traditional NI-DAQ acquisition software in a NI-DAQ-mx one.
    I followed the tutorial (#4342) but I found a problem with Analogue 2D DBL Multiple Channels Multiple Samples DAQmx Read Vi.
    I'm trying to acquire 8 voltage signals from a NI-USB-6341 device. When the Number Of Samples Per Channel I set is below the number of channels (8), the software acquires only a number of channels equal to the number of samples per channel I set.
    Is that a normal behaviour?
    Thank you
    Daniele

    This is my code. The problem is the same with or without the code for the scan backlog indexing.
    Tomorrow I will try with the code from the example.
    Thank you
    Daniele
    Attachments:
    acq code.jpg ‏119 KB

Maybe you are looking for

  • Can you advice to a configurations of a new desktop to work?

    Hi friends I´m not an expert in computer specifications (at true I have just an overall knowledgment about this) and I do not want to compare computer manufactured by specific companies (this is not the intention of this post). We work with Dell comp

  • Files deleted, but still taking up disc space.

    When I delete files from my ext HD or USB flash drive the files are no longer visible but they're still using the disc space. I deleted everything from my 1G flash drive this morning, it was full, to be able to put different files on it and when I st

  • Using a function module i want to create another function module

    Hi all,         My requirement is by using a function module i want to create another function module(if needs modify action should also be done if i need this is for the created function module) and the main thing is that the function module which w

  • Moving ITunes movies to external hard drive

    I want to speed up my downloading by moving a bunch of my ITunes movies to an external hard drive.  How do I do it?  Should it help?

  • Editing LAN settings in GP using only computer settings

    billyrobinson2 wrote:I have my GPO applied to the folder just containing the laptops, so in theory, I shouldn't need item-level targeting, correct?Correct.billyrobinson2 wrote:I have my GPO applied to the folder just containing the laptops, so in the