LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save graph setting to previous last used setting

I have a query like, i acquire data and see them on graph and modify for appearance and i need same settings for next measurement also.
 
Let me make it simple, i do measurement and modify the curves like color,thickness. I save file as .csv or .zip file, then i close the system and open the measurement but i see the graph settings to default. which should not happen, i need the graph settings to previous used setting.
i guess i am clear about the description......let me know for any clarifications in the description. Any suggestions regarding this problem
 
-Kirit
0 Kudos
Message 1 of 12
(4,967 Views)
Hi Kirit,

You may be able to save your graph properties by click edit>>make selected items default.. this certainly works for values, I'm not sure about graphs.

However, a more programmatic way would be using property nodes, which can be made by right clicking on the graph indictor on your block diagram, going to create >> property node.. then select whatever property you need.

Hope this gets you on your way,

*edit: Yes using make selected items default seems to work.


Message Edited by Hillman on 08-05-2008 04:28 PM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 12
(4,962 Views)

Hey Hillman

Thank you for the reply. Graph settings in the sense like color,style,thickness etc of the curves. I have checked with the property node but couldn't get an idea how i can assign the values which are to be re-trived.

Can you please gve a example showing how to assign the values or parameters which are to be re trieved again when we re-open the file for measurement.

Thank you

Regards

Kirit

0 Kudos
Message 3 of 12
(4,951 Views)
Hi Kirit,
 
I have attached an example on the way of forcing the properties you wish in the code using property nodes.
 
In the example I chose the line colour to be blue. If you save the file. And re-open it, it does remember the last settings associated with the chart.
 
Hope this helps
 
 
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 12
(4,929 Views)
Hey Hillman
 
First of all thank you for the example!
 
(In the example I chose the line colour to be blue. If you save the file. And re-open it, it does remember the last settings associated with the chart.), but when i change the range and save, its not getting updated. It remains in the same setting.
 
Ok lets assume this works with this VI, but in real time we have a got .exe file to run the application. I dont think if we make any changes in the chart(color,font,size) executed by exe file will get updated and remember the last settings associated with the chart.
 
Any suggestions regarding this
 
Thank you
Kirit
0 Kudos
Message 5 of 12
(4,915 Views)
Hi Kirit,
 
Thanks for your comments.
 
The range property should behave in exactly the same way - or at least it does for me.
 
So if I use a property node (x-scale>>range) and set the min value to 0 and the max value to 100, then the range on the x-axis is always 100.. obviously as time goes by you may see 1000 - 1100. Similarly, if you manually alter the x-axis range by clicking on the numbers and changing them to 0 and 100, and save, close and re-open this will also have the same effect - just as before. However, a word of warning, you need to turn off auto x scaling because this over-rides the property nodes/default settings at run time.
 
As for the real time exe this will work. There are some differences between the way a code works in real time compared to normal operation but the front panel behavior is not one of them.
 
If you are still having issues, please post an example code which shows your issue.
 
Thanks and have a nice day,
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 12
(4,902 Views)
Hi Kirit,
I made an example to illustrate, how to restore the manually made settings.
Greets, Dave
Greets, Dave
0 Kudos
Message 7 of 12
(4,892 Views)
(Hi Kirit,
I made an example to illustrate, how to restore the manually made settings.
Greets, Dave

 

Attachmentexample of property node mod_LV851.vi (49 kb)

 

Dave

The example(

Attachmentexample of property node mod_LV851.vi (

)

 what you posted is not working if we make any changes in color or line width and close without save. It should restore the previous settings but it is not in this case.

It is a good example you posted but some how not working. The version i am using is LV8.5 so there should be no problem i guess.

Anyway lets see...thanks

 

Kirit

 

 
0 Kudos
Message 8 of 12
(4,832 Views)

Hi Kirit,

this is actually a quite simple VI and there are only a few reasons, why it shouldn't work.

  • You should check if the  "Graph-Props.ini" is saved properly after stopping the VI.
  • The VI has to be stopped with the "STOP"- button, not the "Abort Execution"- button from the button bar
  • Write permissions to the LabVIEW- "Default Data Directory" are necessary to save the INI-file properly

Greets, Dave
Greets, Dave
0 Kudos
Message 9 of 12
(4,783 Views)

Thanks Dave!

 

Yeh, it's working....it works when i press stop button on the front panel and wait for few seconds and colse the VI and reopen to see the previous setting changes. But if i close immediately after pressing stop button,,,it doesn't work...then it fires an popup asking for saving option.

Now i am trying to integrate that logic in my source code but not getting the way to handle it. I am a beginner in labview.

 Please post ur suggestions how i can integrate that logic in the read XY config.VI in a LLB file i have attached .

 

Thanking You

 

Regards

Kirit

0 Kudos
Message 10 of 12
(4,737 Views)