05-18-2010 12:37 PM
I've been struggling with this problem for a while now. I have a simple waveform graph that I want to adjust the horizontal scale of and then make a .png file from it. The vi is attached. This vi is part of a much larger vi. When I run the top-level vi the horizontal scale adjustment doesn't work. The .png file I get shows the unscaled graph. However, if I open this vi and then run the top-level vi it does work - the .png file shows the correctly scaled graph. Also, if I just run this vi by itself it works correctly.
I'm guessing there is some timing issue and the .png file is created before the scaling takes place but I don't see how.
Does anyone have any ideas as to why the scaling does not happen if the vi is not open when it is run?
Solved! Go to Solution.
05-18-2010 12:54 PM
If the VI's front panel is not open, the property nodes may not do anything because they execute in the UI thread. This is consistent with the behavior you report with it working when the VI is open.
Can you try opening the front panel but placing it offscreen (so the user does not see it) and then set the graph properties?
Lynn
05-18-2010 01:10 PM
05-18-2010 01:17 PM
Can you put together a simple VI which calls this VI and shows the problem?
Lynn
05-18-2010 01:30 PM
05-18-2010 02:08 PM
I just tried it at my computer. I had to set the subvi VI Properties - Window Appearance to Customize - Show front panel when called and Close afterwards...
After I did this, the subvi pops up for an instant then closes. The resulting file shows the graph expanded to the new scale.
So it works here after setting the subvi properties. Are you sure you are setting the appearance correctly? Does the subvi pop up for a brief moment when you run the main?
05-18-2010 02:15 PM
Ok, I seem to have it working now. I originally also had the vi minimized and that may have been my issue.
Thanks for the quick responses!