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

Similar Messages

  • Custom Keyboard Scan Code

    Hi 
      We have a custom keyboard with 20Keys . We need to implement a custom scan code for every keys . Has microsoft documented any custom keys so that OEMs or IHV can use for their requirement so that it doesnt conflict with the standard keyboard scan codes 
      Thanks 

    About Keyboard Input
    From above link.
    "Scan Code
    The scan code is the value that the keyboard hardware generates when the user presses a key. It is a device-dependent value that identifies the key pressed, as opposed to the character represented by the key. An application typically ignores scan codes.
    Instead, it uses the device-independent virtual-key codes to interpret keystroke messages."
    Virtual-Key Codes
    La vida loca

  • 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

  • LabVIEW & WinNT

    Hello,
    Can anyone tell me if I can use the memory VI's In Port.vi and Out
    port.vi with Windows NT 4.0 (Or with Windows 2000)? I am
    using LabVIEW 5.1.1
    The manual says that it can be used with Win 3.11/95/98.
    Thanks,
    Patrick Pol
    The Netherlands
    [See first answer for additional information]

    Hi Patrick,
    The hardware layers are much better protected under WindowsNT. Any request
    for access to the system has to go though the operating system. Because of
    this
    difference in architecture you cannot use the standard InPort and OutPort
    vi's as
    supplied by National Instruments. However they do have a fix for it but for
    some
    reason.... Anyway if you call NI support they will say they are aware of the
    problem
    and will send you the WinNT VI's. But I can cut the process short and just
    attach it.
    (private mail)
    RB.
    From: [email protected]
    Subject: inport and outport
    Classification: Restricted
    |---------------------------------------------------------------------------
    ---|
    |Title*: Port and Memory Utilities for Windows
    |
    |---------------------------------------------------------------------------
    ---|
    |Description*:
    |
    |These files allow a user to call In Port and Out Port from Windows
    98/95/NT. |
    |There are also functions to read or write physical memory. The zip file
    below|
    |contains an installer that installs two LabVIEW libraries of 12 VIs each, a
    |
    |CVI DLL, the CVI run-time engine (with the low level system driver), and
    the |
    |source file. There are separate libraries for LabVIEW 4.x and 5.x. The
    5.x |
    |VIs are marked as thread-safe.
    |
    |In Port.vi and Out Port.vi are direct replacements for the standard LabVIEW
    In|
    |Port and Out Port. There are also VIs for reading and writing physical
    |
    |memory. However, these use an intermediate DLL, AccessHW.DLL, which in
    turn |
    |calls the CVI RTE. Consequently, this DLL must be in the same directory as
    |
    |the VIs.
    |
    |
    |
    |Also attached is a C example that uses these functions.
    |
    |---------------------------------------------------------------------------
    ---|
    (See attached file: accessHW.zip)
    Patrick Pol wrote in message <[email protected]>...
    >
    >Hello,
    >
    >Can anyone tell me if I can use the memory VI's In Port.vi and Out
    >port.vi with Windows NT 4.0 (Or with Windows 2000)? I am
    >using LabVIEW 5.1.1
    >
    >The manual says that it can be used with Win 3.11/95/98.
    >
    >Thanks,
    >
    >Patrick Pol
    >The Netherlands
    >

  • Keyboard scan codes are trapped in somewhere ...

    I'm trying to use Sun Type 5C keyboard with PC (Solaris-x86).
    I have purchased an adapter (Ultra Spec Cables, Inc) which can connect
    Sun keyboard to PC. This works fine, however, Sun's unique keys are
    not recognized. Although those Sun's unique keys are not available
    in the PC keyboard, the adapter generates scan codes when those keys are
    pressed (or released).
    Using xmodmap, I successfully mapped most of Sun's unique keys.
    However, I couldn't do this trick for 'Front', 'Open', 'Stop' keys.
    Because they didn't emit any event while I'm checking corresponding keycode
    using 'xev' (/usr/openwin/demo/xev).
    It seems to me that those scan codes are trapped in somewhere. My current
    guess is not in X-windows system but in Solaris keyboard device (/dev/kbd).
    My questions are:
    (1) Is there any way to verify who is trapping the scan code (or key code)?
    (2) Is there any way to fix this?
    A guy from the adapter's manufacturer said Linux didn't see this problem.
    (This seems indicating that the problem is in Unix side not X-Windows side.)
    Any suggestions, clues, answers are highly appreciated.

    Hi,
    I have the same problem with a self-made adapter. The SunOpen etc. keys seem to be recognized at the console, but not in X. With Linux and XFree the kbd works like expected. Have you any hints to solve the problem, already?
    Michael

  • Installation Labview-- WinNT Embedded

    can I run a LabView runtime application on my PC-104 Computer where I
    have Installed the Win NT embedded?

    Yes, I have run LV apps on a SBC with NTE. Just be sure you have enough resources, RAM and disk
    space, to load the app and the run time engine.
    "Dario Jossen" wrote in message
    > can I run a LabView runtime application on my PC-104 Computer where I
    > have Installed the Win NT embedded?

  • LabVIEW to control Scanning Electron Microscope(SEM)

    I have a project involving an SEM with 3 stepper motors that do not have any feedback mechanism(encoders). I am using a 7344 controller card and the MID-7604 power amp/controller in conjunction with the FlexMotion library. I wrote a simple application to test our set-up, and noticed that if I incrementally step in one-direction [while counting the number of steps], I cannot go back(in opposite direction) to the same starting point in one 'large step' simply multiplying by the number of steps taken. I have turned off the primary feedback(set to '0') in each of the motors configurations. Note: the motor has 400 steps per revolution. I have tried altering the step sizes, and each yields the same undesired result. It appears t
    hat once I try to go back into the opposite direction, the motor overshoots by about 1 step.Any help would be appreciated.

    Depending on your acceleration and the load on your stepper motors, they can certainly miss steps. This is why you need encoder feedback to ensure that you know exactly where your motor is located at all times. The board will send out the control signals, but if the load is high or if you have a high acceleration, you might not end up where you expect. Try changing your acceleration and try testing the motors without the load.
    Hope this helps,
    Morten Jensen
    National Instruments

  • Send a keyboard event from labview to C#

    Hi,
    We currently have a program in c# that takes keyboard inputs from a user and will fly a quadrotor. We aim to have a LabView .vi generate keyboard commands based on our experiment and send the commands to the c# code creating a feedback loop where the .vi will keep track of sensor and experimental data.
    Our problem is that we have tried many different methods to send the keyboard commands in LabView. 
    1) http://zone.ni.com/devzone/cda/epd/p/id/3711
    2) http://forums.ni.com/t5/LabVIEW/Send-keyboard-commands-to-another-windows-program/td-p/330670/page/2
    as well as other variations and similar .vi's that do the same thing. Here is an example of a .vi used to press the letter "t" once.
    http://i.imgur.com/hwmjZ.png
    All of them can write the string to a text (open notepad put cursor in blank window) file but none can do it in such a way that it is detected by the c# code. On my own I can open and run the c# code and press keyboard buttons myself and the commands are recognized, so I think it could be an issue with how LabView sends the keyboard events and how c# reads them. Here is the c# code segment that we are using to read the input commands:
    public override List<String> GetPressedButtons()
              KeyboardState state = device.GetCurrentKeyboardState();
              List<String> buttonsPressed = new List<String>();
              foreach (Key key in Enum.GetValues(typeof(Key)))
                        if (state[key])
                                  if (!buttonsPressed.Contains(key.ToString()))
                                            buttonsPressed.Add(key.ToString());
              return buttonsPressed;
    Can anyone help trying to figure out why using the keybd_event function in LabView can not interface correctly with the above detection code in c#? I can provide any code and clarification if you think it can be helpful.
    Thanks,
    Andy

    Hi,
    I can't say with certainty where the problem is or even how many there are. I do know that the KeyboardListener.cs class should work according to what I have read online. I also know that if I press the keyboard myself then the state is changed and the correct action is taken. If I try to issue an event from Labview then the event is not captured. Here is the code, it is rather large ~20 MB.
    https://www.dropbox.com/s/vsvcje1ro364otu/ARDrone.zip
    https://www.dropbox.com/s/p3h3tj8bcqc29gk/Forward_backward0924.vi
    The key listener is in ARDroneInput>Utils>KeyboardListener.cs and the polling takes place in ARDroneInput>KeyboardInput.cs
    The reason I wanted to use keyboard inputs is because the quadrotor we are using takes keyboard commands W,A,S,D,T and L. Initially I thought having Labview issue these commands would be the simplest method. That may not be the case.
    I was just thinking that it is not necessary that key events are sent from Labview. Instead, one could send an array representing the frequency of each button press rather than the button press directly. In that case an array that is updated continuously from Labview will just have to be kept track of in the C# code. The C# can then convert that to whatever control input we want. Can it be easier to send a vector of numbers in real time to C#?
    If you think it is better to establish a connection between Labview and C# using .NET to send keyboard commands (rather than the vector idea above) can you explain that a little more? How does one go about doing that? If you think the vector idea is simpler how should the interface be set-up?
    I just talked with my collegue and we think that maintaing a .txt file in Labview and having C# read it is the best option. We will begin working on that and will update you tomorrow.
    Thanks,
    Andy 

  • How to optimize the memory for a large labview array?

    I am running LabView on Windows XP with 4 Gb of RAM. The array is 51X256X256 complex numbers, but I want 300x256x256. The program runs out of memory when I use more than 51-53 arrays of 256X256. I do not know how to use the in place element structure to modify the vi below. The unbundled/ bundle structures do not present symmetry. Anyone can help me with this?  Thanks!
    Mariana
    Attachments:
    array3Dc.JPG ‏22 KB
    array3Dc_front.JPG ‏58 KB

    Norbert,
      The full data3Dc array takes about 15.5 MB and the data3Dc comp.vi takes 31 MB. The empty data3Dc comp.vi array takes only 18.2 kB. This array is a variable that modifies at each scanned wavelength. I have a scanning wavelengths software package. For one wavelength I record a hologram followed by the reconstruction of the object field (1x256x256). 3D optical fields are added all together to create a big 3D optical field (Nx256x256). The code data3Dc comp_1.vi is not the only one in the memory. This VI is a subvi for other codes. A few other examples are FFT, IFFT, filtering, phase matching, cross-section, calibration….I did not care about memory optimization until now. So, I want to scan more than 50 wavelengths. By now (N=50) I have to restart the LabView after each scanning, do the reconstruction of the fields, start the LabView again to see the results. I think the problem is caused by this VI that is a subvi for other codes. I already extended the memory to 3GB in boot.ini, but the thing is that I want also a small scanning time. It doesn’t work. Extending the memory to 3GB makes the OS slower than before. My question is how to modify this array (data3Dc) or the VI (data3Dc comp.vi) to access lesser memory. I have tried to attach the full VI but it tells me that it is too big. I attached the empty one.
      Thanks,
    Mariana
    Attachments:
    data3Dc comp.vi ‏19 KB

  • Validating keyboard input data

    I am new to java and have a question regarding validating input.
    I did check the FAQ for "Validating keyboard input data" but found no help.
    I have to check that the keyboard input is only one of the following char a c,C,d,D
    Ihave tried different conditional loops and statements but cannot get it right.
    Could someone point me in the right direction.
    I am using the latest java.
    Thanx

    well i think i am close but i can't figure out why i have an endless loop or how to fix it
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    numBsSrvConecs = scan.nextInt();
    when i enter the correct data ( c, C, d, D) it goes into infinite loop and never reaches the next keyboard scan for System.out.print("Please enter the Costumer Type C or R: ");

  • Scan slows down with each increment of loop

    Hi
    I am using labview to raster scan a piezo stage and collect fluorescence. To do the scanning, I have an X loop and a Y loop. Each iteration of the loop steps a voltage which is output (using DAQmx assistant) through a PCI 6229. It's very bizarre because the scan rate starts very fast (I monitor by probing the X) but subtly slows down after each iteration. When I stop the application and restart (without exiting labview) it remains slow and even gets slower. When I exit Labview and restart the program, it begins fast again, and then slows down. Any ideas??

    A very inefficient programming method is your use of "insert into array" to append new data, especially since you insert a column at a time. The way the data is linearly arranged in memory, replacing a column requires rewriting of the entire array every time because the new elements are not consecutive in memory.
    (I would think that appending a row at a time would be slightly more efficient, because they would be written consecutively, and at the end of the array in your case. This would be identical to a simple "built array" node).
    Still, all these methods cause a resizing operation of the array, always an expensive condition that should be avoided.
    Preallocating a fixed size array, then replacing rowns as you go is the most efficient. The array memory is allocated once.
    You should update your graph as little as practical, so definitely not a pixel at a time. A row at a time is probably OK but if the loop rate is very fast, you could even put the graph in a case structure and update only every 10th iteration.
    LabVIEW Champion . Do more with less code and in less time .

  • LabView/TestStand Developer - Herndon, VA

    Senior Production Test Engineer
    Job Description:
    ABOUT THE COMPANY iDirect is dedicated to providing next generation solutions for broadband IP networking via satellite networks. For more than 20 years, the VT iDirect organization has focused on meeting the economic and technology challenges across the satellite industry. Today, the product portfolio, branded under the name iDirect, sets new standards in performance and efficiency, making it possible to deliver voice, video and data connectivity anywhere in the world. As the leading innovators in the satellite communications industry, our diverse and talented team of Internet, satellite and telecommunications professionals continues to break new ground and create significant opportunities for network operators, for service providers and resellers, and for corporate networking professionals. If you are ready for the challenges, responsibilities, and rewards that come with working in a high-energy, fast-paced environment, then this is the job for you!
    ABOUT THE POSITION
    We are looking for a true leader in the area of production test development and implementation to significantly upgrade our capabilities and sophistication in an outsourced manufacturing environment. This is a unique opportunity to develop, implement and lead the vision for production test engineering. The Senior Production Test Engineer will be in integral part of the global manufacturing operations team and will interact with the Software and Design test functions. This is a great opportunity to join a growing company in a rapidly developing industry.
    RESPONSIBILITIES:
    Participate in all aspects of product testing within the manufacturing environment.
    Develop, debug and maintain LabView/TestStand code to support production test.
    Partner with Manufacturing Engineering, Quality and Reliability teams to monitor, measure and improve production yields. Develop and optimize the debugging approach incorporating a closed loop corrective action process for root cause identification and correction.
    Identify test process cost savings opportunities and work with other Supply Chain teams to identify and realize regular efficiency improvements and cost reductions.
    Lead projects to improve existing test systems and solve any issues that prevent delivery of professional testing capabilities.
    REQUIRED EXPERIENCE:
    The ideal candidate will come from a communications electronics environment with emphasis in wireless communication, and have a thorough understanding of current test strategies and approaches. In addition, the candidate should have the ability to develop and articulate a clear vision for effective and cost efficient production testing in outsourced manufacturing.
    BS in Engineering required. BSEE preferred, BSEET, computer science/engineering or equivalent experience will be considered.
    10+ years in test engineering or related areas in complex electronics manufacturing environment.
    5+ years of experience working at or with a Contract Manufacturer.
    Experience with LabView/TestStand, Boundary Scan, BIST, POST.
    Strong technical documentation skills including test requirements and test plan development.
    Solid understanding of software design and debug.
    DESIRED EXPERIENCE:
    Experience using databases such as SQL.
    Experience with a variety of programmable instruments; such as Spectrum Analyzers, power dividers, signal generators, logic analyzers, etc.
    Significant RF experience and wireless communications strongly preferred.
    Knowledge of application of test methods (ICT, AOI, and RF communications) desirable.
    Experience with National Instruments hardware a plus.
    Experience programming and interfacing ATE's in VB, C, C++, LabView, shell scripts, Perl, programming language skills for measurement, data acquisition and instrumentation control a plus.
    Equal Opportunity Employer M/F/D/V

    Hi,
    Kindly arrange an interview process.
    I have attached my resume
    Regards,
    Bharath Kumar

  • Notebook keyboard scancode

    I have elitebook 8440p with accidently damaged keyboard (by liquid), so two keys not working. I get a software program that allow to remap keyboard  keys (for ex. duplicate ctrl, alt) to those damaged. It operates with keyboard scan codes and works well with standard 101-keys pc keyboard. So i need scan codes for non-standard notebook keyboard.
    This question was solved.
    View Solution.

    Hi,
    This is from Microsoft.
    Hope this helps.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • USB or Keyboard Polling Rate

    Hi,
    I am curious if anyone knows of a way of changing how often the internal keyboard or external USB keyboards are polled/sampled on a macbook. I would like to be able to sample from these devices at 1Khz (i.e. once per millisecond). Is there a straightforward way to do this? Many thanks!
    Divyezheg

    (Apologies for the re-post. My cat stepped on the keyboard and posted the previous article before I could make grammar corrections -Bill)
    Hi,
    The OS X kernel is designed to be preemptable, so it is possible to schedule a low-latency real-time thread that can run in a quasi-realtime deterministic manner.
    I have a feeling you're going to have to do some of the coding yourself to do what you want to do. This article, though old, gives some hints in sections 5.4 and 6: http://www.usenix.org/events/bsdcon/fullpapers/gerbarg/gerbarghtml/
    You might want to take a look at OS X programming relating to MIDI I/O since that requires accurate timing.
    Keep in mind when measuring response times of someone pressing a key in response to a stimulus: 1. What is your display's refresh rate and latency. 2. How deterministic is the keyboard scanning inside the keyboard? If your doing a psych experiment, using MIDI to trigger a stimulus presentation and read a button press may be an easy way to get the timing accuracy you want.
    -Bill

  • PXI Module Informatio​n Scan

    Hi,
           I'm planning to develop a labview program thats scans information from all PXI module present in the chassis(like calibration dates, module description, etc..). Need some advice which Labview VI is capable of scanning above mentioned information wherein output is in "string" so that I could
    manipulate it in the labview program itself.  As I scan for VI, one option I see is the "MAX Generate Report", but results are in html or xml(plus my PXI
    hangs when I use this function).
           Appreciate any inputs on this.
    Thanks,
    Versil1
    Solved!
    Go to Solution.

    Hi Versil1,
    I would recommend using niModInst, DAQmx device node, and DAQmx system node. Examples for how to use those functions can be found here:
    niModInst: Programmatically Query Device Name or Other Information Using NI-ModInst API http://decibel.ni.com/content/docs/DOC-7454
    DAQmx device and system node: Programmatically Get DAQ Device Product Names http://decibel.ni.com/content/docs/DOC-3716
    For outputs that are not in string format (i.e. DevNames), you can use the flatten to string function to convert them to strings.
    Regards,
    Andrew M.
    Applications Engineer
    National Instruments

Maybe you are looking for