Keyboard in Labview

Hi,
I want to my program to take some action when the space-key is
pressed, but I can´t figure out a way to test if a key (and which one)
is pressed. So I would like to know if there is any way to check for
a pressed key in Labview (win 95).
Thanks for your help in advance,
Alexander
Alexander Stapff e-mail: [email protected]
RWTH-Aachen (Student)
Aachen, Germany
PGP Public-Key available on request

Anu rvk,
There are several options : you are either
  1/ an historian
  2/ a pre-historian
  3/ a paleontologist
Before answering, check the date of the post...
Message Edité par chilly charly le 01-09-2006 01:26 PM
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        

Similar Messages

  • Req any examples of how to use a USB midi controller​/keyboards with Labview TIA

    Req any examples of how to use a USB midi controller/keyboards with Labview TIA

    Hi,
    To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
    As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
    Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
    = "http://msdn.microsoft.com/library/default.asp?url​=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.

  • Req any examples of high to use midi controller/keyboards with Labview TIA

    Req any examples of high to use midi controller/keyboards with Labview TIA

    [email protected];
    Check the following:
    Communicating with a Windows MIDI Device in LabVIEW
    Regards;
    Enrique
    www.vartortech.com

  • Programming a japanese onscreen keyboard in Labview (Linux)

    HI,
    I would like to know whether it is possible to program an onscreen keyboard for a touch screen in Japanese.
    I found a lot of threads on onscreen keyboards programmed for Windows but none for Linux.
    Also, which is the best IME for Japanese in linux and how do i access this IME in labview.
    Thanks in advance.
    Pavitra

    Hey, so I am still trying to visualize what the end goal is.  Could you post the articles you are referring to?  Is it a bunch of bolean controls that are arranging to look like a keyboard that has Japanese text on each button? 
    Daniel Eaton
    National Instruments
    Systems Engineering
    Embedded and Industrial Control

  • How can I disable or enable the keyboard and fix mouse's position with LaBVIEW?

    Hi,
    1. I'ld like to disable or enable the keyboard with LabVIEW.
    2. I'ld like to fix the mouse's position with LabVIEW.
    How can I do it?
    Please advise.
    Regards
    Hork

    For the keyboard, you could create a filtering event and discard the key change.
    What do you mean by "fix the mouse position"? Warping or stalling the mouse is very bad UI form., the operator should always be in control of the cursor position. Could you explain what you want to do?
    LabVIEW Champion . Do more with less code and in less time .

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

  • Disable Keyboard While VI is Running?

    Is there a way to disable the keyboard input while a VI is running? I am designing a system that will run for 14-days, and there might be the potential for someone to accidentally press a button that would stop the VI or cause the computer to crash. I would like it so that a the operator can turn on and off the keyboard lock from the front panel. Is this possible?

    You should try searching before you post your question on the forums. Here is your answer:
    How Can I Disable the Keyboard in LabVIEW?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Labview as recorder.exe

    Do you remember from ancient times, the Win3.1, program -
    recorder.exe.
    This file records the movements of the mouse and key pressed and
    be able to do the same later on demand.
    Can Labview control other applications while it is hidden and
    other applications are "on top". Another words if it is possible
    to emulate mouse and keyboard by Labview to be visible from
    another applications as a normal operator work.
    E.g.. (dummy) I have a CD-player and I want Labview to press
    "start" button in this program every one hour. This is not real
    example but this is what I would like to know.
    thank you for help in advance
    PP

    This would be an interesting application! In order to control external applications, such as the CD player example you used, you would need to use ActiveX controls. You would need an ActiveX control for each application you want to control from LabVIEW. Now, one thing about ActiveX is that LabVIEW must open up the applications through ActiveX. In other words, you can not open Microsoft Word yourself and then have LabVIEW control that instance of it.
    You would need to create a program which simulates certain clicks and selections and then run this program each time you want them to occur. Or, you could also put the VIs in a loop and have it run 24 hours, although this may consume needed processor power.
    LabVIEW can simulate keyboard events. I am atta
    ching a VI from the National Instruments website which shows how this is done. You may want to take a look at this.
    Basically, what you are wanting to do is create "macros." They "record" actions that a user makes on their computer and then are able to "replay" these actions at later times. There are actually software packages that do this and they would be much easier to do that using LabVIEW to build your own. Here is an example of one. You may want to check these out because it sounds like this is what you are wanting to do.
    J.R. Allen
    Attachments:
    Simulate_Keyboard.vi ‏41 KB

  • Keyboard Simulation Help

    I am trying to use the simulate keyboard for labview 8.5. There are 2 keys that I cannot figure out and I neeed to use them both.
    The underscore _ and the slash / or is that a backslash?
    On the simulate keyboard vi the keys I need are listed as reserved.
    I looked at the microsoft keyboard_event Function but sorry that was no help.
    I am sure somebody knows how to get these keys to work?
    I have attached the simulate keyboard vi if that helps.
    Thanks for any help.
    Rick.
    Solved!
    Go to Solution.
    Attachments:
    Simulate Keyboard 8.5.vi ‏22 KB

    Hi Rich,
    see the attached example. It works for me. There are some error in it, because i converted it back to 8.0.
    Hope it helps.
    Mike
    Attachments:
    example.zip ‏49 KB

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • I would like to detect all the keyboard key is okay, but not every key can be detected by using LabVIEW example, keyboard keycode

    I would like to detect all the keyboard key is okay, but not every key can be detected by LabVIEW example ( we can use 『basic input demo.vi』to detect normal key』.
    I want to detect some 『hot key』 for example some keys exist in the upper part like 『search key』、『e-mail key』、『volumn control key』...etc. They are very often to be watched in some new keyboards, but we still don't know how to detect if their functions are okay.
    Can we detect signals of these 『hot key』 in LabVIEW? We can apply these hot key's functions in XP, so we should detect their signal, I think, but I can't do it.
    I serach some information about this question, and somebody said we can detect hot key's signal by grabing 『keybode』 these hot key feedback. But I don't know how to do these. I can't use VC. So anyone can give me a LabVIEW VI to grab keycode? Or any other solution we can detect all the key on the keyboard, including hot keys?
    Thanks!
    Regards,

    Maybe that is the limitation of Acquire Input Data.vi.The vi can't identify the Unformal key.
    You can try to use Event structure and set to listen "key down" event.
    There are two terminals VKey, ScanCode will sent out the information when you press key.
    There are two pictures in attached file, 2.jpg will show you the detail.
    Good luck.
    Attachments:
    SpecialKey.zip ‏17 KB

  • I need to pull data from a keyboard attached bar code reader, labview basic verison 8

    Does anyone know how to pull the data sent by a keyboard attached bar code scanner using labview basic, version 8?  I tried using the aquire input data function, however the data that it gives doesn't seem correct, and it also only seems to give one value out of the whole bar code.  Any suggestions?
    Thanks
    Mike

    You don't need anything more than a string control. A bar code scanner when used as a keyboard wedge, acts just like when you type something into the control with the keyboard. Make sure that the string control has focus and scan something.

  • Labview runs in front of dialog box from third party .exe - cannot simulate keyboard input

    Hello,
    I need to use an external software to set some parameters of an actuator. When I run this software from Labview (using System Exec.VI) it opens a screen while loading and then a dialog box. I need to select something from this dialog box (I am using a keyboard simulator). But just after the dialog box appears, Labview's window comes in front of it and then all the keyboard commands end up in the Labview's window instead of the external dialog box.
    Has anyone ever had a similar problem? I have been looking aroung and I could not find a solution. I cannot use the ALT+TAB or anything like that because dialog boxes do not appear there (something of "modal" and "non-modal" windows).
    I came up with a very unreliable solution by chance: If I hit (actually simulate) one key while the loading screen is on and before the dialog box appears, then the dialog box stays upfront. I think it is like telling the Labview "do not come to the front, I want to stay working in this other window". I do not trust this temporary solution at all but maybe it triggers an idea for a solution.
    Please see the attached image: After I hit the RUN button, my exe is called and the "loading" screen is displayed on front. Then, the dialog box is left behind the Labview interface.
    Any ideas are welcome!!
    Thanks,
    Laura

    Hi Wayne,
    I believe it is a good idea to use Portmon, I will give it a try hopefully today. 
    I have attached the two manuals that can be downloaded from the actuator's webpage (http://www.miraiintertech.com). Then I have attached the manual of the software (I cannot attached the software because they sell it); check on page 24: CTA-1EX, that's the software I am using. 
    Isn't it weird that there is little info about the dialog box thing? I would have thought that many people had this issue.
    Thanks for the help! 
    Laura
    Attachments:
    EE06426I.pdf ‏1094 KB
    TMBSCOM.pdf ‏319 KB
    TBVST-Manual2009.pdf ‏4482 KB

  • Looking for a way to get my Product ID and Vendor ID so I can enable my Radium 49 USB MIDI keyboard to work with Labview 7

    Looking for the Product ID and Vendor ID for my Radium 49 USB MIDI keyboard to work with Labview 7
    Is there a tool to find out the Vendor ID and Product ID for a USB device?
    Example: of what I'm looking for
    The Product ID for National Instruments DAQPad-6020E is 0x12C0. The
    USB vendor ID is 0x3923. This is a 16-bit hexadecimal number(1093)
    (that is decimal 4243).
    Thanks for all the fast responses this newsgroup RULES!!!!!!!!!!!!

    http://digital.ni.com/public.nsf/allkb/335A90747734097886257070006415B9
    How To Find The Vendor and Product ID for USB Devices?
    Primary Software: Driver Software>>NI-VISA
    Primary Software Version: 3.3.1
    Primary Software Fixed Version: N/A
    Secondary Software: N/A
    Problem:
    I want to make an NI-VISA driver that requires the vendor and product ID?
    Solution:
    There is a utility called USBView,
    free from Windows, attached below, which you can use to view what is
    connected to your computer's USB ports. It is necessary to load this
    program and connect the USB device in development. Upon selecting the
    device in USBView, one can then look on the right side of the
    application window to obtain the Product ID and Vendor ID. This will
    allow you to enter in the correct IDs when creating a driver .inf file
    when using the VISA Driver Development Wizard. For more information
    about how to use the VISA Driver Development Wizard see the related
    links below.
    Note: It is necessary to keep the hexadecimal
    (0x####) format. Do not remove the "0x" hexadecimal format preceding
    the ID number. 

  • LabVIEW / WINNT Keyboard scan?

    Hi,
    I am using LabVIEW 5.1.1 with WINNT 4.0 and need a "good" routine or
    pointer to a keyboard scan that can be fine tuned so PC resources are
    not strangled. I appreciate any help with this one!
    Karl Hanke
    [email protected]
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    > I am using LabVIEW 5.1.1 with WINNT 4.0 and need a "good" routine or
    > pointer to a keyboard scan that can be fine tuned so PC resources are
    > not strangled. I appreciate any help with this one!
    >
    I'm not 100% sure I know what you are looking for, but the NI ftp site
    contains some VIs that give you access to key events in LV. They return
    a cluster of keys and modifier info like shift and ctl. They will give
    you key down events only, not key up, and they exist for all platforms.
    I believe you will find them in the LV31 directory, but they will load up
    into LV5 or 5.1 just fine. There are probably similar VIs at other sites
    on the LV web ring. You should be able to jump on the web ring at the NI
    site or at the umass site.
    Greg McKaskle

Maybe you are looking for

  • IPhone headphones no longer control iTunes after 10.5.6 update

    I just purchased my new MacBook Pro yesterday; happy to find out I could use the "clicker" on my iPhone headphones to control my iTunes. The machine came stocked with a version of Leopard before 10.5.6, so The Updater prompted me to update. After the

  • Adding LifeCycle Reader Extensions to a PDF Form created in Acrobat Pro 6

    HELP!!!! I have already created a form in Acrobat PRO 6.0, but I am running into the issue where my clients who don't have Acrobat STD/PRO can not enter their data and then save the PDF form as a copy and email it back to me with the data included. I

  • Aperture 3 and iPhoto library

    After importing my iPhoto 09 photos into Aperture (using the store files in the Aperture library option) I decided I was happy with the results and no longer needed any reference to iPhoto so I deleted the iPhoto library (under projects & albums) fro

  • Asset posting in non leading ledger different than leading ledger.

    Hi Gurus, I am using new GL concept.I have different dep Areas for Companies act as well as for US GAAP. Is it possible for me to post different GLs of non leading ledgers as per US GAAP and in leading ledgers as per companies act. Regards, Abhi.

  • EP6 and BW Query iView - unwanted logon screen - Help please

    Hello, I have a BW Query iView. I noticed that EP6 authentication works for query contents (logon method to BW is UIDPW plus user mapping) but I get an unwanted auth login window as soon as static content arrives from BW. I mean... the query is comin