AI Sample freq. and Samples / Chan

Using LV7.1 with Win_XP.
In a DAS code, using the Digital Edge Counter for firing a Timed Loop. ( Refer the enclosed diagram )
Intially I was acquiring only one channel and required a Timed loop with 50ms timing. Hence configured the Sampling Freq at 200Hz ( 5 ms period ) and took 10 Samples / Chan. I thus got exactly 5ms x 10 = 50ms.
Later I acquired 5 channels @ the same 200 Hz and 10 Samples / Ch. To my surprise I got the same 50ms Timed loop triggers. I don't think I am quite clear whats happening ? The number of channels that I acquire does not seem to alter the 50ms triggers.
Thanks for any clarifications on above. 
Raghunathan
LV2012 to Automate Hydraulic Test rigs.
Solved!
Go to Solution.
Attachments:
DAQMX_AI_Config.JPG ‏39 KB

Pulled out this VI from the disk ( must have got it from the forums earlier ) and that had answers to all my doubts !!
Raghunathan
LV2012 to Automate Hydraulic Test rigs.
Attachments:
Set_n_Read Convert Clock.vi ‏41 KB

Similar Messages

  • How to Extract the Freq List, Cycles per Freq and Samples per Cycles of sweep waveform

    How to Extract the Freq List, Cycles per Freq and Samples per Cycles of sweep waveform
    I want to extract the freqency distribution, cycles per freqency, and samples per cylce of swept waveform, in order to output the same of swept waveform with I have acquired by NI DAQ card, tks!
    owen wan
    Attachments:
    Untitled 1.vi ‏2333 KB

    Look inside the palette called Signal Processing - Waveform measurements.  There are a lot of functions here that you can use to get the information you desire.  For instance, the Extract Tones function will output an array of clusters, with each cluster element giving the frequency, amplitude, and phase of the signal component.  Go through the entire arry to see each frequency component of the complex waveform.
    Also, in the Waveforms palette there is the Get Waveform Components function that will give you t0, dt, and Y components of the waveform.  1/dt should give you the sample rate.  See attached VI.
    - tbob
    Inventor of the WORM Global
    Attachments:
    WfmInfo.vi ‏4658 KB

  • Sr830 connected with rs232, reading freq and voltage doesnot happen simultaneously

    Hi,
    I am having a problem, trying to set the frequency and voltage in the auxiliary output simultaneously. I wrote two codes, one to set frequency and another to set voltage in the auxiliary output and used them as sub VIs to my main program which at this moment contains only these two elements. When I run the program the first time, both the frequency and voltages are set, but on subsequent runs only one item is set whilw the other retains the older value and I have to run the program again to set this parameter. What is the problem? can u please help me out. I am just one week into labview programming but I have to set up C-V hysterysis in very shor time, of which these controls are a part. Please find the programs attached.
    Solved!
    Go to Solution.
    Attachments:
    select frequency.vi ‏20 KB
    select voltage.vi ‏20 KB
    freq and voltage.vi ‏18 KB

    Thank you guyz for your respective suggestions, I have replaced the two serial port initialization into one and I have placed the write functions sequentially, with a VISA close and simple error handler at the end. I have aso terminated all the voltage, freq., and amplitude commands with EOL (\r\n) Now, when I run this program, in the first run nothing happens, the values for voltage, frequency and amplitude remains the same. On the second run only the first component, i.e., the voltage is set to the defined value the freq and amplitude remains unchanged and on subsequent runs, nothing happens at all. o, I can only set the voltage, but not the next two components. I am sorry, but I don´t if I am making some silly mistake, but why doesnot the write functions work sequentially now?  and BTW i have only one serial port connected to the Stanford research SR830 lock-in amplifier.
    Attachments:
    select voltage freq amp.vi ‏44 KB

  • How do I input a wav. file, change the freq (cap the high freqs) and then save the new waveform as a new wav file again?

    Using Labview 7

    Hi Alexi,
    I have found a vi in the examples and slightly modified it for your purposes. Basically this is just taking the idea from the post above and partially implementing it into a vi.
    I have added a couple of notes to help you.
    If you need any further help with this, then I will be watching this post so please feel free to post back with more questions.
    Best regards,
    Peter H
    Applications Engineer
    National Instruments
    Attachments:
    Wave_File_Player.vi ‏192 KB

  • Unable to read the freq and amplitude

    if you could look at the prog.s attached and if you can explain why i am unable to read the data output from "scalled data vs seconds" into tone measurments.
    it must have something to do with the conversion from the cluster of 3 elements to the DBL waveform can anyone see the mistake in the conversion!!

    Please re-post your VI "problem" with default values saved on both graphs.
    Thanks

  • CMSS and SUB chan

    Hi.
    I have the Audigy 2 ZS and 5. headphones.
    I have tested my speaker setup with a couple of 6 channel tracks and everything is OK, every channel is on it's own speaker.
    My question is why don't I hear ANY sound coming from my subwoofer when listening to stereo tracks and CMSS turned ON?

    My sub is working in stereo/ 4. and 5. with cmss. In THX/ Speaker configuration you have the option to setup your sub.

  • Digital sampling

    I am having some timing issues.
    I am sampling analog inputs at 1kHz, and also sampling some digital signals "continuously" but I can not figure out how to increase the sampling rate of the digital signal. I need to get the sampling rate of the digital signal up to 1kHz to "coincide" with my analog data. I am using the DAQ assistant express VI to acquire both the analog and digital signal.
    Thanks
    Scott Donahue
    University Of Illinois Urbana-Champaign 

    I tried to use the timed loop, but It did not increase the sampling rate of the digital signal. I tried to speed the loop up (1ms period), decrease my analog freq and number of samples per loop, but that still did not work.
    When I try to use run the multi-func-synch AI-read dig chan Vi I keep getting an error message 200077. It says that I can not use the sample clock, and I must use either handshake or On Demand, this defeats the purpose of using this VI though. I need to be able to choose the same sample rate for both inputs. 
    The format of the VI seems to be what I need. It appears that If I can get it working I can synchronize my analog and digital signals to both sample at 1000 times per second, or 1000 Hz.
    I am enclosing a link to my file with read and write privileges, I hope that you can help me with my issue. I appreciate your time and patients with this "labview newbie"
    https://netfiles.uiuc.edu/xythoswfs/webui/_xy-11758353_2-t_qhBJ0PKv
    Thanks
    Scott

  • 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.

  • How to use on board counter to change sample rate dynamically on pci-6134

    Hi,
    I am relatively new in LabView.
    I am making power quality measurement system and I need to vary the sampling rate of my pci-6134 dynamically (all channels simultaneously). What I need is to have a constant amount of samples in each period of measured signal (grid voltage), which changes slightly all the time. Therefore I will have to measure the voltage, find its exact frequency and then adjust the sampling rate of daq accordingly. I know that there will always be some delay, but I would rather like not to go into any predictive algorithms...
    I have found an information in the Forum that one of possible solutions is to use an onboard counter to change the sampling frequency but I have no idea how to make that. Can someone help me or possibly show an example? 
    Is there a simple way to solve that problem?
    Thanks in advance
    Andrzej

    At least at a glance, the code generally looks like it ought to work.  Two thoughts:
    1. Instead of getting into PFI3 vs PFI8 routing stuff, can't you just specify "Dev1/Ctr0InternalOutput" as the AI Sample Clock source?  (You may need to right-click the terminal to get at the menu that exposes the so-called "advanced terminals").
    2. Try writing both the freq AND duty cycle  properties when you want to update the freq.  Or try using the DAQmx Write vi instead of a property node.  My past experience suggests that writing only the freq property *should* still work, but writing both isn't hard to try and may turn out to help if the behavior of your version of DAQmx differs somehow.
    -Kevin P.
    P.S. Bonus 3rd thought.  I just went back to reread the thread more carefully, including your first screenshot.  I'm now thinking that maybe the hardware actually WAS behaving properly, and that you just weren't aware of it.   When you query the AI task for it's sampling rate, all the task can know is whatever rate you told it when you configured it outside the loop.  So even as you change the counter freq to change the actual hardware sampling rate on the fly, the AI task will continue to report its orig freq.  After all, how is *it* supposed to know?
           Try an experiment:   Set your original freq very low so that the AI task produces a timeout error without getting all the requested samples within the 10 sec timeout window.  Run and verify the timeout.  Then run again, but after 3-5 seconds set a new frequency that will produce all those samples in another 1 sec or less.  Verify that you get the samples rather than timing out.  That should demonstrate taht the counter freq change really *does* produce a change to the hardware sample rate, even though the task property node remains unaware.

  • Waveform chart slow to read samples AIs when sending AOs

    Hi all,
    I am using labview to sample AI signals and send AO signals sampling at 4k with 400 samples to read... The AOs are triggered using buttons on the frontal (E-stim or M-Stim).. When the E-stim button is pushed it will generate a square-wave signal with the freq and pulse characteristics as selected on frontal panel (default is 1 pulse at 50Hz)... These are pulses are used to control a muscle stimulator... So the idea is to be able to send whatever signal I want and have the stimulator deliver that same stimulus to the muscle (e.g. 10 pulses at 50Hz, or 5 pulses at 100Hz, etc etc).. To check the timing of this, I connected the AO to the "trigger in" on the stimulator and the "trigger out" on the stimulator to an AI channel... The pulses are coming through from the stimulator as expected...
    However, when I send the AO pulses labview seems to "freeze" or "suspend" until all output pulses are sent... This is very apparent with a high number of pulses (e.g. 10 pulses at 50Hz)... That is, the waveform chart freezes/stops scrolling until all AO signals are sent, then the chart updates all the pulses in one hit and continuous displaying data; rathe than have each pulse displayed individually...Why concern is that AI during the AO phase may be losted ot not sampled properly...
    Can anyone provide me with an explanation for this behaviour? I am using a LV2010SP1 and a USB-6218 BNC multifuction DAQ.
    Thanks!
    Jack
    Attachments:
    TMS2.vi ‏304 KB
    TMS2.vi ‏304 KB

    Hello Jack, 
    Reviewed the code.
    Remember The way labview executes code, Labview executes code by flow of information meaning that it is going to wait untill the neccesary items are ready before executing the next part of the code.
    For example If we want to make a simple add function for "x" and "y" labview is going to wait untill both inputs are ready for operation before operating and outputing  "z" as a result.
    It does it the same way everytime. I took the time and rearranged the code so we can understand it better, The execution happens from left to right, from top to bottom.
    If we refer to the image, the arrows show us the flow of information of the VI, The DAQ assitant, the filtering of the signal and the Triggering is done before you actually output data through device1 analog output.
    The code is expected to work that way cause it waits untill done acquiring with the DAQ asistant to start generating an output.
    I can think of different options,
    -You can modify this VI so that the output takes place regardless of the input data
    -Having two different vis where you can set the read and write at different rates, using a functional global variable.
    -Using a producer/consumer architecture.
    This is an example that I think might be useful.
    Using Producer/Consumer Architecture for DAQmx Read and Write to File
    Hope this was helpful,
    Luis Martinez.
    Applications Engineer.
    National Instruments.
    Attachments:
    Flow.JPG ‏146 KB

  • Niscope for pxi5105, use a digital pulse signal to control analog signal sample

    i want to use ni-scope to drive pxi5105. And the PFI1 connect to a digital pulse signal(10KHz, 0-3.3V), to control a single channel analog signal continuous sample(Chan 0). I want a loop when the digital signal falling, the analog singal start to sample, and when the digtal signal rising, the analog singal stop. And by the low level of the digital singal, the analog singal sample (coupling by DC) can get an average and export to txt. I have tried the "start_and_reference_trigger.vi " and it did not work correctly. i need your help, thank you very much.
    Attachments:
    start and stop triggers for analog sample.vi ‏94 KB

    Hi Phil,
    The SCC carrier is only conditioning your signals (i.e. if your signals are not in optimal ranges, bandwidth or need external excitation). The actual counters and all digital lines are controlled directly by the M-series board. This means you will never be able to refer to a counter in the SCC module.
    If you route the signals of the M-Series board, is as if you had done so externally from the SCC. Look at this example and might give you more insight to how to implement it (This is software timing). The hardware timing would be doing correlation DIO. Here is an example that needs to be modified to adapt to your timing: http://zone.ni.com/devzone/cda/epd/p/id/4414
    Hope this helps,
    Yardov
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    Finite Dig Output High.vi ‏31 KB

  • High freq pulsing and error message

    while recording or in playback i hear a pulsing high freq and soon after a message pops up that reads "
    error while trying to sync audio and midi". my interface is a motu traveler and there tech support doesn't seem to be responding to the same question to them. everything is set at 44.1hz, i've tried rebooting and a lot of other stuff. does anyone out there know how to fix this problem?

    Your MOTU unit needs a reset!
    This is for an 828MkII but works on the traveler as well.
    * Disconnect the firewire cable from the 828mkII
    * Press the Setup knob
    * Turn the Setup knob all the way to the right
    * Press the Select knob
    * Press the Value knob
    * Power off the interface and plug the firewire cable back in
    * Power the interface back on
    pancenter-

  • Spectrogra​m from freq-domai​n magnitude, phase?

    I have complex frequency-domain data that I would like to use to make a spectrogram (energy vs freq and time).  The frequency-domain spectrum is evenly sampled with respect to angular frequency, and contains both magnitude and phase information.  I also already have a program that calculates the complex time-domain waveform for the data.  Is there a way to generate the spectrogram of these data, either by using a combination of built-in functions, or some other method?
    I have looked into using the built-in spectrogram function for this problem, but it seems to deal only with real data, and to assume that the given data is in the time domain.   It also doesn't seem to take a scale along with the amplitude values it reads... in this case, how can it properly display the time and frequency scales? 
    Since I already have the phase of each frequency within my data, I think it should be possible to translate phase into time delay.  I'm just having trouble figuring out how to actually do this.  Does anyone have any ideas?  Thanks!

    Lasergeek,
    As you mentioned, currently the WVD Spectrogram.vi doesn't support complex math. But the good news is that the vi is open source so you can edit it as you see fit. I think this is probably a great product suggestion and encourage you to visit the Product Suggestion Center. Thanks for your feedback!
    Chris C
    National Instruments
    Applications Engineer
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • A/R Extractor, Validation, and Enhancement......

    Hello ALL
    Need HELP in undesrtanding A/R extraction and validation.  Also need your help in LOGIC for Enhancement:
    1.  We use 0FI_AR_4 to pull in data into ODS.  As a Std. BC data surce and cube, the mapping includes 0DOC_NUMBER
         (SD Document Number) mapped to the field "VBELN".  When I check the data in the ODS, I do see records with values
         for 0DOC_NUMBER.  However, when I check the table "BSID" (data source table for 0FI_AR_4, I don't see any of the
         values.  So can some pone please tell me where am I going wrong in validating the values??  How can I proceed?
    2.  What does "VBELN" correspond to....?  Assuming it to be "Sales Order Number", I tried to check these values in the SD
         tables - VBAP and VBAK.  Both the tables do not have these Document Numbers....!  So I am not sure of what this
         Doc. Number represents?  Is it "Invoice Number"...?  How can I validate the SD Doc Number (VBELN) that is coming
         from 0FI_AR_4 with SD Tables?  Which table(s) should I check??
    3.  The A/R datasource needs to be enhanced to bring the Sales org; Division, Dist. Channel.  I am hoping to do this in CMOD
         by appending the extract structure.  I was hoping to match the "SD Doc Number" (VBELN) coming from 0FI_AR_4 to VBELN
         in the table "VBAP" &  "VBAK" and then get the Sales org, Div and Dis Chan for matching records.  Does this sound right?
         But since I am unable to match the value of VBELN in any of the tables (BSID, VBAK, VBAP), I don't know how this logic
         would work....?  What would be the logic to grab the 3 fields (Sales Org, Div, & Dis Chan)??  Will I need to bring the
         Line Item number from BSID (field VPOS2)..? 
    Can someone pelase suggest the answer to each of the above..... as they are related to one another.  Suggestion on the
    LOGIC for enhancement would be greatly HELPFUL.....!!
    Thanks...... MKAM

    Hi,
    FI -AR and SD is integrated modules. Any transction done by the SD it will effect in FI also.
    May'be in R/3 side they are not integrated properally just check it once in FI functional guys.
    Thanks & Regards,
    Venkat.

  • Can I use two "finite pulse train" to work in parallell with different freq.?

    I want to generate two seperate pulsetrains in parallell with different freq. and number of pulses. I am using a "PCI 6036E" with two counters on the device. I think I need four counters to make this task? I would be very glad if anyone had any answer on this

    It will take four counters to generate two pulse trains with two different frequencies and number of pulses. As a workaround with your existing device, you can possible create a pulse train using one of the analog outputs, if it's available. Otherwise, you'll need either another MIO device or you could choose to use a TIO device (660x) which will have 4-8 counters.
    Hope this helps!
    gus....

Maybe you are looking for