Does LabVIEW take over keyboard presses?

I'm using a C api in my LabVIEW application through a call-library-function-node. I'd like to be able to gather keypress info in one of the functions in the DLL, but it seems like LabVIEW is hijacking the values gathered by the C function from the keyboard. Any info on this? Thanks!

Thanks for all the replies! I'll respond in order:
"Instead of a DLL, can you compile your code into an executable, and then call it with System Exec?"
Haven't tried this yet. The reason I'm using a DLL is that I'm using an API for an out-of-the-box device (an eye-position tracker), and I've written several functions that I need to access, so it would be kind of a pain to write code for multiple executables, but I can do this if it comes down to it.
"Is there a reason you don't want to monitor the keyboard in LabVIEW? Look at the Connectivity>Input Device Control palette."
"Another way to monitor the keyboard or mouse in LV is to use an event structure. There are events and filter events for keyboard and mouse."
Putting these two together since they have the same answer... Long story short, I can't, once the function I'm calling is triggered correctly, it's waiting for user-input on the keyboard and thus the input read by labview will go unnoticed (I tried this several different ways).
"IIRC, CLNs execute in the UI thread.  It seems to me that if you use a CLN to call something that also is trying to access the UI thread, they could deadlock (but I have never tried this).  Could that be the issue?"
I'm actually a novice C coder and self-taught labviewer, this sound super intriguing, EXPLAIN PLEASE!
Finally, I'd like to mention that I have made a small amount of progress on my own with this issue. I believe that I need to create a window using something like the function CreateWindowEx, part of the native windows user interface functions, because when one creates a window, one also makes a process to handle events like user-input. I suspect that whatever process is created by labview to handle user input in the VI is rightly in charge of handling key-presses (I also suspect that creating an executable might get around this as well since the exe might create a process to handle UI), so it's more like my DLL is actually the one trying to hijack the key-presses, not the other way around. If this is so, I should be able to simply create a dummy window (drawing it off screen so I can still see all my front-panel stuff in LabVIEW)  to handle the UI and then kill it when I'm done. I'm trying to do this at present, but my novice C coder status is making it a bit slow going. I was hoping some LabVIEW engineer or somebody else might have dealt with this type of issue in the past and could simply send me some code to make it all a moot point...
Again, thanks for all the replies and suggestions!

Similar Messages

  • Why does it take over two hours to download a movie on Apply tv

    Why does it take over two hours to download a  movie on Apple TV
    Thanks

    Welcome to the Apple Community.
    The first thing to check would be your internet download speed, you can do this at www.speedtest.net.
    1080p HD movies require a recommended speed of 8 Mbps, 720p HD movies require a recommended speed of 6 Mbps, while SD movies require a recommended speed of 2.5 Mbps.
    Netflix uses adaptive streaming and can reduce quality right down to produce a stream as low as 0.5 Mbps.

  • Why does Adobe take over?  Part 2

    Why does Adobe take over Part 2:  I attempted to use  http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html  and on download got a box that said, Quitting     Raise without Handler!    
    Oh, and I had to uninstall the whole thing anyway just to be able to get to the Internet.  Any Adobe icon I hit tells me that there is nothing attached to it. 

    May be you can try other solutions mentioned in the link.

  • Why does it take over 2 hours to download a rented movie on apple tv? When I download a movie on Netflix it downloads immediately.

    Why does it take over 2 hours to download a rented movie on Apple TV?  When I download a movie from Netfix it is immediate.

    Welcome to the Apple Community.
    The first thing to check would be your internet download speed, you can do this at www.speedtest.net.
    1080p HD movies require a recommended speed of 8 Mbps, 720p HD movies require a recommended speed of 6 Mbps, while SD movies require a recommended speed of 2.5 Mbps.
    Netflix uses adaptive streaming and can reduce quality right down to produce a stream as low as 0.5 Mbps.

  • Does CC take over my perpetual CS6 licence?

    I have a perpetual licence of Creative Suite 6 and am running many of its applications - InDesign, Photoshop, Illustrator and so on. It is working perfectly for the print-based work I do. However, I may take on a job that requires me to subscribe to InDesign CC 2014 for a month or two. Just the one-app subscription, not the full CC. When the job is finished, I will stop subscribing.
    I believe I have seen discussion that CC takes over your perpetual licence (search didn't find it). One comment was that their perpetual licence "disappeared" from their Adobe registered products. Apparently, when you drop the month-to-month subscription, it kills CS6 because it has become related to the subscription, and the only solution is to do a full uninstall, use the cleaner tool, and reinstall the perpetual suite.
    Can anyone confirm that this is true?
    On a related note, if I buy a single app InDesign subscription, will my other CS6 apps (Photoshop, etc) stop working during the job because I haven't subscribed to the full suite?

    If you buy a single app CC, you will be able to work on the CC version as well as the CS6 version.
    If you own a license for CS6 you own it for life.  Machine capabilities might advance beyond being able to use it, but you always have it.
    If you have a full CC subscription it includes the option to install CS6 software but that software is part of the CC subscription, so if the subscription ends so does the use of the CC-acquired versions.  Your licensed software still remains useable if you end the subscription.
    As far running both CC and CS together, it should be possible, though in my case CC decided to assume control of my suite programs to an extent where it changed how they are set up.  So I can't answer regarding how things get along when you mix them in the same system.
    Your Creative Cloud membership also includes access to CS6 apps. So if you ever need the CS6 version, head over to http://creative.adobe.com/, sign in, and download a CS6 app. For instructions on how to install CS6 apps see: Install CS6 app with Creative Cloud
    Please refer to What Are the Differences Between New Adobe CC vs. CS6?
    What’s the Difference Between Adobe CC (Creative Cloud) vs. CS6? | ProDesignTools
    Successfully Installing & Activating CS6 (not Creative Cloud) behind an Authentication Proxy server
    Regards
    Rajshree

  • Why does Adobe take over?

    When I download Adobe Reader it takes over my computer, turning every icon into an Adobe one and killing it.  I have tried the download in Chrome, Mozilla and now IE, uninstalling after every attempt. 

    Please try this
    http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acrobat.html
    Hope this helps.

  • Why does it take over 30minutes for my brand new MacBook Pro to sign me in?

    I purchased a macbook pro 2 days ago. I am not familiar with mac's, but the first day it worked fine, but after i shut it down and attempted to start it up again it takes forever. The computer starts up and i enter in my password, but then the screensaver screen just stays on and doesn't actually log me in until about 45minutes later. When it does actually log me into the main screen with the deck, it freezes up if i click on anything. This is a brand new computer, why is this happening?!

    This is very unusual. A normally operating Macbook Pro should have you signed in and running in well under 60 seconds from cold boot.
    Most likely is that the software installation on you machine has been corrupted. It's not possible to efficiently work through all the possible problems over the forum. The root causes can range from a bad preference file up to a corrupted file system. Because your are a very new user and the problems are so severe, my approach to your situation would be to completely erase your drive and reinstall OSX and your applications from scratch. That way you eliminate nearly all variables.
    A more conservative approach would be to fix permissions on the drive and/or repair the drive using disk utility (after booting from the OSX install disc) That MAY fix things, but if things are this bad, AND you are new on the machine and presumably don't have much work saved on it anyway, I'd just start anew.
    This is very unusual for a Mac. Typical reliability on my Mac's lets me keep some up and running without reboot for 6 months. Yours is definitely in a bad state.

  • Why does LabVIEW take significantly longer to display a large amount of Chineese characters? (intentionally misspelled)

    EDIT: I am intentionally misspelling the word for "the language of China" otherwise the forum will censor me, seriously.
    We have a large application based on LabVIEW. In this application, we use flattened strings to pass data between VIs. I recently noticed that some VIs who show their Front Panels when called were taking significantly longer to draw their Front Panels on computers that are localized in Eastern languages (Chineese, Korean, etc.).
    I eventually traced it down to the fact that if you try to display a large amount of characters (anything over 2000 characters) in a string on a Front Panel where the text in LabVIEW is localized to English, the Front Panel is launched and drawn instantly. However, if the string becomes localized in an Eastern language, say Chineese, it can take significantly longer to draw the Front Panel (anywhere from 40 seconds to 2 minutes or more depending on the length of the string) and the CPU is being taxed.
    I've attached a simple VI (LabVIEW 2014) which demonstrates this behavior. It simply generates a random sequence of characters of a predefined length.
    In order to notice the problem, follow these steps:
    Make sure LabVIEW is closed first.
    In Windows, go to Control Panel > Region and Language.
    In the Formats tab, observe which language is currently selected. If it is not set to "English (United States)", then switch to that and click Apply.
    Launch LabVIEW and run the attached VI. You should notice that the string indicator updates almost instantly.
    Completely exit LabVIEW.
    Going back to the Region and Language panel in Windows, change the Format drop-down from "English (United States)" to "Chineese (Simplified, PRC).
    Launch LabVIEW and run the attached VI. You should notice a significant delay it takes for the string indicator to display the text.
    Anybody have any idea why this is happening?
    Thanks!
    Attachments:
    Random String Generator.vi ‏8 KB

    Drat.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Why does it take over 2 minutes to get a database connection from the DataSource?

    Hello,
    It is taking over 2 minutes for my application to get a connection from a registered DataSource in iAS 6.0 sp4 on Solaris. The proper results are returned it just takes 2 minutes to establish the connection. The DataSource is an Oracle 9i database. I have the 9i drivers in the classpath. I also have a registered datasource that is an Oracle 8 database and have no problems establishing a connection quickly to that database. As an aside I have setup this application on JBOSS and both datasource's return a connection very quickly. If anyone has any ideas about what might be going on please respond. This issue is holding up a production release.
    Here is the code:
    try {
    log.debug("getting a new initial context");
    ctx = new InitialContext();
    ds = (DataSource) ctx.lookup(bundle.getString("IW_DATASOURCE"));
    log.debug("after looking up datasource from initial context");
    } catch (NamingException e) {
    log.error(e);
    throw new FinstarException
    (bundle.getString("E-0001"));
    try {
    log.debug("about to get connection");
    conn = ds.getConnection();
    log.debug("after getting connection");
    Produces this in the logs:
    2002-05-29 08:55:12,859 DEBUG org.mitre.mii.project.finstar.FinancialSummary - about to get connection
    2002-05-29 08:57:24,963 DEBUG org.mitre.mii.project.finstar.FinancialSummary - after getting connection
    Here is the datasource registration file:
    <ias-resource>
    <resource>
    <jndi-name>jdbc/pdc/IWDataSource</jndi-name>
    <jdbc>
    <database-url>jdbc:oracle:thin:@xxx.xxx.org:1521:acisdb</database-url>
    <datasource>jdbc/pdc/IWDataSource</datasource>
    <username>XXXXX</username>
    <password>XXXXX</password>
    <driver-type>OracleThinDriver</driver-type>
    </jdbc>
    </resource>
    </ias-resource>

    Have you tried to eliminate everything extraneous. In other words, do you experience the same delays with a simple Java program (no lookups, JNDI) that loads the drivermanager and creates a connection.
    Do you have access to a traciong JVM or some program that captures run-time execution timing information? Even without the source, this will tell you the specific class::methos where time is spent so you can better determine where the delay is ocurring.

  • Why does labview take so long to load

    I have LabVIEW installed: along with LV RT and LV FPGA. When I want to target an FPGA board: 7813 or 7811 for example, the LV load time is minutes versus seconds.  I understand that VISA is used to interface to the RIO boards.  It seems that there is something waiting to timeout and LV takes a really long time to load.  Any thoughts?

    Is LabVIEW installed on a local disk or on a network resource?
    LabVIEW Champion . Do more with less code and in less time .

  • Why does LabVIEW skip over commands in programming structures

    Hello everyone!
    Is there a certain way you program to make labview execute ALL commands within a loop before going into another loop? For example, I have a while loop that stops if either the stop button is pushed or if the set point input is greater than 8. If both of these are false, then the code entered a case structure where it controls the output from a plant model. However, labview will enter the case structure without checking if both conditions are met. I've attached the VI and in the next message will post the VIs from the plant. I want it to do the below code,
    IF (Set Point > 8 OR Set Point < 0) THEN
           SET_Point OK= False
    ELSe
          SET_Point OK = True
    END IF
    IF (SET_Point OK = FALSE OR Stop Button pushed) THEN
             ! STOP VI
    ELSE
             ! Enter PID Control Loop
    END IF
    But labview likes to just jump around and skip parts for some reason. So when it for example, skips the OR check it uses the default value of true for the next case structure. It's driving me crazy. Can anyone please tell me why its doing this??
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    General Auto PID Simulator.vi ‏83 KB
    Global 1.vi ‏5 KB

    Ah! I can't believe I made that dumb of a mistake. And thanks for the advice altenbach. My overcomplicated diagram probably lead me to making that error. 
    I have another question though. How come when I use the Write to measurement file VI it will start the process variable at like 40 inches but when I don't use it, it'll start it at 0 and do as its supposed to? I've attached my updated VI with the write to measurement file VI in it. You'll see that if you delete it then it'll do as its supposed to. I don't understand why though..
    Attachments:
    General Auto PID Simulator.vi ‏118 KB
    Global 1.vi ‏5 KB
    problem with PV initialization.JPG ‏132 KB

  • Does Labview take advantage of graphics accelerators?

    We have an application which is updating LOTS of indicators, boolean and numeric, several times a second while handling a lot of serial communication and data parsing.  We have already seen that on a relatively high spec laptop, it is causing very high load and overheating of the laptop at times.  Yes, there are lots of optimizations yet to take advantage of, and have a developer working on it now, but in general, if one has front panels w/ lots of displayed data that is refreshed a lot, or lots of graphs, would a graphics accelerator card take load off the processor, allowing the application to run more efficiently?

    altenbach a écrit:
    Only update indicators (especially graphs) if their value actually changes. (Place their terminal inside a case structure).
    Don't set your indicators to "synchronous display".
    Hum... I thought that indicators where only updated if their value was changed ... even when set to synchronous display. At least this bis what is suggested by the attached vi...
    Message Edité par chilly charly le 09-05-2006 06:14 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Update or not.vi ‏10 KB
    Update.PNG ‏8 KB

  • Why does it take over ten minutes for email to get through for my request for a signature

    Why isn't this program faster? It's been over 20 minutes emailing a test form, to myself, to see how quick this is? Is this normal? Not what I was looking for in a software program

    Have you tried to eliminate everything extraneous. In other words, do you experience the same delays with a simple Java program (no lookups, JNDI) that loads the drivermanager and creates a connection.
    Do you have access to a traciong JVM or some program that captures run-time execution timing information? Even without the source, this will tell you the specific class::methos where time is spent so you can better determine where the delay is ocurring.

  • Why does the keyboard take over and type c's all across the search box (no hands involved)?

    Why does the keyboard take over and type c's across the search box (no hands involved)?

    There are only three possibilities. Either a dangling hand hitting the c key, or if you have a bluetooth keyboard connected and something is pressing a key, or you have some bad harware.  Eliminate the first two, and if you still have the problem, take it in for service or replacement

  • How long does it take to connect to Wi-Fi the first time I use my Ipad? It's been over 30 minutes. I see that it wants to connect but it keeps on turning.

    How long does it take to connect to Wi-Fi the first time I use my Ipad? It's been over 30 minutes. I see that it wants to connect but it keeps on turning.

    It should not take very long. Up to thirty seconds tops depending on your Wi-Fi network.
    Try rebooting your Wi-Fi router. Turn off the router for 30 seconds then turn it back on. After the router completes its startup routine and indicates a good connection to the internet start you iPad again and see if it will connect.
    If you still have problems you might try connecting to a different Wi-Fi network. Maybe one at your local coffee shop or library.

Maybe you are looking for

  • NOKIA C5-03 Internet connectivity Problem..

    I Have Nokia C5-03 bought before 4 months. I use BSNL Prepaid card, 3G/EDGE enabled. I am facing problem of not being able to connect to internet via 2G/3G reliably. whenever I try to connect to internet, 7 out of 10 times it gives me message" "conne

  • How to use iCloud email for registering at iTunes Store

    This is my first discussion even I'm not a newbie I'd like to use my iCloud email to register at iTunes store, but I always got a message "Use your @me account to sign in" (I guess like that the message). When I sign in with iCloud ID at AppStore, th

  • Quickfix and format problem

    I am reading from the book "Implementing DSL with xtext and xtend" it says that formatter is invoked when of course the Format from the context menu is used or the shortcut for it "Ctrl + Shift + F" is used. It also says that "If you provide a custom

  • How to call a function defined inside a module loader

    I wanna know...the method of calling a function defined inside a module loader component? Th <mx:ViewStack id="myViewStack" > <mx:Canvas id="Mgmt1"> <mx:Label text="Gopher"/> </mx:Canvas> <mx:Canvas id="Mgmt2" > <mx:Label id="gopherlbl" top="-2" left

  • Having issue with Mirrored display

    I got the mirrored display working for my external display, but then randomly the external display will flash between a solid blue empty background and my desktop for no reason.