RPM Measurement using Quadrature Encoder and PXI 6602 counter

Hi,
I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
I am familiar with the NI example finder, but have not been able to find an example that I can use.
Thanks,
Gary

Hey Gary,
I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
Hope this helps
Luke W

Similar Messages

  • WANTED: NI PXI-6602 counter/timer

    I'm looking to buy a used NI PXI-6602 counter/timer board. Got one?

    "Zvezdana S." wrote in message
    news:[email protected]..
    > Hugh,
    > To possibly obtain an used board from National Instruments, you should
    > contact your regional Internal Sales Representative (ISR) for possible
    > used boards. If you are not sure who your ISR is, generate a service
    > request at:
    I never knew NI had an SRQ line we could pull.
    Craig Graham
    Physicist/Labview Programmer
    Lancaster University, UK

  • Need to use quadrature encoder to trigger (RTSI) single point DAQ on 2 channels of E-Series DAQ, using 6602 NI-TIO for counting encoder pulses.

    This is for LV6i, W2000, all PCI equipment.
    Using a quadrature-measure position-VI, I get 7200 edges/rev from the encoder of my physical system. This equates to 0.05 degrees of angular displacement. This amounts to an angle stamp as opposed to a time stamp.
    I need each of these 7200 edges (source: 6602 NI-TIO) to trigger (using RTSI) the acquisition of a single sample from each of 2 channels on an E-Series DAQ board (maybe more channels later). I only need/want one rev (7200 samples per channel) of data for each run of the test. As I write this I think I want pre-triggering and a little more than a rev of data. So the
    re is a buffering step. Anyway, you can get the idea.
    I need this angle stamp and the DAQ samples to be placed in an array and on the hard drive for graphing and other mathematical treatment, analysis, etc.
    I think there must be a way to use the quadrature output of the counter/timer as a scan clock for the DAQ board, but I haven't seen an example to guide me.
    It seems like all of the RTSI or other triggering examples I have seen trigger once to start a continuous scan, not a series of discrete samples repeated quickly. I am not sure how to fill an array with this data. Again, examples are for continuous sampling, not a series of discrete readings.
    Any hints on any part of this task will greatly appreciated. This is my first LV project.

    Sounds like a fairly ambitious first project!
    I assume your 7200 edges/rev come from an encoder with 2 channels in quadrature which each provide 1800 cycles/rev. You can clock in analog data at 1800 scans/rev with either of the two encoder channels, but will probably need an external quadrature decoder circuit to produce 7200 scans/rev. Either method can be done with screwdriver and wire or else by using another counter from the 6602 and the RTSI bus. Here are two approaches in detail, but you could mix-and-match as needed.
    Note also that if you can be sure that your reference encoder will be uni-directional, you wouldn't need to measure position -- position could be determined by the array index of the analog scan data. This would simplify things greatly.
    1800 scans/rev, screwdriver & wire
    Wire both encoder channels to your 6602 breakout box and configure your counter for the 4x quadrature option. Send a wire from one of the encoder channel connections at your 6602 breakout box to a PFI pin at your E-series board breakout box. Config the analog acquisition to use an external scan clock and specify the correct PFI pin -- there are built-in examples that will guide you. Now one edge of one encoder channel acts as a scan clock for your analog acquisition. Inside the 6602 breakout box, route the same signal to one of the default gate pins and configure your encoder counter gate to use that pin as its gate signal. Note that there will be a race condition governing whether the encoder value updates from the encoder inputs before or after the value is latched by the gate.
    7200 scans/rev, extra counter & RTSI
    Make sure you have a RTSI connector between your two acquisition boards inside your PC. Build a quadrature decoder circuit that will convert your two encoder channels into a clock and direction output. (Consider the LSI 7084 decoder chip or similar). Setup your "encoder" counter for buffered position measurement. Use "Counter Set Attribute" to define "up down" as "digital" (don't use it to define "encoder type"). The clock output goes to the counter SOURCE and the direction output goes to the counter UP_DOWN pin.
    Use "Adjacent Counters.vi" to identify the counter considered adjacent to your encoder counter. Configure it for "retriggerable pulse generation". Use "Counter Gate (NI-TIO).vi" to specify "other counter source" as the gating signal. Configure the output pulse specs to be short duration (make sure total of delay + pulse width is less than the minimum period of the incoming encoder clock signals). Use "Route Signal.vi" to send this counter's output onto the RTSI bus, say RTSI 0.
    Now configure the analog acq. to use RTSI 0 as its external scan clock. Also configure the encoder counter to use RTSI 0 as its gate signal. Voila! Now your quadrature decoder clock output acts as a scan clock for analog acquisition and a "gate" to buffer your encoder measurement. The short delay helps ensure that the clock updates the position measurement before the gate fires to latch the value.
    Respond if you need clearer explanation. There's a fair amount of decent info "out there" if you scour the online help and this website. Good luck!

  • How to measure the rotational speed by using rotary encoder and 1 counter?

    I want to measure the rotational speed of a shaft, and I have below hardware:
    1, a rotary encoder, with A,B,Z signals output;
    2, PCI-E6363 card.
    I do konw how to use such a  encoder to measure the rotational angle by using the function "DAQmxCreateCIAngEncoderChan", but this time I need to measure the speed(rpm), as well as the dirction of the speed, which means a negative speed represent a CCW rotate direction.
    More detail informations:
    for the encoder, the A,B signal is 600ppr, and Z signal is 1ppr
    the rotatinal speed is in range: -300 ~ 5000 rpm.
    some one suggested me that I can use the "DAQmxCreateCIAngEncoderChan" task to measure the angle firstly and then do the differential analysis with the angle. but I have to enable the Z index function, and it's hard to calculate when the shaft speed is fast then 2500rpm.
    Anyone can help me on this issue?
    Thanks in advance!

    RobertoBozzolo:
    Thansk for your reply. You are right that measure frequency to get the speed is the best way, but it's hard to get the dirction at the same time. You suggest me that "perform two angle measurements to get the sense of rotation", but I'm not sure I catched what you mean about this. I try to understand your opinion like this: distribute the signals to 2 counters, and start 2 tasks, one for frequency, the other for angle which used for deciding the dirction?
    And by the way, in my application, the counter is limited:
    I'm using PCI-E6363, which have 4 counters totally, and I have to measure 4 different speed sensors at the same time, so that means only 1 counter for me to measure the speed and the dirction.
    RobertoBozzolo 已写:
    To measure the speed from the encoder you can simply follow some of the frequency measurement examples that ship with DAQmx, considering that speed (rpm) is given by frequency (Hz) on one encoder output / 600 (ppr) * 60 (s->min)  = frequency / 10.
    Difficult is to add a sign to this measurement: frequency measurement gives you no information about sense of rotation, so I suppose you could perform two angle measurements to get the sense of rotation and then get the speed as above.

  • Measuring distance using quadrature encoder

    I am currently doing a project that requires the positioning and characterization of TV signals. As such, the position of the TV receiver is one  important variable that i have to measure. I am required to automate the measurements and data logging using a PC/notebook. I have purchased a 2-channel HEDS-9000 quadrature encoder with 2000 CPR & the HEDS6120 codewheel - both from Avago Tech, to be interfaced with the notebook/PC. My idea is to get a TTL-to-RS232-to-USB converter to interface with the PC, so that i can feed the output from the encoder to the PC. However, i dun have much idea on how I can use LabView to interface the encoder and the PC. Can anyone offer some valuable advice?
    Btw, the encoder module consists of 5 pins - Vcc, GND, CH.A, CH.B, with one pin not used.
    Thanks !!

    Hi,
    I think one of the best and reliable options that should meet your needs is a bus-powered USB-M-Series device like the USB-6210.
    The USB-6210 is a multifunction data acquisition device with 16 analog inputs, 4 digital inputs, 4 digital outputs and 2 counters. Each of the counters can interface directly to the quadrature encoder signals of your HEDS-9000.
    It's very easy to use this device with the NI-DAQmx API for position measurements in LabVIEW. In fact there are some shipping examples that you can use for getting started.
    I hope this helps,
    Jochen Klier
    National Instruments Germany
    Message Edited by Jochen on 02-09-2007 09:18 AM

  • Using quadrature encoders with PXI-6025

    Hi!,
    We are using an encoder for position data. The encoder gives A and B pulses which are phase shifted by 90 deg.
    Grating Pitch = 40 microns
    We make the connection to our PXI-6025 as such:
    Channel A pulse goes to PFI 8 (GPCTR_Source)
    Channel B pulse goes to DIO6 (GP_Up_Down)
    Ground goes to DGND
    We are able to increment/decrement the counter on our 6025 for every 40 micron movement
    However, we are unable to quad the input and increment/decrement for every 10 microns. How do we achieve this?
    We have an electronic circuit which converts the 40 micron A and B pulse from the encoder into 4 pulses spaced at 10 microns. But, using this single pulse mode does not allow for up/down counting.
    We are using LV-7.1
    , NI-DAQ 7.2 and Win2000 prof.
    Looking forward to some quick help.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    There's one tedious way that might work if you only need to post-process the data. However there are several possible problems.
    The idea is to perform buffered semi-period measurements with both the counters on the 6025. Once you've collected all the needed semi-period data, perform a cumulative sum of each array so you end up with timestamps for all the transitions. Then you'll need to go through them to distinguish (+) from (-) direction quadrature transitions and generate a cumulative position array.
    I don't think there's another way -- only semiperiod measurements will react to both edges of an incoming pulse train. However, it *is* possible in principle to get your 4x factor in resolution. Now for the problem list:
    1. Your 6025E only has 1 DMA channel. One of the counters will have to be configured to use interrupts, which in turn will limit the maximum encoder rate you can track. I wouldn't count on tracking better than single digits of kHz, and you may not even be able to achieve that much.
    2. The last time I did semiperiods on an E-series board, there was no way to specify which edge would mark the first recognized transition. If the input was low when you started, the first transition recorded would be a rising edge; if high, then a falling edge.
    Knowledge of the initial state of the inputs is critical for your software quadrature decoding. I think the solution I used was to parallel wire the A&B channels to a couple DIO pins which I inspected before any encoder motion started. If your encoder jitters or vibrates about its nominal position however, you're probably hosed.
    Are you sure you can't use the LS7084 to replace your other external circuit? The alternatives are either going to be trouble-prone gimmicks like I described above or the purchase of new DAQ equipment.
    If you have budget for new DAQ equipment from NI, I'd suggest you look into one of the following:
    1. Low-cost M series multi-function board
    These have 2 32-bit counters onboard that are capable of quadrature decode. Each counter gets its own DMA channel for buffered acquisition. Plus you get a bunch of analog in, timed digital i/o, and can get analog outs. The boards are $475 with 2 analog outputs, $375 with none.
    2. dedicated counter/timer board
    The 6601 is cheaper at $295, but is limited to 1 DMA channel and has a slower onboard timing clock. The 6602 costs about double that but gives you somewhat more than double capability.
    -Kevin P.

  • RPM measurement using NI ELVIS? help me out

    i want to measure RPM from two different sources simultaneously using NI ELVIS and i am using an hall effect sensor, how to do it?
    info:
    my hall effect sensor has 3 pins Vcc, GND, out
    i connected the Vcc, GND to ELVIS board itself and the OUT pin to CTR0- SOURCE pin (is this connection correct? i left CTR0-GATE and CTR0-OUT free)
    from one of the website i found that i need to use frequency counter
    so i went to NI-DAQmx->create task->acquire signal->counter input->frequency (i did a test run, nothing was working)
    then i did edge count NI-DAQmx->create task->acquire signal->counter input->edge count, here i could see the up counting every time i passed a ferrous material in front the sensor.

    I'll pass this to you to see if it helps
    http://zone.ni.com/reference/en-XX/help/370466W-01/mxdevconsid/elviscountsigconn/

  • Error use quadrature encoder to count optical mouse position

    Hello, PRO
    Can U explain me how count pulses from optical mouse? I have 2
    quadrature signals (as said in document about Quadrature measure in Edevices
    I connected XA to PFI8/GPCTR0_source, XB - DIO6...and digital ground to the
    DGND).
    I used sample "STCcountWithHWDirControl.C" to count pulses. This sample
    was developed for device with DAQ-STC counting/timer... :-)
    But result of counting = 0. Where is mistake?
    One detail (maybe it help): I connected XA to analog input and read values. This pulse had 0.1volt amplitude , but when I measure voltage between XA and DGND by a oscilloscope. It was 5V.
    Sincerely
    Spivot
    P.S.
    NI Software : Measurement Studio for Visual C++ version VC++ with NI-DA
    Q 6.9.1
    NI Hardware : Multifunction DAQ device DAQPAD-6020E

    Hello;
    The first thing you should test is if the pulses can be counted at all by the general purpose counters of your device. The way to go about that is to connect the pulse to the source of one of the counters and run the simpleeventcount.c example.
    If even that example doesn't work, you will need to condition the pulses before going to the counter.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Database Data Security: both from within (using MIMEbase64 encoding) and from without (using encryption).

    In my MDB file databases (Jet 4.x format) I turn on both compression and encryption.  This gives me data security from without, meaning, I can't open a MDB file in a Word Processing software (or otherwise) and read the data in a humanly recognized
    format.   But I am also using MIMEbase64 encoding of my stored data so that the data is humanly unreadable from within - meaning that anyone performing an SQL query will not be able to humanly read the data in my database.  I do the decoding
    (from MIMEbase64) within my end-user software interfaces to the databases. 
    I found out just recently (last few months) that I can do this from Win32 Perl, so I encorporated this feature into my Perl database applications.   Only thing is that MIMEbase64 increases the size of the data stored.
    Is there a better encoding strategy available today which might actually compress the data a little?    

     INSTRUCTIONS FOR SECURE/CUSTOM (non-formula based) TEXTFILE ENCODING (should be undecipherable w/o mappings file):
    by Eric C. Hansen. You may freely use these encoding instructions, and the code I have provided, but please
    acknowledge me as the author where credit is due - such as in a publication. And do not try to sell it.
    However, any code I have provided you may freely use in any programs you write to be sold for your own profit,
    except you may not attempt to sell this encoding scheme (or my code provided), as a generic encoding tool, for
    general use, to be marketed as a turn-key custom encoding solution. 
    (1) Create a unique code list 
          Using the characters:  A-Z a-z 0-9 only. That's 62 characters only.  
           62 (1 char codes) + 3844 (2 char codes) + 238,328 (3 char codes) = 242,234 total codes
                     62x1         +      62x62         +       62x62x62    
           REMINDS ME of my college Genetics course i.e. dominant/recessive trait inheritance tables  
           EXAMPLE CODES:  a, k, 3c, A4, xy1, H8j
    (2) Create a unique word(+punc) list from your textfile which is to be encoded. You know how to do this.
           Example of 9 words(+punc) found between whitespace within a textfile input line:
                "Hello", this is Mr. Bell-va-deer. My number is 999-342-8998.   
                    1       2    3   4       5              6      7       8       9
     PERL code for STEPS 3-7 is provided below. Code for STEP 1 above was previously provided. 
             You should have little trouble writing the textfile encode/decode logic yourself.  
    (3) Read your list of unique codes into an array.
    (4) Read your list of unique words(+punc) into another array.
         LOOP   #-- 0 to number of elements in words array
                (5)     select a random code and a random word(+punc) from the 2 arrays.
                (6)     now remove that code and that word(+punc) from each array using "splice".
                (7)     then save them as key/val pairs to persistent Perl SDBM database files ("mappings").  
         END LOOP
     (8) Once you have your persistent, random code/word mappings, you can convert your textfile
          to an encoded textfile. Read in one line at a time from your textfile (chomp), parse the words(+punc.)
         between whitespace within that line, then for each word(+punc) parsed, perform
         the word-to-code mapping conversions by doing a lookup within the Perl SDBM database
         file of key/val pairs, where KEY=word and VAL=code. You will then need to 
         concatenate these codes (space delimited) to your outputline, in the same order as found in your
         inputline, finally writing the outputline (newline "\n" terminated) to your new encoded textfile.    
    (9) Keep your persistent Perl SDBM database file ("mappings") in SAFE KEEPING, with a naming
         convention of your choice that perhaps hides any relationship to the name of
         your encoded text document - which it specifically pertains to. But keep a record of that joint
        relationship somewhere.  Keep a copy of both the original textfile and the encoded textfile,
        or perhaps you'd like to keep just the encoded textfile?, and not the original?  You can always decode it. 
    (10) Send your encoded text document via email as an attachment, to the recipient of your choice.
    (11) Upload your persistent Perl SDBM database "mappings" file to your secure login FTP download site. 
         NOTE:  If your encoded text document is very large, you may want to reverse 10 & 11, putting the encoded file
             on the FTP site, and sending the Perl SDBM database file ("mappings") as the email attachment.
    (12) Call your recipient to see if they have received the encoded textfile, email attachment.
         Let them know that the "mappings" file is uploaded for them to download from the FTP site.
        You can have a LINGO you both use/know on the phone, to secretly convey this message, if you like,
          to avoid possible interception of this sensitive information.
         Recipient will then take the encoded textfile email attachment, the FTP downloaded "mappings" file,
        and place them both in a directory on their PC where the Perl decoding program is located which you
         had previously sent them to handle all the decoding anytime you send them an encoded textfile + "mappings".
         Recipient will run the Perl decoding utility program to create the original textfile.
    use Win32;         #-- as you can see, I use a Windows O/S Perl distribution. 
    use IO::Handle;
    use SDBM_File;     #-- my understanding is this module comes standard with every Perl distribution
    use Fcntl;
        $PWD=Win32::GetCwd();  #-- get current working directory on Windows O/S platform.            
        srand;        #-- random seeding initiated, do this just once at top.
        @codesARR=();    @wordsARR=();          #-- initialize the arrays
        print "working.  please wait...\n\n";
        unlink( "$PWD\\Project_0836_Mappings_CtoW.pag" )
                    if (-e "$PWD\\Project_0836_Mappings_CtoW.pag" );
       unlink( "$PWD\\Project_0836_Mappings_CtoW.dir" )
                  if (-e "$PWD\\Project_0836_Mappings_CtoW.dir" );
        unlink( "$PWD\\Project_0836_Mappings_WtoC.pag" )
                  if (-e "$PWD\\Project_0836_Mappings_WtoC.pag" );
       unlink( "$PWD\\Project_0836_Mappings_WtoC.dir" )
                 if (-e "$PWD\\Project_0836_Mappings_WtoC.dir" );
         unlink( "$PWD\\Project_0836_Mappings.txt" )
                 if (-e "$PWD\\Project_0836_Mappings.txt" );
       $cnt1=0;    $ret="Y";
        open(CODES,"$PWD\\codes.txt") || do {$ret="N";};
        if ($ret eq "N") {  
               print "Codes input file not opened \n";  
               sleep 5;   die;  
        while (<CODES>) {
               chomp $_;
              $codesARR[$cnt1]=$_;
              $cnt1++;
        print $cnt1 . " codes loaded\n\n";
       close(CODES);
       $cnt2=0;    $ret="Y";
       open(WORDS,"$PWD\\words.txt") || do {$ret="N";};
        if ($ret eq "N") {  
                print "Words input file not opened \n";  
               sleep 5;   die;  
       while (<WORDS>) {
               chomp $_;
              $wordsARR[$cnt2]=$_;
                $cnt2++;
        print $cnt2 . " words loaded\n\n";
        close(WORDS);
        sleep 3;       #-- a little time to check on record counts loaded to both arrays
      tie( %Project_0836_Mappings_WtoC, "SDBM_File", '.\Project_0836_Mappings_WtoC', O_RDWR|O_CREAT, 0666 );
       if (tied %Project_0836_Mappings_WtoC) {
               print "WtoC Hash/SDBM File are now tied\n\n";    
       } else {
              print "Could not tie WtoC Hash/SDBM File\n\n";  sleep 5;  die;
       tie( %Project_0836_Mappings_CtoW, "SDBM_File", '.\Project_0836_Mappings_CtoW', O_RDWR|O_CREAT, 0666 );
        if (tied %Project_0836_Mappings_CtoW) {
                 print "CtoW Hash/SDBM File are now tied\n\n";    
        } else {
               untie(%Project_0836_Mappings_WtoC);  #-- close the successful tie made directly above 
              print "Could not tie CtoW Hash/SDBM File\n\n";  sleep 5;  die;
      open (OUT,"> $PWD\\Project_0836_Mappings.txt");
       OUT->autoflush(1);
       $cnt2=$#wordsARR;   #-- we do this because we will be removing elements from wordsARR
       for ($i=0; $i<=$cnt2; $i++) {
             $index   = rand @codesARR;    # get a random index from the codes array
            $code    = $codesARR[$index]; # get the value of that array element
            splice(@codesARR,$index,1);   # removes only this element from the codes array.
            $index   = rand @wordsARR;    # get a random index from the words array
            $word    = $wordsARR[$index]; # get the value of that array element
            splice(@wordsARR,$index,1);   # removes only this element from the words array.
            $Project_0836_Mappings_WtoC{$word}=$code;   # key/value pair where: word is key, code is value
            $Project_0836_Mappings_CtoW{$code}=$word;   # key/value pair where: code is key, word is value
        print "Your Mappings have been created and saved to (.dir and .pag extension files)\n\n";
        print OUT "Here are your Mappings you just created:\n\n";
        foreach $key (keys %Project_0836_Mappings_WtoC) {
              print OUT "word=" . $key . "     code=" . $Project_0836_Mappings_WtoC{$key} . "\n";
      print OUT "##################################################\n";
       foreach $key (keys %Project_0836_Mappings_CtoW) {
               print OUT "code=" . $key . "     word=" . $Project_0836_Mappings_CtoW{$key} . "\n";
        untie(%Project_0836_Mappings_WtoC);  #-- now you have saved a persistent word/code mappings file
        untie(%Project_0836_Mappings_CtoW);  #-- now you have saved a persistent code/word mappings file
        close(OUT);   
        print "Done.  Goodbye!\n";
        sleep 5;
        exit;

  • Frequency measurement using Labview 8 and Fieldpoint FP-CTR-502 - wind speed measure

    All the information regarding this kind of application seems to be outdated, I did not find no solution or example to construct frequency measurement VIs using Labview 8
    The examples at "NI Discussion Forums :
    Most Active Hardware Boards :
    FieldPoint Family :
    Low-Frequency measurements using counter/timer" is very strange and so far the steps given seems to be usefull only do old Fieldpoint Explorer.
    I was trying to find a way to learn how to make an anemometer send its signal to a FP-CTR-502 but I have no sucess.
    I am realy very new on this Labview stuff, any help would be welcome.

    (similar thread here)
    Message Edité par Mathieu R. le 12-23-2005 02:28 PM
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  

  • RTD Temperature Measurements using LabView 2013 and MyRio

    Hey everyone.  I am VERY new to LabView programming and working with a MyRio.  I need to figure out how to measure the resistance of a 2 wire RTD to find a temperature utalizing the MyRio and LabView.  I am pretty lost on how to do this.  Does anyone know some good resources for making the LabView program off of the tops of their heads?  I've figured out how to measure from specific pins, but I am not sure how to get it to constantly output a voltage from the output pins.
    Eventually, I would like to have it display the temperature as well as have it turn on or off a heater depending on that temperature, but that will come far later in this process. First things first, how do I take temperature measurements utalizing LabView 2013 and a MyRio with a 2 Wire RTD. 
    Thanks so much!

    Hi JoshEpstein87,
    The myRIO can't acquire a change in resistance directly, so you'll need to somehow convert the change in resistance to a change in voltage. There are multiple ways to do this, but you'll need to build an external circuit and then read the voltage output with the myRIO. One example of a circuit that allows you to do this can be found here. To output a voltage on the analog output pins, you should just need to set the output voltage and then it will remain at that voltage until you change it or power cycle the myRIO.
    To get started with LabVIEW and myRIO programming, see the following page:
    http://www.ni.com/myrio/setup/getting-started/
    There are some links to LabVIEW training as well as resources about RIO programming. I also highly recommend you check out the myRIO Community as there are example programs on there that you can take a look at to see how they are designed.
    Best Regards,
    Matthew B.
    Applications Engineer
    National Instruments

  • Recording quadrature encoder and AI signals simultaneo​usly and generating output TTL signals in one VI

    I want to record simultaneously encoder, pressure and other AI signals and output a TTL signal for every other pressure signal. I have two VIs: One is to record all signals and the other is to generate TTL signals.
    1. Since I'm new to Labview, I would like to double check with experts that if my VI (attachment 1) did what I expect. I would like to have DAQ box read and write encoder signals and pressure signals at the same time so I can plot PV diagram.
    2. During acquisition, some data points are usually missed, shown in attachment 2. Is there any way to solve it?
    3. I tried to combine two VIs but it never work (attachment 3). Can anyone give me any suggestions?
    PS. Labview 9.0 and NI USB-6216 are used.
    Dummy signals are 30Hz sine waves for pressure and 2 TTL signals for encoder A and B at 5kHz.
    Thank you!

    Thank you for your help, Peter!
    I attached the wrong file for attachment 1. The initial code for measurement is attached here.
    The sampling rate is 20000 and the sample mode is continuous.
    For missing data points, it improved when I add "wait until next ms multiple" in while loop.
    Follow the example you gave me, I'm able to generate TTL signals in one vi, attachment 2. Could you please check if it's correct?
    It looked fine with simulated signals and hope it will go well with real engine tests.
    I have two more questions:
    1. Does the input number for wait until next ms multiple should always be the same as "samples per channel" in sample clock?
    2. How will the value of "samples per channel" in sample clock affect data acquisition? I tried 1000 and 10 but didn't see any difference between these two.
    Thanks a lot.
    Attachments:
    recording VI.png ‏332 KB
    AI+CI+CO.png ‏72 KB

  • Distance measurement using Ultrasonic sensors and phase shift method

    Hi, 
    I've recently started a project where the idea is that we have an ultrasonic transmitter and a receiver. The transmitter will send out a signal at 40 kHz that will hit some object, most likely a book, and reflect that signal to the receiver. The received signal should have a phase difference from the outgoing signal. Now, when we vary the outgoing signal, the phase shift should also change. Likewise, if we vary the distance to the object, the number of wavelengths that can fit in between the object and the transducers should also change. We would multiply the incoming and outgoing signals and measure the beat signal, but I'm not sure how we would do this in labVIEW. We can calculate the distance to the object by figuring out what d(phase)/d(frequency) is. So far,when I am having problems with actually getting an incoming signal and figuring what that phase shift is. I'm not sure how I could use simulate signal to accuately and precisely send out a 40 kHz sine wave, and then vary that signal by steps of 1 Hz. I have also tried using a signal generator, and having once BNC cable go to the input of the transmitter and the other going to input of the DAQ. I have another BNC cable going from the output of the receiver to the input of the DAQ. I had multiple channels on my DAQ, and used split signals to see the transmitted and received signal. But this doesn't seem to be working. I also tried to add gain to the received signal, but when adding an Op-Amp LF356 to the receiver, the signal completely disappears. Attached are some of the VI's I have, but none of them seem to be working. Thanks in advance for any help. 
    Attachments:
    Latest version of final.vi ‏64 KB
    Draft for final project.vi ‏89 KB

    Have you done the basic physics and mathematics? For the speed of sound = 343 m/s and the frequency = 40 kHz the wavelength is 8.6 mm. At 40.001 kHz the wavelength is 214 nm shorter.
    So, how do you propose to keep track of the number of wavelegnths if the target moves more than 8.6 mm?
    To measure a phase shift you must have some kind of reference. Typically a fraction of the transmitted signal is used as a reference.  Since you probably do not know how much phase shift occurs in the power amplifier driving the transmitter or between the electrical signal at the transducer and the acoustic signal in air, it is usually best to measure both, ideally with the same receiver and amplifiers.
    The LF356 should be good for modest amounts of gain. The transducers can look like a capacitance to the circuits. Do you have a DC offset which is saturating the amplifier?
    Lynn

  • DC component measurement using BasicDC-RMS and AvgDCRMS

    Hello,
    I am planning to calculate the DC component from a noisy signal.Both the BasicDC-RMS and AvgDCRMS vi's will the give the ouput as the waveform but how to get them as a constant instead of showing it with the waveform.As the DC component of the signal obtained will be used for the later calculation with a formula.
    Thanks in Advance.
    Solved!
    Go to Solution.

    I just use the Basic Averaged DC-RMS.vi.  It returns the DC value of a waveform.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Local bus and PXI-6602

    Is it possible to use any of the 13 local bus lines on the PXI chassis as a
    gate for a counter?
    Thanks,
    Peter

    Hi Peter,
    You should have access to PXI lines 0-6 (RTSI 0-6 on PCI devices) as the Gate of a counter.
    Ron

Maybe you are looking for

  • Why do website links to documents stored on another server work in IE but not firefox?

    here is the line of code that works fine in IE: <td><div align="left"><b><a ref="file://sndpdps.ess.ad.addp.com/opssupport/FLOWCHARTS/Batch_Processing/PDF format/BKUP_FACKS_PROD_Daily.pdf" target="_Top">FACKS_PROD Backup</a></b></div></td>

  • Subclassing a servlet

    Hi, I am trying to call a method in a super class from a servlet. I packaged the superclass in a jar file and tried importing it in the servlet. I put the jar file in the lib directory of tomcat. In my servlet I try Myclass class = new Myclass(); whe

  • MDM or XI for a workflow consultant...

    Hi there, I have been working in SAP ABAP workflow for 3+ years now. Now I am looking to add some more skills. I am thinking of either taking up MDM  (work with MDM workflows) or XI (work with ccBPM). I am confused, please help me. Thanks, Sukumar.

  • Blogs - inserting into web page

    Hi All would some onoe beable to direct me to the best place on where to start?? I am new to blogging, I have downloaded and install wordPress for a blog but I would like to incorporate the blog into an existing web page, say the index.html. or creat

  • Can't 'save as' jpeg file

    I have a group of PSD files that my client wants to have as JPG files. I just went to do a "save as" on one of these and JPEG is not one of the types of files listed. In fact there are only eight file types listed instead of the list of dozens of typ