LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Discrepancy between Coords (from Event Data Node) and Coords 2 (mouse axis info – PF.PaneBounds)

Solved!
Go to solution

Discrepancy between Coords (from Event Data Node) and Coords 2 (mouse axis info – PF.PaneBounds)

I am using LabView 2018. I clicked at 6000 and 6 on XY Graph. The value of XY indicator is correct, but the value of XY 2 indicator is not.

Horizontals between two are identical, but Verticals are different. Why? I need to use mouse axis. It is not working as supposed. It is a LabView bug or something that I miss. Can someone help me out?

AAAA Caller panel and block diagram.PNG

0 Kudos
Message 1 of 4
(2,962 Views)

I can't open your actual VI, but my guess would be that you scrolled the front panel down - the mouse down event returns the coords relative to the FP origin, regardless of how you scroll the FP. The mouse VI returns global screen coordinates, which means it will return different results for the same object in the VI if you scroll the FP.

 

In case this isn't the issue, I would suggest you try to debug it in an orderly fashion. Move things around (the VI, scrolling, etc.) one thing at a time and see how it affects the different values. This should allow you to see where the difference is.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,833 Views)
Solution
Accepted by topic author 4RangN1

Your values are offset based on the position of the panel origin. Try subtracting those values and you get agreement.

AAAA Caller.png

Does that fit within your constraints for the available inputs (since it sounds like the coords method works for you, but you want to avoid that method)?

 


GCentral
0 Kudos
Message 3 of 4
(2,550 Views)
Solution
Accepted by topic author 4RangN1

Yes it works. Thank you so much.

0 Kudos
Message 4 of 4
(2,184 Views)