How to configure a continuous pulse generation that doesn't end after the VI exits with DAQmx?

Hi,
I'm just learning the DAQmx and I have run into a problem.
With the legacy DAQ API I could configure a counter to create continuous pulses and
when I needed change the freq or duty cycle, I would just call the the configuration function
again. The pulses were generated even after I closed LV, so it was all in the hardware.
Now, with DAQmx api, it seems that this is not possible. I read a forum post saying that
LV will end the pulse generation after the VI exits. Is there a workaround for this?
I could ofcourse create a LV thread for this, but I liked the old one better
It was simpler and I didn't need to worry about threads so much.
All LV operations are going to be inside a DLL that is called from outside of LV, so I can't
use LV threads in a simple way, e.g. putting things inside a while loop. Just that you'll
know why I wan't to avoid using the threads.
Thanks.

It is possible to achieve this behavior using the DAQmx API by using the DAQmx Create Task VI to explicitly create the task (rather than relying on DAQmx Create Channel to do it implicitly) and setting the AutoCleanup attribute to False.  This method prevents LabVIEW from automatically clearing the task when your VI (or the function you'll be exporting to your C .dll) finishes executing.  The disadvantage is that you might accidentally "leak" a task if you're not careful.  In order to stop the pulse generation on command, you can either reset the device or somehow store the task name you created and come back later to call DAQmx Stop and/or Clear Task.
Here's how you would start the generation:
...and how you could come back and stop it later, using the task name you created:
Hopefully this helps-
Message Edited by Tom W [DE] on 11-16-2007 07:54 AM
Tom W
National Instruments
Attachments:
autoCleanup.JPG ‏17 KB
clearTask.JPG ‏4 KB

Similar Messages

  • How do I rename a hard drive that is suddenly invisible after the 10.9.2 update?

    I am using a Mac Mini as a server for our office. I recently ran the system update to bring it to 10.9.2.
    We have 2 firewire drives attached to the mini to store files ("Shared" stores our files and "Shared Backup!!" is a backup of "Shared").
    Finder prefs are good – set to show all external and internal drives. I was able to turn on visibility for the drive named "Shared", but all efforts fail when I try to update the name of the "Shared Backup!!" drive.
    I think it may have something to do with the name of the drive and/or the exclamation points. I'm close to erasing the drive and reformatting it, but would love another solution.
    I've tried the SetFile command -
    SetFile -a v /Volumes/Shared Backup!!
    I get a number of "File Not Found" errors.
    Any help would be appreciated.
    Chris

    You need to use backslashes in your Unix command for your drive name when you have spaces involved.
    I think you might have to put backslashes after special characters too like the exclamation points. I'm not sure.
    Example1:
    SetFile -a v /Volumes/Shared\ Backup
    Example2:
    SetFile -a v /Volumes/Shared\ Backup\!\!

  • How do you delete a purchased song that doesn't have a delete option when swiping?  This was a freebie when I first purchased my pad

    How do you delete a purchased song that doesn't give you the delete option when swiping?  This was a free song when I first got my pad. Now I can't delete it. I only get the play option, or to download it again.  The song is "Twinkling Lights", I think that's right.
    Any help with this would be greatly appreciated.
    Thanks!

    I think it is in the cloud, so how do I delete it?  Also, I have IOS 7.1.1

  • How can I tell if my Generation one IPAD is part of the recall??

    How can I tell if my Generation one IPAD is part of the recall??????

    A small number of the Verizon CDMA version of iPad 2 was recalled, not the 1st gen.
    http://www.wired.com/gadgetlab/2011/06/verizon-ipad-2-recall/
    Stedman

  • Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks

    That is a function of the recipient's e-mail software understanding what your software sent.  If it doesn't it will always show as an icon or attachment.   It is also a function of both your internet provider and their internet provider accepting messages of that size, and a function of their download attachment settings in their e-mail program.  There is no way to guarantee it will appear inline in the attachment.   The best you can do is attach with Windows Friendly format.  To do that, use the attach toolbar icon that looks like a paperclip, (View menu -> Customize toolbar if invisible) on Mac OS X Mail when composing the message.   A checkbox appears in the file dialog box's bottom to make it Windows friendly when you navigate to pick the PDF file.  That makes it as universally compatible as possible.  It still may not appear inline, but at least you are less likely to be incompatible.

  • HT1918 My granddaughter accidentally purchased an app.  How can I secure my device so that doesn't happen?

    My granddaughter likes to play games and I only download the free ones for her because she only uses them briefly.  How can I secure my device so that doesn't happen?

    Depending upon what version of iOS that you have it on, you might have a Settings > General > Restrictions > Require Password setting which you can set to 'Immediately' - there should also be an 'In-App Purchases' setting on the Restrictions screen which you can set to 'off' so as to prevent in-app purchases bein made.

  • How can I burn a dvd now that I can't download premiere pro cs6 with Encore?

    How can I burn a dvd now that I can't download premiere pro cs6 with Encore?

    Here's what you do to get Premiere CS6 + Encore:
    Just click here (it's the same link as the more information link in CC.)
    or
    Go to your Creative Cloud application (on the menu bar) and go to Adobe Premiere CC and click more information
    There is a dropdown menu that says "Adobe Premiere Pro CC" near the top.
    Click it and the other option is "Adobe Premiere Pro CS6."  Select that.
    Now on the top right corner of the page it has a download button that says "Download Adobe Premiere Pro CS6."
    It is included in your CC subscription.
    However, a word of warning, you cannot use Adobe Dynamic Link to link to a Premiere CC sequence directly in Encore.  A CS6 sequence still works fine, but if you have a CC project, you will need to encode your sequence into a DVD friendly format (MPEG2 file).  I'm really hoping that Adobe changes this in their upcoming release, and just adds the ability to import CC sequences into Encore, then I would be fine with them not including it in the normal CC package, or updating it.  But I haven't seen anything about it in the release notes.
    A lot of people still want their DVDs and it's a lot easier to just dynamically link the sequence.

  • In Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    in Office 2011 the function "share it by e-mail" seems to be disabled. that happened recently, just after the apple update regarding Java. Any idea on how enable this function again?

    I was able to get to a support person who helped me fix this without charge. I guess it was my bad for not trying the right way to access support.
    Anyway, they answer is this.
    I had to create a new account on my computer. When I logged into the new account it immediately wanted an AppleID. I used my daughter's e-mail address for the AppleID. This setup the internet accounts correctly with her iCloud.com e-mail address. I was then able to access e-mail in both the browser and Mail. Not that complicated but nothing that I would have easily thought up on my own.
    Thank Apple Support!

  • How to design and implement an application that reads a string from the ...

    How to design and implement an application that reads a string from the user and prints it one character per line???

    This is so trivial that it barely deserves the words "design" or "application".
    You can use java.util.Scanner to get user input from the command line.
    You can use String.getChars to convert a String into an array of characters.
    You can use a loop to get all the characters individually.
    You can use System.out.println to print data on its own line.
    Good luck on your homework.

  • How do I access files that have been recovered (after a Mavericks problem) with the .cca file extension

    How do I access files that have been recovered (after a Mavericks problem) with the .cca file extension

    First, to access documents you must use an app designed for that specific Document type. So Pages will not be able to open PDFs. The Documents app by Readdle can handle PDFs though. In the latter case, you'd open the app, click the menu icon at its top left, and click Open to go to your iCloud Drive. With Pages, if you had files outside the main Pages folder, click + then iCloud and navigate to the file's location.
    Matt

  • How do I edit out a fence that is in front of the background???

    How do I edit out a fence that is in front of the background???

    Can you post the photo to help explain what you are talking about?

  • How can I delete a Downloaded book that doesn't go away ?

    How can I delete a Downloaded book that doesn't go away ?

    Back up all data.
    Triple-click anywhere in the line below on this page to select it, then copy it to the Clipboard by pressing the key combination command-C:
    ~/Library/Safari/Bookmarks.plist
    Quit Safari.
    Select
    Go ▹ Go to Folder
    from the Finder menu bar. Paste into the text box that opens (command-V), then press return.
    A folder window should open with a file named "Bookmarks.plist" selected. Move the selected file to the Desktop, leaving the folder open.
    Relaunch Safari. It will open with the default set of bookmarks. Delete them all. Select
    File ▹ Import Bookmarks
    from the Safari menu bar. Import from the bookmarks file you moved to the Desktop. Arrange the bookmarks as you wish.
    If Safari now performs normally, you can delete the old bookmarks file. Otherwise, quit Safari again and put back the file you moved, replacing the newer one with the same name. Close the Finder window and post again.

  • How do you get iTunes purchased songs to automatically play one after the other

    How do you get iTunes purchased songs to play automatically one after the other without having to hit play for each song ? Also I lost all my pictures on my iPad when I installed iOS 7 upgrade. Any way to get them back? Thanks. Dr Ron.

    Hi Dr. Ron,
    By your question, I am wondering if you are playing your music from the iTunes app rather than the Music app?
    In the Music App, you can go to any of the options at the bottom and click on a song to play and it will then continue to play the songs in that category. You can also select "Shuffle" to shuffle them.
    As for your Photos, did you have them backed up anywhere?
    Cheers,
    GB

  • How to deploy connection (Mac OS X Yosemite to Windows RDS) through the RD Gateway with Two Factor authentication (Safenet OTP) on Session host?

    Good day!
    Could you please help me? How to deploy connection (Mac OS X Yosemite to Windows RDS) through the RD Gateway with Two Factor authentication on Session host? How to open an authentication dialog that is the same as in Windows when logging on to network resources
    in Windows (Windows Security)?
    Our test environment: We have one RDS 2012 R2 server (all roles in one) and one session host in collection. On the session host installed Safenet Network Logon and it under GPO which disable all authentication, only OTP.

    Hi Sir,
    It seems that you are going to integrate 3rd party product into AD for authentication .
    I would suggest you to contact the vendor of Safenet for this deployment  scenario  :
    http://www.safenet-inc.com/multi-factor-authentication/authentication-management/safenet-authentication-manager-express-samx/
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • How can I make a intro page for my website, then after the intro has run make the page automatically change to my we site home screen

    how can I make a intro page for my website, then after the intro has run make the page automatically change to my website's home screen

    You can do this using a meta refresh but the problem is you have to add it to the html file for the page very time you publish changes.
    A better way is to create a splash page and upload it to the server outside of the folder produced by iWeb. Example HERE.
    The meta refresh is added to the head section of the html file...
    <meta http-equiv="refresh" content="32;url=http://www.domain.about.com/Page-Name.html">
    The delay time in seconds is marked in blue and the URL to the redirect page is in red.

Maybe you are looking for