LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Display: Need Help

Hi Dushant,

I wasn't able to determine what's going wrong in your VI.  I would suggest that you greatly simplify the code in order to make it easier to find the error in the code.  Maybe your code could just load the file and then display the image with the axis on it.  As it is right now it would take me hours to trace through your code to find out what's going wrong.

-Justin D.

0 Kudos
Message 11 of 26
(1,777 Views)
Justin,

Thanks a lot. I really appreciate your help.

I have modified the code and make it very simple. Please try to run this code and let me know why both spread-sheet are not displayed properly.

"Axis Property MOD.vi" is the main code and the others are subvis.

Message Edited by Dushyant on 11-12-2006 04:49 PM

0 Kudos
Message 12 of 26
(1,759 Views)

I'll take a look at this and see what I can find.

-Justin D

0 Kudos
Message 13 of 26
(1,738 Views)
Dushyant,
 
It looks like your problem is caused by the scale of the y axes.  Since the area included with the "bounding rectangle" includes both the y-axis numbers and the x-axis numbers, when you specify the bounding rectangle you are specifying where the numbers on the left start.  When you go between the two images the y scales change as well.  On the first one the top of the y-axis is "-10500.0".  The corresponding number for the second image is "5000.0".  When you look at the two numbers side by side...
 
"-10500.0"
"5000.0"
 
...you can see that the first number is "wider" than the second one.  So, when you change the scale of the graph it appears to shift the y-axis to the left or to the right.  There are a few different ways you could go about fixing this.  You could modify the draw axes VI to be bound by the actual axis lines instead of the the numeric labels on the left.  You could also draw the axes first, then determine where the axis lines are and then shift your picture over to accomodate for this.
 
-Justin D
0 Kudos
Message 14 of 26
(1,721 Views)
Hi Justin,

I am sorry, I could not do as you said.

Actually I was thinking the same thing. It was already mentioned in last post of 1st page contains attachment "Labview_Problem_Detail.doc".

I tried to modify "
draw axes VI", but could not succeed.

thanks,
Dushyant





0 Kudos
Message 15 of 26
(1,717 Views)
Dushyant,
 
An easier way to do this might be to pad your y-axis values with zeros so everything lines up.  For example, you could use:
 
"5,000.00" instead of
"5,000"
 
This way, you could keep everything at a constant width.
 
-Justin D
0 Kudos
Message 16 of 26
(1,709 Views)
using "5,000.00" instead of "5,000" would not help.


For instance "-10500" contains 6 digits while "5000" only 4 digits if I converts everythings into integer.

Also "-10500.00" contains 9 digits while "5000,00" only 7 digits if I keep it real.

If I could write
5000 as 005000 or 5000.00 as 005000.00, then my display would be proper.

0 Kudos
Message 17 of 26
(1,701 Views)
If you go deep inside the picture vi's, find the Draw Scale.vi, inside this is the Draw Text at point.vi. This vi puts the text on the image. If you modify the strings going into this block, maybe you can get what you want. You should be able to use a format into string/number to string and pad with spaces on the left to make all of the labels the same length. I'm using 7.0, so I can't open your files.
0 Kudos
Message 18 of 26
(1,697 Views)
Thanks Unclebump,
I really appreciate your help.

I did as you suggested and it worked mostly. However, there is a couple of (new) issues and I would appreciate if you can address those.

I have saved codes as LV 7 and so you can open it.

Please read the attached word document to understand what I am trying to do.

Thanks again,
DK
Download All
0 Kudos
Message 19 of 26
(1,680 Views)
The zip file that you attached has two of each filename and they are spread across many folders. Some are 7.1 format and others 7.0
0 Kudos
Message 20 of 26
(1,663 Views)