LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph and picture

I have an application where I superimpose a picture onto a waveform graph. The application also resizes the graphs and pictures depending on certain parameters of the application. If I write the same values to the plot/picture area size and position to both the graph and picture properties the two should be superimposed, but they are a slightly different in size and position. It would only make sense that they should be the same, but they are not. Why is this?
 
Paul
7.1
2000
PaulG.
Retired
0 Kudos
Message 1 of 10
(4,521 Views)

Hi Paul,

Resizing the graph will resize both the border and the plot region.

and maybe you have the superimposed picture's  size to fit the the plot region and it may be the reason for what you are observing

check it out.

regards

Dev

 

 

0 Kudos
Message 2 of 10
(4,498 Views)

The position of the plot area can't be reached directly using the standard LabVIEW properties. There are two possible solutions : use the scale position and width properties to calculate the plot area position, or live in a non-standard environment, and use a few scripting nodes (see this link).

Additionnal issues come from the followings :
- the picture position relates not to the draw area, but to the outer border of the picture, including the frame (4 pixel wide).
- the plot area includes a one pixel frame (you can see it when modifying the foreground color of the plot area).

So you need to subtract 2 pixels (4 - 2x1) from the position and size of the picture to get a proper positionning. And of course, beware of the label displays. 😉

Working with the scale marker positions is also a bit tricky, since you have to take into account the font height if you want to make a serious work ;). And of course, doing that, you'll find that there are a few inconsistencies in the string property interface between different LV objects. 😞  (shadow and outline are specific to the picture control...)

The attached vi illustrates these comments.

Message Edité par chilly charly le 11-30-2005 07:08 AM

Chilly Charly    (aka CC)
0 Kudos
Message 3 of 10
(4,499 Views)
Thanks much for your solution. It is very helpful. However, I have one concern. I don't think you and I are talking about the same type of graph. Mine is attached. And when I go to property nodes I cannot find plot area position for my graph. But when I "copy and paste" your property node into my vi and link it to my graph it's ok. Weird, huh?
 
Paul
PaulG.
Retired
0 Kudos
Message 4 of 10
(4,474 Views)
If you add the following two lines to your labview.ini file you should be able to then see it
SuperPrivateScriptingFeatureVisible=True
SuperSecretPrivateSpecialStuff=True
However, this is undocumented and unsupported by NI. 

Paul
Message 5 of 10
(4,472 Views)

This may be a topic for another time and thread (and I may be revealing some ignorance here) but I thought you might have been joking about the SuperPrivateScriptingFeatureVisible=True and SuperSecretPrivateSpecialStuff=True. Smiley Very Happy The number of additional properties are amazing! But where did they come from and why the lack of support? I've pretty much been on my own for the last 5 years learning and developing LV applications, so I don't get much background or 'guru' info except what I learn here on this board.

Thanks again.

Paul

PaulG.
Retired
Message 6 of 10
(4,465 Views)
If you are getting all of your info here, then I suggest you check out
 
There is a lot of 'guru' type information there. 
NI does a lot of their under the hood stuff with these methods and properites including scripting.  However, the scripting ini file entry does not work in LV8.  I suggest you take a look at the forum on lavausergroup.  I think NI will take a dim view of us hashing this out here.
Paul

Paul
Message 7 of 10
(4,462 Views)


Pana-man a écrit: ...I think NI will take a dim view of us hashing this out here.

Pauls  (funny that !)

I thought I had been clear in my previous post, where I gave you the link to the Lava user Group, and told you about living in a non-standard environment. Seems that you have a very selective reading ;). You are right this is not the better place to discuss this subject.

And don't forget I also gave you a work around, using only standard tools, that should work as it with LV 8 !

Chilly Charly    (aka CC)
Message 8 of 10
(4,457 Views)
I followed your link this morning but wasn't registered. I registered and waited for my confirmation email but nothing happened. Smiley Indifferent Then I went back after reading Pana-man's response and presto, I was registered! I'll be spending some time over there, too. Thanks.
 
Paul
PaulG.
Retired
0 Kudos
Message 9 of 10
(4,447 Views)

Just a final note on this topic, functionality has been added in LabVIEW 8.0 that allows you to insert an image onto a graph via the graph's property node. It's a pretty neat feature and I would recommend checking it out if you're interested. If you do not have a copy of LabVIEW 8.0, you can try it out here for free.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 10 of 10
(4,432 Views)