Two threshold analog to digital

I was asked to develop a code which would take a signal an analog mode, convert it to a digital camera, then perform the frequency, duty cycle and test on that signal integrity.  Built in OR functions to perform these tasks were inadequate, because we need to be able to detect a single drop out of a cycle.  With a real-world signal I realize it may be noise and one with a single threshold of convert from an analogue to a digital camera may show transitions that do not exist and so I was planning on the development of certain types of debounce code.

Someone said instead using two thresholds, one for the bottom and one for the top and don't take into account that the signal of the transition if it exceeds the top after going below the bass.

My attempt at this method is attached.  This VI simulates a sine wave with a lot of noise, then made a single threshold for show how imperfect, it can be.  Then using signal that there is a threshold of two level which works much better, but has a slight change in the time domain, and start will contain unknown values because no transition has occurred with the first sample.

Pointers or suggestions to improve my implementation is appreciated.  Thank you.

EDIT: This uses an OpenG function in the Array palette.

I've done some destruction to your code and converted for you in 2012.  Added the upcoming indeices.

Tags: NI Software

Similar Questions

  • External monitor for X 61-analog or digital


    Hello and welcome to the forums!

    The output on the X 6 ban is analog, but most sold monitors come with analog or digital - input some with both, others with one or the other. Your purchase of the monitor should not be limited to the connector type for the simple reason that there are connectors available conversion easily and cheaply, if necessary, convert the analog signal to a digital connection. So, this is really you, offers you can get on an external monitor to make a purchase of such.

    Then, there is no worry about running two monitors on the X 61. Use Vista or XP, you will be able to flawless use monitor or both. You can make the selection in the display properties (of no operating system). No additional software required to do this.

    Hope that helps

  • analog and digital data synchronization

    Hi all

    I would like to help with what I seek to accomplish, if you don't mind much.

    I'm trying to synchronize the acquisition of analog and digital modes using a common trigger that launches both types of data collection at the same time. What I've done so far, is wasting his time trying different combinations to gather examples of LabVIEW 2011 on the synchronization of data - namely the 'Multi-multifunction-Synch AI lu Dig Chan.vi' and 'Multi-Device Synch-Analog Input-Finite Acq-Analog Start.vi.

    I tried to combine the two, because one contains digital and analog, the other contains the trigger for multiple tasks.

    I guess I should place the trigger (either digital or analog-eventually I will want to choose) then call the "Get Terminal name with device Prefix.vi. But from there I'm not sure wheter to connect the name of the terminal of the sample clock digital channel or a digital leading edge of the digital chain trigger.

    Also, the way it is wired now I get errors at the local terminal name, so I don't know exactly where this terminal must come from.

    I try my best, I could use a little help, I have attached my attempt with the examples that I speak to you.

    Thank you.

    Hi beefcake.

    The CtrInternalOutput internal output line is used as sample for your digital output sample clock source clock. If you change the settings for your CO Pulse Time is Dev1 and your digital output is Dev2, you will notice that the name of the product terminal would give Dev2/CtrInternalOutput. So what you get here, it's as well as the digital output device sees his sample clock, instead of the clock itself.

    If you just want to use a digital/analog input as your trigger, you should do something more as in the example above. Do you use multiple devices, or are all your lines on the same device? This example is more complicated because it is synchronization of signals on several devices.

    Looking at how this VI is wired, you can see that the digital signal triggers the analog signal. You want the analogue signal must be started first, so that when the digital signal triggers the analog task is already running and can trigger immediately. If the digital task started first, it can trigger until the similar task had started, and they do not exactly trigger at the same time.

    I hope that clarifies things. Kind regards

  • analog-to-digital

    Hello, please how to convert an analog output digital, I'm working on the cRIO 9012.


  • Interleaving of samples: two outputs analog (tables with different lengths)

    CHAN                   AOCHANNEL1       AOCHANNEL2       AOCHANNEL1           AOCHANNEL2       .. .and so on

    SAMP * * * * * * * * * * * * .............and so on

    Hi guys, how could I go on the interlacing of two arrays of different lengths in a two-channel analog output?

    In the illustration above, for example, I like to write 5 values in channel 1, followed a string of unique value 2 and so on...

    I use DAQmx library controls to achieve this (not LabView).

    I am able to write unique values each time a task is opened without any problem, I was wondering if I can interleave the berries so that values are buffered and tasks are performed with greater haste.

    best regards,

    Ravi

    target met: I've made the following changes:

    CREATION OF TASK 1
    CREATION ANALOG_VO channel 1 & channel 2 in TASK 1
    CONFIG. CALENDAR OF TASK 1

    CREATED some TENSION with SAMPLES interleaved pre

    WRITING TASK 1 VALUES

    TASK 1 STARTED



    DAQmxCfgSampClkTiming(taskHandle1,"",SAMPLING_RATE,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,2*SAMPLE_SIZE_WX)


  • How to trigger and outputs analog and digital Outout tasks begins on a counter to start?

    Hello

    I'm trying to synchronize the start of a task outputs analog, a task of digital output and a task of counter. I want to start the counter to serve the master trigger and analog and digital tasks to synchronize his departure.

    I guess I need something like:

    analogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    digitalOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger ("?", DigitalEdgeStartTriggerEdge.Rising);

    analogOutputTask.Start (); Slave 1

    digitalOutputTask.Start (); slave 2

    () counterTask.Start; n / / master

    Where? is a string specifying a command source for the beginning of the task of the meter. However, I can't find what this string. Any suggestions?

    Thank you!

    -Jon

    Just FYI, the solution to this problem as well as some other ones is encapsulated in a short example .NET, I created. It is on the Web site of EITHER:

    http://decibel.NI.com/content/docs/doc-15500

    This project shows how to synchronize all your analogue/digital outputs through tasks and forums in terms of synchronizing Calendar and start clock.

    -Jon

  • detection of peak with two thresholds

    Dear colleagues!

    Excuse me, but I need example or any help for the detection of peaks with two thresholds. Namely two adjustable thresholds with detector standard Ridge for the creation of a detection bandwidth or range.

    Detector of crete have only one threshold of... But why only one...


  • Sending of different waveforms on two separate analog output channels

    Hello NOR community,

    I am trying to send a note to say 100 Hz signal on one of the channels on my computer USB 3101 FS Measuremnt and a sinusoid 300 Hz on another channel. I've seen a lot of soultions to this problem, but I do something wrong in my attempt to imitate. As a result of the use of a product of MC, I use the library instead of DAQmx Ulx, but the Vi is virtually interchangeable features wise. In any case, I managed to send two signals (see annex VI), but they are still the same in terms of amplitude and frequency. In other words, I get the same signal on both channels as opposed to the two different signals of different frequencies.

    Thanks for your suggestions,

    Leo

    Hi Lemmeneger,

    I have reproduced what you're trying to do, but using DAQmx since I did no material of MC. And had no problem sending two different analog ouptuts.

    Could you try to wire the errors?  and let me know if something doesn't appear! I do not see a problem in what you are trying to run

    Kind regards

    Caroline

  • NEITHER USB-6343 analog and digital grounds

    In the manual for the NI USB-6343, it is said that the mass input/output, analog and digital terrestrial are related, but by a small sign. For my application, I am attaching all 3 these grounds to exit the box (I'm tie all areas with physical threads). It is perhaps a silly question, but it's OK to do, correct?

    This should be OK unless there are large currents flowing on ground conductors.  If you have important currents in the ground, you have other problems that must be resolved before you connect the DAQ hardware.

    Lynn

  • Do not connect ANALOG and digital grounds when the annotation to the front at the UB

    I'm finding randomly more often when I annotate with impatience to UB analogous and digital patterns do not connect.  In addition some power to the IC pin connections are unable to be connected in UB.

    Connect to the digital terrestrial analog ground is checked in my properties of Ms.

    Is there a reason for this?

    Thank you.

    Tien Pham offers this solution that worked:

    I saw the ground issue in the file you sent and you can fix it by replacing
    the digital ground with the one from V12.  On the Spreadsheet View, click
    on the "Components" tab, select all the Dgnd symbols, next click the
    replace icon on the Spreadsheet to replace all symbols at the same time.
    
  • Tips on ribbons Hi8mm analog to digital conversion

    Hello

    I'm looking for advice on the conversion of some Hi8mm analog video tapes to digital. They are not my tapes but I still prefer to get a good quality transfer. I can make a few changes on some of them pre and want to maintain the ability to modify them in the future.

    At the present time, I bought a converter USB of Roxio easyVHStoDVD which States it can capture in DV - AVI format, but does not actually appear able to do. Results so far to capture have been wayward at best, but I'm still working on it, but don't trust because the captured format isn't DV - AVI.

    I have read several people here, which suggests using an ADS Pyro converter analog-to-digital Firewire. Would it be a better world, less painful path go? And what other advice someone doing an A/D conversion?

    Thank you

    Paul

    Yes the DV - AVI captured in the ADVC110 will be 13 GB per hour exactly the same thing from a miniDV Tape.

    Once burned on a DVD video files will be converted to MPEG2 (VOB to DVD), these can indeed be imported into Premiere Elements to edit more far however there will be an impact on the quality. MPEG2 is a compressed format, available from PE7 8Mbit/s higher transmission speed, the size of the file is reduced to about 4 GB per hour. If you encode at the higher rate (a little more than one hour on a single DVD layer), you could do a cycle of edit/burn more without losing too much quality. Ideally, you do not use an editing program that supports rendering of chip, which will burn the portions without re-rendering avoiding the following quality loss. Unfortunately PE7 does not support chip-made... so that most of the other editors.

  • Fortunately the cRIO merger two time real screws: analog and digital output

    Howdy,

    I need help with a cRIO code.  The purpose of the code is to acquire an analog input from the NI 9234 c series module and be able to send a "signal of pulse" digital camera (first low for some time, t1, then high for some time, t2) from a NI9401.  Separately, I wrote the code to perform both tasks.  However, when I add the code of RT digital output pulse pulses to analog input RT code, the DMA FIFO overflows because of the way that my digital pulse output code works.  Currently, there are two reasons which overflows of the FIFO:

    1. The digital output code is pending for a while loop (pending "Send Pulse" become a true), the loop I can't empty the buffer FIFO
    2. The FIFO is not enough, quickly emptied depending on how long the pulse (t1 and t2) times are.  The way I keep the pin high or low for a defined period of time is by issuing a sleep command, which blocks the loop I empty the FIFO.  (Is there a "best" way to sleep?)

    I have attached photos of my codes FPGA and RT.  Please give me a suggestion on how to marry my two loops of RT for the use of happy resources!  Thank you.

    I found a quick way to solve this problem.  I moved the timing of the Digital pulse on the FPGA.  So whenever I have a Boolean value, the FPGA generates a waveform with the settings I put (a pulse in my case).  This works because the FPGA loops run in parallel, I think.  That's why, when I run a pending order in the loop of FPGA digital output, it does not prevent the FPGA of analog input loop to run.  I have attached a picture of the code.

  • Synchronization of analog and digital output with the external sample clock

    Hello

    First of all sorry for my English, I will try to explain what I want to do.

    I want my PCIe-6321 to send two custom signals (modification sawtooths) on a mirror controller. I would also like to generate output with my card at the beginning of each tooth of saw. Everything must be synchronized with an external k-clock signal of 100 kHz. The idea is that whenever the PCI receives a trigger to external clock, it sends two analog output voltages and when he received 1024 clock ticks it will also send a pic of triggering TTL. What I do is first prepare the map and after that in a loop sending and modifing the output values of the two signals and at the same time send a digital signal Boolean in each arch, so when's done it 1024 iterations of the loop I send an event to the digital port. Attached you can see.

    The problem is that I don't know how to synchronize both. Can I use the sample clock just to the analog output? I can use sample for the two outputs clock, or do I need to use the output of the meter? If don't know how to use it here.

    If I do nothing else bad/wrong, I would be grateful for feedback.

    Thanks in advance,
    Pablo

    I don't know how but I find the solution. I'm generating more than a positive value (as I was triggered maybe very fast the oscilloscope has been absent there). If I put the sample clock of digital output to use the sampling/ao/Dev1 clock that it doesn't, but if I put to use the same source as the OD (terminal where my external clock is connected), but the trigger to start the DO to be Dev1/ao/StartTrigger this works. I don't really know why, but it does.

    Thank you for your patience and your help. I put here the final code.

  • separation of two edges using a digital output

    I am using a DAQ, PXI-6229 map and programming in c# .net.

    I'm claiming a falling edge on PFI12 used as a digital output, and I need to measure the time between this edge and a second front on PFI8 used as a digital input.  I have implemented the code using some examples I found.  I don't know when to to argue the signal on PFI12 in order to be read at the right time.  Playback must be put in place before the signal is asserted, but I do not know how to set it up it up properly.

    Here is the code I have so far:

    Public Sub MeasureAcquisitionTime()
    {
    DigitalSingleInputTask = new Task();
    CIChannel counterSetup;
    firstEdge = CITwoEdgeSeparationFirstEdge.Falling;
    secondEdge = CITwoEdgeSeparationSecondEdge.Rising;
    Double minTime = 10-3;
    Double maxTime = 60F-3;
    String auxCounterInput = "/" + CardName + ' / PFI12 ';
    String gateCounterInput = "/" + CardName + ' / PFI8 ';
                
    counterSetup = DigitalSingleInputTask.CIChannels.CreateTwoEdgeSeparationChannel)
    CardName + ' / ctr1 ', 'counter',
    minTime,
    maxTime,
    firstEdge, secondEdge, CITwoEdgeSeparationUnits.Seconds);
    counterSetup.TwoEdgeSeparationFirstTerminal = auxCounterInput;
    counterSetup.TwoEdgeSeparationSecondTerminal = gateCounterInput;
    DigitalSingleInputTask.Control (TaskAction.Verify);
    runningDigitalTask = DigitalSingleInputTask;
    counterInReader = new CounterReader (DigitalSingleInputTask.Stream);
    Double data = counterInReader.ReadSingleSampleDouble ();
    }

    I'm glad to hear it.

    paofthree wrote:

    Is there a way to make a measure of separation of two edges on the analog inputs of the PXI-6229?

    The only way would be to constantly acquire the analog input voltage and calculate the separation of the two edges in the software.

    Best regards

  • Producer consumer with inputs and outputs analog and digital

    Hello world

    I'm working on a program of control system for some practical test work. Currently, I am working on the data acquisition of the Labview program component. My architecture is consumer-product loops with a what. My system will have analog inputs, outputs, analog inputs and digital outputs. It is not a criticism of time sytem, but I wish that all the acquisition of data to synchronize. I enclose my program because it is at the moment. I have difficulties to get all the data in the since that I have two types of data. In addition, I don't know if I have synced the four sequences of read/write correctly. I would be very happy if someone could take a look at my program and give me some advice. Thanks in advance.


Maybe you are looking for

  • How can I remove this face?

    Hi all, I have windows 10 with the latest version of the Skype client running. Whenever I log in, I see this girl, which is no doubt a useful tutorial on how to make calls. The problem is that I don't want to see this every time. My girlfriend might

  • Need drivers for Satellite L30 W2k replace the Vista operating system

    All, I brought 2 L30 notebooks that have Windows Vista installed. The programs that I put on, I have purchaced the books, does not work with Vista, and I intend to put W2k Pro on them. Of course I need drivers to runt he network card etc... Can someo

  • Satellite 1900-303 memory upgrade of contradictory opinions

    my machine worked even more slowly since I downloaded i tunes and norton. I understand that by upgrading the ram, it must run more fast without having the burden of buying a new machine. The problem is that I have read my manual, looked at this forum

  • Satellite L300 - 22L: Power saver issue code: 0x7E runnig Win XP

    Guys, I will aprecciate if someone can help me here. When I start the computer, this message appears "unable to locate component tpsmain.exe. This application has failed to start because cpuperf.dll is not found. Reinstaling the application may fix t

  • BlackBerry Desktop Manager Smartphones will not read phone

    the Director of bureau will not read my phone... it connects fine - starts playback-, then freezes.  He can even do the initial configuration.  I don't get an error message. I reinstalled the software tried different versions - exchanged phones - dis