12-19-2013 11:21 AM
Yes.
Since I also doubted that, I changed all graph with the same setting.
I will double-check that.
I could see the Y-right axis after putting the following code:
SetCtrlAttribute(DisplayHandle,Chart[idx].chartCtrl,ATTR_YLABEL_VISIBLE,1);
SetAxisScalingMode (DisplayHandle,Chart[idx].chartCtrl, VAL_RIGHT_YAXIS , VAL_MANUAL, -0.5, 0.5);
But still my trace#2 value refers to my trace#1 value.
My charts are hidden initially and set to visible when the sensor is chosen. While doing that, is it possible to reset uir setting???
Somehow I may need to set up everything on the code.... Is it possible to set trace on code by using SetCtrlAttribute
Thank you,
Insuk
12-19-2013 11:34 AM
I found out the solution although I am still confused for the interaction with uir.
SetTraceAttribute (DisplayHandle,Chart[idx].chartCtrl, 2, ATTR_TRACE_YAXIS, 2);
Thank you for the valuable answers.
Insuk
12-20-2013 02:48 AM
You should not need to programmatically assign trace axis. I made up a small sample project to demonstrate automatic axis assignment: in the attached example trace #2 is assigned to right Y-axis in the UIR editor; assignment is honoured at runtime and PlotStripChart automatically writes traces to the correct axis.
12-20-2013 08:53 AM
You are right! Thank you for examples.
I am guessing my uir information was reset while I am doing "clear chart" and "hide chart". Maybe this guess is not resonable ...
Thank you so much,
Insuk
12-20-2013 09:04 AM
Hello Roberto,
I recently upgraded the CVI from 2010 to CVI2013.
While I am saving, I got the message
"saving to older.uir version produced the following warnings:
-skipped saving plot visibiltiy in legend
-skipped saving chart auto-scaling
-skipped saving right y-axis attributes "
Is that possible reason?
But when I open the uir, I could watch my setting such as trace , scale or precision etc.
Do you know how to save them correctly to newer version?
Thank you,
Insuk
12-20-2013 09:15 AM
I haven't upgraded to 2013 yet so I can only guess...
The error seems related to 2013 trying to save a UIR file in previous version. I can imagine that since your project originated in a previous release of CVI the 2013 IDE keeps memory of this and tries to preserve this association. I don't know if this is true, but you can try executing a Save As... specifying to save in 2013 format and see if the error still arises.
12-20-2013 12:53 PM
The expected behavior is that as long as you keep saving the UIR in the current format, you can then migrate your UIR to a higher version of CVI and, by default, that higher version of CVI will save the UIR in the newer format.
However, if at any point you override the save format to save it in an older version, the UIR will remember this format and will carry it forward to any higher version of CVI that you take it to, so that even this higher version of CVI will continue saving it in the remembered, older format.
So, what I expect has happened in this case is that at some point, when you were using your UIR in 2010, you saved it in an earlier version (2009?). Now, when you bring this UIR to 2013, the UIR remembers that it's tied to the 2009 format, and so CVI 2013 continues saving it in the 2009 or earlier format.
You can easily change this by selecting File>>Save As and choosing the 2013 format. Once you do this, the UIR will "forget" that it's supposed to be saved in a specific format, and henceforth will always use the current format.
Luis
12-20-2013 01:14 PM
Hooray!
That works!
Thank you so much, Luis.
Insuk
12-20-2013 01:16 PM
Hello Roberto,
Correct!
After saving "Save as", it works well without manual coding.
Thank you so much for your precious time and solution. I've learned a lot.
Insuk