How do I use resource or release resource based on boolean?

I have a case where I need to turn a AO on and off and when turned off I need it set back to zero offset. I need to do this with four different AO channels each with their own boolean switch. I have it setup but what I am having trouble is releasing the resource after the first switch is turned on then off.
The logic seems to escape me.

Hi THurst,
I will like to step into the forum and suggest a more simple approach, if you can run this shipped example: “Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi”, and simply write a waveform with amplitude zero, before ending the task.  This might be a good resource to look at: What is the Difference Between the DAQmx Stop Task.vi and DAQmx Clear Task.vi? , The screenshot might give you an idea, but basically you press the Boolean to change the amplitude of the sine wave to zero and then you stop the task.
I hope it helps
Message Edited by Jaime F on 12-12-2007 02:48 PM
Jaime Hoffiz
National Instruments
Product Expert
Digital Multimeters and LCR Meters
Attachments:
zero offset.png ‏22 KB

Similar Messages

  • Whcih function to use to cleanup/release resources before application exit?

    I need to release system resources and cleanup etc before my JavaFX application exits?
    Where should I write the code?

    In [javafx.lang.FX|http://java.sun.com/javafx/1.2/docs/api/javafx.lang/javafx.lang.FX.html] class, there is the static function addShutdownAction() which is called when the application exits.
    You can register several functions.
    But some people report issues, like being unable to do an HTTP request to save parameters on server in these callback functions (the application exists before completion).

  • How can I use GestureRecognizer in a Xaml based app?

    I've encountered a problem when I'm trying to use gestures in my app:
    I'm trying to retrieve info from input on a rectangle using GestureRecognizer responding to the PointerPressed event. When the user taps on it, the textblock shows information. However, I failed to get any info after following the code samples.
    There was no response and through debugging, I found the tapped event was not responded to.
    First, I added:
    Platform::Agile<Windows::UI::Input::GestureRecognizer> m_gestureRecognizer;
    in the header of the class.
    And in the constructor:
    MainPage::MainPage()
    InitializeComponent();
    m_gestureRecognizer = ref new GestureRecognizer();
    m_gestureRecognizer->GestureSettings =
    GestureSettings::DoubleTap | GestureSettings::Tap;
    m_gestureRecognizer->Tapped += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Input::GestureRecognizer ^, Windows::UI::Input::TappedEventArgs ^>(this, &App4::MainPage::OnTapped);
    Next, I responded to the PointerPressed event:
    void App4::MainPage::OnPressed(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
    unsigned int id = e->Pointer->PointerId;//debug breakpoint
    m_gestureRecognizer->ProcessDownEvent(Windows::UI::Input::PointerPoint::GetCurrentPoint(id));
    e->Handled = true;
    But when I came to the Tapped event, nothing happened:
    void MainPage::OnTapped(GestureRecognizer^ gesrec, Windows::UI::Input::TappedEventArgs^ args)
    int i = args->TapCount;//debug breakpoint
    if (i == 2)
    info->Text = "You double-tapped the point at X: " + args->Position.X + ", Y: " + args->Position.Y + ".";
    else
    info->Text = "You tapped the point X: " + args->Position.X + ", Y: " + args->Position.Y + ".";
    Why there was no info when I tapped the rectangle? Do I lack of something in the code? 

    Oh, it's very kind of you! Thank you so much and the problem has been solved by adding two handlers:
    void App4::MainPage::OnMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
    m_gestureRecognizer->ProcessMoveEvents(e->GetIntermediatePoints(wpRect/*name of the rectangle*/));
    void App4::MainPage::OnReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e)
    m_gestureRecognizer->ProcessUpEvent(Windows::UI::Input::PointerPoint::GetCurrentPoint(e->Pointer->PointerId));
    I've been haunted by this issue for days...

  • How do you use Default Resource Access Information?

    I have some 10g Forms & Reports that I want to use with SSO and they will all be connecting to the database with the same connection info. I know how to configure a Default Resource Access Information, but how do you use this with Forms & Reports?

    Douglas,
    the default Resource Access Infomation should be the connection information right? This is used in conjunction with SSO. You need to configure your F&R applications to delegate authentication to SSO by placing ssoMode=true in the config section of formsweb.cfg.
    The Forms Servlet will connect to OID retrieve the Resource Access Information (descriptor) for a given user and automatically log them into the application.
    Users will need a global identity in OID and SSO must be enabled to use resource access info with F&R
    regards,
    tt

  • How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?

    How do I use Automator to duplicate a folder with graphics on my desktop and erase their Resource forks?
    I do not use command line and tried to use ZapResourceForksAMAub_1.2 which I downloadedand instaled the Zap Resource Forks.action. Next I tried to use their sample copy-zap-rsrc.workflow in Snow Leopardon my Mac Pro. The 3 different steps are displayed in Automator but there is no place to put in which folder (on my deskto) to copy, and remove the resource forks from the graphic files.
    Can sombody please step me through this please please.
                                                                                          W.W.

    Unfortunately, Back to My Mac only works across computers using the same iCloud account.

  • How can i use a Property as Link in the Resource Renderer Setings

    Hi to all,
    i have created a Propertry with the name SFS_NewsLink.
    The content of this Property is
    http://<server>.<domain>/path/sitemap
    Now, how can i use this property in the Visible Propertis? i dont will use use the default "contentLink" i will use as Link the content from the SFS_NewsLink.
    how can i do this? have envery one any ideas?
    Best Regards
    Thomas

    Hello Thomas,
    You can modify your Collection Renderer and Resource Renderer to achieve this functionality.
    Check this weblog, to get ideas:
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3648
    Greetings,
    Praveen Gudapati

  • How do I use a JDBC Resource set-up in Sun Java System Appliation Server?

    How do I use a JDBC Resource set-up in Sun Java System Appliation Server 8.2?
    I created a JDBC Resource labeled "jdbc/__PetroPool" that is backed by a Connection Pool labeled "PetroPool".
    Since this is set-up in Sun Java System Appliation Server 8.2, I am looking for suggestions, examples or guides on how I can use this connection.
    I've been browsing the developer's guide for Sun Java System Appliation Server 8.2 without much luck.
    Googling really doesn't provide a lot of useful information either...
    Any suggestions, examples or guides on how I can use this connection is greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    How do I use a JDBC Resource set-up in Sun Java System Appliation Server 8.2?
    I created a JDBC Resource labeled "jdbc/__PetroPool" that is backed by a Connection Pool labeled "PetroPool".
    Since this is set-up in Sun Java System Appliation Server 8.2, I am looking for suggestions, examples or guides on how I can use this connection.
    I've been browsing the developer's guide for Sun Java System Appliation Server 8.2 without much luck.
    Googling really doesn't provide a lot of useful information either...
    Any suggestions, examples or guides on how I can use this connection is greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How do i unistall quicktime if i keep getting the installer note of: the feature you are trying to use on a network resource that is unavailable. i cannot find Quick Time.msi file anywhere. so i cannot uninstall or re install quick time

    the feature you are trying to use on a network resource that is unavailable. i cannot find Quick Time.msi file anywhere. so i cannot uninstall or re install quick time
    any suggestions please??????

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any QuickTime entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing QuickTime again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • How can I use a POJO as a resource

    I'm trying to figure out how I can use a simple class I have written with methods and properties in Sutdio Creator.
    I have been looking around, but I've only found how to use an EJB directly from Creator. We would like to use a bean that handles all the connections to the app server and only returns the result to the JSP.
    I know there has to be a way to do this, if anybody has any ideas please help!
    Thanks

    I'm trying to figure out how I can use a simple class
    I have written with methods and properties in Sutdio
    Creator.
    I have been looking around, but I've only found how
    to use an EJB directly from Creator. We would like to
    use a bean that handles all the connections to the
    app server and only returns the result to the JSP.
    I know there has to be a way to do this, if anybody
    has any ideas please help!I'm not sure I follow 100%, but you can use POJOs via Spring integration. Do a search on this forum for Spring and you should find a tutorial I wrote on it a while back.

  • How to Map Proces form field with Resource form field?

    Hi,
    How to Map Proces form field with Resource form field while creating Process form in Form designer

    Are you talking about Provisioning ?
    then you do that in Data Flow under Process Defintion in OIM 10g
    In OIM 11g you use Request Dataset. In that you can directly map fields to process form.

  • Release resource

    Hi
    I think it is a good practice to release resource (eg, db connection) whenever the user session is ended or time-out.
    I do the following things:
    class myHttpSerlvet extends HttpServlet implements HttpSessionBindingListener
    then all the servlets in my application extend from myHttpServlet.
    Then i can release resource in the valueUnbound operation of the servlets.
    Am I right? Is there any performance consideration?
    Thank you
    Leo

    Well, this really isn't necessary. The various JDBC classes all implement finalize() to release their resources. So, when the session is destroyed, those objects will be garbage collected and the resources will automatically be removed.
    A better plan would be to not have the database connections in the session at all. Instead, use DB connection pooling. For example, javax.sql.PooledConnection. Then you can just keep reusing the same connections and don't have to deal with constantly connecting and disconnecting, and you have better load management on your database.

  • How to solve the error "The specified resource is reserved" when running with DAQmx And LabVIEW?

    How to solve the error "The specified resource is reserved" when running with DAQmx And LabVIEW?

    I hate "J term"
    OK I love the learning the students get.   And, I like helping them out!  But, as a former man who's got the varicose viens to prove he's spent time "behind the podium" (yeah, "behind the podium" puts 'em to sleep- songs and dances for the young'uns) come on! USE the tools you teach!
    Instructors invited to engage in the forums
    Jeff

  • Access BAPIs Using the SAP Java Resource Adapter

    Hi experts,
    Can someone tell me how to Access BAPIs Using the SAP Java Resource Adapter?

    hi Shweta,
    Please refer the step by step procedure:
    1. Start the deploy tool of the SAP J2EE Application Server with the DeployTool.bat in the directory //<SAP J2EE Engine Installation Directory/.../j2ee/deploying.
    2. Choose Project &#8594; New Project and enter a name for the new project.
    3. Click on the Deployer tab.
    4. From the menu path, choose Deploy &#8594; EAR &#8594; Load Module and select the sapjra.rar file.
    5. For the newly created node sapjra.rar, choose Server Settings &#8594; Identity Subjects and select Caller Impersonation as authentication type, so that the J2EE user data is used to log on to the ABAP system.
    6. Make sure that the J2EE Application Server is running. Connect to the J2EE Application Server with Deploy &#8594; Connect.
    7. Deploy the sapjra.rar using the menu Deploy &#8594; Deployment &#8594; Deploy Module.
    8. Enter SAPJRADemo as application name and start the application.
    9. Close the deploy tool.
    10. Start the Visual Administrator again.
    11. Select the Cluster tab and switch to <Server Node> &#8594; Services &#8594; Connector Container.
    12. Click on the Runtime tab and choose sap.com/SAPJRADemo &#8594; eis/SAPJRADemoFactory.
    13. Choose Managed Connection Factory &#8594; Properties. On this page, you need to specify the logon data for the ABAP system. There is already some dummy data visible in the property list if no real system data has been specified so far.
    14. To change the value of a property, select the property in the list, change the value underneath it, and add the changes using the Add button. At the end, do not forget to save all changes by pressing the button Save Changes. The user configured for the SAP JRA must be the user authorized to read metadata of function modules.

  • I cannot uninstall or install itunes.  error is 'trying to use on a network resource that is unavailable'.  I cannot find a pth to any folders containning installation package itunes.msi.  Unable to download itunes since 2 updates ago and crashed com

    I cannot uninstall or install itunes.  error is 'trying to use on a network resource that is unavailable'.  I cannot find  path to any folders containing installation package itunes.msi.  Unable to download itunes since 2 updates ago and crashed computer.    Windows update as suggested in some posts does not assist either.
    Can anyone assist me?  Thank you so much

    Should the advice above not fix things for you...
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • How to declare a path as a resource JNDI?

    How to declare a path as a resource JNDI?<br>
    <p>
    Hi all<br>
    I�m a beginner programmer in J2EE.<br>
    I need in my application to declare a path as a resource JNDI but I can�t use tag for this declaration. Can any one help me?<br>
    thx. <br>

    You should be able to declare an absolute path using the "/" and a relative path should be without the "/".
    For example if you have myJsp.jsp in the directory jsppages and you wanted to access the page from a jsp in the webapp root directory.
    the absolute path would be
    "/jsppages/myJsp.jsp"
    and the relative path would be
    "jsppages/myJsp.jsp"

Maybe you are looking for