Simultaneous AO generation at different frequencies

Is it possible to run two sine waves simultaneously from the same board, at different frequencies?
example:
Dev0/ao0...sine wave with amplitude = 10, freq = 1
Dev0/ao1...sine wave with amplitude = 1, freq 100
thanks for any replies.
dave

why not just set up 2 sine waveforms at the different parameters and send it to the AO write:
Creat Channel->Timing (use waveform)->AO Write (using array of waveforms)->Start
LV 7 example attached (uses DAQmx).
2006 Ultimate LabVIEW G-eek.
Attachments:
simusine.vi ‏71 KB

Similar Messages

  • Producer Consumer simultaneous operations at different frequencies

    My goal is to do two operations simultaneously.
    The desired end result is:
    1)      Produce an output signal which oscillates at a specified frequency (1 to 10 hz)(using DIO NI-9403). This signal will cause a solenoid to vibrate at different frequencies.
    2)      Monitor voltage on 3 lines in real-time (using analog input NI-9201). This will monitor system response to vibration.
    3)      Produce an output signal which oscillates at a different frequency from (1) – producing 1-second HI values 5 seconds apart. This will cause the system to “pulse”; system response will be monitored.
    4)      Have a front-panel user interface where: the signals in (2) can be monitored; frequency of (1) can be monitored and changed; and the output on (3) can be monitored and changed.
    My efforts so far have been to build a producer-consumer structure. This is my first time using this structure so I may be completely misunderstanding its use. Feel free to correct me if I’m way off target.
    The issue I have is the solenoid in the consumer loop (which handles item (1)) is not operating at the desired frequency. It is too slow. I used a 10ms timer for this loop, but instead it is operating about 1 cycle per second.
    There may be a much better way to approach this, or maybe my program only needs some minor tweaks. Either way, thanks in advance for your help.
    Attachments:
    ProdComsLoop Pulser 2-27-14.vi ‏65 KB

    Hi BradleyDDC,
    It seems from your program that you don't need a producer consumer loop. The only thing you are feeding from one loop to another can be put in one loop, I mean the simulator on button.
    The timer does not determine how fast the loop runs in real time. To get more precise timings, we recommend hardware timed operations as opposed to the software timed ones.
    Instead of using a digital output signal, you can use a counter output task, here is a knowledgebase, which has an example of what you may want.
    Paolo F.
    National Instruments
    Applications Engineer

  • Finite pulse train with different frequency

    Hello,
    I'm trying to modify the labview example "generate finite pulse train" to generate a finite pluse train with different frequencies. Each freq will run 400 pulses. The freqs are stored in an array, which is being fed into a for loop. Thus ramp up the freq each iteration. However the program only generate 400 pluse at first given freq. I'm fairly new to daqmx and not sure what is wrong. Anyone have some idea how to fix it?  
    Attachments:
    pulse train finite mod.vi ‏38 KB

    The best "fix" will depend a bit on the needs of your app.
    Is it ok to have a fraction of a second without any pulses each time you change frequencies?  If so, then there's a pretty simple solution:
    1. Outside the loop you'd create a DAQmx virtual channel and configure for Finite Sampling (# samples = 400) using DAQmx Timing.vi.  
    2. Inside the loop you'd chain together a DAQmx Channel property node where you set the pulse frequency property, then perform a DAQmx Start, a DAQmx "Wait for Task Complete", and a DAQmx Stop.
    3. So for each freq in your array, you'll program the counter for that frequency, start the generation of pulsetrains, and then stop the task after 400 pulses have been generated.
    If you must change frequency on-the-fly, producing *exactly* 400 pulses at each freq setpoint will be tricky, and maybe even impossible to do reliably.  Some techniques will get you closer than others though, so post back if you need to do this.
    -Kevin P.

  • 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

  • Schedule Line Generation at Different dates

    Dear MM gurus
    SUB:- Schedule Line Generation at Different dates
    We have requirement of generating the shcedule line on different dates
    in case multi supplier.
    Say the subject part is supplied by 3 different supplier when executing MRP
    system generated the schedule line on same date for each supplier,
    however the business requirement is not to receive all material on same
    date but to receive the same on say three consecutive dates,say schedule line for first Vendor 20.11.2007 ,22.11.2007 for second vendor ,23.11
    for third Vendor and  so on.
    Pls suggest.
    Regards,
    Ashok Ugar

    I have not presented my problem to them. It is ofcourse possible that this SAP note is not applicable for my problem, but I noticed the first paragraphs as relevant.
    The problem now seems solved by the way. An order desk/planning empoyees has changed the order quantity and the confirmed quantity to 15.000 pieces. So this line is now fully delivered. Th edelivered quantity is now stated in the schedule line.

  • How to structure the DMA buffer for PXie 6341 DAQ card for analog output with different frequencies on each channel

    I'm using the MHDDK for analog out/in with the PXIe 6341 DAQ card.
    The examples, e.g. aoex5, show a single Timer  (outTimerHelper::loadUI method), but the example shows DMA data loaded with the same vector size.
    There is a comment in the outTimerHelper:rogramUpdateCount call which implies that different buffer sizes per channel can be used.
       (the comment is: Switching between different buffer sizes will not be used)
    Does anyone know what the format of the DMA buffer should be for data for multiple channels with different frequencies ?
    For example, say we want a0 with a 1Khz Sine wave and a1 with a 1.5Khz sine wave.  What does the DMA buffer look like ?
    With the same frequency for each channel, the data is interleaved, e.g.  (ao0#0, ao1#0; ao0#1, ao1#1, ...), but when the frequencies for each channel is different, what does the buffer look like ?

    Hello Kenstern,
    The data is always interleaved because each card only has a single timing engine for each subsystem.
    For AO you must specify the number of samples that AO will output. You also specify the number of channels. Because there is only one timing engine for AO, each AO will channel will get updated at the same time tick of the update clock. The data will be arranged interleaved exactly as the example shows because each AO channel needs data to output at each tick of the update clock. The data itself can change based on the frequency you want to output.
    kenstern wrote:
    For example, say we want a0 with a 1Khz Sine wave and a1 with a 1.5Khz sine wave.  What does the DMA buffer look like ?
    With the same frequency for each channel, the data is interleaved, e.g.  (ao0#0, ao1#0; ao0#1, ao1#1, ...), but when the frequencies for each channel is different, what does the buffer look like ?
    In your example, you need to come up with an update rate that works for both waveforms (1 KHz and 1.5 KHz sine waves). To get a good representation of a sine wave, you need to update more than 10x as fast as your fastest frequency...I would recommend 100x if possible.
    Update Frequency: 150 KHz
    Channels: 2
    Then you create buffers that include full cycles of each waveform you want to output based on the update frequency. These buffers must also be the same size.
    Buffer 1: Contains data for the 1 KHz sine wave, 300 points, 2 sine wave cycles
    Buffer 2: Contains data for the 1.5 KHz sine wave, 300 points, 3 sine wave cycles
    You then interleave them as before. When the data is run through the ADC, they are outputting different sine waves even though the AO channels are updating at the same rate.

  • AI/AO at different frequency

    Hi,
    As a newbie, I met a problem when I tried to input and output analog signal at different frequency.
    I followed PID-control-Multichannel.vi to build a control program, so input/output can be synchronized. However, the project requires that the AI frequency to be ten times of the AO. I could rewrite the while loop to make the output value constant for 9 of 10 cycles. However, I believe there is more straight forward way to do it.
    Could anybody provide an example?
    Thank you in advance.
    Sincerely yours
    Ming 
    Solved!
    Go to Solution.

    lmuri wrote:
    Hi,
    As a newbie, I met a problem when I tried to input and output analog signal at different frequency.
    I followed PID-control-Multichannel.vi to build a control program, so input/output can be synchronized. However, the project requires that the AI frequency to be ten times of the AO. I could rewrite the while loop to make the output value constant for 9 of 10 cycles. However, I believe there is more straight forward way to do it.
    Could anybody provide an example?
    Thank you in advance.
    Sincerely yours
    Ming 
    Hello Ming!
    Thank you for using the NI Forums. You'll be glad to know that DAQmx allows I/O tasks such as these to be ran not only concurrently but also at different rates.
    The problem with the solution you've devised is that this implementation will remove the delegation of the tasks down to the hardware level and your program would become software driven; this becomes problematic when running data acquisition tasks at very high speeds as you become limited to the output speed of your Operating System (OS).
    You can co-ordinate your tasks to operate synchronously and perform output and acquisition at different rates by creating a task master. This generally means that you configure a task through DAQmx that maintains a clock frequency and you create tasks which use this clock frequency, or a division of it, to operate at their own individual frequency. This will ease not only the implementation of synchronous DAQmx tasks but also provide an entirely hardware driven solution to maximimse performance.
    Through LabVIEW, if you go to Help > Find Examples to open the NI Example Finder. If you browse through Hardware Input and Output > DAQmx > Synchronization > Multi-Function > Multi-Function-Synch Dig Read Write With Counter.vi, you will find an example of how to configure a Counter as a task master to control the operation of both a Read and Write operation. (This example shows a digital implementation but may be easily replaced with analogue.)
    By setting the counter rate to the maximum frequency that you will require for your task (In this case, the speed at which you want to output values) and applying it to the output task SampleClock, you will drive the output task clock with the Counter as the clock source. You can then use the Counter as the source for the SampleClock for the input task, however set the rate to whatever division of the driving frequency you want. In the case of your example, you can set the input rate to 0.1 times the Counter Frequency to acquire at a 10th of the rate.
    If you wanted to acquire at the same rate but only retrieve values at the 10th of the speed, this same solution could be configured to instead produce a trigger to return a buffered acquisition. With a master clocking task, the opportunities are endless!
    I hope that you find this helpful, and if you need any more clarifcation don't hesitate to let me know. Have fun with your DAQ!
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • Consumer for different frequencies

    Hello,
    what is the proposed architecture for consumer that muxes multiple producers with different frequencies ?
    Example: DEV1 goes 100 Hz, DEV2 goes 50 Hz. You need to mux the data together in order to get 1 list to simplify programming further and boost searching performance and so on. The cluster contains DEV1,DEV2 , when there is no new DEV2 you keep the last value there.
    I am deciding between multi-queue and functionalglobal. The queues seem better option to me.
    Let me know your opinions. Thank you !

    Dear Bublina!
    You are correct, queues are generally a safer and more reliable way of transmitting data between loops.
    The way I would do it is to have one single queue for all the producers with two items stored in the queue: 1 enumerated type and 1 variant. The ENUM can tell the consumer from which producer loop the data is coming from, and the variant can contain all the data sent. You can store the latest values of DEV1 and DEV2 in a shift register, and overwrite the one that was sent.
    Please tell me what you think.
    Regards:
    Andrew Valko
    NI Hungary
    Andrew Valko
    National Instruments Hungary

  • How to use a multiple boards (6321/6323) analogical acquisition task with simultaneous analogical generation task using the same boards (Labwindows CVI10)

    Subject : it seems impossible to run a multiple boards analogical acquisition task with one or several analogical generation task using the same boards.
    NI Configuration : Dev1 = Dev2 = 6321 boards
    Development environnement : LabWindows CVI 10
    Source code for analogical acquisitino task :
           DAQmxCreateTask("",&AIRecordingtaskHandle);
           DAQmxCreateAIVoltageChan(AIRecordingtaskHandle,chan,"",DAQmx_Val_NRSE,min,max,DAQmx_Val_Volts,NULL);
           DAQmxCfgSampClkTiming (AIRecordingtaskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, sampsPerChan);
           DAQmxGetTaskAttribute(AIRecordingtaskHandle,DAQmx_Task_NumChans,&gNumChannels);
    Chan = "Dev1/ai0, Dev1/ai1, Dev1/ai2, Dev2/ai1"
    Source code for analogical generation taskS :
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC0, chan, "", min, max,DAQmx_Val_Volts, ""));  // chan vaut Dev1/ao0
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C1_DAC1));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C1_DAC1, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev1/ao1
           DAQmxErrChk (DAQmxCreateTask("",&AOtaskHandle_C2_DAC0));
           DAQmxErrChk (DAQmxCreateAOVoltageChan (AOtaskHandle_C2_DAC0, chan, "", min, max,DAQmx_Val_Volts, "")); // chan vaut Dev2/ao0
    At the first DAQmxReadBinary call attempt, the system shows an error (see attached document) 
    What we understand about that error : it is impossible to run the two set of tasks (ai and ao) using ressources from both Dev1 and Dev2 in the set of tasks because it is not allowed to use the same Reference Clock for that.
    The question is : is there a way to to that without having that kind of message?
    We tried different combinations :
    - Using only one ao task (on Dev1/Dac0) : same error
    - Not using any ao task (only the ai task) : no error
    - configuring the ai task with only channel from Dev1 : no error 
    - Using "/Dev1/ai/SampleClock" as internal clock for the ai task and "/Devk/ao/SampleClock" for each ao task (k standing for "1" or "2" depending of the ao task we consider) : error
    Thanks a lot.
    Pièces jointes :
    MsgErreur NIDAQmx.JPG ‏38 KB

    doublon
    Valentin
    Certified TestStand Architect
    Certified LabVIEW Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • In what circumstances could my app service simultaneously process requests in different processes?

    Hi,
    We recently encountered a scenario in our Cloud Services Web Role web app where simultaneous api calls on the same item occurred, such that IIS automatically allocated them to be handled on separate threads inside the same w3wp process. We needed to handle
    this scenario by rejecting/ignoring whichever call came in second, so we just used a static ConcurrentDictionary object to track which items were currently "locked".
    But I'm concerned that as we scale up eventually Azure will start routing such calls to different w3wp processes or even different machines.  In such a case, a static in-memory object is obviously not going to do the job.  For now all I want to
    do is find out what happens in the scenario where two requests are handled by different processes/machines - so what's the easiest way to trigger an Azure web role into this behaviour?
    Thanks
    Dylan

    I've confirmed via MS support that my assumptions were basically correct - if you have Instances = 1 then all requests for a single web application will be handled by one instance of the relevant w3wp process.
    If Instances > 1 then they might be handled by w3wp processes on separate virtual machines. There's no known scenario where there would be multiple w3wp processes on one machine, so if you need to handle concurrency for a scalable web-app, you have to
    use some central resource that is available to all instances.

  • How to merge to frequencies together and play it? I have a program that outputs two numbers everytime and those numbers in Hz. I want to merge those two different frequencies and play the sound.

    Hi there
    I have a program that reads from a table done in excel and finds two numbers from the table(they're different all the time). Those numbers are represented in Hz. What I want now is how to merge those two numbers as frequencies and output them and hear them from the speaker as audio. I also have the part of hearing them done but I can't figure out a way to have it connected so that it doesn't matter which numbers come up, it'll update it accordinaly. I appreciate any helpers.
    Thanks a lot

    Then I'm not sure what you're doing, or what your definition of "add" is. Here is the example I posted, with Signal 1 at 250 Hz and Signal 2 at 500 Hz:
    Message Edited by smercurio_fc on 01-15-2009 03:46 PM
    Attachments:
    add freqs.png ‏25 KB
    add freqs.vi ‏123 KB

  • Can I use two different frequencies on a roaming network?

    I have a roaming network with a first generation Airport Extreme (i.e., first square model), with a first generation Airport Express connected via cable to make up the roaming network.  This is for a detached office that is about 50 feet and several walls away.  It has worked wonderfully for years until recently. 
    I believe I am now experiencing some interference to the Express.  Basically once a week I have to unplug the Express, count to 10-15, and plug it back in.  Then all is well... for about another week.  Oddly, the Express light stays green (why if no internet??).  Interestingly when I had my iPhone with me (office is primarily used for my MBP), it could still see the Express' SSID.  However, like the MBP, its wifi "fan" icon is not able to show a signal.
    I have tried changing the channel to one that isn't being used by my neighbors, nor my Extreme.  For a while, I was also experiencing interference on the Extreme.  But that seems to have been resolved after I changed the channel on that unit.  I noticed that my all my neighbors run in 2.4Ghz.  So I'm wondering if I should buy a new Express that can run in 5Ghz. But that means I lose wifi connection to my iPhone.  I can live with that inconvenience in the detached office, but not in my home (i.e., where the Extreme is).
    So my question is: In my roaming network, can I have my Extreme run in 2.4Ghz (to allow iPhone wifi connection) and my Express in 5Ghz? 
    Side question:  I noticed in Airport Utility that my Extreme's frequency is updated (Manual Setup > Base Station > Options) is updated weekly.  Could that be somehow causing my Express to stop having a wifi signal and require the Express rebooting (i.e., unplugging)?

    So my question is: In my roaming network, can I have my Extreme run in 2.4Ghz (to allow iPhone wifi connection) and my Express in 5Ghz? 
    Yes
    Thanks.  Good to know!
    Update Frequency specifies how often the Express will check to see if any updates are available...which would have nothing to do with losing the Wi-Fi signal or other problem.
    Thx.  I feel like an idiot!
    Btw, two other questions, if I may:
    1. If there is no wifi signal, why would the Express light still be green?
    2. When there is interference, why would the Express need to be rebooted?  Why wouldn't it simply regain it's connection once the interference subsided?  The reason I as is that I have exprerienced interference with the Extreme before and there is no wifi signal.  After a minute or two, it would reestablish internet connectivity on its own (i.e., without me unplugging and re-plugging it).

  • How to plot 2 signal in the same graph but different frequency?

    Hi!!
    I have 2 sensor, motion and EMG.. I want to plot both of the signal (after processing) in the graph (real-time)..
    The frequency of motion sensor is 128 Hz and for EMG sensor 800 Hz..
    When I'm trying to plot (motion and emg) in the same graph, the signal from EMG (red line) not smoothly and very different with motion sensor..
    I'm trying to resample that signla but, it's not working..
    Can you help me?
    thank youu
    Attachments:
    graph.png ‏11 KB

    Akardo14 
    Yes, I trying to use merge signal before...  but signal from emg signal didn't appear in the graph (using merge signal figure)..
    I'm showing motion and emg signal in different graph, it's work..
    But I need to show both of signal in one graph to compare between motion and emg signals (fig1)
    Attachments:
    using merge signal.png ‏19 KB
    fig1.png ‏9 KB

  • Can I use an unlocked iphone 4s from USA in Spain? Does it gonna work with a different frequency?

    I want a iphone 4s unlocked. Can I buy it on the United States and use on Spain? I listened that the frequency is different on this countries, and that the phone may doesn't work. I want to know it.
    Thank you so much

    The iPhone 4S will certainly work in Spain, even if purchased in the US.  Keep in mind, however, that warranty service is limited to the country of purchase.  Youll have to send your phone to someone in the US to bring into Apple if your phone needs warranty service.
    In addition, there is VERY limited availbility of the unlocked iPhone 4S in US Apple stores, if they're even available at all.  At this point, they're really only available online directly from the Apple Store

  • Running multiple java apps simultaneously, each using a different jre.

    I have a situation where I have 3 or 4 applications (and one applet) that were built over time, each with a different version of the jdk (ranging from 1.2.2.005 to 1.3.2). I need to know of a way (and it must exist) to run each of these applications on the same machine, and at runtime, have each application (or applet) run with its respective version of the jre. Certainly, one could change some source code and make all programs compatible with a particular jre, but that doesn't solve my problem if a new app is built with a new version of the jdk down the road. Currently, each runs fine by themselves, but if I try to run them together as different processes, some won't do anything because the default jre may not be what it needs. Would the Java Plug-in software have a role to play in this? Is there a way to specify (link) which application should use which jre?
    P.S. These applications (right now) don't have to interact or interface in any way. I just need to have them all running as separate processes on the same machine and be able to jump from one to the other.

    However ... if you have the programs running in Java1.x, I
    wouldn't recommend to let it run under Java 1.y; atleast
    not without thorough testing.I do it all the time and have not had a problem. I'm
    currently using JDK 1.4 beta 3 and I regularly run a
    Java application written with JDK 1.1.
    It sounds like the programs you are running are
    relying on behavior that is not guaranteed. If that
    behavior changes in a later version, it can break your
    program. Program to the contracts provided by other
    classes and packages, and you should have few or no
    problems.I guess you are right. Maybe you can help me with the following problem (this is off this topic, I know): I have Swing JDK 1.2 and Swing from JDK 1.3. I have to register keys on components.
    In JDK 1.2 I can use registerKeyBoardAction, in JDK 1.3 I have to use input maps and action maps. Both solutions only work with certain JDK. What I did was writing code which detects the java version and takes the appropriate action to register the keys. To make the thing compile in 1.2, I have to use reflection for the input/action map methods, because they are only available in 1.3.
    Any idea how to solve this more elegantly ?

Maybe you are looking for

  • Creative MP3's have a short li

    This is my second Creative MP3 that has just died(after the warrantee is over)! The first was the Zen Touch 40 GB=worked nicely for about 9 months, then blah. nothing. It would power on but give only error messages. The Creative help people said it w

  • Sharepoint / 365 messages

    Access 2013 performed split and put back end on the 365 account (share point lists). The following are messages found in a new local table that was created as part of the split and named:"Move to SharePoint Site Issues" 1. SharePoint does not support

  • How to uniquely identify a users session

    Hi, I need to identify a users session, I am aware of the wwctx_api.get_user function but this returns the user name, my problem is that, how do I identify a session, if the user logs on twice then the get_user() function is not unique basically I ne

  • SAP SD Training

    Hi All I have worked in a company for 17 years using front end SAP; I have now secured a job as IS Business Support at the same company where I am mainly dealing with users Trouble Tickets. I have absolutely no SAP SD knowledge so am looking for a co

  • Can imovie import mpeg-2 formats

    I am working now with imoive version 10.0.1. I want to import certain videos which will be on a CD in the mpeg-2 format. Does imovie import this format without problems? Gerhard