Two Threshold Analog to Digital

I was asked to develop some code that would take a signal in on an analog, then convert it to a digital, then perform frequency, duty cycle, and signal integrity testing on it.  The built in NI functions for performing these tasks were insufficient because we needed to be able to detect a single drop out of a cycle.  With a real world signal I realize there maybe noise and a having a single threshold to convert from a analog to a digital may show transitions that aren't there and so I planned on developing some kind of debounce code.
Instead someone mentioned using two thresholds, one for the low and one for the high, and to only consider the signal transitioning if it goes above the high, after going below the low.  
Attached is my attempt at that method.  This VI simulates a sine wave with a bunch of noise then does a single theshold to show how imperfect it can be.  Then using that same signal it does a two level theshold which works much better but has a slight shift in the time domain, and the beginning will contain unknown values because neither transition has occured with the first sample.
Any pointers or suggestions to improve my implementation is appreciated.  Thanks.
EDIT: This does use an OpenG function from the Array palette.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
Solved!
Go to Solution.
Attachments:
Test AI to Digital With 2 Levels.vi ‏72 KB

Why so many loops when you just need one?
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Test AI to Digital With 2 Levels.png ‏76 KB

Similar Messages

  • MBP video out to TV using DVI - both analog and digital?

    I have a Macbook Pro 10.6.4 2008 Model with details are below on graphics card and display options. I am trying two hookups to televisions which may or may not be possible. Can anyone tell me if my DVI output on the macbook pro is capable of delivering an analog signal to my old sony tube tv with component inputs? Second part of my question is do I have the right dvi cable. I purchased a cable with 24 + 5 pin. This cable does not produce a picture on my analog or digital television. Just snow on the analog and no input on the digital. The cable that came with my macbook pro is a DVI to VGA converter and seems to be an 18 + 5 pin plug....with a few pins missing in the middle. Should I buy another cable with the 18 + 5 pin DVI to component or buy a cable to connect the supplied DVI to VGA converter - VGA to component. Please help I'm confused on many fronts.
    Thanks
    Frank
    Chipset Model: GeForce 8600M GT
    Type: GPU
    Bus: PCIe
    PCIe Lane Width: x16
    VRAM (Total): 256 MB
    Vendor: NVIDIA (0x10de)
    Device ID: 0x0407
    Revision ID: 0x00a1
    ROM Revision: 3212
    Displays:
    Color LCD:
    Resolution: 1440 x 900
    Pixel Depth: 32-Bit Color (ARGB8888)
    Main Display: Yes
    Mirror: Off
    Online: Yes
    Built-In: Yes
    VGA Display:
    Resolution: 800 x 600 @ 60 Hz
    Pixel Depth: 32-Bit Color (ARGB8888)
    Mirror: Off
    Online: Yes
    Rotation: Supported
    Macbook Pro 2.4 Leopard 10.5.2 Mac OS X (10.6.4) Brand New 3/08

    I made an account and am replying to this because i have the exact same computer as you and i was also at best buy at around 3pm wondering the exact same things you were! The DVI port on our MacBooks are different than the standard DVI ports. Freaking weiiiiiiiiiiiiiird! Get out of my head!!!!
    I ended up buying a VGA cable and using the converter that came with my MBP because the DVI to VGA cables at Best Buy had a different VGA than what the MBP has.
    Our goals were slightly different though, I wanted a cable so i can connect the MBP to my Toshiba 42inch HDTV. VGA works but doesnt support 1080p, only 1024x768, which is not a fullscreen resolution. So i will be returning the VGA cable tomorrow and looking for a VGA to HDMI cable, if that exist.
    So, to answer your question, YES, buy a cable that has the same ports as our adapter, or just use the adapter that came with the Macbook.

  • Analog to Digital conversion of hi8 tapes

    I have many hi8 video tapes that I have been trying to digitize so that I can import them into my imac. I have connected my analog hi8 camera to a Sony DSC-PC350 mini dv camcorder that has an analog to digital converter (pass through). In the VTR mode I can view my movies on the Sony camcorder. However, when I connect the Sony to the iMac with a firewire, I get a 'no tape' message on my iMovie screen. At the same time the video screen on the Sony camcorder goes blank. Can someone help me with this problem? Or is it possible that you cannot import a conversion on iMovie '09?

    Hi again ftts (having a little trouble pronouncing that)
    I went to the Sony web site and simply downloaded the operator's manual for that camcorder...
    http://esupport.sony.com/US/perl/model-documents.pl?mdl=DCRPC350
    I also compared it to the manual of my TVR-330 which is a Digital8 camcorder and does have the pass through functionality. I did that to find the wording they use when talking about pass through (Sony never calls it "pass through"). All indications of the manual for your camcorder indicate you can input an analog signal and record it to digital tape. But nothing indicates you can use the camcorder as an A2D pass through device like you can with my Digital8 model.
    So you will have to go through the two step process of first recording onto the MiniDV with tape. Then secondly importing it to the Mac. If you want to use that one.
    For the DCR-TRV22 ...
    http://esupport.sony.com/US/perl/model-documents.pl?mdl=DCRTRV22
    it looks like that one WILL do the pass through function (see page 173 of the manual). So if you want to skip the tape part then use the TRV22 camcorder instead.
    Cheers,
    Patrick

  • Analog to Digital (ie VHS to DVD)

    As much as I love the internet I think I've overloaded myself with information, lol.
    I have some home movies on VHS that I would like to transfer to DVD and have them be compatible with tweaking in iDVD or iMovie (I'm totally new to Mac BTW, I've only had my Macbook Pro for a little over a month).
    I know I need to buy a VCR.... this is where my confusion comes in ... should I just buy a VCR/DVD combo (I'm looking at an LG RC797T for $250 @ Best Buy) and record the VHS tapes to a DVD on the machine? Will that video on the newly burned DVD now be digital video that will be importable and editable (are those words?) on my MBP with iDVD and/or iMovie?
    Or, do I need to go w/some sort of analog to digital converter? I was looking at purchasing either a Canon Elura 100 Mini-DV or Canon ZR700 Mini-DV camcorder since they do analog to digital conversion (would have to go from VCR, out via S-Video into the Camcorder and then out of the Camcorder via Firewire into the Mac (actually an external HDD will be necessary so I don't suck up all my space).
    I'm not a guru when it comes to file compression and rendering and video formats and all that happy stuff - I'd like a simple method that works well and produces a decent quality DVD.
    I think if I can do it w/just the VHS/DVD machine that'll be the route I take (it'll be least expensive). If I have to buy a camcorder along w/a VHS machine then that's adding $$ to the project and I still need to buy an external HDD - scouring good sales for that info.
    Thank you a million times over in advance, I've researched and read and dug and shopped my brains out for the past week and it seems like there is no simple solution.
    B's Fan

    Just a question.....if you have all these old VHS home movies, don't you already have a VCR? What have you been playing them on all these years?
    I agree w/ Sue and Kirk. If you want to edit these old movies, you need to digitize the footage onto DV format.
    I just connected my camcorder to my VCR (It is the VCR/TV combo unit and worked fine for this) and recorded the raw VHS footage onto DV tapes. Yes, there were a lot....I think I have about 150 DV tapes (one hour each).
    I have been slowly importing them into my iMovies as I create them. I put my still photos and videos in chronologic order, so I import about one or two tapes per movie. Usually the 60min tape gets edited down quite a bit before I am finished. You know, you have plenty of bad shots, blurry images, terrific movies of the floor, ceiling, your hand, etc that can be cropped out.
    If you really don't need to edit your movies, and just want them preserved as DVDs, I know that the Sony VHS/DVD combo unit works great. My brother copied some of his old Muhammed Ali fight tapes that he had recorded from tv. He didn't need to edit, just was afraid that the VHS tapes were degrading.
    However, I recommended to him that he do the same as I, and get the footage on DV tapes to preserve them. I am sure that DVDs are not going to be the technology of the future. They can become broken, melted, scratched, etc. I save all my edited movies on DVDs and on more DV tapes. I (almost)always export my finished movies back to my camcorder after I have made my DVD.
    The DV tapes are small, can be easily stored in a cool dry environment, and your memories are not lost.
    Because VHS tapes are not great quality to begin with, you could (and I have done this also) copy the finished DVD to your camcorder by connecting them and recording from the DVD. Supposedly there is a quality loss, but you will not notice because the digital version of your movies will be so much better than the original. I have occasionally had to do it this way when I deleted my iMovie after making my DVD, but forgot to export it back to the camera.

  • Simultaneous analog and digital waveform read with PXIe-6361 and BNC2120 ?

    Hi there,
    I am trying to collect both analog and digital signals from a PXIe-6361 linked to a BNC2120, using the attached VI. I am running Labview 2011 64bit. This is the first time I am working with digital input. On the 2120 board, I have the digital input BNC cable connected to User Input 1 and wire between the screw terminal of UserInput 1 and the P0.1 (Digtial I/O) screw terminal.
    I have two questions related to this:
    1) When I try to run the VI in its current state, I get the following error:
    Error -89137 occurred at DAQmx Start Task.vi:3
    Possible reason(s): Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
    Property: RefClk.Src
    Source Device: PXI1Slot2
    Source Terminal: PXIe_Clk100
    Required Resources in Use by
    Task Name: _unnamedTask<6>
    Source Device: PXI1Slot2
    Source Terminal: None
    Destination Device: PXI1Slot2
    Destination Terminal: RefClockInternal
    Can anyone point me in the right direction for troubleshooting this?
    2) I would like to combine my regular waveforms and the digital waveform into one array which would then be written to file. I can't figure out how to combine the two different waveform types...can anyone give me a hint on this?
    Thanks for your help,
    Claire.
    Attachments:
    Export Waveforms To Spreadsheet File (1D)_wo extra line.vi ‏33 KB
    Multi-Device Synch-Analog Input-Finite Acq-Analog Start_Claire_wDigitalin.vi ‏105 KB

    Hi ClaireJ,
    Sounds like a reference clock conflict. This KnowledgeBase (KB) talks about this error when using simultaneous sampling. Also, might want to check the device routes in Measurement and Automation Explorer (MAX) as discussed here. Finally, if you are routing your PFI line over a RTSI connection, this error can occur. This KB discusses it.
    As to your second question, this post should help.
    Bill E. | Applications Engineer | National Instruments

  • How to capture using Pinnacle 700-USB Analog to Digital (USB)?

    I have a Pinnacle 700-USB Analog to Digital converter which inputs Composite and L+R Audio and outputs a Digital signal through USB.
    I'm using this to digitize VHS tapes.
    I am trying out different Video Editing sw including Adobe Elements 7. Others like Pinnacle Studio 12 and Corel Video Studio 12 can import from this USB-device. It doesn't seem to be possible using Adobe Elements 7.
    I've looked at the page http://help.adobe.com/en_US/PremiereElements/7.0/WS51F6C811-8B79-4c26-B4B9-24C0919182B6.ht ml
    It mentions at the end "Note: If you capture using an AV DV converter, you might need to capture without using device control."
    1) What does the last Note mean? Which device control?
    2) Are there any possibility of this working? What should I try to play with?

    My Pinnacle Dv500 came bundled with Premiere 6.0 which I updated to 6.02... and I also updated the Dv500 driver software from the V3 to V4.5a so it would save in "standard" DV AVI Type 2 48khz files, instead of the ones that required the Dv500 codec to edit
    When I bought a new computer and started using WinXp instead of the Win2000 that came with my Alienware Pentium3, I could never get Premiere 6 to work... would start, flash a screen or two, and then just go away
    I then bought Scenalyzer, since it was compatible with the Dv500 (still had to have P6 and Dv500 drivers installed) but it turned out to be very FRAGILE as any slightest glitch on the tape would stop the program... and since some of what I'm doing is capturing my OLD library of VHS tapes, that simply wouldn't do
    My current solution is a dual boot drive with Win2k/WinXp
    Premiere 6 captures EVERYTHING in the Win2k partition... files saved to 2nd drive... and then I use PProCS3/Encore3 for editing and DVD creation
    Just a "bit" of a hassle to have to restart between capture & edit/dvd... but much better than Scenalyzer stopping every time an old movie hit a rough spot in the tape... rough spots that capture just fine with P6

  • Producer consumer with analog and digital inputs and outputs

    Hi everyone,
    I am working on a control system program for some practical test work. Currently I am working on the data acuisition component of the Labview program. My architecture is produced-consumer loops with a que. My system will have analog inputs, analog outputs, digital inputs and digital outputs. It's not a time critical sytem, but I would like all of the data acquisition to be synchronised. I have attached my program as it is at the moment. I am having trouble getting all of the data into the que since I have two data types. Also, I'm not sure if i've synchronised the four read/write sequences correctly. I would greatly appreciate if somebody could take a look at my program and give me some advice. Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    control_v2_DAQ loop.vi ‏46 KB

    Robert, the specific error that I get is:
    Error -200462 occurred at DAQmx Start Task.vi:6
    Possible reason(s):
    Generation cannot be started because the output buffer is empty. 
    Write data before starting a buffered generation. The following actions can empty the buffer: changing the size of the buffer, unreserving a task, setting the Regeneration Mode property, changing the Sample Mode, or configuring retriggering.
    Task Name: Heater testing lab digital outputs
    This error occurs at the 'DAQmx write.vi' function. I just want to sent one sample per second, for each channel. I would like the producer and consumer loops to each run once every second.
    I have attached part of my code with just the data acquisition and writing. Any help would be greatly appreciated.
    Attachments:
    control_v2_ML_simple.vi ‏83 KB

  • Archiving analog video digitally for later editing

    Hi:
    I'm a newbie to iMovie and have been through the discussion threads without finding an answer. Thanks in advance for any help.
    I have about 16 hours of analog tape from a Hi 8 Sony camcorder. I just picked up a Canon ZR200 which allows me to use the analog to digital passthrough feature to move the old analog tape to the computer. I've been able to import some video and have some rather huge files. I see in the forums that an hour of DV video is about 13 GB which is consistent with what I have on my computer.
    I have two objectives here. First, I want to archive the clips from the analog tapes to DVD in a raw and unedited format. Essentially, I want to have a DVD copy of the tapes I have presently. However, I also want to later be able to go back and edit the video backed up on DVD into more concise clips using iMovie and put together several separate DVDs of the edited material.
    I don't want to just backup the raw DV files to DVD as data files because they're so huge. I have about 20 G free on my computer, so I can't archive there and I'm trying to avoid buying an external HD.
    Is there some way to archive the unedited video on DVD (as data or movie) so that I can later reedit?

    In reading your response and other threads, I am
    assuming that when I Share to a Full Quality movie, I
    am making a quicktime movie as the output which will
    be much smaller than the DV file; is this correct?
    The Shared movie is smaller because it is shorter. But in terms of quality, the Full Quality export is exactly the same content as the DV video used in the iMovie HD project.
    In iMovie HD, a "Full Quality" export creates a movie that matches the natural video of the currently active iMovie project. The video format varies by project type. A DV project exports to a different movie format than an HDV 720p project, for example.
    (Note: The image quality of the DV you see in QT Player may not look very good by default, but that's because its High Quality playback features need to be turned on. In QT 7, you can do it in QT preferences.)
    With no discernible loss in quality?
    That's correct. There will be no loss of quality.
    Thanks again for your help, Karl.
    You're welcome.

  • No Analog to Digital Conversion Imports, eh?

    Been messing around with FCPX using previously imported FCE files.  FCPS doesn't care that they are VHS footage imported to FCE using my DV camera as an Analog-to-Digital Converter. It results in DV camera footage iimported as FCE .mov files, with which FCPX is quite happy.
    This worked great until I decided to try the same procedure with the "new, improved" FCPX.
    FCPX recognized the DV camera, displayed the video coming thru the camera from the VHS player, and had no objection when I pressed the import button.  However, tuff cookies on actually importing anything.  It created an Event, but placed no files in it.
    Now, just as a side note, when I actually put a DV tape in the camera, FCPX controls the camera just fine.  Naturally, as a AV/DV converter, there are no controls, and FCPX notes in the upper left corner "Not a Controllable Camera", and when "import" is started it replaces that with a clock counting up the import duration. But no file results.
    Apparently, like Apple itself, FCPX doesn't play well (or at all) with anything it can't control.
    Anyone actually found a way to get media imported from a tape-based camera which FCPX can't control?
    I'm doing just fine importing to disk via FCE and then importing the files to FCPX. 
    But, really?  No way to do it directly? 

    Well, I suspected as much, but how ya gonna know for sure if you don't ask?
    At least I learned I can use QTPro 7 for more than cycling FCE 640x480 anamorphic .mov files into 853x480 .mov widescreen files for iDVD input. 
    Never even looked at QTPro for capturing.  Thanks.
    Edit:  Took a quick look, and I'm supposing that if I have my "Converter Camera" turned on, it will give me that choice over my iMac camera, but I also noted I apparently can also use QTPro 7 to toss in Chapter Markers on the way to iDVD. 
    May not work for "power users" and their HD formats, but for working with DVDs as the target output its worth checking out.
    As Macked said in his related thread (that I missed when I searched), its just plain stupid to have to use two (actually 3) programs for these simple tasks.
    Thanks again.
    Message was edited by: Clyde Crocker

  • Audio problems with Canopus analog to digital converter

    I'm trying to digitize and import VHS tapes into iMovie 08. I'm using the Canopus 110 analog to digital device. I've connected the VHS player to the Canopus with RCA cables, as prescribed. The video has imported beautifully — but there's no sound, and so my then 2 year old daughter appears to sing, but alas, no voice — except, for the occasional clip (about 2 to 4 seconds of sound on a 30 minute tape). Any ideas? (I've spoken with an Apple tech who walked me through a test before assuring me the problem didn't seem to be with iMovie ['-).

    Hi
    a. You did install the Canopus programs (on CD) ?
    b. I connect mine to a Standard VHS-VCR and use the SCART connector on it's back
    and to this a RCA to SCART plug WITH AN IN AND OUT Switch !
    On my VHS-VCR there are two SCARTs on it's back - only one of them works for this.
    c. If You in iMovie pref - set Playback via Camera - picture will play but sound
    will be directed to analog device = Your Canopus
    and if You connect a TV to this or via the VCR (as I've done) the audio playbacks
    nicely trough this.
    Sorry this only goes for iMovie 1 to 6 - not for 08 or 09 (very bad)
    Yours Bengt W

  • Need two track analog out

    How can I get a two track analog output from an Audigy 2 ZS Platinum Pro soundcard? I need to feed a digital recorder (Fostex MR-8) that only accepts analog inputs.

    I tried doing that but I get only a slight hiss. It could be the sound card. We had a power outage that appeared to mess some things up. I cannot get Lin-in 3 to play at all. The recorder works fine so it must be the sound card.
    Tom Wagner

  • How does ipad digital AV adaptor works? does it have a Analog to Digital conversion?

    I wonder how the Digital AV adaptor works? I heard the ipad 30-pin connector does not have digital video out. Does it have an Analog to Digital converter inside the adaptor?

    Yes..same thing here..I get a pop up saying This Accessory is not Suported...I click Ok and I get a 4x3 "mirror" mode on my TV. However when I play a movie it is in the proper aspect. Same goes for the SlingBox" app.  I tested photos and they appear in the 4x3 ratio as well.
    I only use the adapter for the occasional movie while staying in hotels so it's not a big deal to me that most of the items are in a 4x3 ratio.
    I'm coming from an iPad 1 so mirroring wasn't an option so technically, I didn't even know what I was missing..not sure if the iPad 2 mirror function displays in 16x9 ( or whatever the native aspect is )

  • How to store the output of a analog to digital converter into an 2D array

    Hi
    I am doing my M.Tech Thesis in Image reconstruction and I am using labview for simulation and I want to know how to store the output of a analog to digital converter into an 2D labview array.

    nitinkajay wrote:
    I want to know how to store the output of a analog to digital converter into an 2D labview array.
    How exactly are you performing 'Analog to Digital'???
    Grabbing image using camera OR performing data acquisition using DAQ card OR some other way????
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • How can I open two screens of Adobe digital editions at the same time?

    How can I open two screens of Adobe digital editions at the same time?

    I doubt that you can. Doesn't the Sound prefpane require you to select just one output device?

  • Analog to digital protocol

    Hi again,
    I got a lot of help yesterday on hardware devices that allow capture of analog video. Thanks.
    That got me to wondrin... If I'm going to try to do this, I might as well learn the basics.
    When a card or outboard hardware device captures and digitizes analog video (with audio) for import to a Macintosh, what is it doing, exactly? It seems like it might be converting the analog data to a digital format or protocol. If so, what format or protocol is it?
    Do these devices have a dedicated processor on board, running a codec? Or do they do something less demanding, move the data to the computer, and then let the computer's CPU run the codec?
    If the codec runs on the capture device, that would explain why some such products get a lot of praise while others earn general contempt. It would depend on the speed of the processor running the codec, it seems. In that case, you probably get what you pay for, more or less.
    If I'm getting the fundamentals all wrong, just tell me!
    Cheers,
    Tim

    Hi
    Just some thoughts.
    In my mind the videoconverter converts an analog video + audio signal
    to streamind DV (digital format) that can be read by the FireWire port that
    only accepts digital info.
    So at least there is an analog to digital converting chip inside and in more
    advanced models the other way around. Quality and speed is vital I think.
    But the boxes/cards can sometimes make more. That may indicate some
    more logic like a CPU or a signal processor of some kind.
    My Canopus ADVC 300 can alter the video and sound so I get a better
    material to work with and I get the feeling of that it even fixes some drop-
    outs on the VHS tape. This I think can be worth to pay for.
    Yours Bengt W

Maybe you are looking for

  • How Do I Get A Sprint Novatel S720 to work with a PB G4 10.4.8?

    I need help with "Sprint Mobile Broadband Card Novatel Wireless Merlin S720. I have a Mac PowerBook G4 running 10.4.8 as follows: Machine Name: PowerBook G4 Machine Model: PowerBook3,3 CPU Type: PowerPC G4 (2.1) Number Of CPUs: 1 CPU Speed: 667 MHz L

  • Install on 2 Different Macs?

    Is it ok to install one Retail version of FCE 4 on 2 separate Macs? I use 2 to accomplish many tasks, sometimes multi-tasking, and they are connected via a home LAN. Do I need to Register one, and then the other will just work fine. I got I could not

  • This version of iTunes is not compatible with iTunes Match

    Starting this morning I'm getting this message, but there's no update available. I'm using iTunes 10.5.1 -- there is no update available. Anyone have a solution? //B

  • Manually provided DNS server addresses are higher priority than DHCP's

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as

  • Pause long running queries...

    Is there a way to pause for a moment long running queries? or.. to give them lower prioriry during runtime? (even if they're already started)