Frequency sweep with DAQmx

The following is the setup :
LV7.1 + PCI_6229 + WIN_XP
For controlling the drive rpm of a servo motor, I need to generate a range of frequencies from 60 to 2500 at 10 Hz intervals.
With the DAQmx polymorphic VI,  "CO Pulse Freq" , I can generate  a particular frequency.
But if I have to change it on the fly how do I do it ? Like ideally if
there was a property node for the polymorphic VI (!) , I could easily
do it. But it does not have one such node for frequency and hence the
query.
Having started the frequency generation at a default value, I would
like to alter it programmatically without having to stop the VI and
reload the fresh frequency.
Any suggestions welcome.
Thanks
Raghunathan
Raghunathan
LV2012 to Automate Hydraulic Test rigs.

Hello SG_ENGINEER,
So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
-Alan A.
Attachments:
Continuous_Analog_Out_Update_Sinewave.vi ‏100 KB

Similar Messages

  • Frequency sweep with peak frequency

    Hi guys, I need some help here. I´m using a NI 9215 to do a frequency sweep from 30 to 90 Hz.
    So far so good. Now I need a resulting resonance frequency at highest voltage.
    I tried a max peak frequency VI but couldn´t get it to work.
    Any idea what to do?
    mfg, Andi
    ok, here is my sweep.vi for better understanding
    Message Edited by andinew on 08-11-2009 04:14 AM
    Attachments:
    sweep.vi ‏216 KB
    create_log_frequencies.vi ‏15 KB

    Hi Andi,
    one thought first off: looking at your "create_log_frequencies.vi", I realized that it generates linear frequency hops, not logarithmic ones...
    But on to your question: to find the frequency with the highest amplitude (this will be your resonace, I guess), you will have to look at the entire signal - your "sweep.vi" code iterates the measurement and interpretation five times per second, independantly of the speed of the sine sweep.
    My advice would be to generate one waveform containing the whole sweep run, and writing this sweep block for block with a constant sample rate onto the output. You could then read back the response with blocks of the same size as your output, do the single tone measurement on this block and store the resulting frequency and amplitude in an array preserved trough a shift register or simply into two auto-indexing tunnels. The latter is okay as you don't need a "while loop" in the measurement loop (you know how long the analog output loop runs - why not use this information to configure a "for loop").
    After your analog input "for loop" has finished, search your amplitude array for the maximum - then use the found element's index to index the frequencies array and return the corresponding resonance frequency.
    A good starting point could be the example I wrote a couple of month ago: it runs continuously the same "sweep" (you'd have to adjust the waveform, I know) and reads back the stimulus and the response (wire the output to your probe and parallely to ai0, your response signal will be connected to ai1). You can then insert tone measurements etc.  at the marked section...
    When trying to open the example, you will be prompted to find a VI called "_Get Terminal Name....vi" - you can find this VI at the following location: C:\Programme\National Instruments\LabVIEW 8.5\examples\DAQmx\_Utility\_Utility.llb
    As an afterthought: the "phase difference" you are calculating between every other sample of the analog measurement array is a bit confusing: if oyu need the phase difference between the original signal and the stimulus response, you will need to wire the stimulus to a second input and compare the phases of the two separate signals...
    Best regards,
    Sebastian
    Message Edited by SFK on 08-12-2009 04:12 PM
    Attachments:
    Multi-Function-Synch AI-AO mit Signalgeneration.vi ‏91 KB

  • When using the LabVIEW Simulation Module, how can I start a frequency sweep with the Simulation Chirp signal generation VI at an arbitrary time after the simulation initial time?

    I'm using the Simulation Loop on LV RT when interacting with some hardware (i.e. all I/O is happening in the Sim loop). I'm going to conduct a frequency sweep test on the hardware and want to use the Simulation Chirp function. However, there is no way (that I can see) to trigger the Chirp to start at some event (i.e. I click a boolean on the front panel and enter a case statement). The Chirp is tied to the global time of the Simulation loop and so are it's input parameters. Is there a way to make it relative to some time at which an event happens?

    Craig,
    Your solution will 'cut' the beginning of the signal and only show the signal afterwards.
    To control when the chirp should start, the best option is to use the Chirp Pattern.vi ( in the Signal Generation palette) and use a Lookup table to control when to feed the time. The shipping example (in LabVIEW 2013) shows how to code using a lookup table.
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Chirp.vi
    Then, to start from a toggled boolean, look at the example:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Simulation\Signal Generation\SimEx Step.vi
    and Here is the example in 2013 (in attachment):
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments
    Attachments:
    SimEx Chirp with Delay.vi ‏241 KB

  • Pci 6602: configuring a frequency-divider with daqmx using labview7.1

    i´m using labview 7.1 and the pci6602 counter-board. i want to configure a counter as an frequency-divider with varaibale division-rate, witch is a easy thing to do with the classic "old" daq-driver.
    it´s recommended to use the "new" daqmx-driver, and i want to do so, cause i´m using also other ni-devices and want to use the same driver for all of them, but i can´t find any possibility in the daqmx-vi´s to configure such a frequency-divider.
    i also couldn´t find any example-code for this problem.
    please help me!!

    hi, thanks for the answer, but unfortunatly it´s not what i ment.
    i need to configure a counter on the pci6602 wich divides down the frequency "f_in" of the square pulses connected to it´s "source" pin by "divisor" and puts out square pulses with frequency f_out=f_in/divisor at another pin. That process should take place only on the 6602-board without using the cpu.
    i´ve found the solution already, how to configure a counter on the pci6602 with daqmx like described above. see attachment.
    servus
    markus
    Attachments:
    Divider_Config_mw.vi ‏40 KB

  • HP4284A Frequency Sweep with frequency points read from a tab delimited excel or lvm file

    Hello,
    I am using a HP4284A, and have downloaded the file here. However, I cannot figure out what format of file it takes as input: I understand this should be a .lvm tab delineated value file, but in what order is the data? If someone could provide an explanation, or an example data file, I'd greatly appreciate that.
    Thanks.
    Ps. I know the linked article says that 'The frequency points are as defined for the oscillator in the HP4284A user manual.', bit I have been through the manual from end to end, and I can't find anything of the sort. The closest I've been able to find is the codgin for remote access, but that isn't very relevant as Labview and the coding (C++, I believe) used are very different.
    Solved!
    Go to Solution.

    Sure. I wound up adding some additional features to it, though, badly. It's perfectly functional but badly coded (veteran users please don't laugh); I could probably optimize it now, having learned more, but I'm too lazy to. There's a writeup, too.
    Attachments:
    HP4284A Frequency and voltage sweep.vi ‏288 KB
    Program writeup.docx ‏12 KB

  • Frequency sweep with vb6 and measurement studio

    hello! i hope you can help me with my problem
    im using:
    -PCI-MIO-16E-4 Daq-Card (at the moment, later i will get the PCI-6115 Daq-Card)
    -Visual Basic 6.0 with Measurement Studio
    my Problem: i want to stimulate a mechanical system with sine-waveforms of differernt frequencies, because i want to measure the resonance frequency of the mechanical system.  For that i want the Daq-Card to output a sine waveform, the frequency should be swept from one frequency to an other frequency (i think the real values dont matter at the moment). The Problem is that the sine-waveform must not be interrupted  when you change the frequency, because this would disturb the movement of the mechanical system.
    I allready tried (without Measurement Studio) to use the fifo buffer (regeneration of thewaveform in the fifo) to be independent of the delays caused by the pc-system, but when i change the updaterate (change of the frequency) of the DAC there is again a dependence on the pc-system and the waveform goes to zero Volts for a while.
    And i also tried to use the Chirp-Function (CWDSP.Chirp) of the measurement Studio, but with this function i have the problem, that i cant define how long the DAQ-Card outputs the actual frequency.
    greetings A.Herman

    Hello SG_ENGINEER,
    So that is possible, but it is a completely different approach than that mentioned above.  You would have to use a continuous analog output program and change the output waveform.  Check out the attached example.  I modified a shipping example to do an analog output and increment the frequency of the output waveform. 
    -Alan A.
    Attachments:
    Continuous_Analog_Out_Update_Sinewave.vi ‏100 KB

  • Can I produce a frequency sweep a PXI-5652 from 1GHz to 2GHz and back down to 1GHz at a rate of 1KHz with RT?

    I need to produce a triangular frequency sweep over a range of at least 1GHz.  This sweep will start at 1GHz go up to 2GHz and back down to 1GHz and repeat the cycle.  I need this cycle to repeat at a rate of 1KHz.  The sweep must be as smooth as possible with the frequency steps being no more than say 1MHz.  I have a RT controller chassis that I can install the PXI-5652 into.  If I dedicate one of the processor cores to this function and reserve the second core for my data acquisition and processing do I have and chance or am I just dreaming?
    Thanks,
    Bruce Barnes

    Hi Bruce,
    If I interpret this correctly that you need to go from 1 GHz to 2 GHz and back to 1 GHz in 1 ms (you want to repeat this at a rate of 1 kHz) then this isn't possible with the PXI-565x series of RF Signal Generators. These have a tuning time of around 1-5 ms for one frequency step, and tuning from 1 G to 2 G in steps no greater than 1 MHz would mean at least 1000 steps.
    Regards,
    Andy Hinde
    National Instruments

  • Frequency sweep input output

    Hi
    Using Labview 7.1 and PCI 6071 DAQmx card i want to design a frequency sweep application. I mean  that i need my analogue output channel to give a sine wave with incremental frequency of 100 Hz step, starting from 10000 Hz untli  100000 Hz (10000 Hz, 10100 Hz...100000 Hz). This wave is applied on a kind of a transformer, and each time the frequency changes, i need an input channel to acquire another also sinus wave coming from this transformer and measure its amplitude, in order to examine its frequency response. So, i came up with the attached vi.
    The problem is, that when "sweeping" takes place ,i get amplitude values between 2 and 6 or even 7 volts something that  can't be happening. I know that the amplitude values i should get are around 2 volts  (+/- 500 mV maximum).
    I think, that the problem should be in some kind of "non-synchronization" of the input-output channels when the vi enters the loop to start changing the frequency.
    Just to be more clear, i need my vi to do these steps in order:1. constantly output the 10000 Hz wave 2. acquire the input wave 3. measure its amplitude 4.transform the frequency into 10100 Hz 5. acquire the input wave 6. measure amplitude  etc... 
    The odd thing is that when i physically connected the output channel with the input one to see if the frequency sweep is done, it worked fine. I mean that i did get in the input channel almost exactly the signal i generated.
    Thanks in advance, and i hope i was not tiringly analytical..
    Attachments:
    sweep3.vi ‏140 KB

    Hi
    Please take a glance at the two attached vi's.
    The first is the one i use in order to generate a steady frequency sinus wave,feed it to my transformer and acquire the also sinus output of the transformer  through my input channel. Using two channels of an external oscilloscope i check and notice that for many frequency values, both sinus waves are steady and noiseless, with the expected amplitude voltages.
    Now, using the second vi, in order to "sweep" the wave and check my transformers amplitude response, then these impossible amplitude "up's and down's" again came up.Again by looking at the oscilloscope's screen i can see the noisy waves tha "confuse" and the oscilloscope and my input channel, and so result in wrong amplitudes.
    Based on the above, i have to assume, that the problem lies in the sweep mechanism design i use. Also, after trying several different ways to sweep, i came to the conclusion, that the problem comes up whenever i use the second Basic Function Generator.vi inside the loop. Could it be that it needs triggering again?
    I'd really use some help, or maybe even ideas for different design approaches for the frequency sweep.
    Thanks in advance
    Attachments:
    Multi-Function-Synch AI-AO3.vi ‏164 KB
    sweep4.vi ‏142 KB

  • Synchroniz​ing two counter frequency inputs with multiple analog inputs

    Hello all,
    I'm fairly new to LabVIEW and I'm trying to collec​t data from multiple sources with synchronized tim​ing on the acquisition but I'm having trouble figu​ring it out. My problem is that I've got two count​er frequency inputs, one optical tachometer readin​g one pulse per revolution, and a max machinery fl​ow meter with a k factor of 12000. I can't seem to​ figure out how to sync the timing with my multiple analog inputs. I've be​en attempting to get the tachometer  to sync with ​the analog inputs first by following the example l​inked here. (https://decibel.ni.com/content/docs/DOC-10785) So far each time I run it I either get a timeout e​rror on the DAQmx read or a "Multiple sample clock​ pulses were detected" error (see attached image).  It seems if I slow the sampling rate way down to ​say 10 hz and ensure that the tachometer signal is​ over 800-1000 RPM (13-17 Hz) before starting the VI then the program will run without errors until ​the RPM drops below that threshold then the "Multi​ple sample clock pulses" error occurs.  The code is attached below.
    Does anyone know of a more effective way of syncin​g counter frequency inputs with analog inputs?  I'd like to have a VI that can show 0 RPM (and ev​entually 0 flow as well, but I think I need to fig​ure out the timing of one counter before I add ano​ther as it seems I can't have two counters in the ​same task). Any help on this would be greatly appr​eciated.
    LabVIEW version 13.0
    cDAQ-9178 Chassis with NI 9401 for the two counter inputs and NI 9205 for the analog inputs.
    Thanks!
    Richard
    Solved!
    Go to Solution.
    Attachments:
    SimpleDAQ.vi ‏44 KB
    LV_Error.JPG ‏31 KB

    Maybe third times the charm? 
    So I've finally got a good handle on why the VI is having problems at low RPM though I'm somewhat embarassed how long it took me to do that
    Because I have the counter time synced to my Analog input task if it doesn't see at least two pulses between the two clock pulses set by the analog input task I get the -201314 "Multiple sample clock pulses" error. This seems fine at first as it just sets a minimum RPM that I can measure and it's well below the area I'm interested in so no problems there.  I tried a simple error handler that would clear the error when it happend assuming the loop would keep iterating until the RPM went above that minimum at which point I would get a signal again. This is not the case, the read function just continues to spit out the -201314 error even after the RPM is back in the readable range. So then I tried adding two case structures so that when the error occured it would stop the task, clear the error, and then start the task again on the next loop iteration (Code Attached). This also doesn't work as the error shows up again on the stop task and then AGAIN on the start task on the next loop iteration. It seems this error is not actually being cleared and once it happens it stays with the task regardless of what the error cluster is carrying. 
    Anyone have any ideas?  The only solution I can think of is to just clear all tasks and recreate them each loop iteration until the RPM is readable again but that strikes me as a horribly clunky solution.
    Richard 
    Attachments:
    SimpleDAQ_1_Start Stop.vi ‏48 KB

  • Setting up frequency sweeps using HP33120A

    I am trying to set up a frequency sweep in LabVIEW by programming a HP33120A Function Generator. Would appreciate if someone who has worked on it suggest a method appropriately. Thanks!

    By manually, do you mean from the front panel? If you really mean programtically, then use ag33xxx - Config Waveform like I said inside a loop. A shift register would be initialized to your starting value. Inside the while loop, wire the shift register to the frequency input of the ag33xxx - Config Waveform function. Also inside the loop, increment the shift register by another control that you specify a value for. Add another control for a stop value and terminate the while loop when the current value of the shift register is equal to/greater than the stop value. I've attached a picture that I did just a couple of days ago for an almost identical question (just a different instrument). The picture has a constant for the start and stop value so if you want to use different values at times, replace them with controls.
    If you want an uneven step value, you can place an array of values outside a for loop and auto-index the array.
    Attachments:
    Increment 370A.JPG ‏8 KB

  • Frequency sweeps using HP33120A

    Hi,
    i am new to Labview 
    I am trying to set up a frequency sweep in LabVIEW by programming a HP33120A Function Generator.with device Driver have i implemented Sweep with same Step in my posted Code,now i want to improve Sweep function durch varied step in different frequency range,for example,from 10 Hz to 1000Hz :10Hz to100Hz with 10Hz step sweep, from 100Hz to 1000Hz with 100Hz step sweep.  Would appreciate if someone who has worked on it suggest a method appropriately. Thanks!
    note:Labview 2009 SP1
    Attachments:
    fast frequency measurement program.vi ‏248 KB

    Dennis_Knutson wrote:
    It seems overly complicated to me, especially with that silly sequence structure. All that you have to do is use the Ramp Pattern to create an array of frequencies. Use two of them with different a different delta and combine the arrays. Pass the combined array to a for loop with the function to set the frequency and let the magic of autoindexing do its thing.
    thanks for your suggestion,i try it later

  • Problem with DAQmx and Real Time PCI-7041/6040E.

    Problem with DAQmx and Real Time PCI-7041/6040E.
    I have a problem with the Real Time card PCI-7041/6040E, I think it is properly installed because my software run with the traditional NI-DAQ. When I try to use the new DAQmx to acquire one signal, Labview doesn't see any device for de DAQ card 6040E.
    Information, I work on Windows XP and LabView v7.0.0 (NIDAQ RT v7.0.0, NI-Serial RT v2.5.2, NI-VISA v3.0.1 and NI-Watchdog v2.0.0).
    Could Labview RT run with new DAQmx ?
    What can I do to use DAQmx with PCI-7041/6040E?
    Thanks for your help !

    Hello,
    I refer to your posts because i am using the PCI 7041/6040E card as
    well but without any success to make it work. The problem I have
    already described in the following thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=120198
    Would be nice if you had a look on it, maybe you can help me. BTW, the
    thread starts with a problem of someone else, the difficulties I
    encountered are to be found a little bit to the bottom of the thread's
    page.
    Thank you!
    Dirk Völlger
    Darmstadt
    Message Edited by ratschnowski on 07-28-2005 07:14 AM

  • Problem with DAQMX on a 6025E !!

    Problem with DAQMX on a 6025E
    I work on a DAQ 6025E and I can't use the example "Write Dig Port.vi" and all others example on digital output with DAQMX. There isn't any hardware failure because the same installation functions correctly with the traditional DAQ. I want to use these channel parameters: Dev1/port2.
    I already tested to make a reset device and use "line or port configuring vi" but without successes.
    Thanks for your help!
    Attachments:
    Write_Dig_Port.vi ‏48 KB

    I took a look at the example you attached and it looks fine. Here are a few things to try out BEFORE running the example from MAX:
    1) Remove any SCXI, SCC, and accessories from the configuration in MAX so that no DIO lines are reserved for communication.
    2) Reset the driver to work in DAQmx mode for your board. To do this, first right-click the "Traditional DAQ Devices" and say "Reset Driver" and then right-click your 6025E under DAQmx Devices and say "Reset Driver" again. This should enable the driver for DAQmx.
    3) In MAX, under DAQmx Devices, run the test panel and make sure you can read/write all the DIO lines there first. If that works fine you should be able to run the example.
    Remember that the port names for the 6025E are Port 0, Port 2, Port
    3, and Port 4 (no Port 1).
    Good Luck!!!
    Sincerely,
    Brooks Bailey
    Application Engineering
    National Instruments

  • Can read TEDS in MAX but not with DAQmx VIs

    Hi,
    I have a cdaq 9181 with a 9234 accelerometer module.  I have 3 teds equipped accelerometers connected to ai0, ai1, and ai2 repectively.  In MAX, when I reserve the chassis I can read all three teds, no errors.  When I do the same thing in labview (ie reserve the chassis, create a daqmx task, associate teds data with each physical channel, all with daqmx VIs) I can only read two out of three teds.  The third one throws a "no teds sensor detected" error.  This code has been in use for about four months now, though I just rewrote the calling VIs, and hasn't displayed this problem.  I've attached a snippet of the task building VI for reference.
    Any ideas what's going on?
    Thanks.
    Using LV2012 and MAX 5.3.1 running on Windows 7 32 bit.
    CLAD
    Attachments:
    Build Daq Task Snippet.png ‏58 KB

    Nope.  That's a delete from array, length 1, index 3.
    In any case, I eliminated that block since the string array wired to the for loop controls how many devices the VI attempts to configure.  Same result, verified it was trying to configure ai2.  Here's the updated snippet:
    CLAD
    Attachments:
    Build Daq Task Snippet v2.png ‏54 KB

  • SCXI 1001, SCXI-1102 and SCXI-1303 not working correctly with DAQmx

    I have recently upgraded from Labview 6.5 to Labview 8.2 and now my SCXI 1001 with a SCXI 1102 and SCXI 1303 terminal block no longer reads the correct voltage.  Using the old version of labview thermocouple measurements are correct at 0.5mV; however using the new version of labview and DAQmx the thermocouples are reading 5V.  Everything is installed correctly as it still works with the older version of Labview, is there something that needs to be reset or change so that teh SCXI will function properly with DAQmx?

    Hello ilabtech,
    From my understanding you are using an SCXI 1001 chassis with an SCXI 1102 and 1303 terminal block to perform thermocouple measurements.  You are upgrading to LabVIEW 8.2 and DAQmx.  I am assuming you were using LabVIEW 6.1 since there isn’t a LabVIEW 6.5.  You mentioned that are able to get a correct reading of 0.5 mV with LabVIEW 6.1 but you see a rail of 5V with LabVIEW 8.2 and DAQmx. 
    My first suggestion is that you ensure that the SCXI is set at the appropriate range and for the correct thermocouple type.  You can also configure these settings in MAX as detailed on page 27 of the SCXI 1102 User Manual and Specifications Guide. 
    My second suggestion is for you to start off using an example program to see if you see the same error.  When you are in a LabVIEW 8.2 VI you can go to Help>>Find Examples to open the NI Example Finder.  You then choose Hardware Input and Output>>DAQmx>>Analog Measurements>>Temperature>> Cont. Acq Thermocouple Samples-Int CLK.vi.   This example program is supported by your hardware and is a good resource to use to troubleshoot.
    If these suggestions aren't helpful please answer the following questions in your reply.
    1.        I would like to know what range you have set the SCXI 1102 to read. 
    2.       What version of DAQmx are you using?  You can find the version my opening Measurement and Automation explorer (MAX), expanding the “Software “and clicking on NI-DAQmx.
    3.       What operating system are you using?
    4.  Does your Traditional DAQ program work in LabVIEW 8.2?
    Regards,
    Ima
    Applications Engineer
    National Instruments
    LabVIEW Introduction Course - Six Hours
    Getting Started with NI-DAQmx

Maybe you are looking for

  • Hyperlink in XML Report

    Hi, I need to create a hyperlink in one of my report. The business logic demands that I get entity-wise clubbed data . But if I need to see the detail of an entity , I should just click on that entity name which should then refer me to a new report t

  • Was not able to use my geeksquad warrenty on my Phone.

     When I bought IPhone for myself and my wife I decided to purchase the geek squad insurance. The Best Buy employee who sold us the phones did not say anything about the insurance lasting 2 years, so I was under the impression that the insurance was g

  • Is the power cord covered under warrenty?

    I bought a powerbook about two years ago and purchased the extended applecare warranty. My powercord is starting to rip on the end that connects to the computer. Is this covered under the warrenty?

  • EXCEPTION_DURING_EXECUTE While sync Proxy to Proxy

    Hi All, I am doing Synchronous Proxy to Proxy(CRM>PI->ECC) Scenario. In the CRM server we have business partneres. when i execute the client proxy for some business partners It is getting successful and the response details are coming back to CRM, bu

  • Awesome Bar: auto-complete suggestion does not remember port number from URL

    I visit URLs with non-standard ports all the time such as http://localhost:8080. When I start typing "localhost" into the address bar, the Awesome Bar suggests only "http://localhost" - i.e. WITHOUT the port 8080 - instead of suggesting the full URL