Any example code to generate and measure both channels using a 4451 DSA card?

I want to generate signals and check the magnitude and phase performance between the inputs on a 4451 DSA card. It seems like there would be some example code already available for this function.

I've attached an example which shows how to perform sychronized input and output with a NI-4451 board. This example only acquires the raw voltages and displays them on a graph. If you want magnitude and phase information, consider using a complex FFT algorithm.
Hope this helps,
Jack Arnold
Application Engineer
National Instruments
Attachments:
DSA_Simultaneous_IO_(reduced_ringing).vi ‏177 KB

Similar Messages

  • Example codes for each and every class in API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Try this
    http://www.javaalmanac.com/egs/
    It's almost complete, but you could help mr. Patrick Chan to write more samples for the few classes left in the Java API...

  • Example code for each and every class in java API

    hi,
    Is there any place where i can get example code for eacha and every class in java API.
    for eample...if i wanna find sample codes for all the clases in java.lang.*
    please let me know ASAP.
    thanks in advance

    Crossposted here: http://forum.java.sun.com/thread.jsp?thread=570264&forum=54&message=2820774

  • 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

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • I have always paid for apps with a credit card and now need to use an app store card but I can't get past the point where it keeps wanting my credit card updated.  And can't used the app card number.  Any advice???

    I have always paid for apps with a credit card and now need to use an app store card but I can't get past the point where it keeps wanting my credit card updated.  And can't used the app card number.  Any advice???

    I do NOT like using my credit card if I don't have to, and I went out of my way to go buy an Apple gift card, which I successfully redeemed into my Apple account. However, when I use the Apple "Cards" app, it will not let me use anything other than my credit card. I tried purchasing a card, hopefulling it would come out of my Apple store balance, but no such luck -- it came out of my credit card.
    Apple is becoming more like Microsoft every day.

  • I want to change the cantry because I used us voucher and now the remanding only 0.05 and now I want use my Saudi credit card but give massage I have to finish the balance and nothing I can by by this amount I need to remove the balance to change the city

    I want to change the cantry because I used us voucher and now the remanding only 0.05 and now I want use my Saudi credit card but give massage I have to finish the balance and nothing I can by by this amount I need to remove the balance to change the city

    Click here and ask the iTunes Store staff to zero your account balance.
    (105215)

  • Hi there - I have an iPhone 4s which I bought from the apple store here in the UK. I am going to South Africa at the end of the year and I want to use a SA sim card - do I need it unlocked?

    Hi there - I have an iPhone 4s which I bought from the apple store here in the UK. I am going to South Africa at the end of the year and I want to use a SA sim card - do I need it unlocked?

    Hi,
    As far as I know, all the iPhones bought online or in the Apple Store ar unlocked.
    Only carriers (e.g. T-mobile, Vodafone, O2) are able to lock a phone, Apple won't do that (afaik).
    This would mean that you shouldn't need to unlock your iPhone.
    Kind regards,
    Hugo

  • Hello. I've just bought a new iPhone 6 in miami apple store as a unlocked phone. But now it shows the message that my phone is locked and I can't use my russian sim card. What I need to do to unlock it?

    . I've just bought a new iPhone 6 in miami apple store as a unlocked phone. But now it shows the message that my phone is locked and I can't use my russian sim card. What I need to do to unlock it?

    The device is locked to Verizon wireless not a Russian cell provider.
    You can use Verizon here in the states. Get a Verizon Sim.
    In out of the country use, pop in that Sim and it should work. However Verizon does not unlock for use in the USA.
    And you must be a Verizon customer to get it unlocked to use in other countries. Apple claims it will work in other countries.
    Good Luck

  • Ni 6111 and Single Scan mode - any example code

    Hi,
    I am using the  Measurement Hardware Driver Development Kit (MHDDK) to program an NI 6111. I just cannot work out how to get
    single scan to work. No matter what I do, I either get no conversions or a full FIFO.
    The example code does not include any Single Scan examples and I would be extremely grateful if someone could provide me with example code.
    thanks
    Russell Thamm

    Hi Russell-
    Is there a reason why you have decided to perform register-level programming with this device?  It is supported by NI-DAQmx for Windows and NI-DAQmx Base for Linux and Mac.
    Regardless, if you would like to request support for the MHDDK I would encourage you to repost your question on the DDK Forum.
    Hopefully this helps-
    Tom W
    National Instruments

  • Any T.codes for Replenished and Non-Replenished Inventory Stock/Value ??

    Hi
    Are there any T.codes for getting the
    1. Replenished Inventory value/stock
    2. Non-Replenished Inventory Value/Stock in SAP-MM. ?
    Thanks
    Maruthi Ram

    Hi,
    For both you can check with T.Code:MD04, by selecting fields in "Collective access" tab and "filter" fields.
    or
    try with T.Code: MCBZ by giving different MRP types.
    Regards.
    Chinna
    Edited by: Chinna Veerappa on Jan 23, 2009 5:46 AM

  • Example: Code to generate audio tone

    This code shows how to generate and play a simple sinusoidal audio tone using the javax.sound.sampled API (see the generateTone() method for the details).
    This can be particularly useful for checking a PCs sound system, as well as testing/debugging other sound related applications (such as an audio trace app.).
    The latest version should be available at..
    <http://www.physci.org/test/sound/Tone.java>
    You can launch it directly from..
    <http://www.physci.org/test/oscilloscope/tone.jar>
    Hoping it may be of use.
    package org.physci.sound;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.SourceDataLine;
    import javax.sound.sampled.LineUnavailableException;
    import java.awt.BorderLayout;
    import java.awt.Toolkit;
    import java.awt.Image;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import javax.swing.JSlider;
    import javax.swing.JCheckBox;
    import javax.swing.SwingUtilities;
    import javax.swing.UIManager;
    import javax.swing.border.TitledBorder;
    import java.net.URL;
    Audio tone generator, using the Java sampled sound API.
    @author andrew Thompson
    @version 2007/12/6
    public class Tone extends JFrame {
      static AudioFormat af;
      static SourceDataLine sdl;
      public Tone() {
        super("Audio Tone");
        // Use current OS look and feel.
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                SwingUtilities.updateComponentTreeUI(this);
            } catch (Exception e) {
                System.err.println("Internal Look And Feel Setting Error.");
                System.err.println(e);
        JPanel pMain=new JPanel(new BorderLayout());
        final JSlider sTone=new JSlider(JSlider.VERTICAL,200,2000,441);
        sTone.setPaintLabels(true);
        sTone.setPaintTicks(true);
        sTone.setMajorTickSpacing(200);
        sTone.setMinorTickSpacing(100);
        sTone.setToolTipText(
          "Tone (in Hertz or cycles per second - middle C is 441 Hz)");
        sTone.setBorder(new TitledBorder("Frequency"));
        pMain.add(sTone,BorderLayout.CENTER);
        final JSlider sDuration=new JSlider(JSlider.VERTICAL,0,2000,1000);
        sDuration.setPaintLabels(true);
        sDuration.setPaintTicks(true);
        sDuration.setMajorTickSpacing(200);
        sDuration.setMinorTickSpacing(100);
        sDuration.setToolTipText("Duration in milliseconds");
        sDuration.setBorder(new TitledBorder("Length"));
        pMain.add(sDuration,BorderLayout.EAST);
        final JSlider sVolume=new JSlider(JSlider.VERTICAL,0,100,20);
        sVolume.setPaintLabels(true);
        sVolume.setPaintTicks(true);
        sVolume.setSnapToTicks(false);
        sVolume.setMajorTickSpacing(20);
        sVolume.setMinorTickSpacing(10);
        sVolume.setToolTipText("Volume 0 - none, 100 - full");
        sVolume.setBorder(new TitledBorder("Volume"));
        pMain.add(sVolume,BorderLayout.WEST);
        final JCheckBox cbHarmonic  = new JCheckBox( "Add Harmonic", true );
        cbHarmonic.setToolTipText("..else pure sine tone");
        JButton bGenerate = new JButton("Generate Tone");
        bGenerate.addActionListener( new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              try{
                generateTone(sTone.getValue(),
                  sDuration.getValue(),
                  (int)(sVolume.getValue()*1.28),
                  cbHarmonic.isSelected());
              }catch(LineUnavailableException lue){
                System.out.println(lue);
        JPanel pNorth = new JPanel(new BorderLayout());
        pNorth.add(bGenerate,BorderLayout.WEST);
        pNorth.add( cbHarmonic, BorderLayout.EAST );
        pMain.add(pNorth, BorderLayout.NORTH);
        pMain.setBorder( new javax.swing.border.EmptyBorder(5,3,5,3) );
        getContentPane().add(pMain);
        pack();
        setLocation(0,20);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
        String address = "/image/tone32x32.png";
        URL url = getClass().getResource(address);
        if (url!=null) {
          Image icon = Toolkit.getDefaultToolkit().getImage(url);
          setIconImage(icon);
      /** Generates a tone.
      @param hz Base frequency (neglecting harmonic) of the tone in cycles per second
      @param msecs The number of milliseconds to play the tone.
      @param volume Volume, form 0 (mute) to 100 (max).
      @param addHarmonic Whether to add an harmonic, one octave up. */
      public static void generateTone(int hz,int msecs, int volume, boolean addHarmonic)
        throws LineUnavailableException {
        float frequency = 44100;
        byte[] buf;
        AudioFormat af;
        if (addHarmonic) {
          buf = new byte[2];
          af = new AudioFormat(frequency,8,2,true,false);
        } else {
          buf = new byte[1];
          af = new AudioFormat(frequency,8,1,true,false);
        SourceDataLine sdl = AudioSystem.getSourceDataLine(af);
        sdl = AudioSystem.getSourceDataLine(af);
        sdl.open(af);
        sdl.start();
        for(int i=0; i<msecs*frequency/1000; i++){
          double angle = i/(frequency/hz)*2.0*Math.PI;
          buf[0]=(byte)(Math.sin(angle)*volume);
          if(addHarmonic) {
            double angle2 = (i)/(frequency/hz)*2.0*Math.PI;
            buf[1]=(byte)(Math.sin(2*angle2)*volume*0.6);
            sdl.write(buf,0,2);
          } else {
            sdl.write(buf,0,1);
        sdl.drain();
        sdl.stop();
        sdl.close();
      public static void main(String[] args){
        Runnable r = new Runnable() {
          public void run() {
            Tone t = new Tone();
            t.setVisible(true);
        SwingUtilities.invokeLater(r);
    }

    JLudwig wrote:
    Any reason why you call getSourceDataLine() twice? ..Oh wait, I know this one (..snaps fingers. yes) it is because I am a mor0n, and forgot the class level (static) attribute declared earlier in the source when I (re)declared the local attribute and called getSourceDatLine (which was redundant, given the next line, which as you point out also called getSourceDataLine).
    There are (at least) two ways to correct this problem.
    1) Remove the class level attribute and the second call.
    2) Remove the local attribute as well as the first call (all on the same code line).
    Method 1 makes more sense, unless you intend to refactor the code to only instantiate a single SDL for however many times the user presses (what was it? Oh yeah..) 'Generate Tone'.
    My 'excuse' for my odd programming is that this was 'hacked down' from a longer program to form an SSCCE. I should have paid more attention to the fine details (and perhaps run a lint checker on it).
    Thanks for pointing that out. I guess from the fact you spotted it, that you have already corrected the problem. That you thought to report it, gives me confidence that you 'will go far (and be well thought of, besides)' in the open source community.
    ..This is quite handy, thank you.You're welcome. Thanks for letting us know about the error (OK - the pointless redundancy). Thanks to your report, other people who see this code later, will not have to wonder what (the heck) I was thinking when I did that.
    Another thing I noted, now I run the source on a 400MHz laptop (it's hard times, here) is that the logic could be improved. At the speeds that my laptop can feed data into the SDL, the sound that comes out the speakers approximates the sound of flatulence (with embedded static, as a free bonus!).
    Edit 1: Changed one descriptive word so that it might get by the net-nanny.
    Edited by: AndrewThompson64 on Mar 27, 2008 11:09 PM

  • Any example code for WVD spectrogram in labview ?

    I heve been trying to implement the WVD spectrogram in my vi with no luck. Can't find any examples on how to do it.

    Look at the Functions palette >> Analyze >> Signal Processing >> Frequency Domain >> WVD Spectrogram.vi.
    This is in LV 7.1.1 Full.
    The WVD uses a different kernel than the Fourier transform and works well with rapidly changing signals. The major disadvantage is the large amount of spurious signal that appears in the spectrogram.
    Lynn

  • Any Example code site for MQ v6.0 Clustering

    Hi All
    Can any body please help me some sites, where I can get some example codes, for MQ Clustering in java....
    Windows platform
    MQ Webspere v6.0
    thanks in advance
    Balmiki

    I'm looking for exact property need to be set for SSL in Oracle MQ adapter.
    It would be very helpful if Oracle have some standard docs.

  • I want the example code for Calendar() and TimeZone() in java

    Hi,
    I want the example code for the TimeZone() and Calendar() class in java
    because i new to java, i am not able to understand the concepts properly.
    Thanks...

    Hi Paolo Dema.
    What are the exact spefications of your computer?
    Also did you computer come with 10.6 ot 10.5?.
    You may try entering the MPN (marketing part number) Format: M*****/**
    The MPN can be found on the product packaging or the System Profiler.

Maybe you are looking for

  • Using Accessibility in Solaris 10

    Hello, I've installed Solaris 10 03/05 and am attempting to use the included Accessibility (explicitly the gnopernicus screen reader with Gnome). I have followed the instructions in the Java Desktop System Release 3 Accessibility Guide (http://docs.s

  • How to backup data prior to harddrive swap

    My HDD is going to be swapped out under warranty by Apple. What do I need to do to ensure everything is put back where it belongs? Thanks

  • IPod 160 GB Not on iTunes List While Connected

    Dear guys (Apple Supporter's) Since i upgraded my Macbook Pro to Yosemite  OS, of course iTunes also to latest version, Before upgraded, My iPod classic was connected, synchronise very good but after all has seems to be changed. My iPod classic  now

  • Cannot Sync Calendar and Contacts

    I upgraded to Windows 7 but am still using Outlook 2003 as it is compatible with my office server for data storage. I am not sure when exactly but when I upgraded iPhone software to 4.3.2, I find that since Windows 7/Software 4.3.2, I cannot sync my

  • I dropped my phone in juice. Only the bottom was submerged in orange juice. How severe is this and what do I need to do?

    What do I do? I dropped my iphone 4 in a cup of juice. Only the bottom was submerged. I turned it off immediately. THe speakers sound like they are busted like when you bust speakers in a car. When it rings it is ringing and vibrating and cutting in