LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt about the origin of the graph

Hi,

 

The code attached displays (n reads from excel file) the image generated by photo diode and can zoom the image etc. It can read the coordinates (y, z) of the pixel based on your click. I am believing that “top left most” should be the origin. However, I kept clicking and kept getting "–ve" value for y coordinate. I am expecting both y and z coordinate to be positive. Please let me know where I am going wrong.

 

PS: If you will click, it will ask you whether you want to move motor to new position or not. Please click “yes”. It will just read the coordinate of picture.

 

Thanks,

Dushyant Kumar

0 Kudos
Message 1 of 5
(2,912 Views)
Hi
if you multiple the pixel size by a factor of 10 your picture size will expand dramatically.
Now its possible to obtain a positive value for Y!!
Indicates that your reference origin is not the same as picture origin!!
Have you tried to co ordinate all referencing (y,z) from same point?? For example from Top Left Hand Side of
Vi front Panel?
Means more work but then you will be using a common reference origin and not two 'floating' orgins.

Hope that helps
chow
xseadog

0 Kudos
Message 2 of 5
(2,899 Views)
Thanks xseadog!

 

However, Based on your suggestion I could not solve the problem. Basically each pixel in image corresponds to some particular values of stepper motors' position

(one motor moves in horizontal and other in vertical direction). If I multiply by 10 as you suggested, the origin that I am getting does not corresponds to any motor

position. So, I would prefer not to have any extra white space (corresponding to no sample value in excel file).

I could not understand the issue of "picture origin" vs "reference origin". Actually I want the origin to be at some corner of image displayed. Actually, most of the features of my code have been borrowed from labview examples. So, I may not be able to understand the  EXACT logics of the code.
 
0 Kudos
Message 3 of 5
(2,893 Views)

I think you want the "mouse.position" property of the image itself, see attached (LabVIEW 7.1).

(The position properties that you are currently using have little to do with the image.)

Message Edited by altenbach on 09-29-2005 06:19 PM

Download All
Message 4 of 5
(2,888 Views)
Thanks altenbach.
 
You really helped me out of the trouble. I can not really thank enough to all members of labview discussion forum community and I must say that without guys like you, coding in LV would not have been easy for beginners like me.
 
You are doing a great job!!
Message 5 of 5
(2,864 Views)