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

Similar Messages

  • How to avoid jitter in analog output(square wave) generation

    Hi all,
    Iam working with PCI-6723 32 channels analog output,iam generating a square wave,sampling at 100ks/s.
    ican able to generate upto 10kHz square wave.The wave form appears clean when it is below 1000Hz if i crossed 5KHz to 7KHz, iam getting jitter in the output square wave form,i have experimented with the digital filter but still the jitter is persisting,
    since iam using 12 channels for such similar generations so i have fixed the sampling rate.100Ks/s.
    kindly suggest me how to avoid this jitter in high frequency generation.
    OS::WINDOWS 2000
    HARDWARE PCI-6723.
    I/O CB 68
    NIDAQ:7.3
    LABVIEW 7.1
    kindly find the attached file.
    Thanks and Regards
    RAJESH
    Attachments:
    Untitled.vi ‏73 KB

    Hi ALAN,
    Thanks for your reply, well the square appears to be overlapped ie one ON/OFF period another waveform tries to overlap, actually i planned to take a snapshot of my oscilloscope (tetronix) but since its not advanced one ,i have attached the file kindly look into it,you can observe the at some higher frequencies there is lot of difference between rise time and fall time.
    Thanks and Regards
    rajesh
    alan actually iam decorating my front pannel do u have any sample layouts for coloring ,buttons kindy forward me .
    Attachments:
    Doc1.doc ‏56 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

  • How can I use two analog output channels simultaneously?

    I am using PCI6110 DAQ card. I want to run two separate VIs on one computer. Each VI output a waveform to one analog output channel. How can I do this simultaneously without interfering each other?
    Thanks

    Hi Stephen,
    This can NOT be done with two seperate VI's.
    The issue is in the hardware/driver.
    Your hardware has a clock that controls how fast updates to the AO occur. That clock can only have one value at a time. I will let your contemplate the complications that come up with two different clock settings being active at the same time (see below).
    So how do you work around this complication?
    You will have to develop a single VI that OWNs both output channels. That VI will have to accept start,stop,configure, etc commands from the two clients (what you will have to convert your existing VI's into). If you decide to place a restriction on the services you provide to the clients along the line of "only one sample rate at a time" you will be making your li
    fe much easier.
    If I was contracted by a customer to do what you have asked, I would try to combine the two existing VI's into one or simply buy a second 6110 and avoid all of the hassles. Both of these approaches would end up saving the customer money in the long run while freeing them of any restrictions that where established in order to develop the "server".
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How do I get an analog output signal from my PCI-MIO-16E-4 card?

    I need an analog output from 0-10 V to control the mass range on a mass spectrometer. Do I use the DAC0out channel to do this? The manual only talks about analog out (ao) channels. Is this the same as DAC0out and DAC1out? How do I set up the DAQ assistant for this process? I do not need a waveform, only a constant signal.

    Yes indeeded. The DAC0out and DAC1out are the analog output channels (ao0 and ao1).
    Simply follow the examples that ship with LabVIEW. You can also easily create code with DAQ assistant.

  • How to synchroniz​e two analog output with USB-6353 sharing a trigger

    I'm have the need to synchronize two analog output on the same device (USB 6353) sharing a trigger signal on PFI0.
    The programming environement is Visual C++ , and the code I wrote is as following:
    DAQmxCreateTask ("", &Ao0TaskHandle);  // is the task handle for the analog output Ao0
    DAQmxCreateVoltageChan((Ao0taskHandle,"Dev1/Ao0","​",-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(Ao0taskHandle,5000.0,DAQmx_V​al_Rising,DAQmx_Val_ContSamps,1000);
    DAQmxCfgDigEdgeStartTrig(Ao0taskHandle,"/Dev1/PFI0​",DAQmx_Val_Rising);
    DAQmxCreateTask ("", &Ao1TaskHandle);  // is the task handle for the analog output Ao1
    DAQmxCreateVoltageChan((Ao1taskHandle,"Dev1/Ao1","​",-5.0,5.0,DAQmx_Val_Volts,NULL);
    DAQmxCfgSampClkTiming(Ao1taskHandle,5000.0,DAQmx_V​al_Rising,DAQmx_Val_ContSamps,1000);
    DAQmxCfgDigEdgeStartTrig(Ao1taskHandle,"/Dev1/PFI0​",DAQmx_Val_Rising);
    DAQmxWriteAnalgF64(Ao0taskHandle,1000,FALSE,10.0,D​AQmx_Val_GroupByChannel,AOdata,NULL,NULL);  AOdata is a buffer containing a sinwave
    DAQmxWriteAnalgF64(Ao1taskHandle,1000,FALSE,10.0,D​AQmx_Val_GroupByChannel,AOdata,NULL,NULL);
    DAQmxStartTask(Ao0taskHandle);
    DAQmxStartTask(Ao1taskHandle);
    What happen as result of the code is that only the Ao0 channel get the sinwave output , but not the Ao1 . It seems the two channels are not synchronized.
    What is wrong in my code?
    Please any help non referred to a LabView soloution , first because I'm not a LavView programmder and secondly the project impose C++ as the unique environement.
    Thanks
    Enky

    It will depend on what you are programming the NI 5112 device with.
    If you are using LabVIEW, you can use the example program attached below. In it, it will show you how this is done.
    If you are using VB, VC++ or CVI, you can look at one of the NI 5112 shipping examples that are installed on your computer. These are located in the VXIPNP folder. For example, the VC++ example would be located here:
    C:\VXIpnp\WinNT\NISCOPE\Examples\c\MStudioC++\5112​Sync
    These examples will show you how to synchronize the two digitizers.
    Let me know if you have any questions about these examples.
    Brian
    Attachments:
    Multiple_NI_PXI-5112_Synchronization_Demo.llb ‏151 KB

  • How to toggle LED at analog output from my VI Using NI USB 6009

    Greetings,
    I bought this NI USB 6009 Multifunction I/O and found various uses for it. In my VI, I am acquiring some signals using the DAQ assistant. After doing a couple manipulation I would like to toggle a LED at one of the two Analog outputs available. I tried configure it in Max and was able to toggle it there, but now I would like to have the VI do it once a certain value is attained. Can anyone  tell me how this is done as I think I might be doing something incorrect.
    Thanks
    Edward

    Greetings,
    Attached you will find just a simple code to turn on the LED if the indicator on the VI's front panel illuminates. In my original code it is something similar. I have also check the wiring and I don't think that's the problem since I was able to toggle it through Max. I am using LV 2009. When  the output channel was configured in Max, the output voltage was set to range from 0-5V. I am not sure if the DAQ  Assistant  analog output is being triggered properly.
    OK, Lets say that I wanted to turn on the LED if a number was greater than the one stored in memory. How would I pass that to the NI USB 6009 to turn on a External LED. Please assume that the output is wired properly.  
    Thanks
    Edward
    Attachments:
    LED Application.vi ‏43 KB

  • How much noise expected in analog output?

    I'm using a PCI-MIO-16E-4 with LabView to generate buffered analog output, and at the BNC-2090 output (DAC0/1OUT) I'm finding ~180 Hz hum of about 20 mV peak-to-peak. It doesn't seem to matter whether I'm writing a waveform or not; the noise magnitude is always about the same.
    Is there something I can do to eliminate or reduce this, or is it typical so I'm stuck with it? I futzed with the BMC-2090 shield ground jumper (W1) but none of the three documented settings made any difference.
    Any suggestions would be greatly appreciated.
    thanks,
    Kevin

    No particular noise is "typical." No noise at all is atypical. 20mV is low enough that it could be radiated noise for nearby equipment. I doubt you card would have that noise in the lab situation where they test for noise. Which essentially means something about you estup is responsible for the noise.
    Since the frequency is a multiple of 60Hz it is probably environmental noise, radiated ot picked up off of the ground. Really and truly, 20mV is not a lot. I have acquisitions where I must be very careful in grounding ALL the associated equipment or I see huge blurts of noise from a motor drive - on the order of 3 Volts until I drove an eight foot gound rod through the floor to get an isolated safety ground for my DAQ PC and scope. I still see the noise, but it is now lower than 0.8V so I don't get false triggering of TTL circuitry from it. This is AI not AO like you are discussing.
    If you check the specification of your card there is a table on "System noise." I am not saavy enough to understand it, but I see that the noise is dependant on the output range. I suspect that the range is not a user selectable item, but in theory if you see more noise than the spec sheet says, then it is part of your setup not the card.
    Here is part you really don't want to hear: Solving a noise problem by text messaging is like solving a mental illness over the phone, maybe worse. I can tell you all sorts of practical, common sense things that are not specifically helpful. I can tell you from personal experience that you really need to follow all the good practices you can, if you really want to have as high a SN ratio as possible.
    Can you set up a single point ground? Can you eliminate all ground loops (shielding only grounded on one end.) I had a stray strand of shielding that brushed against a case that made terrible noise once.
    There is a good book called ,"Grounding and Shielding Techniques," by Ralph Morrison from Wiley Inter-Science. There are papers on this in in the tech resources of ni.com. In particular the paper on "Field wiring" is good. Keithley has a good book they will send you for free on low level measurements that is very informative. You have to call them on the phone to get it.

  • MRP: how to avoid Purchase orders/ Production orders generation

    Hello,
    I would like to know how can I avoid the generation of purchase orders / production orders for MRP execution. I am interested in knowing which are going to be my future needs for a material running the MRP, but I am not interested in generating any new Purchase order / Production order.
    I've been changing some parameters in the MRP 2 tab: procurement type, but I think that it is also related with MRP type or MRP group or both. With the procurement type I've only been able to change the purchase requisitions to planned orders and viceversa.
    Any suggestions?
    Thank you

    Hi Cristian,
    W/o MRP run you cannot get the requirements at lower level.
    Please understand:
    FG - Stock 10, IndReq 20; Halb - Stock 5; RM - Stock 2
    > MRP run >
    FG - Stock 10, IndReq 20, PldOrd 10
    Halb - Stock 5, DepReq 5, PldOrd 5
    RM - Stock 2, DepReq 3, PurReq 3
    So, via MRP run the requirements are calculated with planning proposals together. As I told you this is material requirement planning, this is the very purpose of MRP.
    If you only want to display the stocks and requirements, create a query / riport for this purpose and use the appropriate filter.
    Csaba
    (sorry, refresh button helps only if you change the PO, PrdOrd, etc > one level under the material you can see the effect)
    Edited by: Csaba Szommer on Sep 2, 2008 1:42 PM
    Edited by: Csaba Szommer on Sep 2, 2008 1:43 PM
    PLEASE NOTICE THAT W/O MRP-generated-PldOrd YOU WON'T GET THE DepReq.
    Edited by: Csaba Szommer on Sep 2, 2008 1:50 PM
    Edited by: Csaba Szommer on Sep 2, 2008 1:51 PM

  • How to avoid letterboxing & pillars in output of slide show as wmv movie in Premiere El 10?

    I have created a slide show with both stills (using pan and zoom) and videos. Both in the Preview monitor in Premiere and in the exported movie I get letterboxes and pillars (black lines top and bottom, and on the sides). I know there is a lot going oh here, but here are a few relevant details.
    Premiere 10 - (64-bit)
    Running Win 7 Home Premium
    Still images have various aspect ratios, but mostly I tried to keep to 1000x750 pixels for 4:3 aspect ratio
    Videos are 320x240
    Output is to WMV (720p HD movie) - this is the only choice for a WMV movie and I cannot find ANY output that matches the 320x240 format of the videos.
    Any help would be very much appreciated.
    This is my first post in the forum. I did search the previous discussions, as I'm sure this has been discussed befor, but found nothing.
    Please forgive if I'm in the wrong poace or any other stuff like that.
    Thank you

    Thank you both for your replies - very helpful.
    This was/is an attempt to put together a demo for a project, to be shown on a computer. - by someone who obviously did not know what he was doing, namely, me.
    Can you tell it was my first attempt?
    Yes, the preset was DV 48kHz, which is apparently 4:3, right?
    The tiny video is what I was given to work with (from VideoBlocks) Maybe not a good idea to even try. The still images were various sizes and I resized them to 1000x750, on a recommendation from someone on how to get good 4:3 resolution. So that was not such a good idea either.
    Since then, I have tried a couple of experiments.
    BUT, I just tried a new video with images resized in Photoshop to 1280x720, with the preset at DV widescreen and output at 720p HD. Hey - it is almost a success. The letterboxes and pillars are negligible - about 1/8 of an inch.  Thank you both so much.
    So would you insist on higher quality video to work with?  I have until next Wednesday. Lots of time. Sounds like there is not much hope for using the 320x240 video.
    Thanks very much for your suggestions and patience.

  • 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

  • How to avoid # in the report output in BEx for null characteristic values?

    Hi All,
    In a query output, # values are shown for the charactersitics which are null. I would appreciate if someone would help showing null instead of # in the reports for the null values.
    Regards
    Subba

    Hi,
    There are various options.
    1. Exclude the # in filters for that chararcteristics, it will remove all # values.
    2. Display the text for that Characteristcs which will be displayed as "Not assigned".
    3. If you want to display as "Null", Change the entry in text table of the charaterictics for value # as "Null".
    4. While updating this filed in cube/DSO write routine to replace #/blank with "Null".
    I hope it will help.
    Thanks,
    S

  • How to hide a output field without changing its layout

    Hi
    My requirement is that i ahve a field which is just for calculation purpose and I do not want it to show as output.
    I want to know how to do that without changing layout.

    Hi,
    If your are using module pool.  Goto the field attribute, in attribute select Display-> select Invisible check box.
    Regards,
    Bhaskar

  • How to avoid the selection of a Parent node and its child node at a time?

    Example:
    consider the below JTree.
    Parent1
    ---->Parent2
    -------->Child3
    Parent3
    ---->Parent4
    My requirement :
    Parent1 and Parent3 can be selected at a time(using ctrl keys)
    Parent2 and Parent4 can be selected at a time
    Parent1 and Parent2 should not allowed to select at a time.
    In general : A parent and any of its child should not be selected at a time.
    How to achieve this? Anyone please help me.

    Thanikai wrote:
    I am very sorry.Whatever for? It's a valid question.
    How do i implement a custom TreeSelectionModel?I would start by going through the source of DefaultTreeSelectionModel so see how the default selection is handled. Also probably check out JTree.EmptySelectionModel to see how selection is prevented.
    Which methods to override?Methods in the class you choose to extend, obviously. But before that you need to firm up certain design decisions: if a parent node is selected and the user attempts to select one of its child nodes, do you select the child and deselect the parent or do nothing/ and vice versa.
    etc.... may form the basis for a future, more specific question accompanied by a [_SSCCE_|http://mindprod.com/jgloss/sscce.html].
    luck, db

  • How can I import an image without Motion 5 changing its proportions?

    I have an image that's intentionally larger than the canvas size (1080x1920) in Motion 5. Every time I import it or drag it to the timeline, Motion automatically squeezes the image to fit the canvas proportions. I know I can go and adjust the width of the image to get it back closer to its correct proportions, but I'm going to be importing multiple images like this will add a ton of extra (and non-precise) work.
    Is there a setting to change this?

    I've tried that. The properties show that it is at 100%, and I have to stretch it out further than 100% in order for the proportions to look normal again. I've also selected "Do Nothing" in Preferences and it doesn't make a difference. It seems that option is for scaling images that are larger than the project pixel dimensions, but it still squishes my imported images.
    Since this was a relatively simple animation, I just did the scene in Final Cut and then brought it back into my Motion project as a Quicktime movie. I would think such a workaround shouldn't be necessary though.

Maybe you are looking for

  • I have windows 7 and firefox wont let me adjust screen settings

    i have an hp monitor model 2310m. tasks bars r ok but viewing sites is very small and condensed width wise

  • Can't sign in to YouTube account  via YouTube app on iPhone4

    I saw a few posts from a year ago - not sure if there are any updates or changes. I would really like to be able to access my personal YouTube account using the YouTube app on my iPhone4, but everytime I try to sign in, I repeatedly get the same mess

  • 2012 macbook pro retina display

    i am looking to buy a 2012 macbook pro retina display 13.3" core i5, 8gb ram and 126gb ssd however,  have heard that the 2012 macbook retina display models have problems with them, like screen issues, over heating issues, wifi connection issues etc.

  • Does the new Aperture use Time Machine at all?

    One thing about Aperture 2 that bugged me was that the library is automatically excluded from Time Machine. In iPhoto, you can recover a photo or bring back a previous version with Time Machine, but this does not seem possible with Aperture. Does the

  • Alarm failure

    As far as I can tell, previous similar questions have not been answered. Since upgrading from Tiger to Snow Leopard I too have had problems with alarms not activating. I have recently been scheduling both e-mail and message alarms for the same event;