Play sound in specified duration and desired file when reading data with VISA functions ?

Hi.
I read data with VISA read function and then I use functions like multiple for showing data on Chart. every thing is OK.
now I want play a specified sound (like a 3s song in my desired folder) when signal amplitude cross over from specified value. then after desired time, it will be wait for new cross over from specified value and this procedure repeat again until I stop the program. 
Data comes from MCU and it doesn't stop when system play sound and when system play sound, incoming data for this part (play sound) will be ignore them until specified expired.
I use this VI for reading data and mentioned part which is sound part is empty and I don't know what I must done ?
altougth I use another while loop for sound apart because I want save CPU time.
Thanks.
Solved!
Go to Solution.

I would recommend making the data type of the notifier a cluster that contains a path and a numeric (double).  The path tells the player which file to play.  The numeric is the duration.
Now for a slightly complicated, but really neat, way to stop your second loop.  Do not use a second notifier.  Instead, send the normal notification but use Not A Path for the path in the cluster.  Your second loop can do a check for the Not A Path and stop when that is recieved.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • I am using a mini display to hdmi with my macbook and the display works fine. However, the sound will only play iTunes such as music and movies but when i go online to watch movies on youtube it will not play any sound. Please help

    I am using a mini display to hdmi with my macbook and the display works fine. However, the sound will only play iTunes such as music and movies but when i go online to watch movies on youtube it will not play any sound. Please help

    HDCP maybe? Read this http://www.macnn.com/articles/08/11/26/displayport.drm.conflict/

  • A520 Speaker is only playing sound on the subwoofer and 2 other speakers

    My A520 Speaker is only playing sound on the subwoofer and 2 other speakers i tried every thing I could, but cant seem to find the problem (win 8.1)

    I checked on Creative's support site and search for A520 and this is what I found http://support.creative.com/kb/ShowA...aspx?sid=64705
    I think because your source is stereo that's why you are only hearing sound from 2 speakers and the subwoofer. You will need to enable virtual surround in your sound card to be able to get all the speakers playing I think.
    You can do a speaker test by going to sound, playback devices and click on configure to test the channels in Windows.

  • How do you export a song in logic pro x. ive tried now for 2 hours to do it and all it gives me and indivial files when i want the whole thing as a project

    how do you export a song in logic pro x. ive tried now for 2 hours to do it and all it gives me and indivial files when i want the whole thing as a project

    Go here:
    http://help.apple.com/logicpro/mac/10/
    Search on   Bounce

  • User I/O and db file parallel read is high in AWR report

    Hi,
    We have one performance issue during a job execution.
    From the awr report we have identified one query with a table having millions of records causing problems and then we had also fine tuned that query by changing it's code and by using the optmizer hints. It is being executed in plsql batches. After fine tuning, On the first batch execution(first 5000 records) the query is taking only 5 mins, but on the consecutive batches it is consuming more time( more than 30 mins).
    From the awr report I got the statistics as
    Release : 11.2.0.2.0
    Instance Efficiency Percentages (Target 100%)
    Buffer Nowait %: 100.00 Redo NoWait %: 100.00
    Buffer Hit %: 85.44 In-memory Sort %: 99.98
    Library Hit %: 99.76 Soft Parse %: 99.15
    Execute to Parse %: 88.91 Latch Hit %: 100.00
    Parse CPU to Parse Elapsd %: 87.32 % Non-Parse CPU: 98.65
    The buffer hit % is good. On each batch execution it is taking different set of records.
    Top 5 Timed Foreground Events
    Event Waits Time(s) Avg wait (ms) % DB time Wait Class
    db file parallel read 120,485 42,540 353 89.60 User I/O
    DB CPU 3,794 7.99
    db file sequential read 145,074 606 4 1.28 User I/O
    db file scattered read 70,030 556 8 1.17 User I/O
    direct path write temp 12,423 21 2 0.04 User I/O
    So the I/O is our main concern since that query contains one table with millions of records.
    Host CPU (CPUs: 24 Cores: 24 Sockets: 4)
    Load Average Begin Load Average End %User %System %WIO %Idle
    1.40 1.45 0.6 0.3 3.7 99.0
    Load is also normal.
    From the Time model statistics , sql execute elapsed time is 98.27% of db time and only 7.99% is that of DB CPU.
    Memory Statistics
    Begin End
    Host Mem (MB): 64,318.0 64,318.0
    SGA use (MB): 30,720.0 30,720.0
    PGA use (MB): 488.2 497.1
    % Host Mem used for SGA+PGA: 48.52 48.54
    Both the size of sga_max_size and sga_target are 32,212,254,720(32gb) bytes and that of
    pga_aggregate target is 629,145,600(600mb)
    from this it is evident that the memory is still available(so increase in memory size is not an option).
    The sql statistics for that query shows like that
    Elapsed Time (s) Executions Elapsed Time per Exec (s) %Total %CPU %IO SQL Id SQL Text
    44,950.03 55 817.27 94.67 6.99 94.72 79dgmrxh4kv74 SELECT /*+ index(cdr_data cdr_...
    I can't understand whether the problem is in the database side or with the query?
    If the problem is with the query, then how it has been executed in 5 mins for the first batch ?
    (all the batches are having 5000 records each).
    And how can we reduce the db file parallel read ?
    Your valuable advice will be greatly appreciated.
    Thanks in advance
    Manoj Kumar N

    "db file parallel read" is likely to be associated with something like index prefetching.
    See:
    http://www.freelists.org/post/oracle-l/RE-Calculating-LIOs,11
    http://aprakash.wordpress.com/2012/05/29/index-range-scan-and-db-file-scattered-read-as-session-wait-event/
    http://jonathanlewis.wordpress.com/2006/12/15/index-operations/
    Tune the SQL.
    Review the execution plan.
    Check whether the statistics are accurate.
    Review whether the index hint (and others that we can't see) is appropriate.

  • Problem occurring when opening and saving files in AI SC5 with Windows 7

    Hi, I ‘am a Graphic Designer and first time working in UAE Windows 7 is basically the only OS here. My PC is:
    HP Elite 7000
    Intel® Core™ i5 CPU 2.67GHz
    4GB RAM
    32-bit
    Now to the problem, not that knowledgeable in IT stuff so here goes:
    1. Problem occurring when opening and saving files in AI SC5 with Windows 7. (You will actually see a “Not Responding” word coming out while opening and saving files, whether small or large files)
    2. Locked layers occasionally are moved accidentally.(Working on multiple layers is normal so we need to lock it specially the once on top. But there are times I still manage to select locked layers)
    3. After typing and locking the text, pressing “V” for the arrow key shortcut is still added to the text that is locked. (After typing I lock the text layer with my mouse and Press “V” to activate the arrow key… yes the arrow key is activated but the text is still typing the actual keyboard pressed)
    I’ve only use the brand new PC and installer for a month now. Not sure if this is compatibility issues or something else I’m not aware of.
    Thanks in advance to people that will reply.
    Cheers!!!

    Well I’m still wondering if it is compatibility issues because I’m also having problem with Photoshop CS5. These 3 are all bought at the same time (PC, Illustrator and Photoshop installers). The problem I’m having in Photoshop is not that too important, every time I Ctrl+O to view files, all PSD are shown in white paper like icons, no preview, and saving as well.
    Or I just purchased a corrupted or pirated installers… Adobe updates are done every time I’m prompted.

  • I deleted adobe and now files won't open with preview automatically like they use to. How do I fix this?

    I deleted adobe and now files won't open with preview automatically like they use to. How do I fix this?

    I think you solved my problem! Upon following your advice, I first got a message that I had not allowed a connection to the Tax dept computers, which would prevent the file I need to fill out from being e-filed. I proceeded to then open the file at the top of which was a security banner at which I chose the site as safe. I then filled in the first line of the form which autofilled other lines telling me I was connected with the tax site. In a few days when I have the data I need, I will actually attempt to file the return. If there is a problem, I will send another message. Thanks so much for your assistance!

  • Very high log file sequential read and control file sequential read waits?

    I have a 10.2.0.4 database and have 5 streams capture processes running to replicate data to another database. However I am seeing very high
    log file sequential read and control file sequential read by the capture procesess. This is causing slowness in the database as the databass is wasting so much time on these wait events. From AWR report
    Elapsed: 20.12 (mins)
    DB Time: 67.04 (mins)
    and From top 5 wait events
    Event Waits Time(s) Avg Wait(ms) % Total Call Time Wait Class
    CPU time 1,712 42.6
    log file sequential read 99,909 683 7 17.0 System I/O
    log file sync 49,702 426 9 10.6 Commit
    control file sequential read262,625 384 1 9.6 System I/O
    db file sequential read 41,528 378 9 9.4 User I/O
    Oracle support hasn't been of much help, other than wasting my 10 days and telling me to try this and try that.
    Do you have streams running in your environment, are you experiencing this wait. Have you done anything to resolve these waits..
    Thanks

    Welcome to the forums.
    There is insufficient information in what you have posted to know that your analysis of the situation is correct or anything about your Streams environment.
    We don't know what you are replicating. Not size, not volume, not type of capture, not rules, etc.
    We don't know the distance over which it is being replicated ... 10 ft. or 10 light years.
    We don't have any AWR or ASH data to look at.
    etc. etc. etc. If this is what you provided Oracle Support it is no wonder they were unable to help you.
    To diagnose this problem, if one exists, requires someone on-site or with a very substantial body of data which you have not provided. The first step is to fill in the answers to all of the obvious first level questions. Then we will likely come back with a second level of questioning.
    But when you do ... do not post here. Your questions are not "Database General" they are specific to Streams and there is a Streams forum specifically for them.
    Thank you.

  • My mac is converting Word and Excel files into Pages and Numbers files when I click to open them (or download and open them) from an email. I do I get this to stop? It's really aggravating.

    My mac is converting Word and Excel files into Pages and Numbers files when I click to open them from an email. Downloading them and opening them doesn't help. How do I make this stop? I don't use iLife and don't want to; my clients are using Office and it's easier for me, except when I have to copy and paste everything they send me from an iLife file back to Word and Excel. Help!!! It's like Apple has become Microsoft, forcing us to use their apps.

    Do you have Word & Excel installed, if yes, navigate in the finder to an example of each, right click and select 'Get Info' scroll down to 'Open With' and select the appropriate program, check the box that says 'Change All'

  • "Premature end of file" when reading in a GZIP file!

    Hello i'm trying to figure out what may be causing a "Premature end of file" when reading in a GZIP file!
    Basically, what i'm trying to do is read a GZIP file, create an XML file in GZIP format and then validate the GZIPed XML file using the SAX validator and this process works fine for LOW volume data, but for HIGH volume data it seems to have several problems. One problem i was getting was 'Corrupt GZIP trailer', which seems to be a known bug, used an override here and it's ok, and now i'm getting the 'Premature end of file error'.
    Here is the error report, see <<<<<<<<<!
    START: Wed Aug 03 12:03:41 EDT 2005
    Runparms :
    host: ....
    port: ....
    sid: ....
    usr: ....
    site: ....
    val_type: HVPEZ -- previously HVPEX, reason, reading zip file (.gz)
    dbo: NULL
    ddl: /home/......../HLPVAL/DAT/hlp_ddl_file
    table: ......
    db_name: NULL
    dat_file: /..../...../....../xxxxxxx1.dat.gz
    xsd: /home/....../....../XSD/xxxxxxx1.xsd
    sql: NULL
    debug: NULL
    sql query null
    pid: 11751
    xml: /home/.........../...../XML/xxxxxx1.dat_HVPEZ_xml.gz
    rep: /home/.........../...../XML/xxxxxx1.dat_HVPEZ.valrep
    fatalError:
    setValidity:
    Error number : 1
    Error starts on line number : 1302706816
    Error starts on column position: 8
    Error text is : org.xml.sax.SAXParseException: Premature end of file. <<<<<<<<<<<
    org.xml.sax.SAXParseException: Premature end of file.
    Here i'm reading in a GZIPed file, i then generate the XML and write out another GZIPed file, see <<<<<<<<<<:
           try {
            GZIPOutputStream     gz = new GZIPOutputStream(new FileOutputStream(xp.xml_file));  >>>>>>>> out GZIPed
            PrintWriter        outf = new PrintWriter (gz);
            GZIPInputStream      in = new GZIPInputStream(new FileInputStream(xp.dat_file),4096); <<<<<< in GZIPed
            byte[] buf = new byte[4096];int len=0; String[] sa = new String[NUM_COLS]; int bj=0; char[] ca=new char[1500];
            while ((len = in.read(buf)) > 0)
                String hrec = new String();
                for (int b=0;b<len;b++)
                     Byte byt=new Byte(buf); int bi=byt.intValue(); char c=(char)bi; ca[bj]=c;
    if (c == '\n')
    hrec=new String(ca); hrec=hrec.trim();
    for (int k=0;k<1500;k++) ca [k]=' ';
    int prevj=0; j=0;int fcnt=0;
    for (int w=0; w<hrec.length(); w++)
    if (hrec.charAt(w)=='|')
    sa[j]=hrec.substring(prevj,w);fcnt++;
    j++; prevj=w+1;
    sa[j]=hrec.substring(prevj,hrec.length());fcnt++; bj=-1;
    for (int i = 0; i < NUM_COLS; i++)
    if (i>(sa.length-1)) { sToken = new String(); } else { sToken = sa[i]; }
    if (sToken.indexOf('<')>-1 || sToken.indexOf('>')>-1 || sToken.indexOf('"')>-1 ||
    sToken.indexOf('&')>-1 )
    String sToken2 = new String();
    sToken2 = normalize(sToken);
    sToken = sToken2;
    outf.write(" <"+_columnNames[i]+">"+sToken+"</"+_columnNames[i]+">"+"\n");
    outf.write(" </"+FILE_NAME+">"+"\n");
    bj++;
    outf.write("</hlp_data>"+"\n");
    outf.flush(); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here if tried every combination of close command ect.
    outf.close();
    gz.finish();
    gz.close();
    in.close();
    Here i'm reading the GZIPed file from the previous program and this is where the 'Premature end of file' error is occurring. Notice that i'm using an extended class Called WorkingGZIPInputStream, this is to bypass the error message 'Corrupt GZIP trailer' message that seems to occur when processing high volume files, here's a previous link on issue:
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=011624
           HlpValSax1  sx = new HlpValSax1();
           SAXParser   sp = sx.getParser(xp.xsd_file);
           if (
                  xp.val_type.substring(0,5).equals("HVPEZ")
               || xp.val_type.substring(0,5).equals("HVPEX")
               || xp.val_type.substring(0,5).equals("HVOEX")
               WorkingGZIPInputStream is = new WorkingGZIPInputStream(new FileInputStream(xp.xml_file),4096); <<<<<<<<<<
               sp.parse(is,dh);
           else
              File file      = new File(xp.xml_file);
              InputStream is2 = new FileInputStream(file);
              sp.parse(is2,dh);
         catch (FileNotFoundException nf) {System.out.println(nf);}
         catch (SAXException sa)          {System.out.println(sa);}
         catch (IOException  io)          {System.out.println(io);}

    Turns out things were not exactly the same. When I had done it from disk I would always create a new InputStream when reading the resource, when doing it from the Jar I was reusing it.

  • HT204268; I have purchases on an aol login pre 2008 and all recent stuff under an apple id. I currently see and use everything when i login with the apple id. After March 31st will my apple id account still show and contain all?

    HT204268; I have purchases on an aol login pre 2008 and all recent stuff under an apple id. I currently see and use everything when i login with the apple id. After March 31st will my apple id account still show and contain all?
    I understand the instructions to create a new account id (apple id) from the old aol account. However, does this mean my purchases will be split into 2 accounts; or does the fact that I currently see everything under my apple id (regardless of the purchased by username) mean this will all still appear in my current account as it does now?

    You see them where when you login your non-AOL account ?
    If you currently have two accounts (the AOL username account and an email address account) then you will continue to have two accounts, and nothing should change when you update the AOL account to be an email address (apart from how you access that account).
    You will just be renaming the account to have an email address for accessing it, not creating a new account.

  • My iPad 2 won't receive text messages and is not sharing any data with my iPhone 4. Please help!

    My iPad 2 won't receive text messages and is not sharing any data with my iPhone 4. Please help!

    The iPad receives Text Messages through Apple's iMessage feature. Make sure this is turned on on your phone. Also, text messages received at your phone number are not shared with the iPad. Make sure that iMessage texts are being sent to your EMAIL ADDRESS

  • How to read three parameters for exemple temperatur​e,current and voltage from the same port with visa read and separate them in a table

    Hi i want to read parameters with visa read, from three sensors related to  pic16f877a, using  module xbee ..but i want to make every one from those parameters (temperature, voltage and current) in a table ..it's the first time i use Labview so i don't know if ther is a solution for my problem so if any one have any idea please help me. thnx in advance. 

    [email protected] wrote:
    Hi i want to read parameters with visa read, from three sensors related to  pic16f877a, using  module xbee ..but i want to make every one from those parameters (temperature, voltage and current) in a table ..it's the first time i use Labview so i don't know if ther is a solution for my problem so if any one have any idea please help me. thnx in advance. 
    The short answer is: "Yes, of course."  But you are going to have to do the legwork and learn LabVIEW basics before we can offer meaningful help.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Hi I'm thinking of buying Adobe After Effects CC for my MacBook Pro. But I am worried it won't work. Here are my specs 2.4 GHz Intel Core i5, 4 GB Ram, 1333 MHz DDR3,13-inch (1280 x 800) are my displays and I'm up to date with latest software.

    Hi I'm thinking of buying Adobe After Effects CC for my MacBook Pro. But I am worried it won't work. Here are my specs 2.4 GHz Intel Core i5, 4 GB Ram, 1333 MHz DDR3,13-inch (1280 x 800) are my displays and I'm up to date with latest software. I need to know if this will work on this Mac and or if there is any other After Effects that will work.

    The display would not. However, your model does not have a discrete GPU, and the integrated (Intel 3000) would not meet CS6's requirements (any CS6 software) alone.
    However:
    Standard VRAM:
    384 MB
    Maximum VRAM:
    512 MB*
    Details:
    Apple reports that "memory available to Mac OS X may vary depending on graphics needs. Minimum graphics memory usage is 384 MB". *If upgraded to 8 GB of RAM (or more), 512 MB will be reserved for video function.
    In other words, you would need to upgrade your RAM to 8 GB. The VRAM (video ram) of the processor can exceed its specifications if you upgrade your memory to 8 GB. In order to run the software, you would have to upgrade your RAM first:
    Crucial Memory Upgrades for Macs - Apple Memory
    Complete MacBook Pro "Core i5" 2.4 13" Late 2011 Specs

  • I used to have mobileme which never really worked properly, and now i would like to use Icloud which work with my Iphone and Ipad, however when i synch with my macbookpro, it does not synchronize properly. Can u please help me?

    I used to have mobileme which never really worked properly, and now i would like to use Icloud which work between my Iphone and Ipad, however when i synch with my macbookpro, it does not synchronize properly. Can u please help me?

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

Maybe you are looking for