How to Measure Position and Velocity with a Single Counter with myrio

Hi Everyone , I need your help .
I got myrio a few days ago for my project which is a electric vehicle drived by wireless mode so first problem faces me that I have encoder and it give me counts (decreasing or icreasing) which I can't convert it to veolcity any one may help , I will be grateful ???????????????????

Hey Hesham92,
As you mentioned the myRIO encoder counts pulses.  These pulses will typically come from some type of encode such as a quadrature encoder.
Look at your encoder datasheet and it should explain how it works (which mode it uses) and the resolution (ie rotation per pulse).    If the encoder is attached to a wheel you can use some simple math to determine how many cm the wheel moves per encoder pulse.
Let us know if you have questions about this (please also post more info about your setup such as the encoder, what it's attached to and what you need to measure).
Thanks!
-Sam K
LabVIEW Hacker
Join / Follow the LabVIEW Hacker Group on google+

Similar Messages

  • Use incremental rotary encoder to measure the absolute position and velocity

    Hi all,
    I faced a problem by using incremental rotary encoder to measure the absolute position of the rotation. 
    I'm not using NI-Daqmx but NI-motion module. In NI-motion module, I use read encoder position.vi to read the position of the encoder. 
    However, the readings is in incremental form. I'm doing the feedback control, so I need the absolute position and velocity.
    Is there any functions or vi in the labview that can be used to transform the information of incremental encoder to the absolute one?
    Thanks
    Jun Wong

    Jun,
    1. The incremental encoder provides incremental position. After switching on the encoder power the encoder counts upwards or downwards. For the absolute position you need the index (R or I) signal. I don't know which type of incremental encoder you have but there should be A, B and (I or R) signals. The index signal should reset the counter to zero setting this way a pseudo-absolute-position (which is lost after the first switch of). Most of the motion controllers have a mode, just after switch on, in which the controller search for the Index. This mode is called Homing. 
    2. Velocity. It's very simple. You sample the position with a fix sampling clock. Let's say: 10kHz. The speed is: (Actual Position - Previous Position) / Sampling Period. Pos[n] = 10.000inc, Pos[n-1] = 9.900inc. Speed = 10.000 - 9.900 / (1/10kHz) = 1.000.000 inc/sec. If one increment is 0.0001mm then the speed is 100mm/sec.
    Paul 

  • Controling Position and Velocity of trolley

    Hey,
    I am working on an application for a engineering design project that requires me to control the position and velocity of a trolley on a linear track.
    I have done some work in LabWindows before controlling the speed and position of a linear movement but am having some troubles shifting my knowledge from a small application to what I am working on now. This is what my plan is; I currently have a motor (DC 24V 88A), String potentiometer to determine linear distance travelled (there was risk of slip and need of high precission), sufficiently sized power supply and BNC-2110 DAQ.
    My plan (which I am looking for some feedback on ... no pun intended) is to use LabView to create a PWM (which has already been done) to control the speed of the motor via the counter turning on and off a power mosfet completing the Motor's circuit. By varying the time on and off I hope to control the speed. 
    After this has been completed I hope to hook up my string potentiometer to the Trolley and see how it's position changes over time (i.e. determine the speed at which the trolley is moving at for a variety of different % time on and off). This will act as an open loop test, which I was hoping to then figure out a practical transfer function for the motion of the trolley and then somehow use the String Pot as a feedback sensor to complete the loop and create a PI controller. I am having a hard time wrapping my mind around how I am suppose to put the later bit into practice. It all sounds fine on paper but actually approaching an implementation of this idea is boggling my mind.
    Any input or pointers would be greatly appreciated. Am I on the right track or am I looking at something completly wrong... being a student I guess I don't know exactly how things are done in practice in industry, just what is written in books so any help would greatly appreciated.
    Thanks!
    Mac

    Mac,
    starting with an open loop system, determining the transfer function and designing the control algorithm is a reasonable approach albeit a little bit academic.
    A more empiric approach is tuning the closed loop motion control system by means of test functions like white noise or a setpoint step. Here you can find some information about tuning a motion control system by analyzing the step response of the closed loop system (Please note, that this document refers to NI motion control boards, but the general approach of the tuning process is universal).
    This brings me to something very essential. Stable control systems require a deterministic real-time environment. You haven't provided explicit information about the environment that you are intending to use, but it sounds like you are planning to use a Windows based system with LabVIEW. This is not recommended, as such a system can't guarantee stable control loop timing, which is at least as important as the right set of PID parameters.
    So my recommendation here is to use either a motion control board which runs the control algorithm onboard or to run the application with the DAQ board under LabVIEW RealTime (could run on a PXI-system or on desktop PCs that meet certain requirements). If you are going for the second approach, you may also consider using the NI SoftMotion Development Module.
    If there is any kind of campus license of NI-Software available at your university, all the required software components should be already available for you.
    Last but not least here are some considerations about the power circuitry. You have suggested to use a PWM signal that controls a single mosfet. This approach is not feasible in most applications, as it doesn't allow you to control the position and the speed of the motor accurately. To do this, you need to be able to drive the motor in both directions. You could do this by using an H-bridge circuitry, but this requires some more considerations when designing the control algorithm. In fact in most cases you would work with two cascaded control loops. The inner control loop is the current control loop, that generates the signals for the H-bridge, while the outer control loop is the position/velocity control loop.
    Depending on the focus of your project, you may also consider using a commercial motion drive that provides the power circuitry and the current control loop. Those devices typically provide a +/- 10 V input for an external control signal that is provided by the outer control loop.
    I hope this information provides some ideas to getting started.
    Kind regards,
    Jochen Klier
    National Instruments

  • How to get gui_download and gui_upload with popup filename?

    how to get gui_download and gui_upload with popup filename?

    Here is a short example.
    report zrich_0003 .
    data: ifiletab type filetable.
    data: xfiletab like line of ifiletab.
    data: xstring type string.
    data: rc type i.
    data: itab type table of string.
    data: xtab type string.
    start-of-selection.
      call method cl_gui_frontend_services=>file_open_dialog
        changing
          file_table              = ifiletab
          rc                      = rc.
      read table ifiletab into xfiletab index 1.
      xstring = xfiletab-filename.
      check not xstring is initial.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = xstring
      changing
        data_tab                = itab.
      loop at itab into xtab.
        write:/ xtab.
      endloop.
    Regards,
    Rich Heilman

  • How to measure a current signal with NI 6211?

    How to measure a current signal with NI 6211?

    Hi Clecio,
    This is a charge accelerometer. It is different from the IEPE accelerometers that outputs a voltage signal.
    You need a charge amplifier. Then according to the charge amplifier output we can select an appropriate module to measure the signal.
    It is not possible to measure charge accelerometers with NI 9234 directly.
    Best Regards,
    Rodrigo Schneiater
    Application Engineering
    National Instruments Brazil
    If this information was useful, please click in the 'KUDOS!' beside.

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • How to pass username and password with the portal url

    i want to access portal from my web site. i have created username and password fields in my web page. when submited , my portal page should open. so how to pass username and password with the portal url.

    This is not straightforward; but it is doable.
    First tell us about your portal version; portal 10.1.4 has a slightly different method of doing it and the pre-10g portals were completely different animals.
    And if you are in AS Rel 2, then the most important document for you would probably be the following:
    [Creating Deployment Specific Pages| http://download-west.oracle.com/docs/cd/B14099_19/idmanage.1012/b14078/custom.htm#i1015535]
    You might want to use it in conjunction with some metalink notes about your portal version and such a login page.
    hope that helps!
    AMN

  • How can I authenticate and authorize with Web Service on ESB ?

    Hello,
    I want to authenticate and authorize client with Web Service published
    by HTTP/SOAP BC.
    Simply if it is an Web Service as J2EE application, I will use
    Basic Authentication with JAX-RPC and Realm.
    But I think that Web Service published by HTTP/SOAP BC is not belong
    to J2EE Application. Threre is no place to describe security role mapping
    (like web.xml).
    JBI 1.0 the section "5.5.1.1.3 Normalized Message Properties" comments
    JAAS Subject is given in the NM Properties. Really in this package
    com.sun.jbi.internal.security.*
    implements JAAS autentication and authorization (at JaasAuthenticator).
    But I can't see how to configure my Service to use this.
    How can I authenticate and authorize with Web Service on ESB ?
    I referred to the resources.
    Mutual Authentication for Web Services: A Live Example
    http://developers.sun.com/prodtech/appserver/reference/techart/mutual_auth.html
    XML and Web Services Security
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security7.html
    JAAS Authentication Tutorial
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
    Thanks,
    Takurou
    - environment ---------------------------------------------
    OpenESB : Project Open ESB Starter Kit
    AppServer : Sun Java Systems Application Server 9.0 PE
    OS : Windows XP
    I don't assume to use SSL (if It's necessary I will try).
    User information is stored in a LDAP Server.
    -----------------------------------------------------------

    Hello,
    I read this resource.
    SecurityDesign
    http://www.glassfishwiki.org/jbiwiki/Wiki.jsp?page=SecurityDesign
    Then I think [non-ssl and ssl/tls and so on] securing by basic authentication is ongoing feature at this time.
    But I can't see well why this page comments 'HTTP over SSL, TLS'.
    HTTP/SOAP Binding Component Overview
    http://download.java.net/general/open-esb/docs/jbi-components/httpsoap-bc.html
    Does BC support only "SSL server authentication" ?
    Doesn't BC support "SSL client authentication" by username/password ?
    Thanks,
    Takurou

  • Anyone knows how to export ROLES and SYNONYMS with exp command?

    Anyone knows how to export ROLES and SYNONYMS with exp/imp commands?
    Help is needed. Thanks.

    Hi,
    Pls. post this query in RDBMS forum since Portal export import forum does not handle this.
    Thanks,
    ~Kirit.

  • How to use audio and mic with multipoint server with out it crashing on you

    how to use audio and mic with multipoint server with out it crashing on you when i use them to make calls thru my station (zero client) at the same time it crashes on me and i need to restart the multipoint is there a setting i may have mist that enable's
    them to work at the same time and if posible can i use a non USB device 

    Look for "Single Sign-on Using Kerberos in Java" in google or on Sun's web site. Maybe this paper will help you.
    Claude

  • PERWSHRG form - How to end/terminate and assignment with end dated entered by user Apps R12.1

    Hi All.
    How to end/terminate and assignment with end dated entered by user Apps R12.1?
    when i try to end or terminate and assignemnt the sysdate is begin registered for effective_end date.
    any help is reaaly greatly appriciated
    thanks and regards
    Soni

    Hi Soni,
    What is the end date you want to enter as. Are you talking about 31-Dec-4712. If not, please change the sytem effective date (calendar icon on the oracle menu) to the date you want to terminate and follow the termination process.
    Thanks,
    Avinash

  • How do I position to panels in a single frame?

    Hi,
    Can someone tell me how i can position two panels in a single frame using the BorderLayout class.
    I have included my code below. When it is run it shows two JPanels positioned at the top and the bottom, a text area to the right, a panel in the center and a panel on the left. I want to get the panel on the left - the yellow panel - to be positioned in the lower third of the center panel. I have tried to use the BorderLayout.SOUTH statement - but this positions the panel across the very bottom which causes the bottom JPanel and part of the text area to disappear.
    Can anyone help with this please???
    Many thanks
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Panels extends JFrame implements ActionListener
         private TopPanel topPanel;
         private BottomPanel bottomPanel;
         private JButton open;
         private JButton close;
         private JButton connect;
         boolean openClicked = false;
         boolean closeClicked = false;
         public Panels()
              super("Panels");
              setSize(1000,600);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setVisible(true);
              Container contentArea = getContentPane();
              topPanel = new TopPanel();
              bottomPanel = new BottomPanel();
              JTextArea textArea = new JTextArea("Text Area",20,20);
              JScrollPane textScroller = new JScrollPane(textArea);
              open = new JButton("Open");
              open.addActionListener(this);
              close = new JButton("Close");
              close.addActionListener(this);
              connect = new JButton("Connect");
              connect.addActionListener(this);
              JPanel topBar = new JPanel();
              topBar.setBackground(Color.red);
              topBar.add(open);
              topBar.add(close);
              JPanel lowerBar = new JPanel();
              lowerBar.setBackground(Color.red);
              lowerBar.add(connect);
              bottomPanel.setPreferredSize(new Dimension(100,100));
              contentArea.add(topPanel);
         contentArea.add(bottomPanel,BorderLayout.WEST);
              contentArea.add(textScroller,BorderLayout.EAST);
              contentArea.add(lowerBar,BorderLayout.SOUTH);
              contentArea.add(topBar,BorderLayout.NORTH);
              setContentPane(contentArea);
    public void actionPerformed(ActionEvent e)
         if(e.getSource() == open)
         openClicked = true;
         topPanel.repaint();
         if(e.getSource() == close)
         {closeClicked = true;
         bottomPanel.repaint();
    class TopPanel extends JPanel
         public TopPanel()
         public void paintComponent(Graphics painter)
              super.paintComponent(painter);
              painter.setColor(Color.white);
              painter.fillRect(0,0,getSize().width,getSize().height);
              if (openClicked == true)
              drawTopMessage(painter);
         public void drawTopMessage(Graphics painter)
              painter.setColor(Color.black);
              painter.drawString("This is the top panel", 20,20);
    class BottomPanel extends JPanel
         public BottomPanel()
         public void paintComponent(Graphics painter)
              super.paintComponent(painter);
              painter.setColor(Color.yellow);
              painter.fillRect(0,0,getSize().width,getSize().height);
              if (closeClicked == true)
              drawBottomMessage(painter);
         public void drawBottomMessage(Graphics painter)
              painter.setColor(Color.black);
              painter.drawString("This is the bottom panel", 20,20);
    public static void main(String[] args)
         Panels example = new Panels();

    One solution would be to create a new panel, bothPanels and adding the two panels that you need to this panel.
    Once you have done that, you can add bothPanels to contentArea.add( bothPanels, BorderLayout.CENTER)
    hth

  • How to Implement DC and RDS on a single physical server

    Can any one guide me that how to install DC and RDS on a single physical server. It would be highly great full.

    Hi,
    Whilst possible to do it isn't supported and you should have your DC as a dedicated DC and then a separate server(s) for the remote desktop session host.
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    Blog: http://www.windows-support.co.uk 
    Twitter:   LinkedIn:

  • Encoder Position and Velocity Measurements and Force Measurements

    Hi,
    I am using a USB 6210 DAQ Card and an optical encoder and force transducer together in an MRI room to measure the power ouput of a patient pedalling on a recumbent ergometer. I would like to obtain synchronous measurements and output this to file. I have started working on the code for the encoder. I am struggling to get the frequency measurement and encoder position outputting fast enough. Any idea why this is? For the force measurements will this be with the same configuration just adding Vi's for analog input. Also I know using the write to measurement file vi is quite slow to write to a spreadsheet what is the more efficient method for doing this.
    Regards,
    Darren
    Attachments:
    Angular_Position and RPM.vi ‏46 KB
    Angular_Buffered.vi ‏80 KB

    Hello Darren,
    The fastest file to write to in LabVIEW is a binary file.  The specific file type used by LabVIEW is the Technical Data Management (TDM) file.  The TDMS file is a version of this file specifically designed for streaming applications.  You can find several examples of writing to this file in the NI Example Finder (Click Help -> Find Examples).  By using the search tab, you can use the keyword “TDMS” to search for all of the examples that use the TDMS file type.  The example Cont Acq&Graph Voltage - Write Data to File (TDMS) can be found from the search tab, or by using the path Hardware Input and Output -> Analog Measurements -> Voltage.  While the data acquisition part of this example pertains to analog input, the same file input structure can be used with your counter input tasks. 
    What do you mean that the encoder and frequency measurements are not fast enough?  Each rising edge of the sample clock source will latch the current value of the measurement into the FIFO and transfer this value into the buffer.  At this point, how quickly you can read the buffer will affect how quickly the user is updated with the newest measurement information.  Since you have specified the number of samples to read in your buffered example, the read VI will wait until that many samples are available in the buffer before returning a measurement (this could slow down the update rate for the user).  By specifying -1 as the number of samples to read, you will read all available samples in the buffer.  If there are no samples available, nothing will be returned, but the VI will continue to execute.  Hope this helps. 
    Regards,
    Browning G
    FlexRIO R&D

  • How to measure current and voltage and rpm with daq device

    i am measuring current and voltage and am wondering should i use shunt resistors or current sensors hall effect sensors. i have a pci 6221 and a scc-68 breakout box. what specifications or size should the shunt resistor/current sensor be or should i use another device to measure the currrent and voltage. do i need any other safety device between the resistors, current sensors and the scc-68 breakout box when measuring the current and voltage. will the daq card pci 6221 pick up a signal from the resistor. what terminals should the wires from the resistors and current sensors be connected to in the scc-68. i am using a proximity switch to measure rpm of a motor. should the proximity switch be 2 or 3wire connection. should it have an analog or digital connection and is a power supply required to power the proximity switch and should it have an npn or pnp connection

    hello,
     i was going to use a 20amp 50mv, or a 20amp 100mv current shunt and connect wires directly into the AI input terminals of the scc-68 from the current shunt would these be suitable. would current shunts such as these be suitable to use http://uk.farnell.com/elc/sh10020/shunt-sh10020-20a-100mv-1-class/dp/1319576 or http://uk.farnell.com/datel/3020-01098-0/shunt-50mv-20a/dp/1339338
    is it ok to use either a current shunt or should a hall effect sensor be used  such as this http://ie.farnell.com/honeywell-s-c/csla2cd/sensor-hall-effect/dp/1082269 . which of them would be more accurate or are both of them fairly accurate.
    when i am measuring voltage can i connect two resistors between the positive and negative of the wires going to the battery and connect two wires from either side of the resistor directly into the analog inputs of the scc-68 and measure the 12-15 volts directly would the pci6221 and scc-68 be able to measure the voltage drop across the resistor.
    i wanted to measure rpm also does it matter whether the proximity switch has 2 or 3 wires and should it have an analog or digital/frequency output for cponnecting to the scc-68

Maybe you are looking for