LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enter does not trigger event properly

I am sending and reciving data using visa serial.  The problem I am having has to do with the terminal I am creating.  I am making a terminal that automatically deletes the last command sent, but keeps the cursor in that box (send). Everything works as it should when I hit the send button with the mouse, but does not work when I trigger it by hitting send.

 

Thanks for the help.

0 Kudos
Message 1 of 5
(2,473 Views)

Sorry, what is the difference between "hit the send button" and "trigger it by hitting send"?

0 Kudos
Message 2 of 5
(2,472 Views)

One way I use the mouse to hit send (toggle send button), the other way I hit enter (key stroke toggles send button).

0 Kudos
Message 3 of 5
(2,468 Views)

It should execute, I even made up this little example to prove it, using the Send button from your VI.

 

Are you sure the body of your code works the way you intend it to? You have two while loops contained inside your main loop. Each loop will run a minimum of 1 time (for each iteration of the main). Also, the 2nd loop will not run until the first loop has stopped. Perhaps the behavior you've seen was because in one test the program was in your 2nd loop and in the other test it was stuck in the first loop?

 

I would use a (2) state machine type architecture based off the boolean control you already have.

 

Adam Becker

0 Kudos
Message 4 of 5
(2,440 Views)

This is my first labview program so it is a little messy.  Basically I want two modes toggled by the switch in the middle.  The mode on the left is autonomous and sends a gps coord then reads data in and outputs it to the gui.  The right side is suppose to act like a hyperterminal so i can send the device commands and read what it sends back.

 

As for the current problem, when I watch it run with highlight execution it appears that it is doing the same thing whether I press the send key with the mouse or hit the enter button, I just don't get any info back from the device.

  

0 Kudos
Message 5 of 5
(2,433 Views)