Digital measurement

This should be simple, but I can not seem to figure it out.
I am using a signal generator to generate a 1KHz 5Vpp (0 - 5V) signal and send it to an NI USB-6008 digital input. I want to log and view this signal.
I use DAQmx Acquire, Continuous samples, 10K samples to read, 10K sample rate. I assume this should give me a signal that looks somewhat like 10 samples low and then 10 samples high, and that the buffer should be refreshed every second.
What I get are samples that range from three samples high and three samples low to one sample high and one sample low and they are not consistent. At the very least I would expect a 50% duty cycle (as that is what I am putting in). By sampling at 10K (10 x the sampled signal) I thought there should be no problems... I even tried sampling at 100k but the results are much the same.
When I move the signal to an analog channel, it looks fine or if I tie an analog channel and a digital channel together, the analog channel looks as I would expect.
As I am new to this program, I expect I am just setting something up incorrectly, but I am having a hard time figuring out what. Any help would be greatly appreciated.
I have attached a text file of the output for reference.
Kind Regards,
Jeff
Attachments:
Digital Input - Dev1_port0_line1.txt ‏30 KB

Please find attached a screenshot of my desktop. The input is a 5Vpp 50% duty cycle 1 KHz square wave. It is connected to Digital Port 0 line 1 and Analog input line 0.
The top waveform is the analog input sampled at 5 KHz with 5k samples to read. As you can see each cycle is 1 mSec which is what I would expect.
The second waveform is the digital input sampled at 5 Khz with 5k samples to read. Here you can see the inconsistency in the waveforms. I would expect these to be 5 samples low and then 5 samples high but that is not what I am getting and I can not figure out why.
The bottom waveform is simply a power spectrum derived from the analog channel to see if there are any harmonics, etc.
Thanks,
Jeff
Attachments:
1Khz 50Pct 5Vpp.doc ‏2216 KB

Similar Messages

  • Cannot create "Digital" measuring points on Work Manager 6.0

    Hi All,
    I am attempting to create "digital" i.e. Pass/Fail measuring points in Work Manager 6.0. I can enter readings as shown below but when I execute a sync, the error message below is shown:
    I can use the same measuring point in SAP via IK11 as shown below to create a measuring document using valuation code only. However, the Work Manager requires a numeric characteristic to be added and the "no reading" checkbox to be ticked.
    Any help would be greatly appreciated.
    Thanks,
    Jonathan

    Hi Michael,
    I tried setting it up with just the two values (0-fail and 1-Pass) and I'm still running into errors. If you could take a look I'd be grateful.
    Set up code group with two values:
    IK11 allows just the valuation code to be used:
    On the device:
    As far as I can see this should work but it still creates the same error as previously. Ideally it should work as IK11 and allow the user to select from multiple valuation codes but it appears to still require a characteristic.
    One option I tried is to assign a characteristic in addition to the the valuation code and use a 0 reading. This works but is a "workaround" solution in comparison to IK11.
    Any help would be really appreciated.
    Thanks,
    Jonathan

  • How to calculate the acceleration of a digitally measured distance

    Hello reader,
    I'll try to explain my problem. I'm using a laser displacement sensor in order to measure the movement of a vibrating table (approx. 20 Hz). The controller of the sensor is connected to my COM port and I read 213 distances per second. (maximum because of baudrate).
    With this signal I want to calculate the acceleration of the table. The problem is that the signal is not 'smooth' enough (about 10 data points per period) to derive it directly.
    I was thinking about applying some kind of curve fitting and use this signal as the input for the double derivation. I have however problems with creating a proper input for the General polynomial fit.vi. Another idea was to use the Extract si
    ngle tone information.vi. This however also fails to work (yet) also.
    So my questions are mainly if someone thinks there is a much better or easier way to solve this or that someone can provide help with building what I described above.
    Many thanks in advance for your answer!
    J-M

    Hello,
    First of all thanks for your fast answer.
    I'll try to provide you some additional information:
    I expect my signal to be almost a pure sine tone, although there might be some (small) noise. Where my main problem is, is that I'm reading data through my serial port after which I convert it to a number. The main difficulty (or at least the first) is to convert these numbers into the required input for these vi's.
    (a waveform for the FFT power spectrum.vi or an array for the power spectrum.vi)
    This includes your second question: I'm afraid I'm using the asynchronous acquisition. Any ideas to avoid this?
    I'm currently using Labview 6i. I attached my current vi (it does not show all the time I'm already trying!)
    Thanks in advance fo
    r your reaction,
    J-M
    Attachments:
    Distance_reading_8.vi ‏98 KB

  • Count digital events on a Counter with pci-6602 with callback on CVI

    Hi,
    I'm using a PCI-6602 card with CVI 8.5 and I need to trig on event.
    On every pulse I received, I need to do some actions like increasing a counter, send a message on Rs232 etc.. I don't want to do any loop checking that the counter value has changed. I would like to use a callback to execute this code only on the edge or counter value event.
    My problem is that I don't know which function can do this. Is there any way to get an event on a pci-6602? 
     Thanks 
    James 
    Solved!
    Go to Solution.

    Hello.
    It's completely possible to create a callback that will allow you to do what you want when a edge will occur on an external signal you define.
    To do this, you can for exemple create a counting edges task that will use one of the 6602 counters,and the set your external signal to be the source of your sample clock.You'll then be able to register a callback with the function DAQmxRegisterSignalEvent, and your callback will be called each time an edge will occur on your specified sample clock source.
    Here's 2 links that explain the events in DAQmx and how to handle them in CVI. The example ReadDigChan-ChangeDetectionEvent.pr that ships with DAQmx examples (Hardware Input and Output<<DAQmx<<Digital measurements) can be very useful to understand how to do. This example creates a signal event callback to detect change detection for digital inputs.
    Regards.

  • Writing/re​ading serial digital data

    I'm trying to figure out how to both read and write digital data in a serial fashion. Mainly, I'd prefer to be able to do so serially because I need to 16 bits apiece for both input and output, and this becomes cumbersome to do in parallel.
    Ideally, what I'd like to be able to do is have a 16 bit unsigned integer as input, convert to a boolean array (or maybe digital waveform) and write this data to a single digital output channel. I have been unable to find very much useful information on how to do this, although I did find a somewhat helpful message on these forums (http://forums.ni.com/ni/board/message?board.id=170​&message.id=289673&query.id=56887). The example VI mentioned in that post (Cont Write Dig Chan-Burst.vi and similar VIs) does not work, though. When attempting to run it, I get an error message related to the DAQmx Timing:
    Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Burst Export Clock).vi:1->Cont Write Dig Chan-Burst.vi
    Possible reason(s):
    Measurements: Requested value is not a supported value for this property.
    Property: SampTimingType
    You Have Requested: Burst Handshake
    You Can Select: On Demand, Handshake
    The hardware in question is the SCB-100 for digital I/O. I'm running LabView 8.5 with DAQmx 8.7.1.
    I'd be interested in suggestions on either how to get these example VIs working properly or alternative methods for how to write digital data serially (I'm sure the reading will be easy enough once I figure out how to do the writing).

    Hi,
    The DIO communication on the 6025E is only timed through software while on the PXI-6534 (mentioned in the other post you linked to) uses hardware timing.
    Since you're limited to software timing, your communication will be significantly slower. The fastest that Windows typically controls software-timed DIO is on the order of 1kHz. However, I don't know your application, so perhaps that rate is fast enough.
    Assuming that you want to use your 6025E card, I would suggest looking at some of the digital port and channel examples that ship with LabVIEW. The example finder is under LabVIEW » Help » Find Examples. From there, navigate to Hardware Input and Output » DAQmx. There are two folders for Digital Generation and Digital Measurements, and the example finder will list the devices that support each example in the lower right. The ones that will work on your card are 'Read Dig Chan.vi', 'Read Dig Port.vi', 'Write Dig Chan.vi', 'Write Dig Port.vi'.
    Please experiment with those and use them to build the application you need. If you need further clarification, please let me know.
    Joe Friedchicken
    NI VirtualBench Application Software
    Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
    Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
    Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
    Senior Software Engineer :: Multifunction Instruments Applications Group
    Software Engineer :: Measurements RLP Group (until Mar 2014)
    Applications Engineer :: High Speed Product Group (until Sep 2008)

  • Collecting digital channel inputs

    Can I collect digital pulses on a digital input like l could on an analog input?  I need to collect 4 inputs, each with 32  5 volts pulses, within about 110 ms.  I am using a PCI-6220 card and have filled all of my analog inputs.  I have a second PCI-6220 so I could go with two devices.  I need to collect 4 channels of pulses from a motor and the engineer wants to see the pulses and save the date to file, no counting or timing needed.  The data can be zeros and fives or zeros and ones, just need to see the pattern.
    I will be collecting analog data at the same time within this time frame (finite sampling).

    Hi M.Abbey,
    For your application, you can use a producer consumer loop with a digital input in the producer part of the loop.
    To acquire the digital input signal you can use the following example:
    [Open LabVIEW] -> Help -> Find Examples -> [Browse tab] Hardware Input and Output -> DAQmx -> Digital Measurements -> Read Dig Chan.vi
    Mikhail
    RF Toolkits, Product Support Engineer
    National Instruments

  • Triggered digital read/write sequence

    Hello,
    I'm fairly sure this is impossible to do in Labview but thought I would ask the question just in case:
    On a digital falling edge I need to set one digital line on a PCI-6224 high and one low, then read sixteen lines as a port.  Next the high and low output lines should change status and then the sixteen lines should be read again. 
    The process repeats on successive falling edges.  The time between edges may be as short as 11 microseconds (90kHz). 
    We currently have a program written in C++ to do this job but I'd like to create something a bit more user friendly and have virtually no C++ experience myself.
    Thanks.
    Solved!
    Go to Solution.

    Hi Simon,
    I have an idea of how to do this using the DAQmx card.  This hasn't been tested but I believe this should work with just a few tricks with DAQmx.  There are three tasks that will be required:
    Counter Output
    ==============
    This should be a retriggerable counter task.  Take a look at the example in the LabVIEW example finder under Hardware Input/Ouput>>DAQmx>>Generating Digital Pulses>>Gen Dig Pulse Train-Finite-Retriggerable.
    1. This should generate two pulses every time the external trigger is recieved so your 11us pulses are the trigger for this task.
    2. These pulses are for each read of the digital lines so:
    Rising edge - Changed the enable lines
    Falling edge - Read the data.
    By making these pulses wide enough (>140ns) this will take care of the settling time of the DO lines.
    3. The gap between the pulses should be long enough for any delay require between reads.
    Digital Output
    ==============
    This should be a regenerative continuous output - see example Hardware Input and Output>>DAQmx>>Digital Generation>>Cont Write Dig Port-Ext Clock.vi.
    1. The clock source should be set by right clicking on the source control.  Select I/O Name Filtering and then enable the advanced terminals tick box.  Then you can select the appropriates counters internal output.
    2. You will need to set the clock edge to be the rising edge.
    3. Prime the buffer with the two outputs we require e.g. 10 and 01 then sending a pulse to the clock will effectively switch between the two.
    Digital Input
    =============
    This should be a standard continuous input task such as the example Hardware Input and Output>>DAQmx>>Digital Measurements>>Cont Read Dig Channel-Ext Clk.vi
    1.Set up the timing VI almost identically to the output task.  Same source but this time clock on the falling edge.
    2.Do with your data what you will!
    Overall Program
    ===============
    The main consideration is that you should start the counter output last as once this is running the others can start clocking data.
    I hope this helps and is clear enough.  Let me know if it makes sense or if you need more information or even any help building this program.
    Regards,
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

  • How can I use a webcam to feed live values (or even better, an average of said values over time) into a subVI?

    The values will be read from a digital measurement device, so there shouldn't be much of a problem in recognizing the fonts, I hope.
    Ideally, it'd function like this: Webcam is trained on device, and without interaction from the user, labview processes the current data every 30 seconds, converts it to a string, and averages 30-second values over a period of 5 minutes. The average is then given to a VI that would normally poll the user for a value every 5 minutes. I'm trying to close the loop on a control system, and think this is the best way to do it.

    If I understand this correctly, you would like to take a picture of a screen every 30 seconds and read some text on that screen. You can do that using the NI Vision Development Module's Optical Character Recognition function palette. This will allow you to create a set of images of each character that you expect to read. You can then train the software to assositate an image of that character with the actual digital character. In this way, the software will be able to read the text. You can read more about this concept in the NI Vision Concepts Help 2013 manual.
    Is there any other way to transfer the information from the first computer to the second computer other than using a camera to read the text off a screen? That seems like a strange way to transfer data, but it's possible that you don't have access to the code on the first computer and you can only access it from the front panel. Is that the situation that you are in?
    Take care,
    Jeremy P.
    Applications Engineer
    National Instruments

  • Is the PXIe-PCIe8361 adequate for this system? And external clock questions...

    Hi all,
    I have spent some time piecing together a system and I'd like a sanity check before pulling the trigger on this purchase.  The system will contain the following hardware:
    1. Chassis: PXIe-1078
    2. Controller: PXIe-PCIe8361
    3. 3 x PXIe-6363 (16 analog inputs each card, 32 digital inputs each card, all internally clocked @ 10kHz)
    4. 2 x PXI-6224 (32 digital inputs on one, 8 digital inputs on the other, externally clocked in "bursts" of 62.5khz)
    5. Labview software
    The three PXI-6363 cards will be responsible for  a mix of analog and digital measurements made @ 10 kHz, timed continuously by the onboard clock.
    One PXI-6224 will be clocked externally @ 62.5 kHz and will be used to collect digital data on a 32-bit port.  These clock pulses will not be continuous, but will occur in bursts lasting for 2ms every 20ms.
    The other PXI-6224 will be clocked externally @ 62.5kHz as well and will be used to collect digital data on an 8-bit port. These clock pulses will not be continuous, but will occur in bursts lasting for 2 ms at random intervals.
    My questions are:
    1. Am I planning anything that looks unreasonable for this hardware?
    2.  Should I expect issues with data transfer rates with the PXIe-PCIe8361?  I will be operating well within the advertised 110MB/s throughput of the device.  I plan to stream this method... NI Fast TDMS data streaming
    3.  I have only ever used NI cards for continuous measurements made by an onboard clock.  When I set up a task to collect data that is externally-timed, will the DAQ be expecting a "continuous" clock pulse, or will the system wait patiently for clock pulses to arrive at any rate (any rate within the spec of the card, of course)?
    Thanks, any input is appreciated.

    Hello LucasH0011
    1-As long as you put the PXI-6224  and the PXIe-6363 cards in the corresponding slots, meaning the express(PXIe-6363) in the express and the hybrid(PXI-6224) in the hybrid.
    2-I think you would  not have issues with the transfer rate.
    3-Your timing specifications sound reasonable to me, I think you will be fine. 
    Here is a document that has useful concepts for the use of cards:
    http://www.ni.com/white-paper/3615/en/
    It is for the M-Series, but the concepts apply to the X-Series as well. 
    Regards 
    Ernesto

  • How can I send audio from an application to the HDMI port on my Mac Mini while also sending the audio to another application?

    I am trying to use VLC (or any streaming audio player) and listen to a web radio station while at the same time using Audacity to monitor the CODEC's digital level.  I want to make a digital measurement of the level that the streaming radio station is using on the air.  I can calibrate the levels for maxbit by overdriving my web stations encoder and watching for clipping distortion on the decode on Audacity (waveform view).  I then calibrate the clipped value to the 0dB peak on Audacity's meters or waveform view.  I also am trying to calibrate and use the free Orban Loudness meter.  I require something like Soundflower (as others have indicated) but I find that sound flower is very unstable (or maybe mis-configured on my machine with Lion).   I think there is a clock drift issue since Soundflower works well for some number of minutes and then distortion appears in one of the outputs (either the HDMI or the feed to Audacity/Orban Loudness Meter).  I would have thought this was easy on a Mac, but as it turns out it is not.  Am I missing something here and there is a way to send audio from one application to my HDMI output and another application?

    Thanks Rudegar for the response. I was already afraid that Apple TV won't be of any help.
    Is there no solution for getting an audio-stream into the "airplay-system", e.g. by using another apple device?

  • Signal transfer for ni usb 6008

    I am trying to send signals through NIUSB 6008 to an instruments.
    I have a VI which might do the same but i am not sure as the VI has a browse switch (tasks/ ports being used), where i can select the ports (digital ports) of the NI USB. I am able to select the signals but when i run the VI the signals dont get treansferred through the NIUSB 6008.
     I am sure that the hardware connections are connected properly as i have tested the NIUSB 6008 by self testing the device and also through test panels provided in the measurement and automation software.
    I understand that it might be simple but i am new to Labview and i am still learning.
    Thank you all
    Dee
    Attachments:
    mastersproject1.vi ‏59 KB

    Hi Dee,
    Good examples to look at in LabView Example Finder are: Hardware Input and Output >> DAQmx >> Digital Generation >> Write Digital Port.vi or Hardware Input and Output >> DAQmx >> Digital Measurements >> Read Digital Port.vi
    Regards,
    Natasa

  • PCI-6254 DIO Read - Need to know how to trigger the Read operation??

    Hi,
    Can anyone help me with DIO Read operation using PCI-6254 (DAQmx)??
    here'e the breakdown of the issue i'm having:
    i'm doing a DIO Read using DAQmx drivers, and am using "one channel for each line" on the Port 0.
    i'm using another line for DIO Write at the same time...infact the DIO write sends the bit pattern
    and inturn triggers an external device, and am trying to capture the response of ext. device on
    other line thro' DIO READ...
    now, i do see the bit pattern on the Oscope, but am not reading the bit pattern using DAQmx Read?
    (i'm reading all ZEROS)
    Currently, i'm not using DAQmx Trigger? i tried using it, but was getting an error...
    i guess i need to trigger the read when the line goes high/low (for ex)
    can anyone help me with this?
    Regards,
    rkpat

    Hi rkphat,
    DIO operations on an M Series device cannot be configured for triggers. The source of the DIO sample clock must be set up for the trigger and the DIO operation should just be configured to receive that clock. You must provide an external clock or a clock generated by another subsystem, such as an analog input sample clock or a counter pulse train output, to clock digital operations. For example, if you were going to use the analog input sample clock to clock your digital measurements, you would configure your AI subsystem to receive a start trigger and to use an internal clock. Once the trigger arrives, the AI Sample clock is generated and passed to the DIO subsystem. Or if you wanted to use a counter to generate the clock, you would set the counter up for pulse train generation with a digital start trigger.
    If you post your code we can find out why the Digital Read is not returning the correct data.
    Cheers,
    Lesley Y.

  • Entradas digitales NI PCI-MIO-16E-1

    hola a todos, otra vez molestando, lo que pasa q en la escuela me encargaron un programael cual capture señales digitales (8 bits) con la tarjeta ni elvis y me las grafique en labview (version 8.2), la verdad que nunca he trabajado con entradas digitales, no se si se deben de configurar en el measurement ni como llamarlas dentro del labvieb, si me pudieran orientar o darme alguna informacion se los agradeceria mucho... gracias....

    Hola Caty
      Gracias por utilizar los foros de National Instruments. Para la programación de entradas y salidas digitales para la plataforma NI ELVIS te recomiendo los ejemplos que vienen en el Example Finder llamados NI ELVIS DIO Read.vi y NI ELVIS DIO Write.vi, adicionalmente la tarjeta la pudes programar mediante el driver NI DAQmx y comunicarte con la líneas digitales, en el Example Finder Tambien se encuentran varios programas bajo la categoría Hardware Input and Output>>DAQmx>>Digital Measurements.
     Saludos
    Carlos Pazos
    Applications Engineer
    National Instruments Mexico

  • Serial ADC Read

        Greetings. I am endevouring to read from an Analog Devices serial ADC (AD7872) using LabView and a PCI 6534 card.
    Data out of the ADC is valid on the falling edge of the SCLK output of the ADC. What I would like to do is trigger a single read of SDATA on the falling edge of SCLK. Unfortunately, I get an error stating something to the effect that the start trigger type is not supported due to requested timing type. I am having trouble finding examples that are similar to what I am trying to do, so any help with this would be greatly appreciated.
    Thank you.

    Hello Awar99,
    From my understanding you are using LabVIEW, PCI 6534 to do a single digital read with a start trigger.  I am assuming that you are using DAQmx. 
    According to the page 3 of the 6534 Specifications guide, your device does support start triggers.  I checked the device routes in MAX (Measurement and Automation Explorer) and the only signals you can use as a start trigger on your device are RTSI 1 - RTSI 6.  You can find the device routes in MAX.  Open MAX and select "My System">>"Devices and Interfaces">>"NI-DAQmx Devices">>NI PCI-6534.  Next select the "Device Routes" tab. 
    A good DAQmx shipping example to start from is called Read Dig Chan-Int Clk-Dig Ref.vi.  You can find it in the DAQmx example finder.  In LabVIEW go to Help and select "Find Examples".  In the browse tab choose "Hardware Input and Output">>"DAQmx">>Digital Measurements>>Read Dig Chan-Int Clk-Dig Ref.vi.  You can modify this VI to do exactly what you want.  For example, you can change the reference trigger to be a start digital edge trigger. 
    If this was not helpful then please answer the following questions and post your code. 
    What is the error code/# and message you receive?
    What version of LabVIEW are you using?
    What version of DAQmx are you using?
    Regards,
    Ima
    Applications Engineer
    National Instruments
    LabVIEW Introduction Course - Six Hours
    Getting Started with NI-DAQmx

  • Time between pulses

    Hi, I want to measure flow of some fluids. Sensors give a binary pulses per 10l. I made  a vi which do it but I think there is some bug in Lab view 8.2
    I used math script for this calculation . I want to use PCI 6510 as digital card for this. In my program it was used simulation for this card.
    What was a problem?
    It works correctly, but when I press in front panel in (for example) place for indicator of flow(mouse cursor) it start to calculate quickly. I am afraid this qcould be a wrong situations in application.
    How can I solve this problem??
    Thanks
    Emir O.

    Hi Emir
    Since the reading of a digital measurement from the PCI-6510 is software time base we have to get the stamps inside the while loop using one of two functions, the first one can be the “Get Date/Time in Seconds”, this function will give you the current time every time the loops runs in a date/time format. The other function is the “tick” function (see code attach) that will give you the time in milliseconds.
    Both cases you will have to save the timer value in an array with the digital value read from the card, for simplicity you can bundle the data with the timestamp into a cluster, from here a little bit of array manipulation and calculation will give you the time between pulses; this calculation has to be program by you. Always remember that since you have software timed application all these measurements are depended on how good your code is written and your computers speed. What I will suggest is to use Producer/Consumer design pattern were you read the data with the producer and make all the calculation with the Consumer.
    I will also suggest taking a look at this DevZone article since you are using a simulated device: NI-DAQmx Simulated Devices.
    Message Edited by Jaime F on 11-05-2007 12:57 PM
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters
    Attachments:
    Read Dig Port1.vi ‏31 KB
    time stamp.JPG ‏80 KB

Maybe you are looking for

  • Writing in Arabic in InDesign CS3

    A customer asked us to reproduce a card in Arabic. We have the scan of the card in .jpg Now, I enabled Arabic in the keyboard layouts, in International inputs and I do have arabic fonts that work. The problem I have (I am only able to recognize Arabi

  • Updating Flash CS5 Built-In Player, Flex SDK 4.1

    QUESTION 1: I'm trying to update the built-in player of Flash CS5 to the latest 10.1.53.64 version. I've downloaded and replaced the "Players" folder from this link:  http://www.adobe.ca/support/flashplayer/downloads.html. However, when i trace which

  • SQL2005 cluster error MDB-05053  Errors when executing sql command: p nr="

    Hi all, We are migrating from 32 bit to x64 bit machines. SQL 2005 database on windows 2003. I am trying to install E 4.7-200 SR1 on the clustered nodes. The installation manuals for 4.7 are very old and there is nothing for SQL2005 installation. Now

  • Portal template without tables and only with css

    Hi, I would like to know if it's possible to create portal templates that dont't use tables to define the layout but a css instead. Thanks, rjc

  • Re: The operation couldnʻt be completed. Permission denied

    Aloha- We recently installed a shared storage server for two Final Cut Pro X systems. Working from our Mac Pro copying FCP X events to new server, 2 problems occur.  1. Server connections interrupted error then FCP X crashes.  2. Re-start Final Cut P