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

Similar Messages

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

  • I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel?

    I am using an NI PCI 6024 E board device for an analog output application. Can I generate two independent waveforms, one on each analog output channel? In attach I send a example of my vi to control one chanel, but i need to control both but with diferent waveforms.
    Is the vi correctly programed to this propose?

    Yes you should be able to do that. look at the signal generation examples shipped with LabView
    You can create a 2 D array, with each row representing a wave form per channel. The number of points of the wave form (per row of the 2 D array) represent the number of points in the output buffer
    The wave forms can have different amplitudes/shapes, and therefore they are independent in this sense.
    However, you need to set the update rate,which is the same for both channels. The update rate together with number of points per buffer determines the frequency of the wave forms. This means the two wave forms will have the same frequency.
    To have different frequencies, you need to have say, on wave form with one cycle per buffer, and the other waveform have 2 cycles
    per buffer. in a case like that the frequency of the second channels is twice that of the first channel, and so on
    The two wave forms are then not truly independent, they may have different amplitudtes/shapes, but related in frequency.

  • 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

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

  • Multiple waveform generation on analog output channels

    hi,
    I am writing data on the two analog output channels on my PCI-6052E card.But AO write takes only one dimensional array of waveform data. How can I simultaneously output seperate waveforms on each of the analog output channels(say sine on DAC0 and square wave on DAC1)?

    I've had a similar experience I believe.
    I had to create the two waveforms with function generators, suck out the Y
    values, then Interleave them into one array.
    Basically, point one was the first point in waveform1 for Dac0, point two
    was the first point of the second waveform for Dac1.
    Then that gets wired to the output block where you tell it to scan both
    channels.
    Confusing as labview eh??
    "shiv" wrote in message
    news:[email protected]..
    > hi,
    > I am writing data on the two analog output channels on my PCI-6052E
    > card.But AO write takes only one dimensional array of waveform data.
    > How can I simultaneously output seperate waveforms on each of the
    > analog output channels(say sine on DAC0
    and square wave on DAC1)?

  • PC able to detect all except for the analog output channel of my SCB-68 device.

    I would like to use the analog output channel of my SCB-68 device. I tried to locate the analog o/p using the wizard but still unable to detect. Why is that so?
    Any possible steps/procedure that i have missed out?
    Thanks

    Rezn,
    Aha, therein lies the problem. This was what I suspected, and thus my question as to which data acquisition card you are using. The DAQCard-AI-16XE-50 has analog inputs, digital I/O, but no analog outputs at all. So your card is working as it should, but it has no analog outputs.
    If you have the 2002 National Instruments catalog, you can see this in a table on page 231 (your DAQ card is the one on the bottom), or check this pdf file:
    http://www.ni.com/pdf/products/us/2mhw254-255e.pdf
    Your card is also called the NI6012E. Check out the small table on the first page.
    Mark

  • [svn:bz-trunk] 13716: since include-read-only is a server global setting, we can't have two channels with different value.

    Revision: 13716
    Revision: 13716
    Author:   [email protected]
    Date:     2010-01-22 09:26:12 -0800 (Fri, 22 Jan 2010)
    Log Message:
    since include-read-only is a server global setting, we can't have two channels with different value.  remove the test for the include-read-only false.  update the service-config.xml as well.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.xml
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/ReadOn lyTest.mxml

    You can give this a try on your Ultimate machine.  While these are said to be for Vista, I used it on my Win 7 machine just fine and it fixed the problems I was having.  Hope it works for you.
    The problem is that Vista, by default, will only use NTLMv2 for authentication, which is not supported by Mac OS X's Windows Sharing service.
    The other problem is the Minimum Session Security for NTVLM SSP based Clients.
    To get around this:
    1.     In Vista, open the Control Panel
    2.     Switch to "Classic" view
    3.     Double-click Administration Tools
    4.     Double-click Local Security Policy
    5.     Or Secpol.msc
    6.     Expand "Local Policies" and select "Security Options"
    7.     Alternate : Type secpol.msc to get editor up then
    8.     Locate "Network Security: LAN Manager Authentication Level" in the list and double-click it.
    9.     Change the setting from "Send NTMLv2 response only" to "Send LM & NTLM - use NTLMv2 session if negotiated"
    10.     Network Security: Minimum session security for NTLM SSP Based (including secure RPC) Clients
    11.     Change the setting from "require 128 bit" to unchecked (No Minimum)
    12.     Click OK
    the real difference between vista and windows 7 procedure is 10 and 11

  • How to switch analog output between two waveform frequencie​s

    Hello,
    I'm using a fairly simple VI to generate a square wave at our analog output board.  I have the square wave controls in one panel of a sequence structure, and a "release" function in the other panel of the sequence. Currently the VI is programmed to switch from the original square wave to -10V when the Boolean control is switched.
    What I'd like to do now is to modify the VI so that I can swtich between a square wave of a given frequency, say 100 kHz, to a square wave of a different frequency, say 10 kHz, or to DC -10V. But I'd like to be able to vary each frequency and amplitude independently.
    Could anyone give me some programming pointers?
    Thanks,
    Michelle

    Thanks to the three of you for the suggestions. I started trying a few of them, and then realized that what I had already built will work pretty well to update the frequency. I didn't realize that it would update the waveform in "run" mode -- I thought it would only do that in "run continuously" -- so I've found that I can change the frequency of the waveform by doing that. This doesn't allow me to change the frequency and the amplitude simultaneously, but I'm not sure yet whether or not I will need to do that -- I so will probably go ahead with the experiments I need to do with this set-up, then modify it if I find that I need to control both frequency and amplitude simultaneously.
    Thanks for your help!
    M.

  • How to equalize an analog output by a known frequency response?

    I'd like the analog output of my system have a flat response. What I'm going to do is first measure the stimulus signal, then using a filter to compensate the frequency response to make the following output signal flat. The difficulty is how to build a filter according to the frequency response. I know it's easy to do by using digital filter design of signal processing toolkit. But I need to do it by LabVIEW and the response is changed frequently. Any suggestions?
    Bill

    The filter does the signal "adjusting." Filters are typically characterized in the frequency domain, but the work on the signal fed them, which usually occurs sequentially in time. The lookup table is just to select the appropriate filter so you do not have to do a lot of calculations at run time. As an example, suppose you have just treble and bass and only one cut and one boost setting for each. You measure the stimulus and find the bass is too high and the treble too low. You select the bass cut and the treble boost filters for this run. If this is expanded to octave (or third octave) filters and 16 gain/attenuation settings in each band the lookup table approach saves time and may also provide a compact means of recording the equalization settings with your test data (rather than filter coefficients which do not actually indicate the response without characterizing the filter).
    Lynn

  • Channels with different sampling in a DataPlugin

    Hallo,
    actually i´m programming an DataPlugin for a textdatafile witch is build like this:
    metadata
    channelname1; channelname2; channelname3
    value_ch1; value_ch2/value_ch2/value_ch2; value_ch3
    value_ch1; value_ch2/value_ch2/value_ch2; value_ch3
    The problem i have ist to get the values of the channel2 (ch2) into one channel.
    Could anyone help me by solving this problem?
    Thank You
    Lacher
    Message Edited by m.lacher on 07-14-2008 07:03 AM

    Hi Lacher,
    Would it be possible to read this as a fixed-width ASCII file?  By that I mean that the values for channel 2 always start on the same character number in each row, with the same being true for all other channels as well (Excel has a fixed-width import option).  If so, then you can use DirectAccessChannels to efficiently load the multiple values from channel 2 on each line (provided it's always the same number of multiple values).  This you would specify with the property:
    FixedWidthBlock.Channels(2).Formatter.SampleWidth = 3
    If you can't read this as a fixed-width ASCII file, because the ";" delimiter does not always fall at the same location in each row, then you'll just have to parse the values manually with a VBScript loop inside the DataPlugin.  This will work but will be much slower than using a DirectAccessChannel.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • I used to have a vi "Beep+.vi" that was able to make a beep with different frequence/duration on WINDOWS 3.11. It worked with the systemspeaker (no soundcard). Is there a similar vi that works under WINDOWS NT?

    Kaba Gilgen AG
    Prüffeld
    Christian von Allmen
    Freiburgstrasse 34
    CH-3150 Schwarzenburg
    Switzerland
    tel: ++41 (0)31 734 43 02
    fax: ++41 (0)31 734 43 79
    mailto:[email protected]

    "Beep.vi" has not worked on my PC for as long as I can remember (First Win95 & now Win98). I decided to track the problem down. I started with the NI knowledge base article on the subject and looked into my "Sounds" control panel and found that I did not have a "Default sound" event at all! I checked another PC and it did have this event, so on that second PC I searched the registry, found where "default sound" existed in it and exported that section of the resistry. I then compared that exported section with the registry on the machine that did not have the event and determined the differences, created a ".reg" file to correct the machine and merged it into the registry. Now it too has a "Default Sounds" event and the "beep.vi" works.
    The "Add
    default Sounds.reg" file that did the job for me is attached
    Attachments:
    add_default_sound.reg ‏1 KB

  • How do I configure 128 channels of DIO and 128 channels of Analog output with the availabili​ty of 3 pci slots

    I have only 3 slots of PCI or 4 slots of ISA bus, I want to configure with the minimum possible modules to attain 128 channels of DIO and 128 channels of analog output. This is inturn fed to the PCM (Pulse code Modulator). The cards will be placed in industrial PC.

    Associate Engineer-Marketing,
    Using just those 3 PCI slots you're not going to be able to get the 128 analog output channels. You will probably want to go either the MXI-3 (PCI bus extender) to a PXI chassis or E Series DAQ card to a SCXI chassis for such a high channel count system. Which analog output cards and which digital I/O cards you will want depends on your application. You will have to decide whether you will need static or dynamic analog output as well as whether you need clocked digital I/O or not. I highly recommend contacting our internal sales department at 1-800-433-3488. They are great at helping specify systems.
    Ames
    Applications Engineering
    National Instruments

  • Loop in combination with Analog output

    Hi
    I have modified the script thats translate a value in to a static analog output voltage. The value comes from another online running application. The analog output value must remain static until a new value arise. I'm using VB6 and DAQmx 8.5 on a XP computer. The DA converter is NI USB-6211. I have tried to play around with the Start/Stop and clear commands but my script still makes the program highly unstabile.
    So am I using the commands correctly?. And have I setup the write commands correctly too. Can anyone allso explain how to use the command Doevent correctly
      Dim taskHandle As Long
        Dim clockEdge As Long
        Dim sampsPerCycle As Double
        Dim desiredSampleClockRate As Double
        Dim resultingFrequency As Double
        Dim amplitude As Double
        Dim numSampsPerChannel As Long
        Dim numChannels As Long
        Dim errorCode As Long
        Dim errorString As String
        Dim sampsPerChanWritten As Long
        Dim XICVolt As Double
     '  Create the DAQmx task.
        Call DAQmxCreateTask("", taskHandle)
        '  Add an analog output channel to the task and check to see whether there is only ONE task.
        Call DAQmxCreateAOVoltageChan(taskHandle, "Dev2/ao0", "aoChannel", "-10", "10", DAQmx_Val_VoltageUnits2_Volts, "")
        Call DAQmxGetTaskNumChans(taskHandle, numChannels)
        If numChannels > 1 Then
            errorCode = -1
            errorString = "Please specify only one channel."
            Err.Raise errorCode, , errorString
        End If
    Data_is_recorded:
        If Actualcycles = expectedcycles Then
        GoTo end_script
        Else
        If Actualcycles > lastcycles Then
        DoEvents
         Call DataPoint.GetDataPoint(thenumberOfDataPoint, theXvalue, theYvalue)
            XICVolt = (theYvalue / 10000000#)
        '  Write to the desired channel(s).
        Call DAQmxWriteAnalogF64(taskHandle, 1, True, 10#, _
            DAQmx_Val_GroupByScanNumber, XICVolt, sampsPerChanWritten, ByVal 0&
        Else
         lastcycles = theWF.GetActualNumberOfCycles(sampleIndex, 0)
         End If
        GoTo Data_is_recorded
    end_script:
    End If
    call DAQmx.stopTask(Taskhandle)
    call DAQmx.clearTask(taskhandle)
    Best regards
    Peter

    David Weber wrote:
    thanks lot for all the great feedback. That's really helpful. I think I'll go for the NO_MERGE hint. A first test with this looks good.Keep in mind, only undocumented hint MATERIALIZE along with subquery factoring clause WITH (for which this hint was created) will work in real queries:
    SQL> select my_id as id
      2       , my_id as same_id
      3  from (select /*+ NO_MERGE */ xxx_test_pkg.get_id(1) as my_id from dual),emp where rownum < 6;
            ID    SAME_ID
            20         20
            21         21
            21         21
            21         21
            21         21
    SQL> select my_id as id
      2       , my_id as same_id
      3  from (select xxx_test_pkg.get_id(1) as my_id from dual where rownum=1),emp where rownum < 6;
            ID    SAME_ID
            22         22
            23         23
            23         23
            23         23
            23         23
    SQL> select my_id as id
      2       , my_id as same_id
      3  from (select /*+ MATERIALIZE */ xxx_test_pkg.get_id(1) as my_id from dual),emp where rownum < 6;
            ID    SAME_ID
            24         25
            26         27
            28         29
            30         31
            32         33
    SQL> with t as (select /*+ MATERIALIZE */ xxx_test_pkg.get_id(1) as my_id from dual)
      2  select my_id as id
      3       , my_id as same_id
      4  from t,emp where rownum < 6;
            ID    SAME_ID
            34         34
            34         34
            34         34
            34         34
            34         34
    SQL> SY.

  • Multiple channel data with different time stamp logging

    I have peaks and valleys from multiple channels with different time stamp but I am not able to log to a single file. Any idea on how to do this?
    Attachments:
    Single Point Peak Valley Log.vi ‏53 KB

    Hi Dennis,
    Sorry for that I have modified the VI.
    Because the peak and valley of every channel will occur at different time and I want to log the peak/valley with the time stamp.
    How can I log them on the same file.
    Attachments:
    Single Point Peak Valley Log_Mod.vi ‏53 KB

Maybe you are looking for

  • Billing Doc not releasin for acccounting doc

    Hi After detail checking I have found that in customer master data>>Partner function tab, there is PY payer is required entry. When I am going to release billing doc in VF02 system is giving error message         Customer 730 has no bank details of t

  • HELP!?  PC Not Showing Up On MAC Anymore?

    This is super urgent, hope someone can assist. My network was working great at my previous apartment, but I just moved into a new condo and reconnected my computers to my Airport Extreme and can't get the network to work properly now. For some reason

  • Restoring Tablespace in different location from the original location

    Dear Experts We are doing an Restoing of production database in to an another server. where the production database runs on Windows and the sap directories has been stored in 6 drives but in the second servder which has only 3 drives but high capacit

  • String to Date function

    I am getting date 03/06/2007 17:37:29 from source system , that needs to be inserted into SQLServer DB. I am using format-dateTime and getting below error, DB Adapter is date format like 2007-01-01T00:00:00.000-08:00. How to convert this. Please help

  • Supplier data quality

    In R12.1.3 -Supplier Hub/Lifecycle Mgt - we have already data quality feature included out of box. Do we need to install enterprise data quality separately in this case for supplier data cleansing?