LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XYGraph nonlinear scale indicator

Solved!
Go to solution

Hello everyone,

 

I would like to know if I can manupulate the scale indicator on an XYGraph so that the indicators are not linear.

 

Example:

-instead of

5

4

3

2

1

  1 2 3 4 5 6 7 8 9

 

-I would like it to be

5

4

3

2

1

  1 2 3 4 5 6 4 5 6

 

I don't care if in the background I have 1 2 3 4 5 6 7 8 9, I just want to change the display to be nonlinear. 

 

Thank you.

0 Kudos
Message 1 of 5
(2,815 Views)

not quite clear what you want to show

but a linear scaling like 

x_shown= x_internal * factor + offset 

can be done with the graph/scale  properties  (often used with waveforms , where factor is dt and offset x0, the time where you start)

 

nonlinear scaling beside the logarithmic scaling is tricky and I would use the picture/report generating plot functions ... or just overlay two graphs (with most items transparent)

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(2,786 Views)

Thank you for replying, I will try and make n example maybe it is easier to understand.

 

Lets say that there are 2 programs running in parallel: the first one acquires, every second, the rotations of a HDD and gives as output 2 values: RPM and Time in seconds(that 3x10^9 value).

The second program takes the data and draws a XYGraph with that data: Time in seconds on X-axis and RPM on Y-axis.

 

Until now everything in ok. The graph will run normally, drawing from left to right.

 

After, lets say, 2h of running I decide to change the time on the first program 1h backwards. If the time a second ago was 9:24:50, the time now will be 8:24:51.

But this 8:24:51 already exists on the graph because the programs ran for 2h so, normally, the graphic will jump back and start drawing over the line that was already there.

 

And my problem is here: can i somehow let the graph drawing normally but change the scale indicator so that the user will see a time change on the graph?

 

I will attach 2 photos to demonstrate what I meant. Look closely on the X-axis scale indicators for a better understanding.

 

 

In the second picture the graph is continuous, without the spike backwards, but the scales are changed so that the drawing look continuous.

 

Have a nice day.

Download All
0 Kudos
Message 3 of 5
(2,759 Views)
Solution
Accepted by topic author MarcusOs

You need some lookup table converting real graph coordinates into scale display.

The only option I have found is to hide graph scale and place horizontal slide in text labels mode. Do not forget to add space to avoid duplicate labels: it will say "1" or " 1", they can not be the same. Obviously you will need to adjust slide scale when graph range changes.

0 Kudos
Message 4 of 5
(2,731 Views)

Still not clear what format you use, how you need to document your data (If you don't document it ... you never have done that measurement!  😉 )

 

I would say something is wrong with the way you store your data, more precise : how you join your aqusition with time 😄 

anyway....

 

If your data is in wavefrm format here is maybe a solution  ...  

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 5
(2,705 Views)