Measure rpm and PWM signals using digital input of NI9401 module

Hi, is there a simple way how measure rpm (to 5000 rpm) and PWM (about f=3kHz) signals using digital input of NI9401 (ultrahigh-speed digital I/O)  module plugged in NI 9172 ?  I will wellcome any suggestions and VI examples (bether still). I'm begginer using LView 8.2. I apologize for my poor English. Many thanks.

Hi CUA,
Since you have already the right tools, you just need to get started with the software. The NI-9401 will give you access to the counters that are inside the cDAQ chassis 9172.
You need to place the module in slots 5 or 6. You can read in how they work and how to configure them in the counters section of the user guide found here.
Now to measure rpm, you can either measure the period of the signal (seconds) and multiply by 60 to have minutes and the number of ticks per revolution. You can find a shipped example to read period called “Meas Dig Freq-Buffered-Cont-Large Range 2 Ctr.vi” found under Hardware Input and Output » DAQmx » Counter Mesurements
To measure PWM, it is similar procedure and you can read the semiperiod (high time or low time). There is also a shipped example called “Meas Semi-Period.vi” found under the same location.
There is great information for these kind of task at this page or just post back if you need to.
Hope this helps.
Gerardo O.
RF Systems Engineering
National Instruments

Similar Messages

  • Generating PWM signal using Signal Express

    Hi,
       Would anyone help in generating PWM signal usinf Signal Express 2.5.1.   I am using a cDAQmx and connected NI 9472 to the slot number 6 to output the PWM signal. Also I have connected a NI 9421 to the slot number 5 to acquire the PWM signal, so that I could verify the signal.
       So would you please let me know how could I generate a PWM signal using Signal Express without any LabVIEW Programming. Please help me out.

    HI Aamruth,
    I atached a project, where you can see how to do it. I hope this helps.
    Regards, Mona 
    Attachments:
    PWM.seproj ‏29 KB

  • How can i measure the time between two successive rising edges ,using digital input ..

    Hello
    I'm trying to measure the time in seconds between each two successive rising edges on a digital input .
    Till now I have managed to detect the rising edge ,increment a counter with each rising edge ,and snap the time at which the rising edge happenned
    all I need now is to subtract the current rising edge time from the previous rising edge time in order to calculate (T) which can be 1/frequency and display it in realtime to the user.
    but I don't know how to do this
    Can somebody please help me !!!
    note: the time that I'm measuring ranges between 200 ms - 2 seconds
    Solved!
    Go to Solution.
    Attachments:
    Counter without time.vi ‏11 KB

    Cheers for that. It's always a good idea to post your SubVIs as well - the problem could be in one of those.
    To help you out:
    You already know how to use shift registers so why not use one again for time? Create a new shift register for  the time then simply compare the "rising edge time" to the the previous time stored in the shift register and then write the new time to the shift register.
    Just a few other pointers:
    1. You'll want to initialise your shift registers ie wire a constant to the left hand register outside of the loop. This will cause the register to be reset each time the program is run. This is so that your counter will start from zero each time you run your code.
    2. You don't need to use the "greater than?" compare function with boolean as they can only be true or false (1 or 0)! The "Equal?" function is what you should use here.
    3. Lastly, it's a small thing but you can use the same tunnel that feeds into a case structure in each of the cases - no need to create two tunnels for the true and false cases, use the same one.
    -CC
    "If anyone needs me, I'll be in the Angry Dome!"

  • How can I measure the time between each two successive rising edges ,using Digital Input ?

    Hello
    I'm trying two measure the time in seconds between each two successive rising edges on a digital input .
    Till now I have managed to detect the rising edge ,increment a counter with each rising edge ,and snap the time at which the rising edge happenned
    all I need now is to subtract the current rising edge time from the previous rising edge time in order to calculate (T) which can be 1/frequency and display it in realtime to the user.
    but I don't know how to do this
    Can somebody please help me !!!
    Solved!
    Go to Solution.
    Attachments:
    Counter without time.vi ‏11 KB

    Woah!  
    Sorry Apok, but your code is becoming way too complicated/messy. I don't think that all of those shift registers or boolean conversion/operators are needed at all.
    If you want to measure the timing between two button presses then this is a different (much less complicated) way. It simply records the timing of the button press into a shift register then compares the two.
    Spoiler (Highlight to read)
    Of course this is a very quick and basic solution just to show you that it can be much simpler than you are making it (remember to use the mechanical actions of the buttons to get the behaviour you want).
    A better way would be to use an event structure looking at value changes of the buttons to determine the timings between clicks.
    -CC
    "If anyone needs me, I'll be in the Angry Dome!"
    Attachments:
    Time between clicks.vi ‏9 KB

  • Transmit/Receive Manchester signals using digital output of PCI 6224

    How can a manchester signal be transmitted and received using the DIO of the pci 6224 board?
    I want to create a NRZ manchester signal on a digital ouput channel and then have the ability to receive and interpret the same type of signal on a digital input channel.
    Any assistance would be greatly appreciated.
    Solved!
    Go to Solution.

    Hi VJohnson,
    You might find this discussion forum post useful.
    Looks like LabVIEW does not have Manchester coding/decoding built in, but it should be do able in your VI by replacing every element with the corresponding two elements, and using double the baud rate as your clock rate.
    Thanks
    Scott M.
    Applications Engineer
    National Instruments

  • How can you tell how fast you are sampling when using digital inputs to the PCI6014

    i am currently sampling information via th edigital inputs of teh PCI6014. However in order to perform FFT and even to use the "Amplitude and Phase Spectrum vi" i need to know my sampling rate so that i can wire this constant to dt.i have attached the Vi that i created as well as some sample data. can you please help me to configure it such that i obtain a correct display of amplitude and phase. thanks
    Attachments:
    DISPLAY3 ‏40 KB
    proper_sampling_at_1Hz.txt ‏1 KB

    Hello,
    Thanks for contacting National Instruments.
    I found some information that I feel will help you to calculate the sampling rate, so that you'll be able to use this constant in your VI. Please see the link below.
    http://digital.ni.com/public.nsf/websearch/5782F1B396474BAF86256A1D00572D6E?OpenDocument
    I hope this helps you. Please let me know if you need any further support. Have a great day!
    Regards,
    Joe Des Rosier
    Applications Engineering

  • Use digital inputs to choose inquiry sequence?

    Hello,
    Is it possible to use a couple of the NI-1456 CVS TTL Digital Inputs to select which specific Inquiry Sequence should be ran?
    I currently own NI Vision Builder for Automated Inspection.  I do not own LabView.
    I am using a NI-1456 CVS and firewire camera.  My solution will use the NI-1456 CVS stand-alone.  It will not be connected to a VGA monitor, or to a computer.  I intend to use the system to detect flaws in silicon wafers.  Due to several possible wafer sizes and shapes, I will have to develop an Inquiry Sequence for each wafer type.  I would like to have the NI-1456 CVS unit contain several Inquiry Sequences.
    -Rick

    Hi Rick -
    Actually, this is a very commonly used feature of VBAI!  From the Configuration Interface, choose Tools»Configure Inputs/Outputs.  This will pop up a settings window for the entire inspection process.  The second state (called "Change Inspection?") allows you to configure a Product Selection port.  The digital byte written to this port will determine which inspection script to run.  From the listbox, you can choose NI CVS/IMAQ IO Product Selection to use your CVS's digital input port for this feature.
    More information about this feature can be found int he NI Vision Builder for Automated Inspection Configuration Help, under the following index: Vision Builder AI Tools»Configuring Inputs/Outputs»NI CVS-1450 Series I/O.  Note that the ISO inputs are used for this feature, not the TTL inputs.
    David Staab, CLA
    Staff Systems Engineer
    National Instruments

  • Joe Meek Twin Q Pre-Amp and Elite Pro SPDIF/Digital input probs

    Hi. I'm wondering if anyone can help. I've just purchased a Joe Meek Twin Q Pre-Amp and I specifically bought it for a new Rode mic I've just got and it needed phantom power. I also paid a little extra for the digital 'outs', thinking I could take an optic or SPDIF out into the Elite Pro breakout box. The problem is, is that digital is not recognised at all - in Audio Codes it states it's an invalid signal. However, SPDIF is recognised saying it's a stereo signal at 48,000hz, but is only being 'heard' in my right channel.
    I have tried the line out into Line In 3, and there's no problem there. Joe Meek representative said it should be working as long as the bit match is the same in both units, which as far as I know is. Am I missing something here? I'm awaiting Creative to get back as it seems to me to be a breakout-box hardware problem, but I could be missing something?
    Does anyone have any experience and/or advice/info?
    Thanks in advance

    Well, since you're not getting response, let me see what I can do.
    I think you're saying the optical connection isn't working, but the coax (SPDIF) one is working, and then you're only getting the mic signal on one channel. The second part is easy to explain, but I never remember the solution suggestions. TOSLink/SPDIF, essentially, are stereo signals, and your preamp is simply putting its channel 1 signal on one side and its channel 2 signal on the other. If you had a second mic connected to the other connector, you'd have one mic on the left channel and the other on the right channel. Basically, you need to treat it as a mono signal and then either pan it into the stereo field, or just duplicate (convert) it to stereo. I'm sure there are ways, but someone else needs to join in with some experience. I'm not sure, but it seems to me if, say, you've put the mic in the channel 1 connector, you could take the channel 1 (analog) output and patch it into the channel 2 line input, and your digital outputs would probably get you the mic signal on both sides.
    On both devices, the TOSLink/SPDIF signals are, to the best of my understanding, basically the same thing in two forms. If one is working, than the other should be working too. That suggests to me either hardware brokenness in the preamp's optical out, or the Elite Pro's optical in. or a problem with the optical cable. CL's optical outs can be checked to see if they are putting out red light: if they aren't, there's a problem. That probably applies to the preamp, in this case. You can simply connect the Elite Pro's optical output to its optical input and record something from the digital input device. If that works, the cable and the digital input are probably OK, and it most likely the preamp's digital output is broken (although it could be a strange compatibility issue). If it fails, then it's most likely either a bad cable, or the Elite Pro's optical input is broken. Trying another cable, or some other piece of gear you have that outputs optical, ought to sort out which it is.
    -Dave
    [email protected]

  • Generating 0 and 1 signal using labview Daq card

    Hello,
    I’m working on a Project on the On/Off control of a pneumatic cylinder via a 5/2 solenoid valve.
    On State: Valve  O/P  1 pushes cylinder  İ/P 1
                     Value  O/P vents air.
    Off State: Valve O/P 2 pushes cylinder  İ/P 2
                       Value O/P 1 vents air.
    By this way we aim to move the clinder forward and back.
    We use Labview 9.0. I did not work on pneumatic system before,
    I will be happy if you could help me about  2 points.
    1)      How can we  enable the On/Off switching  between the 2  O/P’s  of the solenoid ?
    2)      How can we enable the timing between On and Off States. ( On: 0-5 seconds Off: 0-5 seconds )
    Do we need special code for Standard labview blocks will be OK ?     
    Thanks a lot.

    The digital out are a great place to start, however they are signal lines which means they don't drive a lot of current (~1mA). If your device isn't setup to accept digital signals you may have to use an external transistor to step up your amperage. See the link on here to get started 
    Labview can provide all the timing you need. I would search through the shipping examples (Help >> Find Examples) for digital output examples, there should be a bunch and one will probably work for you with just a little modification.
    Jesse Dennis
    Design Engineer
    Erdos Miller

  • How can I measure coherence between EEG signals using labview?

    well, I have an EEG signal(a matrix 16X8498)whose lines represent the channels and collums the samples. The last line is the stimulus channel. I would like to know if I can measure the coherence between my EEG channels(lines)using labview.If,yes,is there someone who has the block diagram?

    Search the Labview help for coherence and you'll find several functions (in Labview 6.1 Full Development System). The functions are in the palette Analyze >> Waveform Measurements >> Frequency Response Function (Mag-Phase) or (Real-Im).

  • Export pdf and save as using digits.pdf eliminating all the text characters from the source file.

    Hi all,
    Usually when we export pdf from indesign or whatever software,,, the pdf file naming will be as per source file...
    eg.,  123456_dfdfjljf_ULCC.indd will be exported and saved as 123456_dfdfjljf_ULCC.pdf.
    my request is "the pdf should be saved as 12345.pdf avoiding all the characters following first digits.
    hint: first digists may be more or less than 4 digits....
    My request is any number of digits should be saved as 23232.......pdf and avoding the following characters.
    please help me... i have hell lot of pdf to export from indesign.......
    thanks
    bobylon.

    There is no "whatever" here - when you export from InDesign or other software each piece of software makes its own naming decisions. It isn't an Acrobat or JavaScript thing at all.

  • Starting and stopping timer using external inputs interfaced with labview

    hello,
    I have trouble finding how to start and stop the timer using external voltage or current pulse. we are interfacing a circuit to labview. so for that we need to count the time it takes between the two external voltages. We have to keep on comparing the voltages to some reference voltage. And when the external voltage crosses the reference voltage we have to start the timer and again we have to stop the timer using tha same logic. We need it for time calculation between the triggers.
    hope you can help.

    https://decibel.ni.com/content/docs/DOC-23334 is agood example to start. You need to modify it to include stop trigger.

  • Trying to create a latching push button using digital inputs

    Hi everyone,
    I'm writing a program to control a motor with 3 push buttons, Up, Down and Stop. I want the Up button to latch when pushed and delatch when Stop or Down are pushed. I've tried the Resettable Latch.vi example program from this website but no luck. It seems like the output  from the AND gate is indeterminate. I've attached my program, Any help would be great! Thanks
    Solved!
    Go to Solution.
    Attachments:
    LatchAttempt.vi ‏140 KB

    Use Index Array to get the single boolean you want from the array.  If you don't wire an index it will give you element 0.  Using this you could have all the switches wired to different pins of the same register on your DAQ device.  Then you could read one byte and sort out which bit does what.  You also need to build the individuale booleans into an array before writing to the DAQ.  Here's a quick example:
    You need to decide which button sets which bit.  I haven't checked the logic of your latch algorithm yet.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

  • How to measure RPM using digital I/O

    Please tell me how to measure RPM using Digital Input or please give me a code for this.

    You probably aren't going to find anyone to just give you code. Especially because you don't specify the hardware you're using. Doing this on FPGA is different than using DAQmx to do it. With FPGA you count pulses over a specified time. Using boolean logic from the digital DI node is a common way but there are others. (if you are using FPGA I can draw up an example, but I believe there is one on NIs website if you search google for it),. Then, if you want, you can run the data through an IIR filter, especially if you have a low resolution or slow moving encoder. Either of these conditions can result in very large difference of RPM even if the actual speed is not varying much (if you need an example why I can provide more detail, but some simple math calculating RPM should explain this. Obviously lower resolution will giv eyou less accurate results).
    If you use DAQmx you can set up a frequency task and it will return the number of pulses in a specified time frame; then you can convert this to RPM based on your encoder resolution and take the same steps of running it through a filter to smooth it out if need be.
    CLA, LabVIEW Versions 2010-2013

  • Can source and gate used to measure 2 signals using one counter?

    I have one PCI 6602 card to measure measure the frequency. PCI 6602 has 10 channels, in which channel 5 and 10 doesn't have 'source' terminal.
    We have to measure frequency from 16 signals using one PCI 6602.
    From channel 1 to 4 and 6 to 9, we have 8 'Gate' and 8 'Source' terminals.
    We have connected 16 signals to these 16 terminals.
    At any given point of the time we want to measure either 'Gate' signals(8) or  'Source' signals(8).
    Can any provide any guidance to make a program in labview to measure frequency (period) as per above given points?
    Regards
    Vijay

    Hello Vijay,
    It takes one counter for each digital frequency you want to measure and the PCI-6602 has 8 counters total.  This means that the maximum number of digital frequencies you can measure is 8.  If you want to measure 16 frequencies you'll need 16 counters.
    Single counter frequency measurements are made by comparing the board's time base (80 MHz) to an external frequency.  The board counts the number of time base periods that occur during one period of your incoming frequency.  When you configure the board to take a single counter frequency measurement the card routes the time base to the source of the counter and then you connect the frequency you want to measure to the gate of the counter.
    Here are a couple of articles that explain how these measurements are taken and calculated.  (The second article is on period measurements so for frequency measurements you measure period and take the inverse):
    Making Accurate Frequency Measurements
    Period Measurements with a Counter
    There are example programs available in the LabVIEW example finder.  You can locate these by going to Help>> Find Examples... The examples you want is:  Hardware Input and Output>> DAQmx>> Counter Measurements>> Digital Frequency>> Measure Digital Frequency- Low Freq 1 Ctr.vi.
    I hope this explains how counters work and why you need one counter per measurement.
    Cheers,
    Brooks

Maybe you are looking for