How to cancel syncronous I/O DLL-call?

We have an application with timeout set to 300seconds. If the application is terminated whilst a Send of Receive is in progress, the application is killed, but the NI driver remains active until the timeout is reached (and therefore blocks any further GPIB attempts).
Is there any way to cancel a syncronous I/O operation other than timeout?
Thanks.

It's not the case that ibln doesn't work with our instruments.
The reason we use a 300sec timeout is because we occasionally do a read from an instrument before the instrument is ready to respond (some instruments don't support SRQ or polling status byte). In which case, if we did a ibln prior to doing the receive, it'd fail, since it is currently processing and not listening to the bus. In these circumstances we do a receive and wait around for a while. Problem is that sometimes the response never arrives.
A lot of this is to do with the way we are programming the GPIB driver. We're using the low-level send/receives, so we can't set individual timeouts for each instrument. One instrument make take 4 minutes to respond, which is o
k, but another may take 30 seconds. If we don't receive a response after this period, we wish to abort the read.
It's a bit of a dodgy arrangement, but we are stuck with these instruments and their method of responding. What we are trying to achieve is a "controlled" failure, rather than the NI driver blocking for the full length of time.

Similar Messages

  • How to response polling event during dll call

    Hello,
    There is a long time dll call in my program. The program doesn't response to mouse click in the front panel during the dll call when I want to display other page in Tab control. It only response after the call.
    How to solve the problem?
    Thanks!

    Wether or not it is possible to fix this situation is dependent on the dll itself.
    IF
    the dll is written to be re-entrant (thread-safe)
    THEN
    you can configure the Call Library function to not run in the user interface thread. This can be done by right-clicking on the node and selecting "configure". In the configure screen, ther is a drop down selection box that defaults to "Run in UI thread". Change this to re-entrant.
    You can then determine which thread the dll runs in by setting the properties of the calling VI.
    Warning!
    If the dll is not re-entrant you WILL experience random crashes and possible data coruption! All bets are of if the dll is used in the wrong manner.
    What is happening:
    LV's execution systems are multi-thread with the exception
    of the UI thread. The UI thread is single threaded to ensure updates of control and indicator information is updated correctly, etc. This thread also uses co-operative multi-tasking wherein a proccess is expected to "put itself to sleep" regularly in order to allow other proccesses in that thread to gain access to the CPU. Your dll is dominating this thread and prevent user actions to be serviced!
    Final note;
    If you do not know if the dll is thread-safe and decide you just want to experiment,
    BACKUP YOUR ENTIRE MACHINE!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How is it possible to make sure that LV uses the same thread for several threadsafe DLL calls?

    Hello,
    i have a thread safe DLL and most functions are called from serveral threads from the LV apllication without problems.
    In case of an error i have to call an error handler function in this DLL (like WinAPI: GetLastError()) from the same thread which has called the function that failed before.
    I can't use the user interface execution because some functions need a long execution time and i don't want to balk the user interface.
    All other executions than the user interface execution have more than one thread and in most cases the DLL function calls were executed from different threads - so the error handling doesn't work...
    Any idea?
    Thanks for your help!

    Hmmm....
    How about wrapping all of your dll calls in a single VI (or an Action Engine ) and make sure the VI's thread is NOT set for "Same as caller".
    "Threadconfig.vi" (sp?) will also let you dictate the number of threads associated with an execution system. Set your target thread for "1".
    Not sure on the above.
    Please correct me if this is wrong!
    Ben
    Message Edited by Ben on 07-19-2007 08:26 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I build an application that calls functions in a dll if the associated hardware is not present?

    I am trying to build an application that use the "Call Library Function" node to call functions in a dll.
    The dll was provided by a third-party and includes functions to drive an I2C communication board.
    The problem I have is that the dll does not not properly because the hardware is not present.
    Therefore when I load the VI a broken arrow is displayed and when I am not able to build the application.
    I will not be running the application on the PC where I build the application, therefore I want to be able to build the application on a remote PC that has not all the hardware installed. Once the application will be build it will be installed on the target PC that has all the hardware.
    How can I make the application builder to build the application event if the dll is not properly loaded? (the dll will be properly loaded on the target PC)
    I want to do this on LabView 5.1.1, any ideas?

    Some .dlls don't try to attach to the driver when loaded.
    I've worked with both and unfortuately, I've not figured out a way around this problem.
    You could possibly use the Conditional Disable structure around the dll calls so they would not be loaded unless you're in the runtime engine. But i've not tried this so I don't know for sure if it's possible.
    Anyone??
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • How do I create a fault-tolerant DLL call from LV?

    I've created an .exe from a VI that calls a DLL, when that DLL crashes,
    it crashes the whole application.  This DLL is too complicated to
    completely debug and it, in turn calls DLLs I have no control
    over.  It crashes approximately once every 100,000 iterations.
    How do I make a DLL call fault-tolerent?
    Attachments:
    crash.gif ‏19 KB

    I might not have been very clear in my answer - this isn't a feature that CAN be added to LabVIEW...the DLL threw an unhandled exception across a DLL interface - which pretty much means a system exception (code shouldn't be throwing language exceptions across DLL boundaries as they are language specific). This means that something went very wrong with the code and there is a good chance that the process space has been corrupted. And from my own debugging experience, if it's only crashing 1 time out of 100,000, that doesn't mean it isn't corrupting memory or otherwise causing problems...it was just the time it was caught.
    Considering this, the Call Library Node already is fault tolerant - we catch the exception and report it to the user. You have a valid position that we should simply return this as an error. It's also a valid position that it would be a road paved with good intentions. All you need to do is remember what life was like in Windows 3.1 - where one process could silently corrupt another - to realize the amount of untraceable errors that could occur. Yes, the error out value should be handled by the user, but when an application of 100's or 1000's of VIs crashes seemingly at random because someone didn't, you can see the problem.
    I will say I like the idea of a separate memory space. It is unfortunate that Windows only offers that through creating a separate process, but it is a neat idea. I worked in the VXI/VME world for a while, which does have multiple address spaces.
    BTW - using signal handlers to catch exceptions is unfortunately not a 100% solution...signals are a partial port of a Unix concept in Windows. You would be best to use SEH around the call (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/key_s-z_4.asp). If the DLL is already a C++ DLL, then you can use the global catch of C++ instead
    int err = 0;
    try {
    } catch(...) {
       err = -1;
    Again, you still are at risk of a corrupted process, but this allows you to avoid our handling of it.
    Having spent years writing and (god help me) debugging device drivers, I love this topic. If you want to talk more about it and various options, feel free to shoot me an email at [email protected].
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to automatically load function parameters when editing c/c++ DLL call?

    I built a DLL in CVI and is used in TestStand, I want this DLL to have the ability to automatically load function parameters after specifying Module pathname and function name in "Edit C/C++ DLL Call" dialog? How can I do it?

    Staring with CVI 7.1 and TestStand 3.1 you do not need a type library for TestStand to load parameters automatically. Just make sure you declare your exported functions with the __declspec(dllexport) modifier as in the following code:
    __declspec(dllexport) void fun(void)

  • How can i cancel the using of "Only calls for emergency?"

    How can I cancel the using of "only calls for emergency?"

    In the USA, you cannot.  I believe it is an FCC requirement that all cell phones be enabled to dial 911, even if they do not have an active contract or prepaid service assigned to them.

  • How to cancel a service request?

    I had been running the Ipod in the car and noticed it had gone into the red. I turned it off and it went off normally. When I got home I hooked it to the computer to charge and it froze up completely, no response to anything, hold button, click wheel, weirdest yet, the backlight stayed on permanantly. And the computer did not recognize that it was even connected in Itunes or as a drive.
    So I freaked out a bit and after an hour or so while( after trying what I could which was basically holding controls down and flipping the hold button off and on ) I gave up and put in a service request, and went to bed.
    The next day, I noticed that the Ipod was dark ( which I expected since the battery was almost gone and the backlite was stuck on ). But just for fun I press the clickwheel on and lo and behold, it came back on as normal. I hooked it up to the computer as usual and it was visible to Itunes and the computer as it should have before. So I went through the reset process just in case and relaoded my music.
    So I guess there should be a 6th "R" Let it sit over night and see if it still screwed up the next day
    Now I'm stuck trying to figure out how to cancel a service after already receiving the return box Which was very fast by the way. Like, 2 days. Anyway, I looked all over the support site and could not find anything that looked like what I needed.
    Does anyone have any idea what I need to do to cancel the service request?
    Mike
    Dell Dimension 8400   Windows XP Pro  
    Dell Dimension 8400   Windows XP Pro  

    Call apple...
    Apple Phone Numbers
    btabz

  • How to cancel screensavers ?? thanks a lot!

    anybody help me pls,
    how to cancel "screensavers" --- this application program in solaris 2.6 open windows environment?
    thanks a lot!!

    Hi
    Your question is very clear. What do you mean by "Screensavers" ? Are you referring to the Solaris screen savers that appear on the screen when you leave the system with no activity for a while or are you referring to some program called screensavers ?
    In case of the first, it is very simple.
    Assuming you have Openwindow desktop,
    1. DO a click on the right mouse button in an empty area of the workapce.
    2. Select Properties
    3. Click the Category section drop down window.
    4. Select Miscellaneous
    You will see that a Screen Saver On/Off button which can
    be put to off or put in on "auto" with timeout minutes specified.
    Change it as you please.
    If you have a CDE environment,
    Just run /usr/dt/bin/dtstyle and select Screen icon.
    It will show you the details of the screen saver settings.
    HTH
    Shridhar

  • Private dll calling in Labview

    Hi everyone, (refinement of my question)
    I have two dlls. One contains public functions which I call from Labview. The functions in this dll call functions in the other (private) dll. However, how do I tell Labview where to find this private dll?
    I have tried installing the dll in the system path directory. I have also put the dll in various different places relevant to Labview (e.g. in the directory of the Labview executable file). However, none seem to work (.
    Is there an option in Labview where I can set paths to dlls?
    Any help will be gratefully received.
    Ciao,
    Matthew Banham (colleague of Francois)

    > I have two dlls. One contains public functions which I call from
    > Labview. The functions in this dll call functions in the other
    > (private) dll. However, how do I tell Labview where to find this
    > private dll?
    >
    > Is there an option in Labview where I can set paths to dlls?
    >
    The problem is that the system loader is what handles the dependent
    DLLs. Since LV knows about the primary DLL, we try multiple locations,
    the path in the dialog, next to the VI, in the LV search paths, and
    finally we ask the system to look in their places. LV doesn't know
    about the dependent DLL, and it is up to the system to find it. I'd
    recommend trying the system or windows folder again. That should be the
    right solution.
    An off the wall thought that might h
    elp would be to add a dependency
    directly into LV by making a DLL node that calls in the the "private"
    DLL. You don't actually have to call it, you can place it in a case
    structure with a constant set the other way. Anyway, this will cause LV
    to look for the DLL, and I think it might help if nothing else works.
    Greg McKaskle

  • How can I work with WindowsAccessBridge.dll from VB6?

    Hi,
    I have one java application(e.g JAlbum). Whenever I start that application it promt to enter username and password.
    Now what I want to do is?
    I want to get that both text boxs values and set some values of that text boxes with my VB 6.0 code.
    I have found that with help of WindowsAccessBridge.dll we can do something which I want. But they didn't provide any example source code in VB 6.0.
    Can anybody help me that how can I get content of Java Application. How can I use WindowsAccessBridge.dll in my VB project. I can do it for windows application by using IAccesible. But I don't know that how can i do it for Java with WindowsAccessBridge.dll.
    Please provide me some proper steps to work with WindowsAccessBridge.dll in VB 6.0.
    Please help me as soon as possible. If possible please provide me some source code in vb 6 or links.
    Thanks in advance.

    Hi Peter,
    Thanks for your reply.
    I have developed it using VB 6.0. Please check the below code.
    '' General Declaration
    Option Explicit
    Private Declare Function isJavaWindow Lib "WindowsAccessBridge" (Hwnd As Long) As Boolean
    Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
    Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
    Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Private Declare Function FindWindow _
                    Lib "user32.dll" _
                    Alias "FindWindowA" (ByVal lpClassName As String, _
                                         ByVal lpWindowName As String) As Long
    Private Sub Form_Load()
    Dim Var_g_HwndRec As Long
    Dim lb As Long
    Var_g_HwndRec = FindWindow(vbNullString, "CI for a proportion")
    lb = LoadLibrary("WindowsAccessBridge")
    MsgBox isJavaWindow(Var_g_HwndRec)
    End SubAt the time when I ran this program I got an runtime error "49', bad DLL calling convention.
    Can you please tell me that what could be the problem?

  • Configuring array of byte in dll call

    Dear all,
    I need to send the data 2010010100H to the dll at the question mark(U8) i mentioned in the attachment. Actually the data has to be transferred at a time not in bits and pieces. How to do this? I just put an array constant. Is it correct? Kindly give suggestions asap.
    Thanks,
    Mathan
    Attachments:
    1.PNG ‏10 KB

    Hi mathan,
    the dll call in your pic only accepts single bytes (U8) - so no way to wire an array!
    why do you create so many new threads, when the topic doesn't change?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Error Code 1097 Coming in DLL Calling

    Hi,
    I am getting error code 1097 in DLL calling function. Please find the DLL calling function details for more information.
    Function :  GetControllerListTest(controller *ptrControllertest,char *max_controller);
    Controllertest parameter details:
    define NO_OF_CONTROLLER  100
    #ifndef CONTROLLER_STRUCT
     typedef struct
      CString name;
      char status;
      CString blocked_by;
      char group;
     }controller;
    Controllertest parameter data type is structure. In LabVIEW, I have configured parameter as a cluster.
    name : String control
    status : U8 Integer control
    blocked_by : String control
    group : U8 Integer control
    Could you please confirm it, did I configured the datatype in correct way?
    I am getting empty array output and Error Code from the DLL 1097. Can you please tell me where I am missing?
    Thanks
    Sivaramkumar.V
    Solved!
    Go to Solution.

    Call Library Node problems without the VI in question attached AND the complete C prototype of the function provided, AND preferably some documentation about the C function in question can be not diagnosed. These informations are paramount to get the Call Library Node configured properly since there is no way a calling application can retrieve the necessary information from the DLL itself. The DLL interface was never intended to be a self configuring interface and it was designed with the understanding, that the user of such an interface is a fully knowledgeable C programmer knowing both, how to read a header file definition as well as various details about memory buffer handling.
    So show us your VI and the C header file, and we can start to help you. Otherwise all we can do is guessing in the way you have done with changing the calling convention randomly. You can of course try to shoot in the shooting range with a blindfold on, but the chances that you not only do not hit the target, but injure some other person instead is very high.
    The only reason that the suggestion from Fragger Fox has any merits is the fact that LabVIEW used to have some heuristics that changed the Call Library Node automatically from C calling convention (the LabVIEW default) to Windows calling convention, if it recognized a certain pattern in the exported function name. This heuristic was removed in LabVIEW 2009 because it did prevent the Call Library Node to be able to call functions that were using C calling convention but happened to match the heuristic pattern. So changing a Windows calling convention to C calling convention when the code has "seemed" to work before is NEVER a solution.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to Cancel Preorder of iphone 4s?

    I ordered the iphone to days ago and I got "Black" by boyfriend wants the iphone now and I don't want the same color as him (I realize how lame this question is).  I called Verizon and they said I could cancel the order and then just submit it again.  I asked them if I could do that online, but I can't figure out WHERE to do this online?
    Can someone give me a link or explain the process to me? thanks!

    Hello DistanceMMP!
    Thanks for posting.  Glad you to hear you ordered the great new iPhone!  I am happy to assist you with your order.
    I see you placed the iPhone order a week ago, if your iPhone has been shipped then you wouldn't be able to cancel the order online.  However, you have a few options; you could give your boyfriend the one you ordered by performing a device switch on My Verizon.  You would then be able to place an order for the white iPhone on his line and have it activated to your line of service.  We also have multiple cases and covers you can purchase for your iPhones via our website.  This can be an option to differentiate the two.  Also, keep in mind you are covered under our 14 day Worry Free Guarantee policy.  You can exchange your device once within the 14 day Worry Free Guarantee to the device of your choice.  There's a one time $35.00 Restock Fee.
    I trust I have answered your questions, and have addressed your concerns.

  • HT4759 how to cancel iCloud space

    how to cancel iCloud space

    Why is it so "easy" to cancel a service with APPLE?  I have signed up for a iCloud plan two years ago and now have decided to cancel it simply because I don't want to use it anymore. I went on Apple.com to read the whole support area with so many subjects while none of them would give me a clue on how to cancel the service. Then I tried to find the phone number to call, then the website gave me two options - either leave a phone number so someone can call me back, or call them LATER, WHY? I chose to leave a phone number but the site gave me some time slots that are all super early in the morning like 5 or 6 or 7 in the morning which is totally not convenient for me, as a single mom I am extremely busy in the morning. Then finally I found a general service phone number to call. First, I had been put on hold for 5 minutes until someone answered my phone, then she put me on hold again for another 10 minutes just to connect to another department or so. Then finally I got to talk to the right person, she asked me a bunch of security questions that makes me feel like I might not be able to cancel the service if I ever failed to answer those questions. Thanks god, I passed the test!  Then she put me on hold again for another 5 to 7 minutes, and the other side of the phone started playing very annoying heavy rock and roll music that almost made me hang up!  Normally I don't write reviews or give comments on services but this time APPLE really ****** me off by playing such an old fashioned bad trick to keep a customer which is polar opposite from their products and other services.

Maybe you are looking for

  • Bit of a problem (Headphone Jack and Scre

    I just got a Zen Micro not too long ago and I love it. But recently I was having issues with the headphone jack. I was only getting sound in one ear and I thought at first it was an issue with the headphones, but it also happened with the new headpho

  • Webservice proxy detail

    Hi,      I want to import the webservice created in ABAP in webdynpro.For that need proxy setting like destination name,destination type,custom URL.system id,client etc. Can anyone explain which system detail we have to provide here ABAP or EP.What s

  • HT1498 My rented movie won't play, even though it shows "rented".  What gives?

    My rented movie won't play, even though it shows "rented".  What gives?

  • Oracle Express vs Enterprise?

    Hi, I was wondering if there is a fact sheet out there on the differences between the various Oracle DBs. I have not been able to located one yet. I'm mainly interested if there are performance differences if any. If anyone could point me in the righ

  • Leopard and Plantronics Voyager 510 headset problem.

    I try to post here a message that i've posted in another section of the support board, maybe this is more appropriate with the problem. I have a plantronics voyager 510 bluetooth headset that i've alway used fine with Tiger. Since it's a multipoint h