From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

touch screen mouse clicks

Hi, id firstly like to begin by saying i am only learning Labview at the minute so i appeal for some patience,

I have done the relevant searchers also but i am unable to find an answer to my question.

 

Ok i am using a 17.5" resistive touchscreen to track the path of a ball which is placed on the screen..I want the screen to communicate the x-y co-ordinates to an x-y graph on the front panel of my program. In my attemp at doing this i have used a previous labview example which uses a mouse click event structure. However this means the touchscreen acts as a second mouse. My problem is that the touchscreen is not communicating with the graph directly as it is controlling the entire pc screen meaning it can interfere with the program.

 

I have included a two page word doc with screenshots which hopefully can explain better what i mean. One screen shot is the display result of the Labview program, the second resembels the path of the ball on the touch screen

Page one of the doc shows the ball tracking when only the first quadrant of the screen is used.

Page two of the doc shows the result when the full touchscreen is used. as the touch screen acts as a mouse it is only able to track the ball when it is in the same locating as the graph on the screen.

 

I have found it difficult to explain my problem but i hope you gurus can understand and provide me with a solution!

 

I am hoping someone can give me an answer that will allow the touchscreen to communicate with the labview x-y graph only.

 

Thanks in advance for any help.

 

0 Kudos
Message 1 of 3
(2,758 Views)

Please do not embed screenshots inside of Word documents. Not everybody has Word, and even if they do, most people don't like using Word 2007+. Attach the screenshots as PNG files. DO NOT ATTACH BITMAPS OR CHANGE THE EXTENSION OF BITMAPS TO GET AROUND THE BAN ON BITMAPS. Don't worry I'm not screaming specifically at you. It's just my normal scream sentence.

 

As for your issue, there's a couple of things that are unclear from your description. Before offering a solution it's better to understand the objective here. The example you are using was specifically designed to only track mouse movements over the graph. However, your description seems to imply that you want to draw on the graph regardless of where the mouse is on the screen. Is this correct? If so, then you need to use the Input Device Control VIs to poll the position of the mouse, as that returns the mouse coordinates globally (search the examples for "mouse" and look at the "Basic Input Demo" example). Second, why an XY graph? Are you drawing a bouncing ball over some graphs? I would think you'd want to use the picture control.

0 Kudos
Message 2 of 3
(2,746 Views)

Sorry about my attached word files, it wont happen again Smiley Embarassed

 

Ok my objective is to create a ball and plate balancing system (extended version of the ball and beam experiment), therefore i need live position readings of the position of the ball. The Touchscreen itself will be mounted on a platform that can be tilted using two stepper motors (1.X-axis 2.Y-axis). My idea was that the centre of the touchscrenn would represent the origin on the graph (0 , 0) and this would also be the home position of the ball so basically if the ball is placed at (10, -23) on the graph for example, then the two servo motors, which will be controlled using a motion controller, will communicate together to bring the ball back to its home position.

 

I know i have suggested doing it the mouse clicks way but if there is another solution to this problem i will gladly take it on board.

 

Thanks

0 Kudos
Message 3 of 3
(2,730 Views)