Best way to make program wait for input from NI USB 9162?

Hi, I'm somewhat new to Labview, but through all the tutorials and online help I'm still having trouble getting this to function properly.
The USB adapter is hooked up to a network cable split into single wires reading in a voltage coming through several seperate oscillators.  
Testing in the lab, the program included below works fine when I run the program, then quickly administer a shock to the table.  In the real world scenario though, I'm trying to make the program wait to record data until the first shock reaches the first oscillator before recording data, but I just can't seem to find an easy way to make this work.
Attatched is an example of the program.  Any help would be greatly appreciated.  Thank you. 
Attachments:
Acq&Graph Voltage-Int Clk-rh-tt-1.vi ‏56 KB

  Hi,
I think I have the answer you're looking for! Please see the attached VI.
I moved the graph indicator inside the "true" case of the case structure. Before, your VI was sending data  to the graph from an empty timestamp constant with each iteration of the "false" case. Now the VI only sends data to the graph if a true is read.
If you're wondering why it takes a bit of time for your graph to stop updating before it stops writing new data, it's because you're filling up a buffer of sampled data by using a queue. If you're writing to the buffer faster than you're reading from the buffer, you may encounter an "overflow" situation when the queue gets full. To avoid this, you might consider using a notifier rather than a queue. It's the exact same thing as a queue, but it gives you only the most recent value, allowing new values to overwrite old values.
Hope this helps.
Regards,
Dan Richards
Certified LabVIEW Developer
Attachments:
producer consumer DAQmx threshold.vi ‏57 KB

Similar Messages

  • Best way to make EventDispatchThread wait for SwingWorker?

    Hi ,
    I have been scouring these forums looking for a simple solution, but can't find one. I want to use a SwingWorker to connect to a server an return some results, but I don't want the EventDispatchThread to continue on until the SwingWorker 's finished() method is done.
    What is the easiest way to do this?
    An example would be great!
    Thanks
    private void myMethod(){
         new SwingWorker(){
    public Object construct(){
    //connect to server
    return null;
    public void finished(){
    //open window with results
    }.start();
    //Wait here until finished() completes.
    }

    Hi
    I have a similar issue but in a different context.
    In my application multiple tab pages are shown. There is an option to close All Tabs. When this is done, firstly it has to save the contents in both the tabs.Each tab contains a Report which contains multiple views.
    For single Tab, the save operation is as follows.
    1. Shows a JOptionPane to enter the Report name,
    2. For each view present in report show a JOptionPane to enter the view name. (This is done on a different thread. (Not SwingWorker) )
    For single Tab its fine.
    If multiple tabs, then Firstly
    1. JOptionPane to enter the Report name is shown.
    2. Again the JOptionPane to enter the second Report name is shown. It should have been to complete saving of the first report with its views first then only it should start the second report.
    I have a for loop . For each Tab i will be calling a save function. Save function firstly shows a JOptionPane to get the report name and new Thread is started which will save the complete view inside the report. I need this operation to complete first before proceeding with the next tab.
    For loop is called from the EDT.
    Any help on this?

  • The best way to make proxy files for editing?

    Hi,
    What is the best way to create proxy files for editing? I'm thinking Apple ProRes 422 (Proxy). The original material is DVCPRO HD 1080i50, shot on Panasonic P2 cards, and copied on to hard drives. But as there is about 400 hours of it, I desperately need to find a clever way to make smaller proxy files for editing.
    I would also like to make the proxies at a smaller resolution than 1080i for the editing process.
    I guess it's possible to import the media and then batch export it to the proxy format, but Is there a better way?

    I'm not able to ingest the material directly from the P2-folders as ProRes 422 (Proxy). No matter how much I change the import settings in "Log and transfer", it still ingests as DVCPRO HD 1080i50.
    Correct. DVCPRO HD P2 can only come in as DVCPRO HD. You can't transcode it. AVCIntra P2 is what you can bring in as ProRes. (Sorry Tom).
    I can of course transcode it form there to the proxy format and delete the ingested files,
    Why? Why do that? You have ingested all the files, right? You ALREADY HAVE THEM...right? Why not work with them? You obviously have the room (20TB). Why import all this, then now take the days it would require to make proxies?
    Making the ProRes-proxies directly from the P2-material seems more logical, or isn't it?
    DVCPRO HD P2 cannot come in as anything else, so the offline/online workflow for them doesn't work unless you import it all, then transcode to a smaller format...but then need to keep the originals online to relink to when you are done. If you wanted to do an offline/online, you needed to research this better...or test it...before you shot your hundreds of hours only to find that what you want to do won't work.
    Shane

  • Best way to make a slideshow for a wedding?

    I am trying to make a slideshow for a wedding. What is the best way to make this?

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • HT4796 I started Migration Assistant and then my old computer spontaneously restarted.  I am back in Migration Assistant but my [new] iMac is still waiting for input from my old computer, and my old computer is waiting for the iMac to connect.  What do I

    I have a new iMac.  I'm using Migration Assistant to transfer files.  My old computer spontaneously shut down.  I restarted it and am trying to use Migration Asst again, but each computer is waiting on input from the other one.  What do I do?

    Let me see if I've gotten this right! You want to remove an account from BOTH machines? Do this for your new machine first, then for the other.
    Click the Apple logo on the top left of the screen, System Preferences, Users and Groups (under Systems), unlock the lock in the window if its locked (you need to know the password), select the user that you wish to remove, and click the - sign next to the + sign for Login options. A window will pop up with some options. Select Delete this user and securely, and click 'Delete user'.
    After this, do an update from the App Store.
    Thats all there is to it.
    For the other machine repeat the process except for one thing. Before you delete the user in this case YOU, you will have to give Administrator priviledges to your son bu checking the box 'Allow user to administer this computer'.
    Do NOT do anything from Finder ... if you dont know how to fix the consequences of the problems caused.
    There is no need to unauthorize your iTunes account on your new machine. Do it on the old machine though.

  • How do i make program wait for user input in some dialog box?

    basicly function public UserData getUserData()
    displays window and returns a value when somebody has pressed OK in JFrame. How?

    Extend from JDialog instead of JFrame and it'll give you the waiting that you need.
    To use a JFrame is a little more involved.
    I had to the other day also. I wanted to have a dialog that would be both a dialog and a JFrame. Reason: when the app started up, I wanted to get some data from it (and have it appear in the task bar for normal application selection), and also wanted the app to call the same window when running but as a dialog (ie: no extra task bar icon). However only the JDialog stopped the calling thread for the dialog.
    To get the JFrame to do the same, I invoked a thread and piled all of the logic into that, and when the user did all that I wanted them to, closed the Frame and released the thread with all of the statefull stuff that I wanted.
    Worked a treat.

  • Best way to make disk images for game disks?

    I want to play my beloved Battlefield 1942 on my Air... and I realized that I need the disk! ...Is there a way to turn the game disk into an image and "launch" it so the program thinks it's in the diskdrive, etc?
    I looked in DiskUtility, and I was a bit unsure what kind of image to make it.
    tia,
    e

    <font "size=+1">Duplicate a CD or DVD
    1. Insert the DVD/CD;
    2. Open Disk Utility, and select the DVD/CD from the left side list (select the DVD/CD icon on top);
    3. from the DU File menu select New | Disk Image from Disk 1;
    4. Choose to format the disk image as DVD/CD Master, name the disk image and click Save;
    5. When the .cdr file is finished select it with mouse and press COMMAND-I to open the Get Info and check the box to lock the file;
    6. Choose the .cdr file from the left side list, click Burn, and insert a new, blank DVD or CD.
    You can skip the last step if you don't want to burn the image to a CD or DVD. There is no guarantee this will work since many games will only work with a CD or DVD rather than a mounted image of one.

  • What is the best way to make a program fit different monitor resoultions?

    In our lab all our test stations have 1280x1024 resoultion monitors. In the "other lab" all the test station monitors are 1440x900 resoultion.
    Now I am tasked with making my programs run on the test stations in the other lab. I have tried setting the options "maintain proportions of windows for different monitor resoultions" and "Scale all object on front panel as the windows resizes" and of course neither one of these options really does what I would expect it to do.
    What is the best way to make programs fit different monitor resoultions?

    J-M wrote:
    I resize the Front Panel when the program start to fit the monitor resolution.  After that, I use the "SBE_Determine If Screen Resized.vi" from TomBrass (http://forums.ni.com/t5/LabVIEW/Resizing-controls-on-a-tab-control-within-a-pane/td-p/1520244 ).  This vi is very useful if you don't want to monopolize the CPU with the "Panel Resize" event.
    I don't like this function for a couple reasons.  First for the example you don't need any custom code to handle the window resizing, just use a couple splitters.  Even if you did need to handle the resize, you only resize after the mouse is up after the resize which is not how normal Windows programs work they resize as the mouse moves.  So I modified the VI to resize objects as you resize the window.  Then because doing this can generate 100 events very quickly, I use a boolean in a shift register to make sure that we only handle the resize event if there is no new resize events after 0ms.  This essentially makes a lossy queue and handles the last resize event.
    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.
    Attachments:
    Resizable_Graph.vi ‏22 KB

  • Make Powershell Prompt for Input

    Hello,
    I'm would like to make some scripts for some of the more common task that I do daily and I was wondering if there is a way to make powershell prompt for input when needed. For example:
    Get-Mailbox -Identity | Get-MailboxStatistics | Sort TotalItemSize -Descending | FT displayname, totalitemsize, itemcount, database, -AutoSize
    In this script I would need to be able to run it for any user in our company. Is there a way for me to be prompted for the 'Identity' in this script?
    Additionally, for another script is there a way to have multiple points where I'm prompted for input. Example:
    Add-MailboxPermission -Identity -User -AccessRights FullAccess -InheritanceType All
    Would I be able to be prompted for both the 'Identity' and the 'User' input?
    Thanks in advance

    Hi,
    Use Read-Host:
    $identity = Read-Host 'Enter the Identity username'
    $user = Read-Host 'Enter the User username'
    http://ss64.com/ps/read-host.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • What is the best way to make a list of addresses for envelopes or labels?  Address book, numbers or pages?

    What is the best way to make a list of addresses for envelopes and labels?  Address book, Pages or Numbers?

    I liek your idea of having multiple images in a grid. I think
    that would be the best bet as you mentioned. Having one big picture
    would be hard to distinguish the sub-areas with mouse coordinates.
    I think checking the coordinates for the mouse would be very
    tedious because I would have to check for the left boundary, the
    right, top, and bottom for each sub-area!
    What do you mean by using button components and reskinning.
    Is this simply using buttons and changing the way they look? I'm
    just trying to save time and memory, because if I had a 10 by 10
    grid, thats a hundred buttons. Wouldn't that slow down the machine
    alot? And for that matter wouldn't having a grid of 10 by 10 images
    also by the same deal?
    Thanks for the input, I'm just trying to find the most
    efficient way to do it.

  • What is the best way to make PSD into HTML for emails

    What is the best way to make PSDs into HTML for emails? Will the new feature in Dreamweaver work for emails as well? I am using Cheetah mail, but I need to be able to turn PSDs into HTML so I can use it in Cheetah mail.  I have a general idea of how to do this, but I'm stumped about where to begin.

    Use PShop for images only.  Use DW to create your tables and inline CSS styles.
    Many e-mail clients do not show images for security reasons.  So graphics heavy e-mails are not an optimal way to communicate with your mailing list.
    See Alt-Web Articles, HTML E-mails and Newsletters
    Nancy O.

  • Best way to make a Constant Power Load

    What would be the best way to make a load that always draws the same amount of power whatever the voltage on it. For exemple, an load would draw 100 mA at 24 VDC, 150 mA at 18 VDC and 200 mA at 12 VDC. All I found is to use Nonlinear Dependant source.
    Any easier way to do this? Thanks.

    Sorry about the file mix up, I was anxious to get it posted for you that I failed to realize you were using a different version.
    As far as the last "amplifier" in your Leaky Feeder design, I actually hooked it up to the 24VDC supply on the left and this was a direct connect before the first resistor.  I realize this is not what would be ideal for your application as probably you have only a certain place in the Leaker Feeder to tap off from. I would suppose this would be going into a different entry way off the main entry at an intersection so I do not know how my adjusting the placing of this would effect the results because it seems to me by doing this I have bypassed a bunch resistance in the Feeder cable itself (if that is what the resistors represent) and also bypassed a number of amplification stages in the process as well.
    I will post a picture of my circuit for you to examine and try in Version 9.  This is the only thing I could come up with to where the power draw was the same no matter what the voltage input was. The only thing I can see as a drawback is that with this circuit the current remains constant but the voltage fluctuates. If I use a 24V regualtor and drop the input voltage to 12V the current remains at approx 118ma but the voltage drops to 12V when I plug it into your circuit.. I will let you try it and see what you may be able to do with it.
    Message Edited by lacy on 04-28-2008 05:47 PM
    Kittmaster's Component Database
    http://ni.kittmaster.com
    Have a Nice Day
    Attachments:
    Possible Constant Power Load.JPG ‏285 KB

  • What is the best way to make a clickable grid

    What would be the best way to make a clickable area that can
    differentiate between discrete parts of the area when clicked on.
    In other words, instead a having multiple buttons in a row that the
    user can click on, is there a way to have an area that has lines to
    distinguish the different areas(buttons) but that acts as though
    there were multiple consecutive buttons?
    For example, if I wanted to graphically simulate the buttons
    on a phone but without using buttons. Instead use some kind of grid
    or area that is divided into multiple sub areas that can
    distinguish the discrete positions (each button on the phone, or
    sub-area).
    Thank you,
    Salchichasa

    I liek your idea of having multiple images in a grid. I think
    that would be the best bet as you mentioned. Having one big picture
    would be hard to distinguish the sub-areas with mouse coordinates.
    I think checking the coordinates for the mouse would be very
    tedious because I would have to check for the left boundary, the
    right, top, and bottom for each sub-area!
    What do you mean by using button components and reskinning.
    Is this simply using buttons and changing the way they look? I'm
    just trying to save time and memory, because if I had a 10 by 10
    grid, thats a hundred buttons. Wouldn't that slow down the machine
    alot? And for that matter wouldn't having a grid of 10 by 10 images
    also by the same deal?
    Thanks for the input, I'm just trying to find the most
    efficient way to do it.

  • What is best way to make disk backup of CS5 downloaded installation?

    Hi,
    We purchased the downloadable version of the CS5 Production Premium installer rather than waiting 2 weeks to receive it in box form.
    What do you suggest is the best way to make a backup of the downloaded installers, which total about 13.8 gigs?  I was thinking of putting the main one on a dual layer DVD-R but the biggest file is 9.23 gb's, nearly a gig over the data limit for dual layer disks.  Is it possible to use Toast to split a disk image over multiple files or use Apple Disk Utility to compress the .dmg even further to fit?  Or perhaps is the easiest way to just copy it over to a USB thumb drive?
    I know Adobe allows you to re-download the software whenever needed, but it would be more handy for us to have a backup here rather than wait for another really long download...
    Suggestions?
    Thanks!

    You can buy a set of backup disks from Adobe for a nominal fee. You might want to give them a call and ask about it.
    Otherwise, just back it all up to an external drive.
    Bob

  • Best way to make a booklet?

    What's the best way to make a booklet on my Mac?  I need to make something that is 8 1/2 x 5 1/2 (so regular paper folded in half) allowing me to put 4 pages on one sheet of paper.
    In the past, I've been able to make full sized pages, and make booklets via the copy machine at school (think music programs here) but someone recently told me there are ways to do this on a mac so that I could make as booklet and just bring to staples to print.
    Any ideas would be greatly appreciated.

    For starters, look at the "more like this" list on the right side of this page.
    Then there is the answer I've used for several years.
    1 - For a folded US letter-size booklet start with your Pages document in Legal size & larger than normal font size. Export the Pages document to a PDF & then drag the PDF to the icon of Cocoa Booklet. It will create a new PDF in booklet form. For international paper sizes, create the Pages document in the larger size with a larger font, i.e. create A4 pages to create A5 folded booklets. You can also use US tabloid or A3 to create larger booklets.
    Next you'll need to use Create Booklet Service to create a booklet with any number of pages (best in a multiple of 4). You can create the booklet directly from the print dialog after you install the service. Again, for US letter size booklets, I find it best to create them in legal size as above. Downlond it from the link & run its installer. It will open the booklet in Preview. If you're using Lion, I suggest using File > Export to save the PDF where you can find it.
    2 - This involves setting your Pages document in File > Page Setup… to landscape orientation & then paginating the document manually. 
    Use linked text boxes. This is easier done with the layout showing. First you need to add a page break to have two pages. Click in the body area & then Insert > Page Break. Now click outside the layout area to enter object mode & click the "T" in the tool bar or Insert > Text to create a text box & type something in it. This is to keep the box from disappearing if you click elsewhere & the text can be replaced later. If you already have some text to paste in you can just paste while in object mode & a text box containing your text will be created. You will now need to click outside the layout again & drag the cursor toward the text box to select it. You can now position the first text box in the lower right of your 2-page document. It is easier to see where it goes if you have the document set up with 2 columns. Click on the blue-outlined tab at the lower right of the text box to create a new of the same size & move the box to the upper left. Repeat for a box for the upper right & again for the lower right. You will now have 4 linked text boxes.
    This will not let you automatically use page numbers because Pages "sees" each page & you actually have 2 pages per page. You'll need to create them manually. I would use text boxes.

Maybe you are looking for

  • Can i change an associated email address to a full apple id?

    hi i have an associated email address linked to my full apple id, but im wondering if i delete it i can now register it for a full apple id? reason for asking its my sons id and i want him to start using it correctly for apple and the store regards..

  • Bank Determination in APP

    Hi, Could anyone help me in knowing the significance of bank determination in APP. I understand it helps in providing bank ranking order. But please let me know any thing specific to currency field in bank determination. Helpful if you could pl send

  • Denim update

    My Lumia 625 shows denim update I want to ask what is the size of denim update Now I'm using Lumia cyan

  • Any Flash CS3 Mac users?

    Where you click something on stage, and it takes what feels like 2 seconds for Flash to respond with the focus selection? The .fla is only 1.5MB, and doesn't have that many assets in the library. Sometimes this goes on for hours. Sometimes an applica

  • I am not able to download the video

    ''locking this thread as duplicate, please continue at [https://support.mozilla.org/en-US/questions/987536 /questions/987536]'' In add one installed flash video downloader in that I am unable to download