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

Similar Messages

  • How can I count events during a given time with 2 counters (6025 E)

    Hi, How can I count events during a given time (1 sec for example) with 2 counters:
    what is the best way?
    how should i configurate both counter?
    i have done the 1st counter in ev_counter with the gate being the output of the 2nd; and how can i say to the 2nd to trig the first after 1 sec counting? (trig at start and at end) what are the functoins calls in NIDAQ. i am using Visual C++

    Greetings,
    When you perform event counting a gate signal can be added such that if a low signal occurs on the gate, then the counter will pause. When a high signal is seen, the counter will continue counting edges. When you install the NI-DAQ driver you should have installed the examples for Visual C++. The counter examples are found in \Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ctr. Take a look at STCeventCount.C. Be sure to only use STC examples with your hardware. The E-series boards contain the DAQ-STC chip.
    Now, all you need is a gate signal with a width (high time) of 1 second. You could use an external frequency or pulse generator to do this. Or, you could just use the second counter found on your PCI-6025E board. In this
    case you could configure the second counter to generate a single pulse. Take a look at the STCgenerateSinglePulse.C example. As long as the pulse is in a high state for one second you can use it to gate (or time) your counting of events.
    Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • How to trigger another events during one event is running?

    dear all,
    i have two events. both of them are triggered by pussing two different buttuns.
    one has been triggered and at running status.
    right now i can't not trigger the other events. clicking the buttons doesn't give my any response.
    does any one have some ideas?
    thank you very much
    Jack

    Hello Jack
    When you select edit events in the context menu from the event case, a dialog appears. At the bottom is a check box which allows to lock the frontpanel until the event is executed (meaning the event case is finished). If you disable this case, the frontpanel is not locked, but the events are not handled before the event case is called for the next time. Therefore it should be placed in a loop. There are some examples in LabVIEW which might help.
    If you want to trigger the second event when the first is not finished yet, you must create two separe event cases, each in an own loop. And the check box mentioned above must be off for both events.
    I hope this helps. If not, aks again.
    Greetings
    shb

  • How do I access keypad during a call?

    How do I access the keypad during a call, to press 2 to select an option from a menu?

    You simply swipe your finger across it, left or right, and that switches between the caller screen and the keypad. hope this helps.

  • How to suppress message popup during RFC call

    Hi  expert,
    I have a scenario where in my RFC i am calling a SAP Bapi. But while this BAPI calling few popups appear which should be clicked as YES and then it has to run further.
    This "Pressing Yes" in popup is a manual way , i want it to be done automatically so that during my RFC call there is no interruption.
    Is there any FM which can suppress this popup by saying YES and there is no stopping for my RFC.
    Regards,
    Abhishek

    Hi ,
    I am facing the similar problem. Let me know how did you solve this problem ?
    Thanks,
    Krupali

  • 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.

  • 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.

  • I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is click event message box will not working correct

    I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is button click event message box or popup window will not working correctly. Please any one suggest me the steps to overcome this not responding or slowness in the responding problem of Button click event.

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    Thank you and I hope this helps!

  • How do i put loudspeaker on during a call?

    how do i put on loudspeaker on my phone 4s during a call??????
    i want record a voicemail message to my mac (in garageband) but cant find the loudspeaker option....
    any clues?

    When you receive a call and have answered it, if you look at your screen you should see several options, one being speaker, tap the icon and your call will be placed on speaker. The other option is to go settings>general>accessibility>incoming calls and change to speaker. Be warned though, if you change it in settings all your incoming calls will be on speaker until you change the option back to default.

  • How can make Jpanel response click event?(help!)

    in a program i want to make jpanel response mouseclicked event, but jpanel class does not provide addActionListener(). through which way? i am able to arrive at the purpose! (create a new class extends jpanel, how to do?)
    thank a lot!!!

    Hello,
    have a look:import java.awt.Color;
    import java.awt.event.*;
    import javax.swing.*;
    public class ClickPanel extends JPanel implements MouseListener
         public static void main(String[]args)
              JFrame frame = new JFrame("Click-Panel");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().setLayout(null);
              frame.getContentPane().add(new ClickPanel());
              frame.setBounds(200,200,400,400);
              frame.setVisible(true);
         public ClickPanel()
              addMouseListener(this);
              setBounds(200,200,100,100);
              setBackground(Color.CYAN);
         public void mouseClicked(MouseEvent e)
              System.out.println("clicked");
         public void mouseEntered(MouseEvent e)
              System.out.println("entered");
              setBackground(Color.ORANGE);
         public void mouseExited(MouseEvent e)
              System.out.println("exited");
              setBackground(Color.CYAN);
         public void mousePressed(MouseEvent e)
              System.out.println("pressed");
         public void mouseReleased(MouseEvent e)
              System.out.println("released");
    }regards,
    Tim

  • How do I correct mistakes while entering #s on keypad during phone call?

    How do I correct mistakes while entering #s on keypad during phone call?

    You mean when actively on the line interacting with an automated system on the other end?  You don't. Or, rather, it's up to the system on the other end. When you tap a number, the tones are sent over the line immediately. You can't "undo" it.

  • When speaking to someone during a call it sounds like there is an echo of their voice, how do I fix this?

    When speaking to someone during a call it sounds like there is an echo of their voice, how do I fix this?

        Hi Debsy1,
    Thanks for the additional details! Let's get this issue resolved. What software version is the device on? Please reset the Network Settings on the device. Go to settings>general>reset>reset network settings. Please Note: Audio alerts may also indicate delivery of incoming text messages or emails. The tone will vary based on the type of information being delivered to the device. Tones may also indicate low battery charge or inadequate signal strength. Keep me posted with results.
    Thanks,
    PamelaF_VZW
    Tweet us @vzwsupport

  • 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)

Maybe you are looking for

  • My i-message and facetime won't work after upgrading io6

    I am currently living in the United Arab Emirates.  My phone was purchased in the UK since UAE Apple products are not allowed to have i-messge or face time installed.....My phone worked great on IOS5, but since upgrading to IOS 6, these features no l

  • Understanding how interfaces work

    I am new and trying to understand the magic of interfaces. I understand that you can declare an interface as follows: public interface MyInterface {       public abstract thisHereMethod(); } But what I don't understand is how the compiler properly fi

  • How to uninstall HP Games/WildTangent

    Hi there, Can someone please tell me how to uninstall HP Games published by WildTangent? Every time I try to do this through Control Panel > Add/Remove Programs I receive an error directing me to contact WildTangent support which always leads nowhere

  • Failure to search - query window problem

    Hello again, Have anyone of you came across a problem with SAP search mechanism in query window attached to document field? I've created a simple query of "Select acctcode,acctname from OACT where acctcode like '2%' and postable='Y' order by acctcode

  • Video camera viewing help

    i have purchased a nokia 5800 xm and i can take an view pics but can only take videos not view them, its just a blank screen with no sound that runs for the length of the video taken. and when the videos are listed they all have a red star next to th