IVI-C switch step open session error

In my current Test Stand 3.5 sequence I start by using niSE open session.vi to begin a new switch session. I then pass this handle along to other VIs for switching, which works perfectly, and then at the very end of the sequence I pass the handle to a niSE close session.vi. The problem I'm having is now I want to start using the built in IVI-C Switch steps. Everytime I insert one of these steps in the middle of my sequence I get an error because the step appears to be trying to open a new session, when one is already open. Is there a way to pass the currently running session handle into the "virtual device name" of the switch step so that it doesn't try to open a new one?
Thanks,
Jason

Hi Jason. 
This is known bug in TestStand and it is currently being addressed CAR ID #125874.  Basically when the NISE session is closed, TestStand doesn't actually dispose of the session but rather hangs on to it until the execution window is closed.   
There is a workaround:
Create a statement step after you close the NISE session, and call the following.
RunState.Execution.TSIviStepTypes_AnchorName_For_NISE Virtual Device = nothing
where NISE Virtual Device is the name of the NISE device that you want to end the session to.
Chris
National Instruments
Applications Engineer

Similar Messages

  • VISACOM - Alloc Error using 488.2 USB-B Interface - too many open sessions

    I have been having the following issue in my VB .NET RF-ATE application.... It usually happens when my program enters a measurement loop (I.E. searching for P1dB). It begins to solve for P1dB and performs about 15 cycles (sets power level on SigGen and takes SpecAn meas) and then crashes due to the following error :
    As Logged in the Event Viewer :
    VISA: May 13 09:45:22: Error=bfff003c,"VI_ERROR_ALLOC: Insufficient system resources/memory": ViTable::add - too many open sessions
    As Logged in VB .NET :
    An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in RFATE.exe
    Additional information: HRESULT = 8004003c
    VI_ERROR_ALLOC
    Not sure why its happening my code is pretty solid (or so I thought) and I believe it closes the VISA session properly after each R/W operation? (See attached). I call the same procedure to talk to the GPIB instruments over and over.
    Is it possible that I am not freeing and disposing of resources properly? I have read a little about destructors in .NET etc. but I was under the impression that as soon as "Sub End" is executed that the resources were free'd up? But that doesn't explain why I would get a "too many open sessions" error occour if I am closing the session after I am finished?
    Another odd thing to note is that I have created testplan scripts and loaded them into my application with literally hundreds of measurement commands and my program didn't crash then???
    I am very new to VB and .NET (3 months) so I have a lot to learn but I can't understand why this is occouring. Any help is appreciated.
    Attachments:
    GPIB.txt ‏3 KB

    Just posting a followup... Turns out I found a way to make it work! (I have been fighting this for almost 3 days!).
    If you look at the variable declarations of my procedure.....
    Sub GPIB(ByVal Addr As Object, ByRef Data As Object, ByVal IO As String)
    Dim ioMgr As Ivi.Visa.Interop.ResourceManager
    Dim instrument As Ivi.Visa.Interop.FormattedIO488
    Dim session As Ivi.Visa.Interop.IMessage
    I use the "IMessage" interface for the variable session.
    Just before the "Sub End" is executed I use the following line to close the session :
    session.Close
    Which it would appear doesn't close the session properly when you use the "IMessage" interface.
    So I changed the line to use the "IVisaSession" interface instead :
    Dim session As Ivi.Visa.Interop.IVisaSession
    Now when the Close method is executed aparently it closes the session properly because my program isn't crashing at all!
    I was using VISA COM 3.0 Reference object (GlobMgr.dll).
    If anyone has any insight on this please do share.

  • Microsoft Access Open Session Prompt

    We currently use Crystal Reports 6.0 32-bit with an Access 2.0 database. When I click on the refresh button or Verify Database within Crystal, I get the Microsoft Access Open Session error that prompts for a user ID and password. I also get this error even when I access the sample reports that came with Crystal Reports. I have tried this with Crystal Reports 6.0 and 7.0 (32 bit). Any one know what the problem could be?

    Hi
    It might be possible that some of the dll files have got corrupted. You can search if you have duplicate dll files of Crystal reports on the machine.
    Try repairing the software from Add/Remove programs. After installation restart the application.
    If that doesn't help go for a uninstall of the software and reinstall.
    Regards
    Sourashree

  • Error from IVI switch step in Teststand

    We have the following issue when using Teststand. A reboot sometimes clears the problem, but other times it requires many reboots.
    When starting our test sequence, we undertake a Disconnect All using the IVI Step type to ensure the switches are all disconnected.
    We then get the following message:
    An error occurred while executing the step. Unexpected Error: Switch Executive failed to initialize for virtual device 'Joyswitch'
    Details: Joyswitch_init returned an error -1074118644 (0x%3)
    Source: TSIviStepType
    Any help would be gratefully appreciated
    I have attatched the actual run-time error.
    Attachments:
    Switch_Exec_error.jpg ‏122 KB

    The suggestion to try the validate option under MAX for Switch Executive would be a good idea. The error that you are seeing appears to be coming back from the IVI driver.
    Question that come to mind are:
    - You say that the Disconnect All fails, but does a Connect work?
    - What hardware and IVI driver is the Joyswitch using?
    - It appears that you are using TestStand 3.0, but what version of the Switch Executive are you using?
    Scott Richardson (NI)
    Scott Richardson
    National Instruments

  • Dreamweaver 6.1 - JavaScript error when switching between open tabs

    When switching between open tabs a sequence of javascript
    errors occurs. I had not used Dreamweaver for about 2 weeks, and
    last time I used it with no problems.
    I have tried uninstalling it, OKing removal of all files when
    asked, re-installing it and updating with dwmx61_updater.exe, but I
    still get the same errors.
    This has rendered the software virtually unuseable, so any
    help would be greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Forward enabled in toolbars.xml, a
    JavaScript error occurred"
    followed by
    "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error occurred"
    The relevant code seems to be :
    <!-- Browser nav toolbar -->
    <toolbar id="Browser_Toolbar" platform="win"
    label="Browser Navigation" container="document"
    initiallyVisible="false">
    <button id="Browse_Back"
    image="Toolbars/images/MM/back.gif"
    disabledImage="Toolbars/images/MM/back_dis.gif"
    tooltip="Back"
    label="Back"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    command="dw.getDocumentDOM().browser.backPage()"
    update="onEveryIdle"/>
    <button id="Browse_Forward"
    image="Toolbars/images/MM/forward.gif"
    disabledImage="Toolbars/images/MM/forward_dis.gif"
    tooltip="Forward"
    label="Forward"
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    command="dw.getDocumentDOM().browser.forwardPage()"
    update="onEveryIdle"/>
    <button id="Browse_Stop"
    image="Toolbars/images/MM/stop.gif"
    disabledImage="Toolbars/images/MM/stop_dis.gif"
    tooltip="Stop"
    label="Stop"
    enabled="dw.getDocumentDOM().browser.getPageBusy()"
    command="dw.getDocumentDOM().browser.stopPage()"
    update="onBrowserPageBusyChange"/>
    <button id="Browse_Refresh"
    image="Toolbars/images/MM/browserRefresh.gif"
    tooltip="Refresh"
    label="Refresh"
    enabled="true"
    command="dw.getDocumentDOM().browser.refreshPage()"/>
    presumably the next error is caused by the previous ones
    failing :
    "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error occurred"
    the relevan tcode :
    function getCurrentValue()
    var dom = dw.getDocumentDOM();
    var value = dom.browser.getURL();
    if (value && value.length)
    //check if is it not a temp file
    //extract the tail of the url
    var filename = value;
    var slashIndex = filename.lastIndexOf("/");
    filename = filename.substring(slashIndex+1);
    var tempIndex = filename.indexOf("TMP");
    if (tempIndex != 0)
    addRecentAddress(value);
    return value;

    You can try this simple fix -
    Quit DW.
    Find this folder -
    C:\Documents and Settings\<username>\Application
    Data\Macromedia\Dreamweaver
    8\Configuration\WinFileCache-*.dat
    (these folders are normally hidden - you may have to use
    Explorer > Tools >
    Folder Options to unhide them)
    and delete it.
    Restart DW. Works better?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "earthdoctor" <[email protected]> wrote in
    message
    news:[email protected]...
    > When switching between open tabs a sequence of
    javascript errors occurs. I
    > had
    > not used Dreamweaver for about 2 weeks, and last time I
    used it with no
    > problems.
    >
    > I have tried uninstalling it, OKing removal of all files
    when asked,
    > re-installing it and updating with dwmx61_updater.exe,
    but I still get the
    > same
    > errors.
    >
    > This has rendered the software virtually unuseable, so
    any help would be
    > greatly appreciated, as I'm working to a
    rapidly-approaching deadline.
    >
    >
    > "While executing Browse_Back enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    > followed by
    > "While executing Browse_Forward enabled in toolbars.xml,
    a JavaScript
    > error
    > occurred"
    > followed by
    > "While executing Browse_Stop enabled in toolbars.xml, a
    JavaScript error
    > occurred"
    >
    > The relevant code seems to be :
    >
    > <!-- Browser nav toolbar -->
    >
    > <toolbar id="Browser_Toolbar" platform="win"
    label="Browser
    > Navigation"
    > container="document" initiallyVisible="false">
    >
    > <button id="Browse_Back"
    > image="Toolbars/images/MM/back.gif"
    > disabledImage="Toolbars/images/MM/back_dis.gif"
    > tooltip="Back"
    > label="Back"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('back')"
    > command="dw.getDocumentDOM().browser.backPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Forward"
    > image="Toolbars/images/MM/forward.gif"
    > disabledImage="Toolbars/images/MM/forward_dis.gif"
    > tooltip="Forward"
    > label="Forward"
    >
    enabled="dw.getDocumentDOM().browser.isCmdEnabled('forward')"
    > command="dw.getDocumentDOM().browser.forwardPage()"
    > update="onEveryIdle"/>
    >
    > <button id="Browse_Stop"
    > image="Toolbars/images/MM/stop.gif"
    > disabledImage="Toolbars/images/MM/stop_dis.gif"
    > tooltip="Stop"
    > label="Stop"
    > enabled="dw.getDocumentDOM().browser.getPageBusy()"
    > command="dw.getDocumentDOM().browser.stopPage()"
    > update="onBrowserPageBusyChange"/>
    >
    > <button id="Browse_Refresh"
    > image="Toolbars/images/MM/browserRefresh.gif"
    > tooltip="Refresh"
    > label="Refresh"
    > enabled="true"
    > command="dw.getDocumentDOM().browser.refreshPage()"/>
    >
    >
    >
    > presumably the next error is caused by the previous ones
    failing :
    >
    > "While executing getCurrentValue in AddressURL.htm, a
    JavaScript error
    > occurred"
    > the relevan tcode :
    >
    >
    > function getCurrentValue()
    > {
    > var dom = dw.getDocumentDOM();
    > var value = dom.browser.getURL();
    > if (value && value.length)
    > {
    > //check if is it not a temp file
    > //extract the tail of the url
    > var filename = value;
    > var slashIndex = filename.lastIndexOf("/");
    > filename = filename.substring(slashIndex+1);
    > var tempIndex = filename.indexOf("TMP");
    > if (tempIndex != 0)
    > {
    > addRecentAddress(value);
    > }
    > }
    > return value;
    > }
    >
    >

  • Open Session: unexpected error

    Hi everybody,
    I'm using BO XI R3.0 and since couple of last days I'm having problem with opening Universe Designer. The message I'm getting is "Open session: unexpected error". This happens after I provide user name and password for the access to the system.
    Does anyone know the solution to the problem beside uninstalling Client tools etc. (I already did that) because the same happens when I want to open Desktop Intelligence, Translation Manager, etc.
    Ivan

    In addition to my previous question, I have another query. I am trying to create a macro to rename, hide/show and change some more properties of universe objects. Below is the code to log on to designer and open the required universe
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Set DesignerApp = New Designer.Application
        DesignerApp.Visible = True
        Call DesignerApp.LogonDialog
        Set Univ = DesignerApp.Universes.Open
        DesignerApp.Visible = False
        Set Wksht = ThisWorkbook.Worksheets("Objects")
        Wksht.Unprotect
        Range("Objects").ClearContents
        Call GetObjectInfo(Univ.Classes, 1)
        Range("Objects").Resize(Wksht.UsedRange.Rows.Count - 1, 5).Name = "Objects"
        Range("Objects").Columns("H:L").Value = Range("Objects").Columns("B:F").Value
        Wksht.Protect
        DesignerApp.Quit
        Set DesignerApp = Nothing
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    What happenns is that after I log on using my macro, if I try to log on to designer again I get the "Open Session: unexpected error" error. If I delete the LSI folder on my local machine, then I can log on fine. but everytime I use the macro I get the error afterwards. I am logging onto a SAP system.
    Any help on this one?

  • Getting error code -251723766 returned from the "EthernetIP Open Session.vi" while trying to talk to a PLC

    I have created a LabVIEW application using LabVIEW 2012 (64 bit) that attempts to communicate with a PLC. I do not actually have the PLC here at the Rockwell Collins facility in Cedar Rapids, Iowa.
    I have sent this application to my co-worker, who is located at a different Rockwell Collins facility in Tustin, California, where the PLC is actually located.
    My coworker in California is reporting that when he starts up my application under WIN7 he gets an error code of "-251723766" when the S/W performs the "Open Session" function during initialization.
    I looked at the online help and the value "-251723766" is not defined.
    When I run the same application under WIN7 here in Cedar Rapids I do NOT get the runtime error code of "-251723766" during initialization.
    Do you have any ideas for what is causing this problem?

    Hello
      I never really understood what the session parameter was all about.
      The documentation says that the session parameter is optional.
      Based on your advice I have deleted the code from my block diagram that was doing an Open Session.
      Are there any example LabVIEW programs that I can study that actully use the Ethernet/IP S/W to connect to a PLC?
      I have attached 2 screen captures that show how my LabVIEW VI's are accepting the session parameter.
      Do you think I should delete the input and output parameters for session?
      Please let me know.
      Thank you
      Todd J. Miller
      319-295-8689
    Attachments:
    OpenSessionProblem#4.jpg ‏107 KB
    OpenSessionProblem#5.jpg ‏189 KB

  • Cannot open document (Error: INF) / Session is closed (Error: INF )

    SAP BO XI3.1
    last time I face this one but suddenly disappear during testing, now we once again face this issue. As all users are member of group 'EveryOne' if we add any user membership to administrator group / master group this error resolved for this user.but that is not proper solutions, so far i m unable to find the rights which is lacking to all user for these report which are available in each user infoview and causing these errors while viewing.
    Open Document error message:
    While viewing Web Intelligence reports
    [Session is closed (Error: INF )|http://yfrog.com/0cwebirightsp|Session is closed (Error: INF )]
    While viewing Desktop Intelligence reports
    [Cannot open document (Error: INF )|http://yfrog.com/mjdeskirightsp|Cannot open document (Error: INF )]

    You might need to give read rights to the folder and category this report belongs to???
    If the problem is fixed when the user who is viweing is an administrator, this means there is insufficient privileges for the other users.

  • Switch on open item mangement.-ERROR

    We are in version Ecc 6.0 ,We have a Balancesheet Gl account.We have made the balance equal to zero.And now want to switch on open item mangement.
    But it displays below message:
    Account balance =0 but open items exist in the account
    The data contains error ,you cannot save
    WHAT EXACTLY NEEDS TO BE DONE WE ARE IN ECC 6.0

    Hi Ravi,
    note 175960 is saying that copy of RFSEPA02 and RFSEPA03 can not be used in above version
    "The reason is that when document splitting is active for open items on the converted account, the splitting information in tables FAGL_SPLINFO or FAGL_SPLINFO_VAL would have to regenerated, which is not possible with ZFSEPA02.u201D
    The client is in ERP 6.0 below enhancement package 3, New GL and document splitting is active
    FAGL_ACTIVATE_OP is not an option.
    We have copied it from a higher release but gives different errors during clearings after switching the account to OI managed.
    The note is saying:
    u201CThe only option currently available is to set up a new account with open item management and to use this instead of the original account.u201D
    please, let us know if you have concern on this
    thanks in advace
    Regards,
    Csaba

  • First page of session opens with "errors"

    Either at home (DSL) or work (shared T1) the first forum page I go to in a session (session is from opening IE7 to closing IE7) will open with "error on page" just about half the time
    This means the mark all as read command won't work... at least until I do a page refresh and the page loads properly
    It doesn't matter if I start at this discussion area, or in an actual product forum... I get a loading error about half the time
    Once I do a refresh, so that page loads OK, going on to a different forum does not cause problems
    I wonder if this is some other effect of the cookie not working correctly?
    Sigh... I do SO wish that webx had been up to the task of running all the Adobe forums

    It seems you are talking about this same problem:
    http://forums.adobe.com/thread/422945?tstart=0

  • (OS 10.6.8 Imac)I cannot open an adobe file on wels fargo online getting Session-1.cgi could not be open unknowe error etc.. on othe browsers it works (safari,Chorme)

    Question
    (OS 10.6.8 Imac)I cannot open an adobe file on wels fargo online getting Session-1.cgi could not be open unknown error etc.. on othe browsers it works (safari,Chrome)

    If anyone is reading this still looking for what caused the issue and how to fix it here is what I discovered.
    The antivirus program our company uses, Bitdefender Antivirus Plus, was causing some of the PDF files not to open. After troubleshooting the different modules and settings the culprit was..
    Scan SSL in Privacy Control Settings. Turning it OFF solved the problem and all the PDF files that previously would not open now open just fine. This issue has been sent to Bitdefender for them to review. If you use a different antivirus program and are having this issue try locating the Scan SSL setting and see if turning it off solves the problem.

  • I can't run visa interactive control window. ERROR MESSAGE: "Unable to open session "ASrl::INSTR" Status name VI_ERROR-RSRC BUSY Visa cannot curently access this resource.

    I cant run tds220 (driver for oscilloscope).
    Error message:
    VISA: (Hex 0xBFFF000E) The given session or object reference is invalid.
    Furthermore
    I cant run Visa INteractive control.
    Error message:
    "Unable to open session to "ASRL1::INSTR" Return value 0xBFFF0072 Status name VI-ERROE-RSRC-BUSY . VISA csnnot currently access this resource."
    Then change ports, this message appears for another port.
    Thanks for answer.
    Gita

    The port is open by another resource. You note that you should also get an error if you try to access the port in hyperterminal. Try rebooting your computer and the first thing you try is opening a VISA session with Visa Interactive control(VISAIC).
    If that fails, then you have a driver accessing your ports.
    If it works then it was just two applications that were trying to access your port (LabVIEW and VISAIC are seperate apps even thought they both may be using VISA.)
    Closing VISA sessions:
    LabVIEW will only *automatically* close VISA sessions if you have this option set: Tools>>options>>Automatically close VISA sessions.
    Otherwise you need to explicitly call a Visa close on the resource.

  • Weblogic Server Switch over automatically due to too many open files error.

    Hi,
    I am facing problem in production environment. I am using Weblogic 8.1 SP4 application.
    Weblogic Server automatically switch over every 3 weeks due to few reasons.
    1. out of memorry error.
    2. Too many open files error.
    Please see my below portalserver. log files. Kindly provide some good solution to solve this problem.
    The following log is portalserver.log file
    ###<May 6, 2009 8:28:15 PM ICT> <Notice> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000205> <After having failed to listen, the server is now listening on port 9001.>
    ####<May 6, 2009 8:28:15 PM ICT> <Critical> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000204> <Failed to listen on port 9001, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
    ####<May 6, 2009 8:28:15 PM ICT> <Error> <HTTP> <ebizdr> <portalServer> <ExecuteThread: '5' for queue: 'default'> <<WLS Kernel>> <> <BEA-101019> <[ServletContext(id=18480784,name=NBIAProject,context-path=)] Servlet failed with IOException
    java.io.FileNotFoundException: /var/opt/weblogic/user_projects/domains/eBizPortalDomain/portalServer/.wlnotdelete/NBIAPortalApp/NBIAProject/images/go.gif (Too many open files)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:23)
         at weblogic.servlet.FileServlet.sendFile(FileServlet.java:563)
         at weblogic.servlet.FileServlet.service(FileServlet.java:206)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    ####<May 6, 2009 8:28:16 PM ICT> <Notice> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000205> <After having failed to listen, the server is now listening on port 9001.>
    ####<May 6, 2009 8:28:16 PM ICT> <Critical> <WebLogicServer> <ebizdr> <portalServer> <ListenThread.Default> <<WLS Kernel>> <> <BEA-000204> <Failed to listen on port 9001, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
    ####<May 6, 2009 8:28:16 PM ICT> <Error> <HTTP> <ebizdr> <portalServer> <ExecuteThread: '5' for queue: 'default'> <<WLS Kernel>> <> <BEA-101019> <[ServletContext(id=18480784,name=NBIAProject,context-path=)] Servlet failed with IOException
    java.io.FileNotFoundException: /var/opt/weblogic/user_projects/domains/eBizPortalDomain/portalServer/.wlnotdelete/NBIAPortalApp/NBIAProject/images/search_right.gif (Too many open files)
    Thanks & Regards,
    Suriyaprakash.V

    Sorry for the late resp. Here's what dev suggests be investigated:
    I would want to know:
    Can they do a "$ORACLE_HOME/bin/dmstool -dump" and
    save/compress/send the results?
    Are there any errors printed in the Apache error_log while this leak occurs?
    The customer could/should re-check their TCP settings, especially the TCP time wait interval and generally follow the TCP settings recommended in Chapter 5 of the iAS Performance Guide for 9.0.2.
    Is there anything else interesting/unusual about the site?
    Let us know how it goes.

  • Get ivi instrument handle from NISE Session

    In TestStand I begin my sequence with an niSE Open Session.vi and I then pass this NISE session reference around to other VI which use the niSE Connect and Disconnect VI's to connect/disconnect routes specified in MAX.  This works perfectly for me.  How do I convert this NISE session reference into an instrument handle for specific IVI devices in this NISE Session?  I want to be able to use the "ni Switch Get Relay Position.vi".  I tried using the "ni Get IVI device session.vi" but i get an error that says VI was stopped at IUseDCO.  What does this mean?  Is it possible to do what I'm asking?
    Thanks
    I'm using TestStand 3.5 and Labview 8.2
    Attachments:
    error.JPG ‏25 KB

    Hi Chad,
    The problem with the find route.vi is it just tells me if the path is available or not.  It doesn’t tell me what state the relay is in.  When using SPDT relays this is a problem.
    I’m using a 2570 card set for SPDT operation.  So if I do a find route after a reset on “Com->NO” and “Com->NC” both return path available.  I understand this because I have not made a connection call to either one.  If I make a call to connect “Com->NC” the relay changes states.   The connection then returns a path exists.  My problem comes when it comes time to disconnect.  Since it is a SPDT I have to first disconnect “Com->NC” then make a call to connect “Com->NO” (which is very annoying).  If someone just calls disconnect and I try to read the path availability both return path available again and the relay has changed state.  How do I know for sure which pole the common is connected to?
    If I open Switch Soft Front Panel it shows exactly what position the relay is in.  How do I get this info to labview?  This is why I was trying to get the instrument handle to the underlying IVI session so that I can look at individual relays instead of paths between endpoints.
    I hope this makes sense.  I know I can’t be the first one to have this problem, so if anyone has another solution I would appreciate any help.
    Thanks    

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

Maybe you are looking for