Trigger and compare waveforms then write to file

I am trying to make a coincidence between two channels without using a SCA.  I have a Tek DPO 7104 scope where I have two PMT's connected.  PMT1 is on channel 1 and PMT2 is connected to channel 2.  I have my current vi setup to trigger on channel 1.  I generate a waveform that has both channels in the waveform data.  My goal is to make a comparsion between channel 1 and channel 2.  If channel 2 is "similiar" to channel 1, then write to file.  If the two channels are not similiar then do not write and go back and wait for another trigger.  I am thinking of using the "index array" to extract each channel seperately.  The next part would be to make a comparison somehow.  I was hoping someone might have an example that would help me to accomplish this.  I have been reading the post but I have not found an example that will assist me.  I would really appreaciate some help.
Chad

Just in case someone stumbles across this in the future, this discussion moved here:
http://forums.ni.com/t5/LabVIEW/waveform-comparison/td-p/1158717
Justin Parker
National Instruments
Product Support Engineer

Similar Messages

  • Save digitizer and DIO waveforms into one spreadsheet file

    I am using attached mixedsignalscopeusingtclk.vi for data acquisition and would like to acquire 4-channel of data. My PXI-1042 system has PXI-5122 and PXI-6552, and I am using 2 channels of digitizer and 2 channels of digital I/O. I am using Labview 2010 SP1. The VI generated 1-D array of cluster for analog waveform and 1-D array of digital waveform. How do I save both waveforms to one spreadsheet file?
    Solved!
    Go to Solution.
    Attachments:
    mixedsignalscopeusingtclk.vi ‏258 KB

    Hi,
    You can use a Write to Measurement File express VI. Note that this is the easiest way however not the most efficient way to write to a file.
    Since you have the fetch VIs inside for loops, your output is a 1D array of waveforms. You will need to obtain the waveform element and convert it into a type that the express VI can read. If you unbundle the waveform and grab only the data and connect it straight to the express VI, LabVIEW will automatically place a "Convert to Dynamic Data" block in line to make it compatible. Same applies when you connect the boolean array to the Signals input of the express VI. And if you connect more than one signal to this input, LabVIEW will automatically place a "Merge Signals" block.
    If you reproduce the below code, you should be able to write the two channels to the same measurement file. If you have more than one channel of each type, you can grab multiple elements using the same Index Array block and take them through the same process shown below.
    Hope this helps.
    Tarek B
    Applications Engineer
    National Instruments

  • Peel off hourly output value and subtract from previous hours (then write to file)

    Here is another problem I have been working with and what I have tried so far.  Right now, my current VI is writing data to an excel file at a point every second.  I would LIKE peel off a point from this datastream once every hour and subtract it from the previous hour's value and write an hourly value to an excel file (same file or different file is ok).  I was working with a guy here at my university who had some ideas to use the Elapsed time function.  I have included a screenshot of the part of the VI containing the function we were working on.  We never could get it to work quite right.  We were having some problems getting the shift registers to work (used to subtract the current hour's value from the previous hour's value).  Let me know if you have any ideas, if maybe we are on a good pathy, or maybe I should try something altogether different.  I'm just looking for a simple solution at this point.
    Thanks,
    Jeremy
    The local variable "Total Consumption" is the data stream off of the hourly values are being taken.  Currently (not shown in this screen shot), the value of "Total Consumption" is combined with the other channels into one signal that is fed into the "Write to Measurement File" VI (shown at the right).

    You have a true constant wired to your stop button for the loop, which means the loop will only run once.
    You may want to consider the positions of the previous and current indicators inside that loop.  It's not clear how you want them to function.  The previous indicator doesn't get updated until right as the elapsed time occurs.  The case structure gets executed, and you will immediately have a new previous value calculated, but you won't see that again until the end of the next hour.  Not sure if you are updating the current value in the false case as well.  Otherwise that would look like stale data for an hour.  If you are updating it in the other case, than you should move the local variable and the indicator completely out of the case structure and only pass in the wire to the subtraction function.

  • I backed up my itunes library to an external drive.It's 119 gb.It took about an hour.When I looked at the files it list the artists and albums but then says the files are empty.On the C drive of my own computer it says they are empty.Why would this be ?

    When I open up my itunes library on my hard drive it says it contains 119 gb.I tried to look up individual songs under each album and artist.Every time I open an album it says the folder is empty.I exported the library earlier to an external hard drive.It took over an hour.When I look on that library it also says the files are empty,yet when open itunes and play songs they are all still there.Why doesn't the library list each song since it says it contains 119gb?

    bzq wrote:
    Niel, I tried that several times but the Choose Library screen never appeared.
    Then try again.
    Make sure iTunes is not running.
    Hold the Option key.
    Click the iTunes icon in the dock.
    Select Choose library...
    Select the iTunes folder you copied to the external
    ITunes would boot up like usual but the only songs listed were in the Cloud.  None of my Apps, Playlists, etc. appeared.
    Because you moved the library and have not yet told iTunes to Choose the library you moved.

  • How can I create a black and white table for Write BMP File.vi?

    I just want to create a black and white array to create the picture in B'n W

    You can use this VI, which outputs an 8-bit Greyscale Color Table.
    Good luck,
    Jim
    Attachments:
    8-bit_Greyscale_Color_Table.vi ‏11 KB

  • Simulation loop write to file

    I'd like to write to a spreadsheet the data from the two waveform charts in the attached VI. I've tried using the write to spreadsheet VI inside the loop but get prompted for a file name each iteration. When I put the VI outside the loop, all I get is the last value from the simulation. Is there anyway to simply store all the data from the simulation and then write the file after it is done?
    Thanks,
    Brian
    Attachments:
    WriteToFileExample.vi ‏164 KB

    Hi Brian,
          I'm sure it's possible to write all the data at once at the end, though, perhaps it's enough to suppress the file-prompt?  The Excel Application has a "Display Alerts" property that can be set to False.  This assumes there's a default filename supplied to the "Save" or "Save As" method.
    You can see an example that disables "Display Alerts" in the llb attached here. 
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Comparing nodes in two xml files

    I need help with a flex app i am making. My skill level in flex is pretty much basic, so some of the questions may seem easy but they r not to me
    I need an application that will load two external xml files and compare nodes. The xml files are pretty much identical except for the values ofcourse. After that i need to write this data to a new xml file which my flex app will generate. Can anyone plz give me an example code which i can later modify for my own application. You can give me any type of an example with the simplest xml files.
    Thank you in advance

    "for in" and "for each in" statements can be used to iterate through the nodes. If the two xml files are of same structure , you can easily compare the node attributes. Here is the link to the livedocs page for looping through xml nodes
    http://livedocs.adobe.com/flex/3/html/help.html?content=13_Working_with_XML_08.html
    Create xml from string
    http://www.cflex.net/showFileDetails.cfm?ChannelID=1&ObjectID=784
    Message was edited by: Subeesh Arakkan

  • Max.No.of Session Relationship b/w Trigger and Application in UCCX

    Dear All - Can you please explain Maximum Number of session in Trigger and Aapplication and their relationship
    When creating Application, We can define  Maximum Number of session -  maximum amount of simultaneous sessions (instances) that the application can handle.
    Also When creating Trigger, We can define  Maximum Number of session - maximum number of simultaneous calls that this trigger can handle,
    call after this number is exceeded gets the busy tone.
    If we leave Default it will take seesion which is defined in Applciation.
    Suppose if i define 5 Session for Trigger and 10 for Application, As soon as 6th Call hit the Trigger will get Busy Tone since Max session set to 5 for Trigger.
    It means Max.no of seesion is always same for both Trigger and Application / Trigger should have higher session than Application session.
    Can you please explain the scenraio In which Scenrio we actually required them in place.
    SIVANESAN R       

    If your trigger has less maximum sessions than the application, you will hear a busy tone. If your trigger has more maximum sessions than your application, then you will "hit" the default script that your application has configure in it. If you have the same maximum sessions for your trigger and your application, then you will hear the busy tone.
    Gabriel.

  • Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not writ

    Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not write anything there, I write but nothing comes and my problem is not löst.När I want to delete the movie / video image Frin desktop still arrive Finder wants to make changes.Type your password to allow this. But even that I type my password file / video is left I need help in an easier way or another set-even those on the terminal that I can not type my password to solve the problem Regards Toni

    If you want to preserve the data on the boot drive, you must try to back up now, before you do anything else.
    There are several ways to back up a Mac that isn't fully working. You need an external hard drive to hold the backup data.
    1. Boot from the Recovery partition or from a local Time Machine backup volume (option key at startup.) Launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
    2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
    3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data.

  • Linux Mint 17, migrated from Win7: Verify that you have enough disk space, and that you have write privileges to the file system, then try again.

    I get this error message (The messages could not be filtered to folder 'Generic Folder' because writing to folder failed. Verify that you have enough disk space, and that you have write privileges to the file system, then try again.) popping up on many, though not all of my incoming filters. I recently migrated from a Windows 7 installation to a Linux Mint 17 system.

    I did give it time to run through everything when I initially migrated, and it frequently will sit open for 3 to 4 hours while I'm working on other projects.
    The 'Generic Folder' represents sorting folders in my main mail account in Thunderbird. For example, my mail which is listed to filter into my 'Amazon' folder is sorted there with no problem, while any mail designated to be filtered into my 'Games' folder prompts the above error massage.

  • Create files and compare data

    I have an aplication that can recive data (an integer and string), it stores it in a datafile and adds the date and time.  However, I need that everytime a new set of data cames, it ctompares it with the rest of the data stored in the same file.  If it the integer (key)  is repeated, it should be stored in a different file if not, it should be stored there.  
    I been able to read and write data files in different vi, but I can't makean  application that does everything at the same time.  I will appreaciate any suggestions.   I'm new with LabView and there is a lot I dont know yet. 
    Thank you!!!!

    Thanks for your suggestion.  However, the main problem is not how to read and write together but how to compare the data.  I started by writing and reading vi becuase I wanted to insolate every part of my program, be sure it works and then build on top of it.   The complete application should do something like:
    --Open two files, one for new data, one for repeted data
    -- User enters data -> a key as integer and some string
    -- compare the new key with ALL the keys already stored in the file.
          -- if the file is empty or no key is found in the file, write the data in the file for new data
         -- If the key is repeted, write the data in the file for repeted data
    -- Keep doing this until the user stops the application.
    What I really need is to be able to compare the recent entered data to what was entered before.  I chose to save data in a datalog because it seemed the best solution and because I also needed to store the date and time.  However, if there is any other way to store the data and compare it, please let me know.  I tried arrays and clusters by themselves but it wasnt easy.  Datalogs worked fine storing data but now comparing is too hard because I dont know how to read the file, record by record while comparing it to the new data I just got.
    I hope this is a little bit clearer!

  • Can't read or write some files, internet is failing, youtube won't load, software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar, etc. Malware?

    Specs:
    iMac 10.8.5
    3,4 GHz Intel Core i7
    32 GB 1600 MHz DDR3
    Can't read or write some files, internet is failing, youtube won't load, security software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar and are randomly corrupted, when I entered something in the Youtube searchbar (when it was still working) it send me to a site with sexadds.
    I tried restart my iMac and when I was logged back in, my dock preferences were reset.
    Also tried to download some security software to check my Mac for malware, but when I did, I tried several, I got a notification that said something like 'dumpfiles (don't know if this is the right translation...) damaged'.
    I'm taking screenshots from all the weird notifications I get and even three quarters off the screenshots I took in the last three hours are already unreadable.
    It started this morning when I tried opening a Premiere Pro file on which I worked the night before.
    When I tried opening it, it said the file was damaged and could not be openend.
    I tried opening it with AE or importing the file in a new project but nothing helped.
    When I tried looking for autosaves, this is the really weird part, there were none.
    Even though there are autosaves from my other projects, this one was completely gone.
    It looked like the day before never happened on my computer.
    Also when I openend Premiere all the recent projects had been wiped.
    So at first I thought it was a Premiere Pro failure.
    But than, later on the day, I tried loading some RAW files from my compact flash card.
    This is where I would get an error (error -36) which said some data cannot be read or written.
    I tried importing the files with a view different technics, from dragging to importing via Lightroom and I succeeded with Image Browser.
    But when I tried moving the files to an other folder the same error occurred.
    While dealing with this issue I wanted to put on some soothing music on youtube.
    This is when the next weird thing occurred: youtube wasn't completely loading in Chrome. I refreshed a view times, checked the internet connection and still no difference.
    When I tried in Safari it did work but when I clicked enter on the searchbar in Youtube, a page with sexadds appeared (I didn't install AdBlock in Safari...).
    I read about this 'phishing' where you are redirected to a site were a possible malware installment can take place...
    I don't know if it's connected to any of the problems I've been having but I just never experienced this on a mac, I have been a Mac user for 10 years now.
    On top of it all, internet started working worse and worse and now it's not even working at all. I had to fill in the password over and over, normally it remembers.
    Just like my system preferences, all the preferences I had with Chrome where also reset.
    Also somewhere in between I got this notification: Mac OS X must restore library to run programs. Type your password to allow.
    To me this is all very weird and suspicious. I have clearly no idea what's going on. Could this be another sort of trojan horse or malware?
    Some background info which could be helpful for solving this mystery:
    two months ago the one year old Fusion Drive in my iMac just broke out of nowhere.
    I got it replaced by a qualified apple repair store.
    When I got my computer back, all the files where gone.
    I got on the internet without AdBlock installed yet.
    A game or whatever it was, can't clearly remember, got installed by accident.
    I deleted it immediately.
    Only two weeks later, I couldn't log in to my account. It didn't recognize my password and username. 
    So I brought my mac back to the store.
    Here the repair guy said it was a minor thing and he just needed to reconnect my account. He also mentioned he found a downloaded game name Sparta and it probably had something to do with the error.
    I asked him; could it be a virus? He replied no way.
    I don't know why I couldn't be a virus, just because it's a mac doesn't mean it cannot be done.
    So today I tried installing anti virus software (such as avast- was in a weird language looked like slovenian, clamxav - was in slovenian) but I couldn't install them.
    PLEASE help me! I don't know what to do anymore, I work fulltime and I need my computer, I have no time to bring it in for repair, are there other perhaps easier ways?
    Could this be the work of a virus or a malware? Or is it a disk permissions issue?

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • When I open a raw file (NEF Nikon 7100)  and apply setting then click save, I get an error ( could not complete your request because of a program error ). Ideas?

    when I open a raw file (NEF Nikon 7100)  and apply setting then click save, I get an error ( could not complete your request because of a program error ). Ideas?

    Oh, dear.
    If you use PSE as your external editor for iphoto, you need to save the images back to iphoto by using Save, not Save As and not changing anything like the name or format that would bring up the Save As window. (You may need to adjust the editor prefs>saving files>on first save to save over existing.)
    OR you can export the photos from iphoto to the desktop, use file>open in the editor and then change whatever you want and either import the saved image to the organizer or import it back to iphoto as a new file. What you are doing is extremely risky, particularly to the iphoto library which you may easily damage by your workflow.
    I would start the organizer holding down the shift key, then create a new catalog and switch to the new one. Then try opening the editor without opening an image and see if you get any farther.
    PSE and iphoto are not designed to be used as you've been doing. You are trying to write to the iphoto library from outside iphoto, which is the fastest known way to corrupt the library and lose all your photos.

  • When I export a playlist and then open in excel, do whatever sorting I want, I then save the file and reimport into itunes but not all the songs are there. It appears to be from "comma's" in the song name. Any solutions?

    I see songs such as "Monday, Monday" or "Paint It, Black" or even the artist name such as "Fireballs, with Jimmy Gilmer" which have comma's in them, being a problem when I try to do the following:
    1. Export a playlist which contains songs which are all there and play fine, but some have comma's in the title such as listed above.
    2. I then open that file in Excel and bring it in as a Tab-delimited file.  Everything lays out fine, and all the songs are thing (including those with comma's).
    3. I then sort the varoius fields I want (which I can't do in i-tunes because i-tunes won't sort it properly), and resave the file as a newly named file, which is also a .txt file.
    4. I then import that playlist into my itunes. It is exactly the same songs that I just had exported but i-tunes says some of the songs can't be found.
    I have traced this problem to comma's in the file name of the song such as listed above.  There must be a solution to this either as the file is opened in excel or in how it's saved or some other solution short of having to rename song/artists without using comma's. 
    Thanks.

    The additional problem is the file name of the song itself.  Even if I were able to delete the commas or replace with a space for example, changing the file name would result in itunes not being able to find the file.  I would have to go through each file (out of about 15,000+ songs) to find any that have titles such as described in this thread and change not only the song and artist in the fields, but changing the mp3 file itself. 
    I fear that I am really pretty much going to have to start with a list of songs that have no comma and then do a file compare to find those songs with commas and then just physically moving them into a new playlist I'm trying to create, but this is a royal pain as I want to be able to create a variety of playlists based on these chart dates/peak positions. 
    I'm trying to sort the songs in this manner:  I use different fields in itunes so that I can put the "peak position" of each song based on Billboard charts, as well as the date the peak position was acheived. I use the "comment box" for that.  I use the "grouping" field for my peak position.
    So I end up with something like "10/14/1980" in the comment box as the peak position for a song which is in the grouping field, and so forth.  If I try to sort the comments column in itunes for example, it won't sort properly. If I sort the Grouping field, it will bring up all the "1's", but that's followed by "10", 11, ...19, then "2", etc.  This is why I want to export the playlist and sort it as I want, and then reimport the playlist into itunes. 
    What I'm ultimately trying to achieve is a year-by-year peak position playlist so that I end up with every #1 song (in this case) from, say, January 1st 1980 and then every #1 song in sequential order for the rest of the year falls in line.  I have chart position dates from 1955 through 1999.  I have entered in all the data from Billboard books I own so I can really create some amazing playlists, but these commas are problematic. Had I known this ahead of time I would have made "Monday, Monday" as "Monday Monday" and not included commas, but it's too late for that.
    Any suggestions?

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

Maybe you are looking for

  • My computer will not load Pay per-view sites

    I have tried numerous times to pull up payperview sites. When I try to access the site i get the message: "Safari can't open the page ....... because it can't find the server ....... I have called customer service for the sites and they have tried tr

  • Thread Safe Issue with Servlet

    I saw the following statement in one of the J2EE compliant server documentations: "By default, servlets are not thread-safe. The methods in a single servlet instance are usually executed numerous times simultaneously (up to the available memory limit

  • Automatic import me

    How do I desacti've automatic import media?

  • CSS 11503 load-balancing with MS Print Servers

    We are trying to load-balance print server connections between 2 MS print servers. When we try to connect to the print servers name, (\\PS01) or even the VIP address, we get a Path not found error. However, if we direct the path to the actual name or

  • Bouncing Mail icon

    Hi, I feel silly- but I know someone out there knows this in a New Yors second! I have a MacBook Pro - everything the latest. With "MAIL" - it used to be when I receive an email - the little icon in the dock bounced, along with the sound effect. I ze