LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication

I'm trying to send out a message through the serial port. I'm not having any problems sending the data, I'm having problems getting it to stop when the message has been sent once. Ideally, I want to be able to click my mouse on a picture, based on the position of the mouse a particular message will be sent out the serial port and the program will wait for another mouse click. I have the mouse part going, now I just need a hand with getting it to send a message, one time, when the mouse is clicked. Thanks for the help!
0 Kudos
Message 1 of 2
(2,399 Views)
Since you aren't using a button with a mechanical action, you'll need to simulate the operation yourself. One way to implement this is to read the location of the mouse click and put the value of the click location into an uninitialized shift register. When this value is different from the last value (probibly plus or minus some tolerance) the code sends the message out the serial port and puts the new value into the shift register. If the values aren't different, the code does nothing but recycle the last different mouse click location.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 2
(2,399 Views)