LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PlotStripChart function

Solved!
Go to solution

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

 

 

0 Kudos
Message 11 of 19
(2,190 Views)
Solution
Accepted by topic author momo2013

 

 

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

0 Kudos
Message 12 of 19
(2,190 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 13 of 19
(2,175 Views)

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

 

0 Kudos
Message 14 of 19
(2,169 Views)

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 

0 Kudos
Message 15 of 19
(2,168 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 16 of 19
(2,166 Views)

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

Message 17 of 19
(2,161 Views)

Hooray!

 

That works! 

Thank you so much, Luis.

 

Insuk

0 Kudos
Message 18 of 19
(2,159 Views)

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

 

 

0 Kudos
Message 19 of 19
(2,158 Views)