From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is this a bug in the xy-Graph?

Solved!
Go to solution

Hi Forum,

 

I came across this problem while working on this (http://forums.ni.com/ni/board/message?board.id=170&message.id=478607#M478607) thread.

 

I add values from 0 to 1 to a XY-graph as in the picture below. (And only this way!)

When the user presses print a reference of the graph is handled to a sub vi.

mainVI.png

In this SubVI there is another XY-Graph.

Now I copy all important properties of the MainVI-XY-Graph to the SubVI-XY-Graph.

This happens inside another SubVI, but this does not matter. The copy process could also happen inside the first subVI. Just a space saver.

Then the Image of the SubVI-XY-Graph is printed via a method node.

 

subVI.png

copy.png

 

What I found is :

Run the MainVI (SubVI MUST NOT BE OPENED)

Change the scaling of the x-Axis (eg from scale the x-axis from 0.0 to 0.1)

Press Print

The file c:\pic.bmp will contain the graph, but the scaling will be from 0 to 1 not from 0.0 to 0.1 !!!!

 1.png2.png

 

 

If you run with the subVI showing itself, this will not happen. 

And if you define the xy-Graph contents like this:does work.pngthe error does not occur.

 

For those who followed me until here:

 

Is this only in my mind or IS THIS A BUG ??????????????????

 

Thanks for reading

Christian

 

Download All
0 Kudos
Message 1 of 5
(2,904 Views)
The files are LV2009 SP1
0 Kudos
Message 2 of 5
(2,898 Views)

I don't know whether this should be called bug or not, but I know that some properties can't be set when the FP is not loaded (e.g. FP window bounds).

My workaround was to set the FP state to hidden so the FP gets loaded but still isn't visible.

 

Message 3 of 5
(2,880 Views)
Solution
Accepted by topic author CtheR

Properties applied to hidden objects (or objects on screens that are not open) are generally "noops" for performance reasons. If you think i have mis-read your description please post back.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 5
(2,873 Views)

Thanks to both of you!

 

Setting the vi invisible helped with my example vi!

It did not work before with the vi I use in my real Program, so I did not try it again; the problem might be somewhere else there....

But it makes sense that a rescaling does not take place when the vi is shown!

I'll try a little more and ask again if I run into trouble again.

 

B.t.w. it would be great if there was some kind of switch to force an update of an element. 

 

Greets CR

0 Kudos
Message 5 of 5
(2,839 Views)