NI 6602 measure quadrature encoder with two signal edge sepearation

Is it possible to improve the position measurement for X4 encoders,
that the measurement starts at start trigger and stops at the stop
trigger signal like the normal two signal edge seperation measurments.
Everything I tried don't works. Does anyone have an idea. Thank You
for Your trouble.

Hello Yong,
You have no wait time within your for loop.  This means that the loop will execute as fast as possible, but not at a constant rate.  To acheive a more constane rate, try inserting a Wait Time of 1 ms.  This will get you a loop with a 1 kHz rate.
How fast is your PWM Signal?  It may be that you are missing some two edge measurements while waiting for the loop to iterate.
I suggest merging your error clusters out of the DAQmx Read.vis.  Right now, you are just clearing out any errors.  Let me know if you start returning any errors once you have done this.
Regards,
Sean C.

Similar Messages

  • Troulbe in measurement quadrature encoder with 6601.

    Hi,
    We are trying to measure position with 6601. The frequency of quadrature encoder is from 100Hz to 8MHz. Now, we connet the A,B and Z channel directly to counter . Using the example in CVI, we change the filter to 100ns and use x4 mode. It works perfect at low frequency.
    The problem is when the frequency of encoder is higher than 2MHz, the accuracy decreases greatly. I'd like to know about following:
    1.Can 6601 do the previous task enough? Or I must change to use 6602.
    2.If 6601 is available, is there any way to increase measurement accuracy ?(in software or wire connection )

    Jimmy,
    You would need to specify what type of accuracy you are looking for, which is pretty much dependant on the type of operation you are performing. You could be looking to timestamp your encoder positions or you could also be looking to perform position/angle tracking over time. You could also be performing single point vs. multiple point (buffered) operations. You could mention which one of the CVI examples you are using and that could give an idea of the type of operation you are performing.
    The NI-6601 is able to perform quadrature encoder measurements and the only limitations you can have in regards of frequency are the filtering parameters (if you use filtering) and the actual maximum timebase of the board (20 MHz).
    Please keep in mind that by ena
    bling filtering at 100 ns you are only guaranteeing that pulses with widths of 100 ns or longer are not being filtered out. This limits your encoder phase frequency to around 5 MHz. (Each encoder period has a 50% duty cycle, therefore the pulse duration is half the encoder period). You can refer to the board�s manual for more information on filtering.
    We would have to know the following in order to provide further help:
    a) Type of operation being performed
    b) Specific example you were using
    c) Type of accuracy you were looking for
    d) Range of accuracy you needed on your measurement
    Regards
    Alejandro Asenjo
    Applications Engineer
    National Instruments

  • 6602 quadrature encoder with c code

    I need to implement a quadrature encoder on the 6602 board usinng c language.
    I found some good function, for example  DAQmxBaseCreateCIAngEncoderChan, but i think this function is only for DaqmxBase,
    is there some similar function for Daqmx, or have i to do it myself?
    From where can i start?
    Thank you in andvance
    There are 10 kinds of people. Those who understand binary notation, and those who do not.

    Solved my problem.
    I installed the daqmx version on CD and it was old.
    Now i installed the new version daqmx 9.0 , that i toke from the site.
    This version has the function i need  DAQmxCreateCIAngEncoderChan,
    it compiles , now i have only to attach my encoder.
    Thank you lo stesso
    Message Edited by blacksocket on 02-08-2010 05:32 AM
    There are 10 kinds of people. Those who understand binary notation, and those who do not.

  • Troulbe in measuremen​t quadrature encoder with 6601

    Hi,
    Thanks for Ross's help.But I cannot differ 6601's x4 mode from other counter/timer counting mode. In measurement position, what difference between them. And I just want to know whether my application viable.
    We are trying to measure position with 6601. The frequency of quadrature encoder is from 100Hz to 8MHz. Now, we connet the A,B and Z channel directly to counter . Using the example in CVI, we change the filter to 100ns and use x4 mode. It works perfect at low frequency.
    The problem is when the frequency of encoder is higher than 2MHz, the accuracy decreases greatly. I'd like to know about following:
    1.Can 6601 do the previous task enough? Or I must change to use 6602.
    2.If
    6601 is available, is there any way to increase measurement accuracy ?(in software or wire connection )

    >jimmyjimmy2000
    "Hi,
    Thanks for Ross's help.But I cannot differ 6601's x4 mode from other counter/timer counting mode. In measurement position, what difference between them. And I just want to know whether my application viable.
    >>mross>The application is viable. However, the use may be difficult.
    >jimmyjimmy2000
    We are trying to measure position with 6601. The frequency of quadrature encoder is from 100Hz to 8MHz. Now, we connet the A,B and Z channel directly to counter . Using the example in CVI, we change the filter to 100ns and use x4 mode. It works perfect at low frequency.
    The problem is when the frequency of encoder is higher than 2MHz, the accuracy decreases greatly. I'd like to know about following:
    1.Can 6601 do the previous task enough? Or I must change to use 6602.
    >>mross>The 6601 is just as good as the 6602 at 2MHz. Therefore, a 6602 will have the same problem of inaccuracy.
    >jimmyjimmy2000
    2.If 6601 is available, is there any way to increase measurement accuracy ?(in software or wire connection )"
    >>mross>Yes, in the wire connection you can make improvements.
    6601 can count as fast as 20MHz (60MHz with prescaling). The signal is noisy (containing addtional, incorrect information).
    You must use an oscillosope to look at the signal. Look at it when 6601 is counting correctly, and look at it when 6601 is "malfunctioning".
    The counter will increment whenever the signal is high for more than 5 nanoseconds. The conditions for "High" and "Low" signals must be strictly met. If the signal is greater than 0.8V, the counter may increment. The signal must then drop below 2 Volts for a "Low" to be seen.
    This sounds wrong, but is true. The counter is expecting TTL signal conditions (Transistor -Transistor Logic). This specification is very broad.
    A "High" will absolutely be recognised if the signal is greater than 2.0V.
    A "Low" will absolutely be recognised if the signal is less than 0.8 V.
    However, the range from 0.8V to 2.0V is "undefined." This means the counter could increment at 0.8V. It has been my experience that National Instruments TTL will always see 0.8V as a "High." If your noise exceeds 0.8V you will never be able to count accurately.
    The problem will be solved when your encoder signal is read cleanly by the 6601. This is why I gave you the URL for US Digital in the previous answer. The circuits they sell can help to clean up the counter signals. You will have to see what works best, since I don't exactly understnad you application. If the noise is very bad, you may wish to use the Encoder to Binary Number circuit. There will be no noise in the reading of a binary number. Since your encoder may run as fast as 8MHz, you must be sure the circuit you choose is also this fast.
    The other solution is to eliminate the noise which is causing the counter to trigger falsely. THis can be a very interesting problem to solve. Please look a this NI link:
    Field Wiring and Noise Considerations for Analog Signalsv
    http://zone.ni.com/devzone/conceptd.nsf/webmain/01​F147E156A1BE15862568650057DF15?opendocument
    Follow these instructions very carefully.
    Also, this book is helpful to explain noise and how one may reduce it.
    From Amazon.com you can get Grounding and Shielding Techniques, by Ralph Morrison.
    http://www.amazon.com/exec/obidos/ASIN/ 0471245186/104-3492923-2811911
    Be very careful how you wire the circuits. Try to use only one ground point.
    The worst source of noise can be the motor and drive that spins the encoder. Be particularly careful in wiring this apparatus. A simple solution can be to use an air powered motor insted of an electric motor.
    Good luck,
    Mike Ross

  • 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

  • Quadrature encoder with PCI-6259 DAQ board (driver for QNX)

    where can I find any example for connecting Quadrature Encoders with M Series DAQ Boards ?
    The only more or less suitable example I found in nimseries DDK, is
    "Count pulses from an external source using an external signal to control
    the count direction" (nimseries\Examples\gpctex2.cpp).
    But this example is not working correctly with Quadrature Encoders
    (encoders with  two shifted on 90 degrees phases A&B).
    i.e. in case of using this example code I get some extra count while encoder is on vibrant motor
    what means enums
    typedef enum {
           kG0_Up_DownHardware          = 2,
           kG0_Up_DownHardware_Gate     = 3,
    } tG0_Up_Down;
    and
    typedef enum {
           kG0_Encoder_Counting_ModeId          = 1,
    } tId;
    in (nimseries\ChipObjects\tTIO.h) ?
    What initalization procedure I need to work with Quadrature Encoders?
    I have PCI-6259 DAQ device
    and I'm writing programm under QNX6 operating system

    Hello alexey_3269,
    If you want to read a quadrature encoder start with gpctex1.cpp and follow the thread.
    I give you my code:
    BEGIN CODE
    ==========
    boardGpct->G0_Mode.writeG0_Load_Source_Select(tTIO​::tG0_Mode::kG0_Load_Source_SelectLoad_A);
    boardGpct->G0_Load_A.writeRegister(InitialCount);
    boardGpct->G0_Command.writeG0_Load(1);
    boardGpct->G0_Load_B.writeRegister(0);
    boardGpct->G0_Load_A.writeRegister(0);
    boardGpct->G0_Input_Select.setG0_Source_Select(9); //see above for choices, PFI8=9, 100 kHZ=18
    boardGpct->G0_Input_Select.setG0_Source_Polarity(1​); //0=CCW, 1=CW
    //If using 80 MHz timebase
    boardGpct->G0_MSeries_Counting_Mode.writeG0_MSerie​s_Alternate_Synchronization(1);
    boardGpct->G0_MSeries_Counting_Mode.setG0_MSeries_​Encoder_Counting_Mode(3);  //3 for X4 encoder counting
    boardGpct->G0_MSeries_Counting_Mode.flush();
    //Enable Input Pins
    boardGpct->G0_MSeries_ABZ.setG0_A_Select(9);  //PFI8=9,
    boardGpct->G0_MSeries_ABZ.setG0_B_Select(21); //PFI10=21
    boardGpct->G0_MSeries_ABZ.setG0_Z_Select(10); //PFI9=10 
    boardGpct->G0_MSeries_ABZ.flush();
    boardGpct->G0_Mode.setG0_Gate_Polarity(1); //invert=1
    boardGpct->G0_Mode.setG0_Output_Mode(tTIO::tG0_Mod​e::kG0_Output_ModePulse);
    boardGpct->G0_Mode.setG0_Loading_On_Gate(tTIO::tG0​_Mode::kG0_Loading_On_GateNo_Reload);
    boardGpct->G0_Mode.setG0_Loading_On_TC(tTIO::tG0_M​ode::kG0_Loading_On_TCRollover_On_TC);
    boardGpct->G0_Mode.setG0_Gating_Mode(tTIO::tG0_Mod​e::kG0_Gating_ModeLevel_Gating); //kG0_Gating_ModeGating_Disabled
    boardGpct->G0_Mode.setG0_Gate_On_Both_Edges(tTIO::​tG0_Mode::kG0_Gate_On_Both_EdgesBoth_Edges_Disable​d);
    boardGpct->G0_Mode.setG0_Trigger_Mode_For_Edge_Gat​e(tTIO::tG0_Mode::kG0_Trigger_Mode_For_Edge_GateGa​te_Starts_TC_Stops);
    boardGpct->G0_Mode.setG0_Stop_Mode(tTIO::tG0_Mode:​:kG0_Stop_ModeStop_On_Gate);
    boardGpct->G0_Mode.setG0_Counting_Once(tTIO::tG0_M​ode::kG0_Counting_OnceNo_HW_Disarm);
    boardGpct->G0_Mode.setG0_Reload_Source_Switching(t​TIO::tG0_Mode::kG0_Reload_Source_SwitchingAlternat​e);
    boardGpct->G0_Mode.flush();
    boardGpct->G0_Command.setG0_Up_Down(tTIO::tG0_Comm​and::kG0_Up_DownHardware); //kG0_Up_DownSoftware_Down
    boardGpct->G0_Command.setG0_Bank_Switch_Enable(tTI​O::tG0_Command::kG0_Bank_Switch_EnableBank_X);
    boardGpct->G0_Command.setG0_Bank_Switch_Mode(tTIO:​:tG0_Command::kG0_Bank_Switch_ModeGate);
    boardGpct->G0_Command.flush();
    boardGpct->Interrupt_G0_Enable.setG0_TC_Interrupt_​Enable(0);
    boardGpct->Interrupt_G0_Enable.setG0_Gate_Interrup​t_Enable(0);
    boardGpct->Interrupt_G0_Enable.flush();
    END CODE
    ========
    I hope this code is appropriate to you.
    FV1234

  • 15 T quadrature encoder with NI 9401

    Hey,
    I have a 15 T encoder  with 1024 pulse/rev and I have it hooked to a 9401 daq to measure angular displacement. I was having issues with the signals reaching the threshold value of .8 V for the daq so I ran channels A and B through a bang bang control circuit. Now, the daq reads the signals, but only counts up. I scoped the channels and it looks like the pulses are not 90 degrees out of phase. I removed the channels from the circuit and they are still perfectly in phase. Is there a good way to get labview to add a 90 degree phase delay to only one channel? I'm running a two-channel pulse count with no Z channel.
    Thanks a ton,
    Wyatt

    Problem solved, but now there is noise from the wind tunnel affecting the encoder signal. They are not wired to the same power source though and I'm sure it isn't vibrations from the wind tunnel because the noise occurs even when I drive the motor at 1Hz.

  • Quadrature encoder with a non-NI board

    I am attempting use an encoder with a non-NI board (Measurement Computing) and I am unsure how to interface the encoder output from the board with LabView. I have the VIs for the board which allow the board to interface with LabView,. I essentially need a VI to decode the quadrature, the ones in the tutorials were not very helpful or insightful.

    Hello Mystery,
    Take a look at the section “Velocity and Acceleration Calculations” in this devzone.  While the article itself applies to CompactRIO, the equations used in the above section can help you determine how to convert the counter output into a velocity measurement. 
    Does the counter value increase when you rotate the encoder in one direction and decrease when you rotate in the other direction?  This is essentially position measurement.  By knowing the number of ticks per revolution as well as the starting position of the encoder, you can determine the current rotation position.  For velocity, there is a little more to the measurement.  The concept relies on taking a counter measurement in a periodic manner.  Then you can use the number of encoder pulses that have occurred over that period of time to calculate velocity.  The document I linked about shows how to convert the number of encoder pulses over a fixed period of time into RPM which can be later converted into angular velocity.  Hope this helps. 
    Regards,
    Browning G
    FlexRIO R&D

  • 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

  • Measure separation between two signals that may be coincident

    Hi
    I need to determine the time period between two pulse signals. I'm going to assume for now that I can get these pulses as TTL.
    I was initially drawn to the 'Two-Signal Edge-Separation' method using two counter inputs. However, it's quite possible that the signals would be coincident some of the time. Could anyone please answer the following questions:
    If my signals were coincident, would the 'two-signal edge-separation' measurement be armed on the edge of signal 1 (= same time as edge of signal 2) and continue counting until the next edge of signal 2 as shown below? Or is it re-armed on the next edge of signal 1?
    Is there any other method I could use to log the time between my two pulses? Either as simultaneous counter outputs or something completely different (non-counter method maybe)?
    (Probably not relevant at this stage, but I will be using Measurement Studio to implement this - hardware as yet unselected).
    Thanks in advnace for any help.
    CAS
    Solved!
    Go to Solution.

    Hi CAS,
    The count is not re-armed on the next edge of signal 1 using the two-edge separation mode.  Once the counter is armed the first time, it will continue counting until signal 2 is detected.  
    Alternate Approach 1:
    If you want the count to reset on every edge of signal 1, you could configure an edge count task (counting the internal timebase) using signal 1 as the count reset terminal and signal 2 as the sample clock.  You still would have uncertainty of which signal is detected first if they occur at precisely the same time, so your measured result might be close to 0, or it might be close to 1 full period of the signal in the case that signal 1 and signal 2 are identical.
    If you wanted to remove this uncertainty, you can actually delay signal 2 by enabling the PFI filter for the signal 2 terminal.  The original intent of this feature was to be able to add a debounce filter to avoid picking up multiple edges on transitions, but a result of the implementation is that the signal is delayed by some amount of time (between the pulse width guaranteed to pass and the pulse width guaranteed to not pass).  The best case scenario would be X Series using the 100 MHz timebase, you would add 10 ns of jitter but you could delay the signal by an arbitrary amount.  So, you can add the delay and account for it in your reported values, but you would run into problems if the delay caused signal 2 to occur after the 2nd edge of signal 1 (i.e. if the signals were already close to 1 full period apart).  You'd have to have an idea of the maximum frequency of the signals as well as the maximum delay between them to determine if this would work or not.
    Alternate Approach 2:
    You could use two counters configured as edge count tasks.  Count the fastest internal timebase.  Sample the first counter off of signal 1, and the second counter off of signal 2.  If you arm the counters together and ensure that signal 1 and signal 2 start at the same time, then you can simply subtract your buffered samples of counter 1 from your buffered samples of counter 2 to get an array of differences.
    There are a number of other ways you could get similar results, but I think the above 2 suggestions are probably the easiest to implement.  Alternate Approach 1 has the advantage of still only requiring 1 counter and you don't have to worry as much with arming the counters and starting the sampling together (which could be a problem with Alternate Approach 2 if signal 1 and signal 2 are free-running).
    I would recommend X Series DAQ for this task for the following reasons:
    The count reset feature mentioned in Alternate Approach 1 is only currently available on X Series and 2nd Generation cDAQ.  It will hopefully be added in the somewhat near future to M Series with a driver update but I can't make any guarantees.
    The 100 MHz timebase on X Series gives a 10 ns resolution to your measurement.  M Series and cDAQ use an 80 MHz timebase (12.5 ns resolution), and E Series uses a 20 MHz timebase (50 ns resolution).
    X Series have the most flexible digital filters on their PFI lines and the PFI filters introduce the lowest jitter (compared to M Series and 660x that is--E Series devices do not have digital filters at all).
    You didn't mention what frequency you would be using, but X Series have on-board FIFOs which will help you avoid errors from samples being overwritten if your external frequency is relatively fast.
    X Series are priced similarly to their M Series equivalents.  All X Series have the same counter features with the lowest cost X Series being the PCIe-6320.
    Best Regards,
    John Passiak

  • Using PCI-6025E with quadrature encoder.

    Hi,
    i'm presently trying to figure out if i can use the PCI-6025E Card to count up/down with a quadrature encoder with no additionnal hardware. I know my answer lies in a document called "Using Quadrature Encoders with E Series DAQ Boards document " but it is not presently available on the ni website.
    Can any1 either confirm me that i can do this or send me the document?
    Thank you,
    Max

    This link seems to confirm that you can
    Link
    Randall Pursley

  • Programming quadrature encoder

    I'm trying to program a incremental optical encoder with nidaqmx 7.4, with C#, using the PCI-6071e card. I want to measure position, velocity, and acceleration.
    As per the "How Do I Use a Quadrature Encoder with My Data Acquisition Board?" document, channel A of the encoder is connected to ctr0_source, channel B is connected to DIO6, and index is connected to ctr1_source.
    I'm trying to run the the MeasAngularPositionBuffered_Cont_ExtClk example. However, an exception is thrown when calling myTask.CIChannels.CreateAngularEncoderChannel.
    The messagebox says "Selected physical channel does not support the measurement type required by the virtual channel you are creating. Create a channel of measurement type that is supported by the physical channel, or select a physical channel that supports the measurement type"
    Also, there is an option in the example program to enable the Z index. How does that program know which channel to read the index pulse?
    I'm new at data acqusition, so any other hints regarding optical encoders are appreciated.
    Thanks,
    Gerry

    You also may be able to measure position using the "Count Edges" measurement with an external direction control. This may be enough for your purposes. Just bear in mind that quadrature encoders typically give off noisy signals, so you might have to build an external circuit to clean up the input signals. Let me know if you need more information on doing this with your E Series device.
    gus....

  • How to find the phase difference between two signals using Hilbert transform

    hi, 
        I am new to LabView.... I am trying to find phase difference between two signals. I sucessfuly found out the phase difference between two predefined waves using single tone measurement. .... But I really want to know how can I measure phase difference between two signals( not predefined... ie we don't know the initial conditions) using hilbert transform or any transformation techniques (without using zero cross detection).. I tried by using hilbert transform based on algorithm... bt I am getting error.... plz help me
    Attachments:
    phase_differece.vi ‏66 KB

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • 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

  • Quadrature Encoder measurements with PXI-6143 S-Series DAQ

    Has anyone used a S-series PXI-6143 DAQ to take encoder position measurements? I believe there are 2 counters available, if you have any examples of how to access and read from these counters it would be greatly appreciated.

    Hi Bentup,
    Measuring a quadrature encoder on your device is actually going to be a bit different than on an M series device.  The STC-2 chip, which is used in the M series, allows for A and B inputs specifically for encoder signals (used in the Angular Encoder task).  The original STC-1 chip which is used in E series and most S series boards (including your 6143) does not have these same inputs.  Instead, you may must a Count Digital Events task (taking advantage of the up/down line of the counter).  The Angular Encoder task is not supported on STC-1 devices.
    The article that lab_boy linked earlier actually mentions how to use an encoder with an E series device once you scroll down a bit (here's the link again).  This same procedure should apply to your S series--connect the A output of your encoder to the source of the Counter (this is the signal that you are counting).  Connect B to the up/down line of the counter (P0.6 and P0.7 for counter 0 and 1 respectively). 
    The downside with this method is that it is more susceptible to vibrations or noise on the encoder lines. If this is a problem for you, you can look into an external encoder conditioner like the one mentioned in the article.  I hope this helps!
    Best Regards,
    John
    John Passiak

Maybe you are looking for

  • Customizing tables not asking for Customizing Request while saving data

    Hi, I have some customizing tables in my development server (Delivery Class = 'C'). These always used to ask for a Customizing Request whenever data was saved in them. Suddenly, I have noticed they are no more asking for any Customizing Request. I cr

  • Itunes problems with Vista

    Has anyone run into a problem with Itunes not being able to play audio tracks from cd, and not able to import from a cd? (Using Vista Ultimate)I can play existing audio files, but not from a disc and it won't import. I have tried uninstalling vers. 7

  • Use a MacBook as a combi Keyboard/Mouse/Monitor?

    Hi, I was just wondering if it is possible to use a lets say MacBook Air as a monitor, keyboard and mouse/trackpad for another Mac via thunderbolt or something?

  • Can't access my widgets on 10.9.4 - what to do?

    can't access my widgets on 10.9.4 - what to do?

  • Page protection in smartform not working

    Dear All, I have a smartform with one page. For a range of order numbers multiple pages would come in output. Example : 5 order numbers , 5 page output. There is a header part, that has to come on each page which is hard coded i.e company name . when