Delayed repeated analog output

I have an AT-MIO 2 DAQ card. I am using the FIFO-buffer for outputting
to the two outputs. The content of the Buffer stays the same and has to
be outputted multiple times. After every output the output should wait a
time and then restart?
How do I do that ...
WFM_ClockRate(dev_nr,group,1,-1,1000,1) does not seem to work .....

You can use software timing or hardware timing.  Since you'll be running on a Real-Time operating system, software timing will be much better than if it were running on Windows.  You also have the option of configuring an interrupt to "fire" and execute code whenever you want.
I hope this helps,
Kevin S.
Applications Engineer
National Instruments

Similar Messages

  • How to avoid delay during analog output generation by changing its frequency?

    Windows XP
    LabVIEW 7.1
    PCI-6036E + BNC-2120
    Hi,
    I am going to create a vi to generate an engine speed sensor signal (a simple square wave with specific missed pulses, in my case 58 pulses “teeth” and 2 missed pulses “missed teeth”) as an analog output but in addition give me the opportunity to control parameters for example frequency online to simulate the engine speed changes during running that vi. For this purpose I have started with “Continuous Generation.vi” which is available in NI Example Finder under the following path:
    Hardware Input and Output > Traditional DAQ > Analog Output > Continuous Generation.vi
    Then I modified it towards above mentioned goal, all related vi s are attached. The main vi is: "Motor Signal Generator_1.12.vi"
    At the first try it looks that it works properly but when have a look on that more accurately with Oscilloscope (fortunately I have a good one: Agilent 54621A – 60 MHz, 200 Ms/s) obviously there is a gap (delay or Jitter) whenever I change the engine speed. It is also attached in Signal generation_problem report.doc file.
    Note: Small gaps are OK and related to predefined missed teeth but the big one is happened during changing engine speed.
    As far as I understand it is related to the time which case structure in AO C-GEN sub-vi needs for AO reconfiguration each time after changing the engine speed (update rate). How can I get rid of this delay or gap during signal generation and generating completely continuous signal?
    I have to mention that obviously I changed the frequency by changing the update rate. The other possibility is to change the number of updates in one period (refer to "generate arb frequency.vi" in NI site: http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E48F56A4E034080020E74861) which resulted in no delay however then I can not change the frequency continuously but step by step (for example jump from 5Khz to 2.5KHz immediately) and this can not pass to my application.
    Any hint is appreciated.
    regards
    Attachments:
    Signal_generation_NIsupport.zip ‏81 KB

    Hi Roozbeh,
    The following example will allow you to vary the pulse train frequency during run time.
    Thanks,
    Lesley Y.
    Attachments:
    GenDigPulseTrain-ChangingSpecs.vi ‏75 KB

  • Single shot analog output: How to pulse this. Probably easy, I'm at a loss.

    Hello.
    I have a piece of machinery that my system is connected to.  Every time it reaches a proximity sensor (It's a reciprocating unit), I need to do a single pulse of 5v out of my analog output.  It has to be fast, it has to stop until the sensor is reached again, and it can't stay 'on' for long.
    I've attached my VI.  I'm using a voltage input via DAQ assistant, routed through some logic to produce a 'true' boolean every time that sensor is reached, and that boolean is connected to a case structure with voltage out tasks created in DAQmx.
    My problem is that the machine won't reverse while the case is still true and there's still the 5v being called by the true case on the case structure.  It has to pulse, then stop, then be allowed to come back when the proximity sensor is reached again.  As it is now, the machine reaches the prox and then the whole system stops, as the 'true' condition on the case structure, and subsequent voltage output, remain high.
    I've attached the VI and heirarchy as well.
    I've tried a few different things here, as well as just using a DAQ assistant with N samples, but that would just retrigger when the loop repeats anyway.
    I'd love to sit and bang my head against this til I get it, but I'm under a time constraint.  Help!
    Still confused after 8 years.
    Solved!
    Go to Solution.
    Attachments:
    using create channel.vi ‏94 KB
    logicsub.vi ‏32 KB

    Ralph, without knowing the exact DAQ card that you are using, it is difficult to give you the best solution. If you want to continue with the solution that you currently have, try adding a shift register to the outer while loop to track the previous value of the boolean. In this way, we can keep multiple values that are above the threshold from causing multiple pulses. Next add a time delay after the DAQmx Write, then add another DAQmx Write to set the output back to your low value. Remove all code from your "false" case. See attached VIs. Please let us know what model of DAQ card you have as we may be able to do something clever like a retriggerable pulse train if your card can support it.
    Charles Chickering
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines
    Attachments:
    using create channel.vi ‏98 KB
    logicsub.vi ‏29 KB

  • How to change the update rate of an Analog output in a loop

    I have to generate a ramp at a decreasing frequency. I use a shift register in a "for" loop to decrease the rate of the analog output. Unfortunately, the loop or the analog output initialisation take a too long time delay..
    How can I solve this problem?
    Any help is greatly appreciated
    Thank you

    Hello;
    I'm attaching an example VI that shows how to change the output rate on the fly.
    Hope this helps.
    Filipe
    Applications Engineer
    National Instruments
    Attachments:
    aochangeonthefly.zip ‏47 KB

  • How to reset buffer pointer for analog output generation?

    I am doing a finite analog output generation on a USB-6216
    Sequence of events:
    DAQmx Create Task
    DAQmx Timing (finite samples, 1000Hz)
    Use DAQmx timing property SampQuantamples per channel to set buffer size
    Write buffer with DAQmx Write
    Repeat
      DAQmx Start Task
      DAQmx Wait until done
      DAQmx Stop Task
    Until finished
    DAQmx Clear Task
    I get a full waveform output on the first iteration of the loop. On subsequent iterations I get only a small section of the waveform, but no error. It seems that it is regenerating the waveform, because when I switch off regeneration I get an error at Start Task, but before it can regenerate all the data Wait Until Done.vi decides that the generation is done and exits, stopping the generation.
    I have done this with a PCI device and it works fine; every call to Start Task generates the whole waveform again.
    OK, so it looks like after every waveform generation completes I need to reset the pointer to the start of the buffer, so that the Wait Until Done vi does not think the generation is done. Or - maybe there is a way to reset the "Generation Done" state?
    I'm sure there's an easy way to do this....?

    Hi CDancer,
    Many thanks for contacting National Instruments. If I can start by giving some general advice, it would be well worth posting your actual VI. This helps others on this forum in helping you with your application. 
    From the sounds of things, you want to do continuous analog output generation. I have had a look at the examples that come with LabVIEW and I think you should look at the one below.
    I would have a look at some of the DAQmx examples that come installed with LabVIEW. The following example would be particularly relevant I feel
    Cont  Gen Voltage Wfm-Int Clk-non Regeneration.vi 
    Please let me know how you get on.
    Many thanks,
    Andrew McLennan
    Applications Engineer
    National Instruments

  • Delayed digital sound output?

    Presumably someone else has seen this already, but I could not find any such info in the FAQ or here.
    I recently connected the SPDIF output to the stereo.
    The sound output there, while good, is slightly offset from the analog output. When running with both analog and digital output active, the digital works as an "echo".
    More annoying, when playing video, this means lips and voice are not in sync.
    My guess is the offset is something like 0.1 - 0.2 secs.
    Anyone seen(/heard) of this before?
    WinXP, BIOS 2.4, APU 1.0 / audiodriver: 5.10.2826.0000

    Hook,
    All this is using the SPDIF output:
    I just checked and the delay is greater (and is probably what you are noticing) when you enable the Dolby Digital encoding. If you output Stereo, that is PCM, it will be much smaller. The DD encoding/decoding process takes time.
    Sill, you will notice some delay anyway WRT the analog, as your receiver has to process the PCM signal a little, but not as much as the DD signal.
    If your problem is lip-sync, set your DVD player to output directly to SPDIF and not to 6 channel audio. Just think about it:
    DD track ->SoftDecode to 6 channel->MCP encode to DD->SPDIF->Receiver decode to 6 channel
    VS
    DD Track->SPDIF->Receiver decode to 6 channel.
    Hope this helps.
    M.-

  • What does analog output do after output

    Hi all,
      I have a question about the behavior of the analog output on a single AO channel. If I write a single voltage (1.2volt) to an AO channel and keep the operation lasting for 3ms (using delay). I wonder after 3ms, what state will that AO channel be? Will it maintain the same voltage or will be reset (to zero) or whatever?
    Solved!
    Go to Solution.

    An Analog Output will hold the last value until the device is reset or a new value is written.  It is advisable to set the AO channels to 0 when you are done with them.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    how can i synchronize analog output and analog input timings to generate and measure voltage at the same time.

    Read this Tutorial
    http://zone.ni.com/devzone/cda/tut/p/id/3615#toc3
    And also refer to this link where You have repeated this question.
    PS: Please stick to one thread. That way, its easier to keep track of your query and answers

  • Setting sample rate for sinus analog output

    Hello,
    I've been trying to do something very simple : using an analog output of the card PCI 6221 to produce a sinus curve of frequency 50 Hz. For this I used a Vi to create a sinus curve and the different DAQmx VIs. But I have difficulties understanding the principle of virtual channel and I think I'm doing a mistake setting the sample rate and samples number : one time for the sinus vi, second time for "DAQmx - Timing". Should I use the same values for both of these VIs ?
    On my oscilloscope, with frequency=50Hz and sample rate=1kHz, I get a null signal. Then depending on both values, I get differently rated signals. For example with f=1Hz and sr=10kHz, a sinus of frequency 0,7 Hz.
    Solved!
    Go to Solution.
    Attachments:
    Sinus analog output.vi ‏32 KB

    Yes, thanks for your advice. I used the structure given in the example and now it's working fine. I'm still not sure what I did wrong though.
    I would have a second question now (should I create a new topic?):
    I put a continuous sine wave on the analog output. As soon as this is running, (or maybe after a short delay) I want to measure a limited amount of samples on my analog input. How can I be sure, it's not going to start measuring before the output is properly set ?
    I don't think a trigger would solve the problem since I'm going to vary the output Amplitude.

  • Can analog outputs simulate a 60hz ttl pulse?

    The only outputs free on my 6020e are 2 analog. I need to drive a TTL device at 60hz. Can the analog outputs do this?

    Paul;
    You can do that but keep in mind that will not replace the counter pulse train generation operation. I'm saying that because the counter will execute a hardware operation, and so, will be able to have a completely system independent operation, generating a nice and accurate TTL pulse train.
    By doing that trough the analog output, as the data transfer in between the computer memory and the DAQ board is system dependent (since it uses DMA), you might have some glitches at the pulse train because of some delay caused by the data transfer. But that is definitely something to try out.
    Hope this helps.
    Filipe

  • Repeating buffer output

    Hi All,
    I have built a program that loads digital and analog signals onto three separate boards.  The experiment only requires about 30 seconds worth of signaling but then should repeat over and over again until we have sufficient data gathered (the data will be gathered on a separate computer so no need to worry about that aspect).  The ideal program would load the buffer, output the signals, once all the signals have been output, wait around 2 seconds for the components to return to the off state, and then repeat the output.  I have tried using a sequence structure with identical frames running each frame for 32 seconds. I have also tried setting the sample generation to continuous samples, but neither of these solutions worked.  Any suggestions would be greatly appreciated.  I have attached my program which runs one iteration, then takes all the outputs to zero.

    maybe now
    Attachments:
    Analog program.vi ‏39 KB

  • Usb 6009 continuous analog output

    Hi
    I'm pretty new to Labview, so you may have to bear with me. I have a USB-6009 and I want to generate a continuos analog output voltage. I've got the example you have posted 'Gen Mult Volt Updates-SW Timed_LV7.1 (0 to 4).vi' working and it outputs a continuous sine wave.
    In a similar manner I need to generate:
    1. Ramp up voltage (and ramp down voltage): starting with a continuos constant voltage, which after a period of time linearly increases to another constant voltage, and which allows me to specify the 3 time intervals and the rate of increase.
    2. Pulsations: whereby I can specify the amplitude and time interval of each pulsation
    This is so that I can control voltage to a valve which regulates my pipe flow. In the example I have (one stated above), I do not understand specifically:
    i. Why I need both a 'Software Loop Time (ms)' as well as 'Timeout'
    ii. The 'Sinusoidal Pattern' input which seems to generate data for a sine wave- I can't get a description of that and there are no similar VIs for other waveforms; and what is the function of the two numbers it has?
    iv. How do I change amplitude and time period for the wave?
    iii. What does 'Index Array' do?
    thank you

    Hi there,
    I'm guessing the VI you are using is the one from this KB:
    http://digital.ni.com/public.nsf/allkb/6F2C2B49A89D685C8625711D007BDD64
    i. The software timed loop control is to control the rate at which you change the voltage output.  The timeout on the DAQmx Write VI is the maximum time in seconds the VI will wait to output a sample (eg. if the write buffer is full, the Write VI will wait for it to become available for 'timeout' seconds before outputting an error).
    ii. The sine pattern is just an array constant of doubles that make up the sine wave voltage values, and the for loop adds an offset (of two volts) to every single one of those values. You might want to replace that entire array constant and for loop with a Simulate Signal Express VI (just search for Simulate Sig or look in the Functions >> Input palette) and convert the dynamic data output to an array of doubles.  You can configure the type of waveform, amplitude, and time period from that express VI as well.
    iii.  Refer to previous answer.
    iv.  Index array returns an element of an array based on the index input.  You can turn on the context help and move your mouse over functions to get more help on them.
    I hope that helps!
    Way S.
    NI UK Applications Engineer

  • Usb-6009 analog output voltage

    Hi,
    The usb-6009 has two 0-5 volts analog ouputs. Is it possible to connect
    them in series, in order to get a single 0-10 volts analog output
    channel ?
    Thanks,
    Nicolas

    Those are ground-referenced signals. To connect them in series, you would have to connect one of the outputs to ground. You would be shorting out (at least) one of your analog outputs, and probably damage the unit.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • 2 analog output channels with different frequencies

    Hi,
    hope that somebody can help me:
    I created two physical tasks, analog output channels.
    I should give signals (triangle signals) to a scanner. The problem ist that I need these triangle signals with two different frequencies.
    I can create the signal with each of the task, but not together. Can I solve this problem somehow?
    Ah, and of course the 2 tasks should start together...
    Thanks for your help!!
    Telly

    You didn't mention the type of device you're using, so I'll assume it's a standard MIO. A typical MIO only has one AO timing engine, so you'll have to create one task for both channels and use a single update rate for the task. You will have to make the output frequencies different by passing different data for both channels.
    For example, let's say your update rate is 1KHz. The data for channel 0 is 1000 data points of a single cycle of a triangle wave. The data for channel 1 is 1000 data point of two cycles of a triangle wave. When you run the task, you will get a 1Hz triangle wave on channel 0 and a 2Hz triangle wave on channel 1.
    Good luck,
    Joe

  • HELP about analog output video

    Hello, I´m need help about analog output video in Premiere CS5 using Matrox RTX2. I need to crop a video with resolution in 1440x1080 to 4:3 in output analog. But what happens is wrong (I think). My video is in format anamorphic and the other option is 16:9 letterbox. Is there any way to crop the video without using effects. Thanks a Lot and sorry my bad english (my native language is Portuguese).

    There are no 4:3 HD specifications.  You'll have to put the video into a normal SD sequence, and scale it down till the top and bottom of the video meet the frame.  That way the sides will be cut off.

Maybe you are looking for

  • Error downloading, tap to retry

    I bought P!ATD most recent album and all but the first two songs downloaded on to my phone. and I've tried to retry downloading them but it keeps saying I they can't download them at this time. The whole album downloaded perfectly fine to my iPod 4th

  • Customer's PO number in SAP PO; VBKD-BSTKD ME21N VA01

    Hello Gurus, Our scenario is Sales Order mfg. First we create a Sales Order which create automatically a Purchase Requisition. We put the client's own PO number in the respective field (VBKD-BSTKD). Then we create a Purchase Order from this requisiti

  • PrintScreen problems in Mavericks

    Hey! Since I updated to Mavericks I seem to have som trouble with my printscreen-option. Especially the "cmd + shift + 4" screen capture-option. Sometimes when I try to do a screen capture with that method in Safari, the computer instead takes the ri

  • Export from 8i to 11g does not create object in default tablespace

    Hello I have exported and schema from oracle 8i and i try to import it in oracle 11g in a different architecture (8i is sparc. 11g is x86) i have created an user with default tablespace and the original tablespace does not exist in this database, but

  • Installing DW8 and DW CS3

    I have some extensions that does not work with DW CS3, so I would like to keep using DW 8, but I would like to get familiar with DW CS3 also. How can I install both on the same machine without messing up the extensions? I am Mac OSX. Thanks in advanc