LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with Graphic

Hello everybody,

I'm still a beginner with LabWindows/CVI.

I have a 2 graphics where I can see the results of my measurements.

Exp. in my frist graphic I can see the full result, the (Y ) Max Value is 256 and the (Y) Min. Value is -156; The (X) Time is from 0 up to 80000 msec.

Now comes my problem. On my second graph I wanna show the same datas but only the part from (X) second 2000 up to 600000, the (Y) Max Value
is 9 and the (Y) Min Value -9.


So how could I realize it? My boss told me I can do this very easy with this graphic. And I'm a beginner with CVI so maybe you could give a easy step by step help.

thanks a lot,

alan-lee
0 Kudos
Message 1 of 3
(3,230 Views)

SetAxisScalingMode( panelHandle,  graphName, VAL_BOTTOM_XAXIS, VAL_MANUAL, minValue, Maxvalue);

SetAxisScalingMode( panelHandle,  graphName, VAL_LEFT_YAXIS, VAL_MANUAL, minValue, Maxvalue);

 

in your case:

SetAxisScalingMode( Yourpanelhandle,  yourgraphName, VAL_BOTTOM_XAXIS, VAL_MANUAL, 2000, 600000);

SetAxisScalingMode( Yourpanelhandle,  yourgraphName, VAL_LEFT_YAXIS, VAL_MANUAL, -9, 9);

0 Kudos
Message 2 of 3
(3,222 Views)
Alan-Lee,

Perhaps what you want is to set the graph y-scale to fit the range of the selected data (you do not know the range in advance).

There are a couple of ways you can do this.
  1. The easier way (I believe):
    Set the y-axis scaling mode to VAL_AUTOSCALE, and plot only the data you want.
  2. Alternatively:
    Check the minimum & maximum y values in your selected range, and manually scale the axis to suit. If the data is of type double, you can get these values using the Advanced Analysis library function MaxMin1D().
Good luck.

Colin.

0 Kudos
Message 3 of 3
(3,180 Views)