Executables crash if VISA sessions are implemented

I'm using LabView 6i version 6.0 on a Windows XP machine.  I have several applications I've created which run fine under LabView, but the executables I build from them all crash.  I don't get any compiler errors.  I tried to build one of the serial communications examples which came with LabView, and that exe also crashes when I attempt to run it.  This leads me to believe that the problem isn't specific to what I've written.
I wrote a very simple piece of test code that doesn't have any VISA functions, and the exe I generate from that runs OK.  I have other executables I've built in the past that don't have any VISA code, and their executables still run OK as well.
Any known issues with VISA and building executables with LabView 6i V6.0?
Solved!
Go to Solution.

B_Harmon:
I haven't used v6 in years, I can't recall how to include the Visa RTE.
Below is a link to NI's ftp site for 6.0.2, I am not sure what exactly to download from there, hopefully it will help you.
ftp://ftp.ni.com/support/labview/updates/windows/6.0.2/
-AK2DM
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~

Similar Messages

  • How sessions are implemented on server

    Hi All,
    Can anyone please tell me how sessions are implemented on server like JRun, WebLogic, WebSphere or in general ?
    Thanks & Regards,
    Kumar.

    A common way to implement sessions in web servers would be something along the lines of...:
    1) When a browser accesses the webserver, the webserver sends a cookie with a session id to
    the browser.
    2) The webserver creates an instance of some proprietary class that implements the
    javax.servlet.http.HttpSession interface (comes with J2EE)
    3) The webserver stores the session instance in a java.util.Map instance using the session id as the key.
    4) When the browser hits the web server again, the cookie containing the session id is also sent, and
    the web server knows which session instance to use when processing this request.
    5) If the browser doesn't have cookies enabled, URL rewriting can be used. URL rewriting means that
    the webserver adds the session id as a parameter to every link in the web application. Thus, whenever
    the browser accesses the server again, the session id will be part of the URL, and the web server will
    know what session instance to use when processing the request.
    6) The webserver has a thread checking the session instances regularly to see if they are still valid,
    meaning if their timeout limit hasn't been passed since the last request. If a session has expired it will
    be removed. If a browser accesses a server with an old session id, the server will send a new cookie
    with a new session id to the browser.
    7) If the web server is part of a cluster, the session instance must be stored in a central database so all
    web servers can access it, or the session must be replicated from the current server to all other servers in the cluster, whenever the values in the session instance changes.
    Though I'm not an expert on Java web servers, I believe the, or variations of the above of course, will be how it's done.
    Hope this gives you an idea.
    Jakob Jenkov
    www.jenkov.com

  • Do we still need to close VISA sessions?

    I know it sounds like a silly question but do we?
    Back in my early days (LabVIEW 5.1) I used to have a set of favorite VI's for my instruments that opened a VISA session, performed a task (like taking a measurement), then closed the VISA session. I used these a lot as I could drop them in and throw a program together without having to worry about wiring the VISA sessions. Fact this speed of test development really sold our company on LabVIEW...
    Well later on I was having an issue with a larger program crashing. After spending some time on the phone with a NI Engineer troubleshooting he told me that the constant opening and closing VISA sessions was not a good idea and could be the cause of my issues. So I rewrote the program opening a VISA session once for each instrument and closing it at the end. This cured the crashing and forced me to abandon my library of drop-in VI's that had served me so well for so long, totally changing the way I was writing my programs.
    Now fast forward to a couple years ago when my company made the jump from Labview 5.1 to 8.0 (that was a big step) now we are at LabVIEW 2009
    Among the many other changes from 5.1 to 8.0 most notably VISA had changed, I/O wire types, VISA Open was gone, VISA Close was deprecated, all my old programs have the (old) tag on the VISA blocks... AND there was a Automatically close VISA sessions in the advanced options
    The fact that VISA Close was deprecated kind of leads me to believe that we are being guided to used the auto-close option. It certainly makes programming faster not having to drag the VISA wires out and close them... But often I still do just out of habit.  
    This also has me wondering if we even still have to open a VISA session and wire it all the way through?
    So take a look at the attached overly simplified examples and explain what is the "best method"?
    Attachments:
    VISA.png ‏64 KB

    When the option is checked, VISA sessions are only closed automatically when your VI stops running.  My understanding, based on this, is that your two auto-close VISA examples are identical.  The session is opened the first time a resource is used and remains open until it is explicitly closed or until your VI stops running (if the automatically close VISA sessions option is checked).  If you don't automatically close VISA sessions and you do not close them explicitly, they will stay open even when your VI is not executing, which means they will open faster when you restart your code but will not be available to other applications.  Of course, exiting LabVIEW closes all VISA sessions.

  • Driver visa session looping issue

    Hi,
    This is the first time I've ever setup a loop with a visa driver session in it. I am attempting to collect an array of flux data. The array indexes correspond to physical (x,y)  locations on the item i'm measureing the flux of. This is why i need the data to be read in as a 5x7 array of flux. The 5x 7 matrix is collected 3 times (at 3 different z heights). However, I can't figure out why I am getting three 6x7 matrices instead of a 5x7. I can't tell if it is my shift register setup, where my visa session is implemented, etc. I just can't figure it out.
    Could someone look at my attached code ( it's pretty simple, just 3 nested for loops with the visa session inside, and that data is fed out to 3 matrices, which is then stripped down further which can be ignored) 
    Thank you very much,
    chelsea
    Solved!
    Go to Solution.
    Attachments:
    visa loop test1.vi ‏31 KB

    First of all, I don't see a point in any of those sequence structures.  All they are doing is creating clutter.
    Secondly, why are you appending the second to last results to the whole results?  That is where your extra index is coming from.  Get rid of that shift register and the Build Array.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How are VISA sessions managed by executables?

    I have noticed that VISA sessions opened in the development environment (Labview version 6.0.2) do not show up in the VISA I/O reference control of compiled executables and visa versa. I assume that each EXE has its own memory space for open VISA sessions. Is it possible to get separate EXE's and the development environment to use the same VISA memory space so that all applications and uncompiled VI's show the same open VISA sessions?

    This answer, while correct, doesn't address the issue of some VISA classes and how Labview addresses open VISA sessions. It is quite correct concerning the listing of available resources, that is not the nature of my problem. The heart of the matter is the Open VISA sessions and how they are returned by the "Open VISA sessions.vi" vi in the vi.lib utilities. Also, the VISA reference control does, as you say, display currently available resources (for some classes), but it also displays currently open sessions below a dividing line for those resources not usually displayed.
    The best example of this is for the TCP/IP class. Resources of this class are not displayed unless a session for them has been opened.
    I have written and compiled an executable tha
    t opens a VISA session for a TCP/IP resource. After opening it, the session is displayed in the executable's VISA resource control below a dividing line that separates it from the available serial and GPIB resources. If, however, I have an uncompiled VI with a VISA control open in the development environment at the same time, the open session is not displayed in that VI's resource control. If I run the compiled executable as an uncompiled VI in the development environment along with other VI's containing VISA resource controls, the open TCP/IP session is displayed in all VI's. The same holds true for the "Open VI sessions.vi". Sessions opened by compiled VI's are not returned by this subVI when it is run from outside the executable.
    As I stated before, it appears the executable creates its own separate memory space for listing open VISA sessions.
    I would like to create a small executable that logs in to TCP/IP resources and makes those sessions available to other VI's that ar
    e either uncompiled and running in the devel environment, or are running as separate executables.
    Thanks for your comments
    Steve

  • Open VISA sessions in LV6 VISA Ref control and LV executables

    I have created a LV executable that opens a TCP/IP socket class VISA
    session. Once the session is opened, it appears below the dividing
    line in the executable's VISA resource control. However, the open
    session does not appear in the resource control of any open,
    uncompiled VI in the development environment, nor in the VISA control
    of other LV executables. However, if I run the VI as an uncompiled
    VI, the opened session appears in all other open uncompiled VI's as an
    available resource that may be selected. It should also be noted that
    VISA sessions opened by executables are not returned by the "Open VISA
    sessions" utility VI running in the development environment.
    My wish is to create a
    separate compiled executable applet that
    creates a TCP/IP connection to a network device and have that resource
    appear in the VISA control of other executables and VI's. It appears
    the executable uses its own memory space to keep track of open VISA
    sessions. Is there any way to change this so that all runtime
    executables and the development environment all work from the same
    list?
    Thanks in advance,
    sm

    jwf wrote in message news:<[email protected]>...
    > If you haven't done so, you should try updating LabVIEW 6.0 to 6.0.2.
    > You can download this update for free by going to www.ni.com and
    > clicking on downloads and then drivers and updates and pick the
    > LabVIEW updater out of a list. I know for a fact that this update
    > fixed some problems using the VISA resouce control in LabVIEW 6
    > executables. Hope this is helpful.
    Thanks for the advice, but I've already updated to 6.0.2.
    sm

  • ORA-12721: operation cannot execute when other sessions are active

    Hi,
    I started my DB like following :
    1) Change INIT.ORA file;  unset parallel_server parameter.
    2) Execute these commands:
    STARTUP MOUNT ;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    SHUTDOWN IMMEDIATE;
    SQL> STARTUP RESTRICT  pfile='C:\oracle\product\10.2.0\db_1\database\initORCL.ora';
    ORACLE instance started.
    SQL> alter database national character set INTERNAL_CONVERT UTF8;
    alter database national character set INTERNAL_CONVERT UTF8
    ERROR at line 1:
    ORA-12721: operation cannot execute when other sessions are activeWhy this error when DB is opened in strict and I'm the only user ?
    SQL> select count (*) from v$session;
      COUNT(*)
            20Any solution ?
    Thank you.

    Hi
    This operation is dangerous, please ensure that you have a full backup before doing that operation.
    Please use that order :
    SHUTDOWN IMMEDIATE;
    -- make sure there is a database backup you can rely on, or create one
    STARTUP MOUNT;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    ALTER DATABASE CHARACTER SET <new_character_set>;
    -- a alter database takes typically only a few minutes or less,
    -- it depends on the number of columns in the database, not the
    -- amount of data.
    SHUTDOWN;
    Please note that :
    The command requires the database to be
    open but only one session, the one executing the command, is allowed.
    For the above error conditions Oracle9i will report one of the errors:
    ORA-12719: operation requires database is in RESTRICTED mode
    ORA-12720: operation requires database is in EXCLUSIVE mode
    ORA-12721: operation cannot execute when other sessions are active
    Oracle9i can also report:
    ORA-12718: operation requires connection as SYS
    if you are not connect as SYS (INTERNAL, "/ AS SYSDBA").
    Let us know if this helps.
    regards,
    Hub
    Edited by: Hub on Dec 10, 2008 1:22 PM

  • Getting an error when closing a VISA session

    I have a VI that uses VISA to talk to an instrument through aLAN/GPIB gateway.  It works fine when talking to my laser.  When I try to communicate with my OSA, all of the commands work, and I get the data, but I get an error message from the VISA Close.  The OSA is an older unit, but I thought that the VISA stuff was all internal to the PC and OS.  Any help or insight would be appreciated.
    Jim
    Jim
    LV 2013
    Solved!
    Go to Solution.

    Sorry for the missing info.
    Error code:  –1073807338  
    Which in NI help is indicated as:  VI_ERROR_CLOSING_FAILED  -   The VISA driver failed to properly close the session or object reference. This might be due to an error freeing internal or OS resources, a failed network connection, or a lower level driver or OS error.
    Watching the VI execute in highlighted mode, there are no errors out of any of the VISA writes or reads before the Close.
    Jim
    Jim
    LV 2013

  • Labview 5.1 Executable crashes when I try to run it a second time

    I created an executable from some labview 5.1 code I wrote. The code works fine when I run it under labview, but when I created an executable, the code crashes. I can run the code once and it will work fine, but when I try to run it again it crashes.
    The coded basic function is to record data displayed on a network analyzer screen. I have the analyzer go into remote mode for data collection and back to local after data collection so changes can be made to the display. When I try running it again after changes were made, the executable crashes.
    Has anyone experience this problem?

    I have run into this problem a couple of times for different (but similar) reasons.
    One was that I used the VISA open and talked to the instrument, but did not CLOSE the VISA session. When trying to OPEN again (second time program is run), the program would crash.
    I had the same problem with opening references once. It is supposed to close all references when the program ends, but I always close my sessions before exiting.
    Look for OPEN without CLOSE in the program.
    Hope this helps.
    Rob

  • VISA Session BeginWrite Waits

    Based on the VB.NET SimpleAsynchronousReadWrite example, I'm able to perform BeginRead for my VISA session (TCP/LAN instrument, VXI-11). As expected, BeginRead returns immediately and then my callback gets called when the instrument responds or when a timeout error occurs. I'm even able to use the session Terminate method to abort the operation using the IAsyncResult returned by BeginRead.
    But calling BeginWrite doesn't return immediately. It waits for the operation to finish or time out. My callback does get called and the operation does execute and complete properly but the overall behavior isn't async. What is going on?
    I'm using Measurement Studio 2013 for Visual Studio 2010, NET Framework 4.

    For VXI-11, a VISA session BeginWrite turns into a RPC device_write request to the instrument's core port. The instrument is supposed to respond with a device_write reply. You can see these packets using a protocol analyzer like Wireshark. What should happen is BeginWrite should wait asynchronously (return immediately) for the device_write reply, allowing the host to perform other processing (Windows GUI etc). During this time, I should also be able to use the VISA session Terminate function to cancel the pending write (host sends RPC device_abort request to instrument's abort port).
    For VISA async reads, BeginRead ends up sending a RPC packet device_read request then asynchronously waits for the instrument to send a device_read reply. Unlike BeginWrite, BeginRead does return immediately allowing the host PC to do other things. If the instrument fails to send the device_read reply, VISA correctly waits in the background and allows my application code to send VISA terminate (correctly sends packet to abort port) or terminates on its own due to a timeout.
    So it appears BeginWrite doesn't implement the correct async behavior for the initial RPC device_write request but instead synchronously waits for the device_write reply. I would like BeginWrite to have the same behavior as BeginRead.

  • Open visa sessions for controllin​g external dlls

    I need to open a VISA session to pass a session reference into a call library fucntion that calls the vendors instrument functions.  I currently see no way to do this using the call library or visa open function.  Does anybody know how to proceed when you have a non NI instrument that has a dll wiht it that you need to control over USB serially? 

    Mike,
    First thanks for your help but I have been in both those docs before.  My issue is that I have an instrument vendor that has a dll with functions like this:
    ViStatus _VI_FUNC Instr_autoConnectToFirst(ViPSession vi)
      return(Instr_autoConnectToAll(vi,1,NULL));
    that is written using some of the variables in the VISA library...
    When I go to look up what datatypes these variables are in the VISA specifications so I can hopefully create inpuits on a call library function in Labview,  I get descriptions like this:
    Type ViStatus
    This is the operational return status. It returns either a completion code or an error code as follows.
    Completion Codes
    Description
    VI_SUCCESS
    Attribute value set successfully.
    VI_WARN_NSUP_ATTR_STATE
    Although the specified attribute state is valid, it is not supported by this implementation.
    Error Codes
    Description
    VI_ERROR_INV_SESSION
    VI_ERROR_INV_OBJECT
    The given session or object reference is invalid (both are the same value).
    VI_ERROR_NSUP_ATTR
    The specified attribute is not defined by the referenced session, event, or find list.
    VI_ERROR_NSUP_ATTR_STATE
    The specified state of the attribute is not valid, or is not supported as defined by the session, event, or find list.
    VI_ERROR_ATTR_READONLY
    The specified attribute is read-only.
    VI_ERROR_RSRC_LOCKED
    Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.
     I do not see how I get the IO defined for passing and returning data to these external library calls.
    Any ideas???

  • Closing Identical VISA Sessions

    I have several sub VI's using VISA in my latest build.  By default they all use the same VISA session, but the user has the option to switch one or more sub VI's to a different device (different VISA session).
    In my "Panel Close" event, I currently have it wired such that each sub VI's VISA session is closed separately.  It occurred to me that this may cause problems in the (normal) case that one or more sub VI's is using the same session; however, my main VI is somewhat of a mess, and it will be a couple days before I can actually test this.
    Will it cause errors, program crashing, etc. for me to give a Close command on a VISA session that isn't open any more?

    PeterHeckert wrote:
    Much easier to do than closing at exit.
    But you really should be closing them when you are done with them.  If you try to close something that isn't open, it is not an issue.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Probe.log no MIBs are implemented

    Probe manageability:
    How do I install the MIB's? I did compiled the mib's.
    proble.log
    In ###.###.##.###, no MIBs are implemented
    Unimplemented MIBs (with OIDs) are:
    RMON-MIB .1.3.6.1.2.1.16.1.1.1.1
    TOKEN-RING-RMON-MIB .1.3.6.1.2.1.16.1.2.1.1
    RMON2-MIB .1.3.6.1.2.1.16.11.1
    SMON-MIB .1.3.6.1.2.1.16.22.1.1.1.1.4
    RFC1213-MIB .1.3.6.1.2.1.1.2
    RFC1315-MIB .1.3.6.1.2.1.10.32.1.1.1
    RFC1381-MIB .1.3.6.1.2.1.10.16.1.1.1
    RFC1382-MIB .1.3.6.1.2.1.10.5.1.1.1
    RS-232-MIB .1.3.6.1.2.1.10.33.1
    TOKENRING-MIB .1.3.6.1.2.1.10.9.1.1.1

    dcampisi,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Why stale sessions are creating in Data Load Execution?

    Hi Experts,
    Can anyone tell,Why stale session are creating every time, when i do the incremental load in operator tab?.Thanks In advance.
    Regards,
    raj

    Hi Experts,
    I got the some below information from blogs..is it correct?
    When the network connection has a problem or an agent gets disconnected from master and work repository momentarily, we end up with stale sessions.and master and work repositories Crash.
    Thanks

  • VISA session to an instrument handle

    I tried to aquire data from TEKTDS 220. I use "set condition" to "aqu
    status",
    then "read waveform" subVIs. So there is a problem: I need to connect the
    "VISA
    session" to "instrument handle", but it doesn't work. Could you please tell
    me
    how to connect these two type of wires?
    Thanks a lot!

    It looks like you're trying to mix the tktds2x0 IVI driver with the tktds2xx LabVIEW native driver. The IVI driver has an "instrument handle" which is an IVI session, and the LabVIEW driver has a "VISA session". The two wires are not compatible. You should either use just the IVI driver or just the LabVIEW driver.

Maybe you are looking for

  • If condition in conversion sheet help

    I need help to know synatx or example of an if statement in conversion sheet.my requirement is if the entity is petstore1 i need to change it to store1 dynamically.

  • Not able to post depreciation in the new co code

    Hi I am trying to post the Depreciation using AFAB into a newly created Co Code for the first time. But the system throws the below error asking me to post to the last month of the previous year. You can only post in new year after closing the previo

  • I cant update my iphone 3g because there's an error 0xE00000A. How can I get my iphone updated?

    When I went on itunes and I plugged my iphone in a box came up and there was an error 0xE00000A. I need to update my phone because all of my apps are crashing, the screen goes dark, my phone is really slow, and I have to push the home button at least

  • How to insert a data&time to Database date field

    Dear Friends, I have created a Stored Procedure which takes a Date data type as an input,When i call this procedure from java i need to set the data&time in yyyymmddhhmmss format. How to set this from java ?. Rgds Mohan S

  • Servlet CPU Scheduling

    Using Weblogic 5.1 SP3 under Solaris 2.7           We are using the native Performance Pack which allocates 3 Posix readers           can           we or should we tune this???           We have an unusual situation where we want to essentially do an