How keyboard control Button in Event structure

Hello
First I am Just a beginner in Labview 
I just make a program that Consist of 4 button controling 4 LEDs Using Event Structure
The Problem is I did not want to operate the button by the mouse click but
i want to operate the button using the arrow keys in keyboard
T
Attachments:
Arrow key control LEDS.vi ‏10 KB

Hi saiko,
when you're a "total newbie" you should at first go through all those free online LabVIEW courses offered by www.NI.com!
Try this:
My stop and clear buttons also doesn't seem to wor​k when I put in the event structure.
How did you configure the event case? When putting those buttons inside the event structure you have the tell that structure how/when to handle them. Did I mention the free online courses?
but I can't get it to switch until release when I ​hold down on my keyboard.
Do you want to use the automatic key press repeat feature? Well, you have to configure the event: right now it's "key press", but you probably want an event like "key repeat"? You may read the LabVIEW help on available events...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Can you share FP Controls between different Event Structures

    I'm creating a program that will either read real-time data from an VNA on the GPIB bus, or read a saved s2p (Agilent) file and analyze it. The FP consists of 5 graphs, and various controls which handle events like printing, changing filters, or exiting. on the BD I have a case structure controlled by an operator selection pop-up. I tried using the same FP controls in the event structures I have setup in each case, as only one event structure would ever be executing at any given time, but the program doesn't seem to like it ast run-time. I've worked around the issue by creating "duplicate" controls and using the property setting to make them visible/disabled, etc., but the is seriously congesting my BD.
    Anyone know a way to share controls with seperate event structures?

    It sounds like the root problem is the overall structure of your program. I highly recommend that you check out the Queued Message Handler project template in LabVIEW 2012, that will show you how to utilize a single event structure and pass events to a consumer loop. If you program is too large to consider an architecture change at this stage of the game, then there is a workaround for your problem.
    What is most likely happening is that you have the event structures all set to lock the front panel until the event completes. However the case structure that you have wrapped around these event structures is causing all but one of these event structures to be unreachable thus preventing you from handling the event. Again, as I stated above, the "RIGHT WAY" to fix this is to select a better program structure but the "kluge work-around" fix is this: Dynamically register for the value change event on all of the controls you are trying to trap events for. Dynamic events can be deregistered and re-registered at run time. This will allow only the event structure in the active owning case structure to be registered for the events, thus no other event structures will get in your way.
    Disclaimer: This advice is given based on very minimal information and a great deal of speculation and may not be correct. Please include your code if you need further assistance.
    Charles Chickering
    Architecture is art with rules.
    ...and the rules are more like guidelines

  • How could control the scroll events in ALV OO?

    Hello experts!
    I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
    I have thought that it could only calculate the field for the lines that visualize.
    How could control the scroll events to calculate the field of the visualized lines?
    I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
    best regards!

    Hi Sriram,
    I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
    I would like to refresh the data in ALV when the user view news rows.
    I want your genial ideas.
    Best regards!

  • Array of buttons and Event Structure

    I have a the same problem... I was wondering if you were able to find a soln.
    I have literally thousands of buttons and each button as a unique key code and unique name.
    For Example :  
    Button Name    – Key code #
    PUSH              - 1
    POP                 - 2
    PULL               - 3
    The way I program this simple algorithm is deadly painful. 
    1)      I create 1000 buttons by going to control->buttons.
    2)      Then I have to go through one by one to change the Boolean text to “PUSH,POP,PULL…”  
    3)      Then used the Event Structure, adding in all the controls names “PUSH, POP, PULL..” In side each event, I placed the key codes “1,2,3..”
    I have search and tried for weeks to find a better way, and still nothing comes to mind.  
    Please help.

    Hi Ben,
    Thank you for your reply, I have attached my try_code and a picture of the code I currently have.  I  am new in Labview, but I am confident that, there must be a easier way to make an array of buttons with different button name and an associated number to that button.  
    The 1st file, is to show you want I am currently doing, (painful)
    The 2nd file attached is some of the things i tried, I had great hope with my try_code, array_jan25.  But I couldn't get it.  I think I am very close.
    Thanks again,
    Attachments:
    ThePainfulWay.doc ‏63 KB
    Array_jan25.vi ‏42 KB

  • Radio Buttons and Event Structures

    Guys, I am hoping for some help here on something I probably should know but cant figure out how to do.  I am using a set of radio buttons and an event structure to run a UI.  The radio buttons are acting as both a user input and indicator of current status selected by the user.  I have the event structure set to run on value change of the radio button.  All works great unless the operator decides that he wants to repeat the selection that the radio button is already set to.  The event structure does not recognize this as a change of value and will not execute.  Is there a way to set the event structure up to run even if the same selection of the radio button is made a second time?  I attached a crude example to this post.  Basically everytime I press the button, I want an entry made into the text box, regardless if the selected item was already pressed.  Any thoughts.
    Troy
    Attachments:
    Radio Button Test.vi ‏16 KB

    Instead of hacking around the inherent nature of radio buttons, why not just use a Cluster?  Its behavior in the UI is more customizable.  Check this out:
    I just replaced your radio buttons with a cluster, and added a little logic to the event structure to get it to behave the way you describe.  I've attached the VI below, saved in 8.2, if you want to try it out.
    Hope this helps,
    -D
    Message Edited by Darren on 11-07-2006 10:45 AM
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman
    Attachments:
    cluster_buttons.png ‏7 KB
    Cluster Test.vi ‏17 KB

  • While loop with stop button within event structure locks up front panel.

    I am not sure if this is a bug with my program or a bug within LabVIEW.  If you believe that this is a bug with my program then I will post my program to be looked at.
    The problem I am having is there is a while loop within an event structure that fires when a particular value changes.  Once the "Activate" button is pressed the while loop within the event structure starts going with a polling frequency of 1hz (1000ms wired to the "wait till next ms multiple" vi).  There is a "Deactivate" button that is wired to the stop control of the while loop and an outter while loop that resets the event structure so that the activate button is being listened to again.
    Once inside the while loop, however, none of the button are responsive within the front panel.  The VI continues to run, and only 60% of my CPU is being consumed, but none of the button or scroll bars work.  The only way for me to terminate the program is with the "Abort" button next to the "Run" button.  If I remove the event structure so that the while loop in question runs as soon as the program starts, the front panel remains responsive.  I've inserted probes within the while loop and verified that it is not running prior to the "Activate" button being asserted, and it is running after the assertion of the "Activate" button with the expected polling frequency set by the "wait till next ms multiple" vi.
    Can anyone help?  Do I need to post my code?
    -Nic

    It is typically not a good idea to stall an event structure by placing loops inside event cases. What good is an event structure if it is not free to repond to events?
    Have a look at some alternative solutions, such as in the following link:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=224817#M224817
    LabVIEW Champion . Do more with less code and in less time .

  • How can I stop an event structure detecting keydown events until the vi has initialised?

    My application has a sequence structure with 3 frames. First one initialises some front pane objects and controls, the second communicates with an external device via a serial port to a start condition and waits for this to complete by polling the device. The third contains the event structure which reads the device when the spacebar is pressed. The problem is that any pressing of the spacebar when the application is in the first 2 frames of the secquence structure is stored and executed as soon as the third frame becomes active. I have tried using dynamic Event registration but to no avail. Am I doing something wrong? can the keyboard be disabled until the second frame complete
    s?

    I usually avoid sequence structures in favor of driving execution order through data dependency (error clusters are great for that). However, since you've already got one, you coul try to add another frame right before your event structure. In that frame, place another event structure that can trap that stray keyboard event. Put a tiny timeout value on it so it doesn't appear to "pause" your VI's response. That event structure will catch any bogus key presses that happen during initialization.
    Having said all that, I still think the behavior is not proper. The event should not be handled if it happened before your VI gets to the event structure. For now, you can try that workaround.
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • How to control button in struts

    Hi there!
    How do we control buttons in struts.
    eg: If I've multiple buttons in the jsp, such as "Save Record", "Update REcord", " Delete Record " etc...
    How do I know which button is clicked?. How to control it ?
    Any help pretty much appreciated.
    Thanks.

    you have something called Dispatch action and LookupDispatch action frame works in struts..
    search in google..u will get plenty of resources..if not pls let me know
    regards
    [email protected]

  • How to control button "services for object" which appears in cv01/02/03

    Hi Gurus,
    In tx cv01/02/03, I get a button at the top of the window called "services for object", which gives me options as ....
      Create------(attachment/note/external document/Store business documents)
      Attachment List
      Private note
      Send (Send object with note/Object outbox)
      Relationships
      Workflow
      My objects
      Help for object services
    With the help of this button I can even attach documents in CV03 tx. through create attchment.
    Can we control appearance of this button according to the transactions?? e.g. in CV01 and CV02 it should appear, but in CV03 it should not allow to create further attachments.....
    Thanks in adavnce!
    Regards,
    Akshay

    Thanks a ton Benakaraj !!
    I am working on it...... will let you know the outcome....
    I am just not clear abiout where to insert the sodes given in the pdf   ???  pLease let me know.
    Thanks a lot,
    Akshay
    Edited by: Akshay Kurhe on Jun 5, 2009 11:17 AM

  • How to handle Button pressed event

    Hi,
    I need some help in button presing handle event. I have Button B1 and L_1 (it is LOV). I want realize next: When I press button B1 List of value L1 shows, but the value in list is selected it hides. Any help plz.
    Thanks.
    Edited by: go0ze on 2011.13.6 23:30

    Hi,
    I need some help in button presing handle event. I have Button B1 and L_1 (it is LOV). I want realize next: When I press button B1 List of value L1 shows, but the value in list is selected it hides. Any help plz.
    Thanks.
    Edited by: go0ze on 2011.13.6 23:30

  • How to control buttons

    Hello Experts,
    Iu2019m new in dialog programming and need some help. Iu2019ve created few transactions for Display, Change & Create. On my Change transaction Iu2019m checking for material number (Matnr). I want to check if matnr is initial then Display button get enable and change button get disable. If matnr has some material number already fill in then display button gets disable and change button gets enable. Can please somebody look at my code and suggest me what should I do to accomplish this task. Also please point me out if Iu2019m doing something wrong.
    =======================================================================
    module set_change_screen output.
      if sy-tcode eq 'ZAD_M02'.
        loop at screen.
          if screen-name eq 'MATNR'.
           if MATNR is initial.
             screen-input = 1.
          elseif screen-name eq 'MARA-MTART' or
                 screen-name eq 'MARA-MBRSH' or
                 screen-name eq 'MARA-MEINS' or
                 screen-name eq 'MARC-WERKS' or
                 screen-name eq 'MARC-PSTAT' or
                 screen-name eq 'MARC-EKGRP' or
                 screen-name eq 'MARD-LGORT' or
                 screen-name eq 'MAKT-SPRAS' or
                 screen-name eq 'MAKT-MAKTX' or
                 screen-name eq 'CHNG'.
            screen-input = 0.
         else.
            screen-input = 0.
         endif.
        endif.
         if screen-name eq 'MATNR'.
         if MATNR is not initial.
           screen-input = 1.
        elseif screen-name eq 'MARA-MTART' or
                 screen-name eq 'MARA-MBRSH' or
                 screen-name eq 'MARA-MEINS' or
                 screen-name eq 'MARC-WERKS' or
                 screen-name eq 'MARC-PSTAT' or
                 screen-name eq 'MARC-EKGRP' or
                 screen-name eq 'MARD-LGORT' or
                 screen-name eq 'MAKT-SPRAS' or
                 screen-name eq 'MAKT-MAKTX' or
                 screen-name eq 'DISP'.
            screen-input = 1.
         else.
           screen-input = 1.
         endif.
        endif.
           MODIFY SCREEN.
        endloop.
      endif.
    endmodule.                 " set_change_screen  OUTPUT
    =======================================================================
    Thanks.

    I don;t know if your code works, but i suggest rewriting a bit to make things easier to understand and maintain:
    if sy-tcode eq 'ZAD_M02'.
       loop at screen.
         case screen-name.
           when 'MATNR'.
               if matnr is initial.
               else.
               endif.
          when 'MARA-MTART' or 'MARA-MBRSH'  or .....
        endcase.
       endloop.
    endif.

  • How to control a windowClosing Event so that it doesn't hide the frame. URG

    if(logIn_logOut.isEnabled()) // true if user is logged in
    JOptionPane.showMessageDialog(null,"You must Logout before closing the Administrator application","Error",JOptionPane.ERROR_MESSAGE);
    this.setVisible(true);
    this.toFront();
    else
    System.exit(0)
    i want to use the afore mentioned code so that if the user is Still Logged in and tries to close the application an error is displayed and the application is not affected.
    but the problem is that the application hides by default and does not terminate.

    make it so your frame does nothing when the when the 'X' is pressed...you can do it like this...
    yourFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

  • How to handle event structures for two buttons and two counters.

         *I have two buttons A and B, and have to compare the difference in hits between them.  So do I place an event structure within a while loop for each button (2 buttons, 2 event structures, 2 while loops), or does it need to be one event structure with cases for both buttons whithin one while loop? 
         *How do I pass the values of buttons A and B's hit counters out of the while loop in order to calculate the differences between them after each increment, not just the final count after the stop button is hit? 
         *How would I make one stop button work to handle both buttons A and B?   I tried to place the actual stop button in one button A's structure and its global in B's structure, but It wont seem to let me use a local variable for a latchable control
    Checker

    You should probably have not started a new thread and waited until your question in the original thread was answered. You can modify altenbach's example for a second button. You have a single event structure with a new event for the second button. You have a second shift register to track the number of times the second button is pressed. Inside the while loop but outside the event structure, you just have a subtract function in or to report the difference. do not modify the posted example for the stop button. It works perfectly as is.

  • How to control the tab control using event structure?

    Hi,
    I am using tab control and event structure in the program.
    When i run the application event is not happening for the active page.
    When user switches from active page to the other page then event is taking place for all pages
    So, how to get the event trigger for the active page when the application is started
    For more clarification i am attaching the code "Test Control Tab using Event Structure.vi"
    Attachments:
    Test Control Tab using Event Structure.vi ‏52 KB

    You have a basic misunderstanding of dataflow. Maybe you should start with some tutorials or study some of the examples that ship with LabVIEW.
    The event structure belongs inside the while loop, and not vice versa. RIght now, the event structure only runs exactly once and never again.
    If the stop is pressed first, the VI will stop. Game over.
    If the tab control is changed (from any state to any other state!), the inner loop will spin forever as fast as the CPU allows, either executing one or the other case. It just reads the tab terminal to decide which case to execute. Changing tab never triggers any events. The VI is trapped inside the event until stop is pressed to stop the VI.
    you were closer to a reasonable program in the other thread:
    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=287905
    Have you tried execution highlighting? Maybe things would become more clear of you do.
    LabVIEW Champion . Do more with less code and in less time .

  • Find Control in Event Structure doesn't show the object when it is not in the frontmost Tab page [Bug Report, LabVIEW 2012]

    When you are looking for the control/indicator handled by a case in the Event structure, you can use the contextual menu item "Find Control" (doesn't distinguish between control and indicator, BTW).
    The result is that the control/indicator is highlighted on the FP. The problem is, if that control is in a Tab and specifically in a page of that Tab that happens to not be the frontmost, the only thing you'll see is marching ants, but no control:
    <=========== the wrong TAB page was shown. LV did not bother to switch to the relevant one....
    In other words, "Find Control" in the Event Structure doesn't switch the tab to the owning page. This is contrary to what happens if you right-click, say, the terminal of this control: the FP will switch to the owning Tab page.
    I'd call this a bug and this is definitely an annoyance (which most likely has been around since the creation of the Event Structure).

    I did not. Is there any better chance for it to be caught there by a NI eye than it is in the LV forum? I though these threads were deemed to gather bugs/features that had been already acknowledged by NI with a CAR number.
    I (and others!) wished there was something like this: http://bugs.sun.com/ or http://bugs.python.org/ for LabVIEW...
    I am just coming back from a short conference of scientists who quite uninamously ended up with the conclusion that LabVIEW was to be disregarded as a lab development environment because of maintenance problems (which could have been argued for any language in my opinion, although I think they meant spaghetti diagrams are the natural tendency of students who could not care less as they are not going graduate because of their LV skills or lack thereof), but I guess I could have added my grain of salt and added the complete opacity on bug and feature handling by NI.

Maybe you are looking for

  • Itunes 8 - issues with Windows Vista

    I have recently bought a new laptop with windows vista home basic. Downloaded Itunes 8 and installed it ok, but when i go to start itunes, it starts in a minimised screen and I can't see the any of the buttons along the top (file, edit etc..). When t

  • Cannot use copy and paste function in PSE10?

    Today i went to copy and then paste an image onto another one,i could not use the copy or paste function(in pse 10). Only the paste function was usable  and when i hit it it pasted the picture of an eagle onto the image. This eagle i had copied from

  • Cannot Log Out or Shut Down

    After extended sleep mode, I cannot log out and computer will not shut down. The first symptom of a problem that I noticed was that after waking from an extended sleep (i.e. overnight), the screen saver no longer worked and would not auto-start. I th

  • Excel file upload restriction

    Dear, I have developed a object which upload any type of file( mainly excel file ) form desktop. Now i want to restrict user to upload the excel file , if that file is open in desktop. Please give me idea how i ll solve this issue ?????? Thanks & Reg

  • Javascript function call

    i am writing a jsp code, where i have put 2 functions in jscript, lets say f1() and f2(). I need to call f1() only once in the start of the program, while i have to put the second function f2() in a loop after that, lets say 100 times. I dont know ho