Go to Post All I have to say is --- Life == FIRST - Lora Knepper [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-06-2010, 19:31
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
GUI: locating mouse on graph indicator

I'm working on another non-FRC project. The idea is that you can draw a waveform on a graph, and hear it played. However, instead of drawing a continuous curve, I figured it'd be easier to just select some points, and spline fit between them.
So, part of that involves converting the location of the mouse into the point on the graph, and that's where I'm having some trouble. It mostly works, but there's some scaling and offset issues.
I've attached the subVI and the testing VI.

NOTE:
If you do not understand control references, event structures, and property nodes, the code may be quite confusing.

EDIT: I forgot the attachement. Thanks Tanner.
Attached Files
File Type: zip TESTER (point clicked on graph).zip (26.0 KB, 36 views)
__________________
-- Marshal Horn

Last edited by kamocat : 18-06-2010 at 22:20.
Reply With Quote
  #2   Spotlight this post!  
Unread 18-06-2010, 20:40
Tanner's Avatar
Tanner Tanner is offline
Registered User
FRC #1261 (Roblions)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Suwanee, GA
Posts: 311
Tanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to beholdTanner is a splendid one to behold
Re: GUI: locating mouse on graph indicator

No attachment is present.

-Tanner
Reply With Quote
  #3   Spotlight this post!  
Unread 19-06-2010, 14:00
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: GUI: locating mouse on graph indicator

Looks like a) the coordinates for Plot Bounds are Panel-relative, rather than control-relative, so you're accounting for the control offset twice and b) since the mouse coordinate origin is at the top-left, the offset/scaling for the y-axis is reversed. The version I've attached seems to work.

--Ryan
Attached Files
File Type: vi point clicked on graph.vi (17.1 KB, 25 views)
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #4   Spotlight this post!  
Unread 19-06-2010, 19:24
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: GUI: locating mouse on graph indicator

Thank you.
__________________
-- Marshal Horn
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Final Data graph!!! Just take a peek!! Jedward45 Scouting 0 12-03-2010 22:21
how to graph joystick inputs as a function of time? Guopeter NI LabVIEW 2 09-02-2009 17:49
Locating Extra Motors ilustrus Motors 0 13-01-2006 16:41
Optical Mouse / Ball Mouse Clark Gilbert Chit-Chat 26 22-07-2004 13:17
Haas CNC Mill Graph Function P-Dog Technical Discussion 9 13-03-2004 23:45


All times are GMT -5. The time now is 21:59.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi