DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the color where the signal is out of the limits?

Solved!
Go to solution

Hello,

I want to ask something. I’ve been trying to develop my report of graphs and I have some problems about changing colors.  I have more than 10 graphs at my report in each page. For every graph I have limit lines. I want to change the color of the signal in graph where the signal is out of the limits. I uploaded an example picture. Could you please help me about this? 


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 1 of 5
(4,611 Views)
Solution
Accepted by topic author No_RegreTs

Hello No_RegreTs,

 

My suggestion is to use the "Palette" function in DIAdem REPORT. Here's how you can set this up:

 

Double click onto the CURVE you wish to change color, it will get you to this dialog. Change the Line color parameter from whatever color it has to "Palette" (see screen shot below):

 

Forum post 1.png

 

A new bottom labeled "Color Palette" will show up in the dialog, click on that button.

 

Forum post 2.png

 

Change the parameters as seen in the dialog below:

 

The important ones are:

"Number of colors" - that should be set to 3, since we will have three colors (one for above, one for below, and one for within the limits.

"Color allocation ..." - This needs to be set to "Input values" because you want to set these limits to meet your needs.

 

Depending on what you selected for "Number of colors, a number of rows will show up in the lower part of the dialog. Select your colors and the ranges to which each color applies here. The Screenshot shows an example for red being the "above and below limit" color and blue the actual curve color.

 

Forum post 3.png

 

This is the result:

 

Forum post 4.PNG

 

I hope that helps. Let us know if you have more questions,

 

     Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 5
(4,598 Views)

Thank about your answer but it changes only a graph. But I have 15 different graph and their limits are different. And the limits are changable not a constant.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 3 of 5
(4,594 Views)

Hi No_RegreTs,

 

Most people solve this scenario by creating one or two copies of the data channel with the values in range set to NoValue and the high/low values left as they were.  Then you plot these altered plots on top of the original, and you have the display you're after.  The CTNV() or IIF() functions in the ChnCalculate() command are the simplest ways to mask values with NoValues for the extra channel(s).

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 4 of 5
(4,592 Views)

 


@No_RegreTs wrote:

Thank about your answer but it changes only a graph. But I have 15 different graph and their limits are different. And the limits are changable not a constant.


Hello No_RegreTs,

 

This can be done on a "per graph" basis, i.e. every graph can have it's own set of color change values.

 

Also, the variables that define the limits can be changed programmatically:

 

Variable: D2CurvePalLimit

Specifies the interval limits within which DIAdem displays the y-values in the specified colors of the color palette.

Definition D2CurvePalLimit(i), Real variable
i = 1 ... 250
   
  Note  You must use the following object hierarchy to access the variable:

Call GraphObjOpen(2D-AxisName)
  Call GraphObjOpen(2D-CurveName)
    D2CurvePalLimit(i) = Value
  Call GraphObjClose(2D-CurveName)
Call GraphObjClose(2D-AxisName)

Use the object names to open the subobject and the main object, to access the variable, and to close the subobject and the main object again.
If you do not know the object name, use the object type to find the object name.
Type of main object: 2D-Axis or 2D-Polar
Type of subobject: 2D-Curve

I don't see any reason why what you want to do could not be done using the method I described, unless I am missing some information.

 

Example, with each graph having different limits and colors:

 

NONAME.PNG

 

Hope that helps,

 

     Otmar

Otmar D. Foehner
0 Kudos
Message 5 of 5
(4,589 Views)