LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

invoke node, get image data shows data from previous VI execution

I am trying to capture in a JPEG file an image of a front panel indicator (in this case an XY graph).  I have created an invoke node for the XY graph and wired out the “get image data” to a “draw flattened pixmap” function.  Then I display in a picture indicator window the contents of the XY graph before converting the picture back to pixmap using “picture to pixmap”.  This image data then gets wired into the “write jpeg file” function.  The problem is that the picture is displaying the contents of the XY graph from the previous run of the VI, and thus, the jpeg file contains the same thing.  When I first launch the VI its initial run results in an empty picture indicator window.  I have to run it a second time to get it to display the actual contents of the XY graph.  The picture window is always showing the results of the previous VI execution.  Can some one explain why this happens?   My front panel IS open when I run the VI.

 

Thanks,

Brian

0 Kudos
Message 1 of 3
(2,880 Views)
Without seeing your vi, the only think I think it could be is that you are not letting the XY graph complete its plotting before the invoke node is called.  I guess check to make sure that this is only happening AFTER the graph is done being written to.

If that's not the problem, post your vi, and someone will be happy to have a look!

Message Edited by Novatron on 06-05-2006 03:05 PM

0 Kudos
Message 2 of 3
(2,879 Views)
Thanks!  You were exactly right.  I solved the problem by using a sequence structure to make sure the invoke node was called after the graph had been written.  Everything looks great now.
0 Kudos
Message 3 of 3
(2,866 Views)