Reading Digital Pulses from a Flowmeter

I have a flowmeter that puts out 0 to 5 VDC pulses and has a calibration factor of 50.99 pulses per CC. I do not have a counter card, but have a digital input card and an Analog Input card.
What will be accurate method to read these pulses from the flowmeter?

The Detect All Triggers.vi is not included, so I cannot tell what it is doing.
Several things may affect your results.
1. It appears that you have the DAQ assistant set to sample at 250,000 samples per second and to acquire 100,000 samples. It creates the task, configures the timing, acquires data, stops and clears the task on every iteration of the loop. The only part which needs to be inside the loop is the acquire data part. All the rest should be outside the loop. You can open up the DAQ Assistant and pull the parts out to do this.
2. The samples you acquire take about 0.4 seconds but you have a 1 second elapsed time test in the loop. It appears that you are only looking at about 40% of the data available because you do not accumulate the data while waiting for the elapsed time.
3. The Detect All Triggers boolean output which connects to the case structure where Counter is updated only allows Counter to increment once pper iteration of the while loop, maximum, regardless of the number of pulses detected in the dataset. Unless you never get more than one pulse in 400 ms Counter cannot accurately represent the number of pulses produced by the flowmeter.
4. Get rid of the local variables. The are not needed and often contribute to race conditions.
5. Learn about dataflow. The "initialization" of the chart history and local variables at the left of the diagram could occur after the while loop has started or even completed. The sequence structure in the True case is probably not needed either. Shift registers are your friend
Lynn

Similar Messages

  • Generating digital pulses from the pci 6722

    I am trying to generate signals that will drive a piezoelectric motor. I need an analog signal that I will send to an amplifier and 6 digital pulses with varying offsets. I am using a pci 6722 and was hoping to get an offsets between the digital pulses to be around 2 microseconds. I am struggling  to find the best  way to get such exact time delays between multiple tasks. Any help  would  be greatly  appreciated.

    The actual offset times is not as important as the digital pulses firing sequentially and all within the envelope of the analog signal for multiple steps.  I guess my question is less about hardware limitations, and more about how execute my desired process in Labview. My experience in Labview is pretty rudimentary and I am struggling to see how to synchronize events in labview.  We are using a BNC 2110 to output our signals, and it is my understanding that the BNC 2110 has a 1 Mhz clock.  We are trying to import that clock from our device use that to clock timed loops and we are having some difficulties with the details.  I am honestly not sure if I am on the right track.  In hopes that it might add some clarity I attached a picture of the signals we are hoping to produce.  The orange signal is our analog output.  Between times t3 and t4 we need the 6 digital triggers to switch to "on" and we need them to all switch off simultaneously at t6.  Again we are definitely willing to compromise on speed if we can use the card we already have.
    Attachments:
    waveform.PNG ‏28 KB

  • Is LabView able to read digital inputs from maxon motors controller, EPOS2?

    Hello,
    I would like to ask that if LabView is able to read any digital inputs directly from a maxon motor controller, EPOS2. As i have tried making a new VI from the maxon example VI, but the difference is that i've added a input control. But the program doesn't seems to work.
    That's why i would like to ask if LabView can read a direct digital input from the maxon motor controller.
    Thank You & Regards,
    ParkyPak
    Attachments:
    sensor.vi ‏34 KB

    Hello Parky,
    I understand now. I check on the motion controller and it is connected through USB to your computer. In term of controlling the motion controller, you are using some LabVIEW library from maxon. The photosensor is connected to the motion controller may be as a switch or as a limit switch.
    In order to read the value of the Digital input port, you may need to take a look of the libraries to check on what function call and the supported command to check the digital input port. If this is not successful, then question or referring to examples from Maxon motors would be the best.
    I hope that this helps.
    James
    - Meadow -
    LabVIEW 7.0 - 2011, Vision, RT, FPGA
    TestStand 3.0 - 4.5

  • Reading Digital Pulse with PCIe 6509

    Hello everyone,
    I'm trying to decode an Infrared signal from a remote control using the PCIe 6509, but I'm having no luck doing that. It seems that when I'm using the Change Detection VI it does generate the interrupt, but it can't produce it fast enough to create a pattern to use with the Daqmx Read VI. Does anyone know if something like this is possible? The idea is to make the PCIe 6509 generate a digital output signal for each differente key on the controller.
    Thanks!
    Kenny
    Solved!
    Go to Solution.

    The 6509 is a software timed DIO.  What you need is either a high speed DIO (like the PCIe-6535), an FPGA card (like the PCIe-7841R), or use an Analog Input on a DAQ board and process the data.  The FPGA boards require LabVIEW FPGA and are on the expensive side, but they are very useful for waveform processing in the hardware instead of trying to process it all in a slow OS.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to safely disconnect the Reader Digital Book from the computer after using it with the Reader Library software.

    Solved!
    Go to Solution.

    WARNING: The Reader device should never be ejected under the following conditions or permanent damage to the Reader device may occur:
    NOTES:
    A data transfer is in progress
    Your computer is accessing the Reader device or compatible memory card inserted in the Reader device.
    A file in the Reader device or a compatible memory card in the Reader device is open.
    If you are not transferring any data and would like to disconnect your Reader device, click the eject button in the Reader (eBook) Library software. The message on your Reader device will now be USB connected and you can safely remove the connection or continue to charge.
    NOTE: If you have already closed the Reader Library software, you can use the Safely Remove Hardware feature of the Windows® operating system to disconnect your Reader device from the computer.

  • How can i send and receive a 2us digital pulse from Labview

    i want to communicate with a system using 2us pulse
    like if i want to send 11010100 then i will send
    |----2US----|----2US----|.............
    I      I___I       I_____________I         I______________I         I_______________________
    |----1-----|-------1-------|------0-------|--------1--------|------0-------|---------1---------|------0-------|------0-------|
    when i will send 11010100 to system the system will repond me by sending 10111001 usinf same 2us pulse as i have shown above.
    I have pci-6025E+CB 50LP connector block+Cable and LABVIEW 10 installed in my PC.
    Can this be done using NI's labview and PCI card ?
    if yes then how ?
    i m new to NI and this is my first Project using NI's hardware.

    The fastest I would trust software timing is in the tens of milliseconds.  And even then, don't count on exactness.  The software timed DIO are best used for static applications (only change every once in awhile, usually controlling a relay or the like).  From my quick search, you will want something like the PCI-6220.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Showing digital pulse from SCC-DI01 into waveform graph

    HI,
    I am trying a simple VI to read battery voltage. The problem comes when I try to connect the "data assistant" block to the "waveform block" ... it show the bad connection.
    Error mssg: you have connected two terminals of different types. The type of the source is boolean ..... the type of the sink is dobule.
    Specs: Labview 8.5.1, SC-2345 connector block, SCC-DI01 digital input module, PCI-6251 DAQ Card.
    Thanks,
    Sine

    Hi,
    If you are trying to get a measure of the volts given by you battery I am afraid you cannot use this module since it is intended for digital input/output, not analogical. However, you can still get to know if you battery is working or not. This module can detect a positive voltage as a digital 1 or zero voltage as a digital 0. Thus, when acquiring a signal with this module, all data will be represented as a boolean array. If you want to represent this signal, you can convert it to a 16-bit integer using the VI Boolean to (0,1) which can be found in the conversion palette.
    Best regards.

  • Reading digita signal

    I'm looking to write a simple program code that reads digital signal from the PXI-7350 that I'm using. Using LEDs to display the signal whether its high or low.
    Just looking for someone to point me the way on how to do this. Thanks 

    Hi odsnot,
    you can search in the Example Finder for "DAQmx". You will find a lot of useful examples.
    Mike 

  • How to uninstall the Reader Digital Book USB drivers in the Windows operating system.

    Solved!
    Go to Solution.

    Connect your Reader Digital Book to the computer.
    Click Start and then click Control Panel.
    In the Control Panel window, click System.
    The next step will depend on your operating system:
    Windows® XP operating system:
    Click the Hardware Tab and then click the Device Manager button.
    Windows Vista® and Windows® 7 operating system:
    In the left pane, click Device Manager.
    Click the plus sign in front of Universal Serial Bus controllers.
    Click to select USB Mass Storage Device.
    NOTE: If there is more than one USB Mass Storage Device in the list, you can determine which one is the Reader device by disconnecting and then reconnecting it from the computer. When you do this, make note of which device was removed and then added to the list.
    On the menu, click Action and then click Uninstall.
    In the Confirm Device Uninstall box, click OK.
    Disconnect the Reader Digital Book from the computer.

  • How can i Read a book from my Mac (digital editions) to my iPad 2

    How can i Read a book from my Mac (in digital editions) to my iPad 2

    iPad's aren't supported by ADE.  Some folks have been able to use iTunes to
    do the transfers, and others have used Bluefire reader.
    ===================

  • How to read a barcode from a digital camera into labview

    Hello All,
    Ive been working on a barcode reader project. My employer wants to create a barcode reader which rather than using a scanner would acquire the barcode using a digital camera/usb camera. The little that i know till now suggests that there are certain barcode series that labview can automatically read itself once the image has been acquired. We just need to acquire the image the correct way and then the labview will read the barcode from it and the information stored in the barcode will be generated from the hard drive of the computer.
    P.S. My concepts might be way off the actual theory. Please bear wimme if im lost. 
    Regards
    Asad Tirmizi
    Design Engineer
    Institute of Avionics and Aeronautics
    " Its never too late to be, what u want to be"
    Using LabVIEW 8.2

    Hello All,
    Courtesy to AdnanZ i was able to understand the basics of reading the barcode. I downloaded the Vision toolkit from Labview and used the barcode example that comes with it. I have understood the VI except for the ROI part and there are certain more issues that i need to resolve in it before i proceed .
    Please find the VI attached, I have also attached the image of VI block diagram. My queries in the order of there urgency are as under.
    The problem starts with the ROI part. If you see the second flat sequence structure. The example sets the Region of Interest by using a property node and feeding it with a string array. There is also a waveform data type array feeding the "ROI color" part of the property node. Property nodes are there to set or get characteristics of certain types of data. I cannot understand its purpose here. Moreover how can i set the Region of interest according to my own liking. I can see a relation between setting the ROI and the values in the arrays. But by which criterion are these values set. Is it with hit n trial.
    The code works perfect with the images stored as default in the example. But when i tried to add up my own images of barcodes downloaded from internet. It wasnt able to detect those barcodes. The code bydefault reads EAN-13 barcodes. I  downloaded a few EAN 13 barcodes from the internet and fed them into the folder from which the program reads. But that dint happen. I think this is because the ROI is not set correctly. Though i am not sure about it.
    Regards
    Asad Tirmizi
    Design Engineer
    Institute of Avionics and Aeronautics
    " Its never too late to be, what u want to be"
    Using LabVIEW 8.2
    Attachments:
    Digital Barcode Reader.vi ‏73 KB
    Barcode Framework Image.JPG ‏273 KB

  • How do I read a pulsed input on an SCB-68 counter channel?

    Hello all, I have been searching through the DAQ help and this board
    for a few hours now and I cannot find an answer that addresses what
    should be a simple problem. Let's start with hardware and software: I
    have a 6062E PCMCIA DAQmx card connected to a SCB-68 (E Series)
    connector block. I am running Version 7.1.0.306 of Measurement Studio
    for Visual Studio .NET and am coding in C#. So please, no LabView
    answers.
    I am trying to read the pulsed output of the Omega HHT-1501 Digital
    Tachometer - it outputs a TTL LOW pulse every time the sensor is
    triggered, I would like to read in these pulses and  get the
    frequency to determine RPMs.  As far as I can tell I need to
    connect the pulsed signal line to CTR0, which is PFI9/GPCTR0_GATE on
    the connector block, pin #3. I have verified that the tachometer is
    indeed pulsing correctly. I have used the DAQ Assistant to create a
    DAQmx task to acquire the frequency of a digital signal using the 1
    Counter Low Frequency Measurement method, input range is set from 1Hz
    to 1KHz, starting edge is set to falling. For Task Timing the
    Acquisition Mode is Continuous, Samples to Read = 100.
    When I run the test I get no response. And it also seems that the
    GPCTR0_GATE is always at +5V. I have tried just about every other
    combination of inputs, including using CTR1 on GPCTR1_GATE, pin 41, all
    with the same result - no signal read.
    So what is the problem? Every post or help article I have read makes it
    sound like plug and play to read the pulses but this is not the case -
    does the counter gate need to be configured as an input in either
    software or hardware? Am I supposed to have a signal set on the SOURCE,
    and if so what? And what about my ground line from the pulse source? I
    have tried attachign that to DGND, still no result, and if I attach the
    pulse signal gnd to the GPCTR0_SOURCE it causes my tachometer to lock
    up.
    This thread
    http://forums.ni.com/ni/board/message?board.id=170&message.id=34826&query.id=3937#M34826
    seems to be very closely related to what I want to do but is as vague
    as the help articles - it mentions using one of the two timebases as
    the source input - what does this mean in terms of code/wiring?
    Additionally in the NI-DAQmx help article under Device
    Considerations->Counter Signal Connections->AO/E/S Series it says
    "The count direction terminal must be tristated to use an external
    signal. Reset the device to ensure the terminal is tristated" for edge
    counting. A) Is this related? and B) how does one tristate by reset?
    Power cycling the scb-68 has no apparent effect on anything.
    I would appreciate any help on this matter, hopefully with as much
    detail as possible since the help manuals seem to be mostly useless for
    guiding one in performing any task.
    Thanks!
                       J. Slater

    Hi Shyam,
    The major factor that would come into play with the signal having some noise is that the counter is expecting a TTL signal and the oscilloscope is measuring an analog input signal. If your signal floats above the TTL thresholds or does not rise/fall within the specifications, the behavior is not predictable and it can be measured as a high or low by the counter. An oscilloscope will measure the analog signal and you may be able to measure the frequency of the noise on your scope by analyzing a smaller timeframe of the signal.
    What Is the Definition of a TTL (Transistor-Transistor Logic) Compatible Signal?
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/acb4bd7550c4374c86256bfb0067a4bd
    Steve B

  • Measurement error in reading Encoder Pulses

    I am using PCI-6601 card to read a Linear Encoder which gives 2000 pulses per mm of distance.The accuracy of the Linear encoder is 2Microns.In my application I am measuring a distance of 7mm.But the card is reading with an error of 30 to 50 Microns error.We had checked up all the factors related to mechanical and Encoder.In fact the same application was earlier working with Advantech Encoder card which has provisons to connect the A,B,A Bar,B Bar inputs from Encoder.There was an accuracy of 0 to 5Microns.But the application was replaced with NI Card because of the continuous problem of the Digital I/O Card used from Advantech.
    Mail me the possible causes and also the troubleshooting procedures for correcting the above problem

    Hi,
    What I think is happening is there might be some noise on your signal lines. The PCI-6601 counters are capable of detecting a pulse as small as 20ns. If the Advantech card can't detect pulses at that small a resolution, it might be ignoring "noisy" pulses that shouldn't be there. Are you reading more pulses than you should be or less?
    There are a couple things I might be able to suggest to clean up your signal. The counters support several different encoder modes. Try using X4 Encoders. An X4 encoder counter increments or decrements on each edge of channels A and B. Whether the counter increments or decrements depends on which channel leads the other. Each cycle results in four increments or decrements. I believe this X4 mode is more noise resi
    stant than the standard mode.
    Another thing you might want to consider is applying a filter to the input signals (debounce or deglitch filters). Each PFI line coming from the I/O connector can be passed through a simple digital filter. The filter operates off a filter clock and a fast internal sampling clock. It samples the signal on the PFI line on each rising edge of the sampling clock. A change in the signal is propagated only if it maintains its new state for at least the duration between two consecutive rising edges of the filter clock (one filter clock period). The frequency of the filter clock determines whether a transition in the signal may propagate or not.
    6601/6602 User Manual
    http://digital.ni.com/manuals.nsf/webAdvsearch/DD0DBB6404BC139886256721007CF16D?OpenDocument&vid=niwc&node=132100_US
    Hopefully one of these suggestions will do the trick. Have a good day.
    Ron

  • I need to count intermitte​nt high speed pulses from an outside source with cFP-CTR-50​2 and labview.

    I need to count intermittent high speed pulses from an outside source with cFP-CTR-502 and Labview 8.2 . I've found example code for generating pulses and creating intricate count setups but no straightforward examples of a simple counter. Any suggestions?

    Hello tinfish,
    I could not find a simple example that implements simple counting either, but it should be straightforward enough for us to try. Do you have the CTR module configured properly in MAX? If so, can you monitor the channels on your CTR 502 for input? Try connecting a square wave or some other digital pulse to the terminal to test the functionality of the counter module first (before programming). If you monitor the input channels with somethign connected you should see the count increment each time it sees a rising edge (assuming default configuration).
    Once you've verified that everything works in MAX, you can set up your CTR module in a LV 8.2 project. If you need help with this, refer to the help document (look in the "Configuring FieldPoint in LabVIEW" section):
    C:\Program Files\National Instruments\FieldPoint\documentation\Online Help\fplv.chm
    You should be able to just read a channel tag from your CTR 502 using an FP Read VI. (Simply drag the channel from your project onto the block diagram). Since counting is the default behavior of the 502, there is no special programming involved to make it work.
    I hope this helps -- if it's too high-level we can talk details about specific questions you have.  Have a good one!
    Charlie S.
    Visit ni.com/gettingstarted for step-by-step help in setting up your system

  • Why can't I read or write from my external hard drive?

    Hey there, I recently borrowed my brother's laptop to use as a media station for listening to music from, and watching movies, in order to free up some space on my main macbook.  In trying to migrate some files over, I discovered that my hard drive, a 320 GB WD Elements drive, is having some problems which I've never encountered before.  It has always worked fine in the past, but now I can't transfer any files to or from it, from either computer.  In all of my troubleshooting, I've gotten various errors, (-36, -50), and various messages saying how the device can't be read or written from, or how some files contian unreadable data, etc.
    Disk Utility found an unused node when verifying the disk, and notified me that the disk needed to be repaired.  I then used Disk Utility, which said it was able to successfully repair it, but the same problem remains, and after verifying the disk, it still says it needs to be repaired.  I've tried to find any files that may be causing the problem, and was finally able to delete a seemingly troublesome file that was stuck in my trash bin from the external drive after trying various apps, (ie Trash It, Cocktail, What's Keeping Me?).  This didn't end up solving anything...I've used terminal to eliminate some other potentially problematic files, with no luck still, and I'm not too confident with Terminal so I don't want to be messing around too much without more guidance.
    Most recently, I've used Disk Warrior to try to solve the problem, but still with no success.  When I use the app to Check All Files and Folders, it does so for only a few seconds, then reports that "An unexpected error ocurred while attempting to perform file operations" for several files, and that several files' "Property list is damaged and cannot be repaired".  When using Disk Warrior to REBUILD the drive, the app pauses for about 15 seconds, then says that it can't be rebuilt because it is in use.  Again, I've used the What's Keeping Me? app to kill any activity with the drive, and the same error occurs.
    I've spent a lot of time trying to sort this out...It's very frustrating, and I have a lot of files that mean a lot to me on my drive, so any help would be greatly appreciated!
    Thanks a lot!
    Ryan

    I have this problem too with my Western Digital 1TB My Passport for Mac.
    Downloaded Card Data Recovery - did not work. The software self terminated itself when the problematic WD is connected. Starts up fine when the WD is not connected by USB.
    Then I downloaded Remo Recovery. Starts up fine, scans fine and appears to save the files but ALL the files 'saved' are unreadable.
    Finally, downloaded Stellar Phoenix in a last ditch attempt to recover my precious video files. Starts fine, saves fine BUT it cannot save files above 200MB because the WD stops working every 10 minutes.So, did not solve my problem totally because I have so many files above 200MB.
    And yes, I PAID for all the software above. And the first two software are reluctant to refund me my money until their development team can ascertain whether it's a software bug, over online web conference. And because of the time differences, I can never get online with them. So, all my money gone.
    Until one day I opened Activity Monitor and noticed this 'fsck_hfs' starting up everytime I connected the problematic WD My Passport for Mac.
    So, tried to Force Quit 'fsck_hfs' and VOILA!
    A dialogue box popped up and says that the Passport for Mac cannot be repaired and that I can move and copy files from it but not save to it.
    PHEW!!
    At least I can access the files and save them to my Seagate 1TB although now I am having a problem opening FCP X project files rescued from the WD.

Maybe you are looking for