How to read the sensorvalu​e of the Hitech Gyroscope and Accelerome​ter in LabVIEW 8.2

hello everyone,
I am trying to read the value of Gyroscope  and Accelerometer (3 Axis respectively and simutaneously) in LabVIEW 8.2, but I didn't find any suitable standard VI .  Should I create a new VI by myself ( in this case I need LabVIEW 7.1, don't  I ?)  or can I convert the standard NXT-G block to LabVIEW VI ?
I am looking forward to any reply. thanks
Liang 

now I describe my problem with more detail.  the VI ReadAccel showed me only "0" in LV8.2 , that means it dosn't work.
Attachments:
ReadAccel.PNG ‏8 KB

Similar Messages

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • How to read file in JAR file (the one containing applet class)

    my applet needs to read a file (font file) that will be bundled in the jar file. how do i read that file?
    i tried using
    URL u = new URL("file:///myfont.ttf");
    u.openStream();i got AccessControlException. is there anyway for the applet to load file in the JAR file? i see applet can load image in the jar file so figured that it should be able to do so with some other type of file
    thanks

    The reason you're getting access violation is the way you code your URL -- it's pointing to a file on the user's local disk. If my.ttf is in the jar, try:
          URL url=myApplet.class.getClassLoader().getResource("myfont.ttf");Where myApplet is the name of your applet and the font file is assumedly kept in the same directory level in the jar file as the class file for your applet.
    ;o)
    V.V.

  • How to read an excel file into the datatable in sdk code( AddonApplication)

    Hi Experts,
    Please let me know the code ,how to write an excel file to the datatable and based on the datatable it should write to the database table.
    help would be appreciated...
    Regards,
    Vijay Kumar
    Edited by: Haroon Rasheed on Oct 29, 2011 10:40 PM

    Hi,
    You may check: Read Excel File by Sheet then put it in Matrix
    Thanks,
    Gordon

  • How to read xml file present in the UCMS from  webcenter portal application

    Hi,
    I'm new to webcenter portal and would like to know how to read an xml file which is present in UCMS 11g(contributors folder) from webcenter portal application.
    Thanks in advance

    I guess I had mentioned that I want to read it via my webcenter portal app rather than login to ucms and searching it via url.
    I want text labels and button names being stored in the xml file which I'm going to keep in the UCMS.
    After reading that from the xml will be placed at appropriate locations like the button values and label feilds, so that we dont need to deploy entire app for this kind of simple changes.
    Now can anyone provide some help with the api's related to this?

  • How to read trace files alerted in the alert.log file

    Hello,
    My alert.log file indicated multiple trace files to review. How to read these trace files to understand the cause of errors. Do I open the trace files with vi and do a search for 'ORA-' error. Are there tools to read and understand trace files. Thank you.

    It depends what kind of trace file it is.
    You can use vi or other text editing tool to open the trace file. The trace file usually provides more detailed information when you have ORA- errors in alert.log. It's also very helpful for Oracle support when troubleshooting.

  • How to read a file residing on the client

    Hi
    How to read a text file residing on client using webdynpro application( If I write code in controller it will go the the server path rather than client path) ? Can somebody please help me
    Thanks

    Hi,
    If you want to upload a file to the server then you can use the webdynpro FileUpload to read the file from the local machine and
    save it to the server.
    But if you want to only read the file from the local machine you need to keep the file within the application in the path - scr/packages/components
    Thanks
    Ritushree
    Edited by: Ritushree Saha on Jul 8, 2009 5:35 PM

  • How to read a flat file from the batch

    Hi,
    We have a requirement to read a flat file in the custom java batch in ETM2.2. We have the file at a specific location.
    can some one let me know what are the various options, we have to read a flat file.
    Thanks,
    Sharath Kumar G.

    Is it referring to some "Process X" batch?
    And why MPL/XAI with or without Configuration Tools should not be used to do this and a custom Java batch is required?

  • How to read two text files using the Read from spreadsheet.vi and then plot it

    I need to read two text files using the read from spreadsheet function and then plot these files over time.
    The file with the .res extention is the RMS values (dt and df) and the second file contains the amplitude of a frequency spectrum.
    I really appreciate any help..thanks
    Attachments:
    RMS.txt ‏1 KB
    FREQUENCY.txt ‏1 KB

    From NI Example Finder:
    Write to Text File.vi
    Read from Text File.vi
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • How to read a time stamp from the db without ".0" at the end

    Hi All,
    I have code that is saving the results of a query in a result set.
    When ever i read a time stamp from the db (mysql 4) it always adds ".0" to the end of it.
    I tried using the getTimeStamp, getDate, getString methods for result sets and was not able to resolve the issue.
    Am i missing something here?
    Thanks

    here is the code
    public static Table executeSelect(Connection conn, String qry)
         throws SQLException {
              Statement stm = null;
              ResultSet rs = null;
              try {
                   stm = conn.createStatement();
                   rs = stm.executeQuery(qry);
                   Table t = new Table(rs);
                   return t;
              } finally {
                   close(null,stm,rs);
    Basically the user is asked to enter the query and the connection settings and then i retrieve the data and return a table.
    Now if i try to print the value of the time stamp from the result set it adds a a .0
    So for example if am running the following
    select mod_ts from temp limit 1;
    | mod_ts |
    | 2007-12-28 09:32:58 |
    1 row in set (0.00 sec)
    When i print the value of the time stamp it gets printed as 2007-12-28 09:32:58.0
    The following code is used to generate a table from the result set
    public Table(ResultSet rs) throws SQLException {
              ResultSetMetaData rsmd = rs.getMetaData();
              int colCount = rsmd.getColumnCount();
              colNames = new String[colCount];
              colTypes = new int[colCount];
              for ( int i=0; i<colCount; i++) {
                   String colName = rsmd.getColumnName(i+1);
                   colNames[i] = colName;
                   int colType = rsmd.getColumnType(i+1);
                   colTypes[i] = colType;
              while ( rs.next()) {
                   if ( data == null) {
                        data = new ArrayList<List>();
                   List<Object> row = new ArrayList<Object>();
              for ( int i=0; i<colCount; i++) {
                   Object ob = rs.getObject(colNames);
                   row.add(ob);
              data.add(row);
    Now when i print the values in the result set it adds a .0 to the end of the time stamp
    I also tried using getTimeStamp for a result set and the same problem still existed

  • How to read an audio file from the disk and play it?

    Do you know who to read an audio file from the hard disk and play it. It's for an application and not an applet. I tried with the Applet.newAudioClip(URL url) thing, but I keep getting a MalformedURLException.
    And is there a way to get the path of the file you are using? Currently I'm doing this:
    File file = new file("randomname");
    string = file.getAbsolutePath();
    file.delete();
    I'm sure there's a better way. And this is not for an applet, just a normal app.

    Below is a class that should be of use to you.
    package com.sound;
    import java.io.File;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.Clip;
    import javax.sound.sampled.DataLine;
    public class SoundPlayer implements Runnable {
         String filename;
         public SoundPlayer(String filename){
              this.filename = filename;
              Thread t = new Thread(this);
              t.start();
         }//SoundPlayer constructor
         public void run(){
              playSound();
         }//run method
         public boolean playSound(){
              try {
                   File file = new File(filename);
                   AudioInputStream stream = AudioSystem.getAudioInputStream(file);
                   AudioFormat     format = stream.getFormat();
                   DataLine.Info info = new DataLine.Info(Clip.class, format);
                   Clip clip = (Clip)AudioSystem.getLine(info);
                   clip.open(stream);
                   clip.start();
                   while (clip.isRunning()) {
                       Thread.sleep(100);
                   clip.close();
              catch (Exception e) {
                  System.err.println("Error in run in SoundPlayer");
                   return false;
              return true;
         }//playSound() method
    }//Class SoundPlayer

  • How to read from two boards at the same time

    I have two NI DAQ Boards, a PCI 6034E and a PCI 6025E I want to make one a master and one a slave and read from both at the same time. Do they need jumpers between them
    from one board to the other or does the motherboard bus take care of that? I can find software to handle this but I can't find anything on the way the hardware should be configured, is there a cable I need between them?

    Hi,
    We have a couple of great tutorials on this:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/6DC991028566309886256F990080A720
    http://zone.ni.com/devzone/conceptd.nsf/webmain/2638A8DA4E4CFD1F86256D250070C093?opendocument
    -Sal

  • How to read from ABAP description of the support message?

    Hi there,
    we need to read description (not a subject) of a support message which we can see at Transaction Data - Overview tab.
    Were tried a couple of FMs, e.g. CRM_ORDER_READ, but it doesn't return what we need.
    Any help is appreciated.

    Can you provide more details?
    In the Transaction Monitor, in Transaction Data, under the Overview Tab, the Description is there and viewable.
    Are you using the Description field as a Subject field, becuse there is no a subject field.
    The overview will show the Description, Reply for SAP. Information from SAP, etc.
    Thank you
    Paul

  • Can I read out the Line-in connector of my PC and process datas in Labview??

    I would like to read an analog signal from the line-in connector. Furthermore I would like to process theses data. Are there any VI's or examples concerning this problem?

    In LabVIEW the Sound Input VIs will read from whatever device is configured for recording in Windows. If you have the line-in set as the recording device then the Sound Input functions will allow you to read in from line-in. There are some examples that do this that ship with LabVIEW titled:
    Sound Card AutoPower Spectrum.vi
    Sound Card Simple SpectrumAnalyzer.vi
    Hope this helps.
    Kevin R
    Applications Engineer
    National Instruments

  • Read from both load cell and accelerome​ter

    Hi,
    I'm trying to collect data from both load cell (which doesn't need excitation) and accelerometer (which needs 4 mA excitation). As you can see below, I wrote a simple program to collect data from both devices. However, my program provides 4 mA of excitation to all channels, one of which shouldn't receive any current. How can I selectively provide the excitation to specific channels?
    Any suggestions?
    Solved!
    Go to Solution.
    Attachments:
    readfromtwodevices.vi ‏47 KB

    Good morning jeongho20000,
    Both aeastat and falkpl have provided excellent solutions for this.  I also wanted to mention a good KnowledgeBase article found at ni.com by searching for "daqmx channel same task" in the internal search bar.  This helps to outline both solutions.  After searching, you can then select multiple entries, but the best that I found was the 3rd choice, titled: Using Different Types of DAQmx Global Channels in the Same Task. 
    You can download from the article the attached example VI titled Multiple Channels Created.vi, and modify the block diagram to fit your needs.  Wiring the Task Out to the Task In of two DAQmxCreateChannel VIs is the programmatic equivalent of adding multiple Global Virtual Channels created in Measurement and Automation Explorer (MAX) to a common Task in MAX.  Either method works, it is only a user preference.  Feel free to reply if you need further clarification/explanation. 
    Best,
    Message Edited by cyclone2k9 on 04-06-2010 11:08 AM
    Message Edited by cyclone2k9 on 04-06-2010 11:09 AM
    Adam
    Academic Product Manager
    National Intruments

Maybe you are looking for