cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

## Displaying a measurement on a Graph.

I’m drawing a blank and can’t find what I need to do in the search.

I am using :

To detect the starting point of a measurement. I am using this detection point and offsetting this starting location to do a 3-point measurement, and averaging those numbers.

FRE=ChD(i,"PulseStartChnLine")+0300

FRET=ChD(FRE,"Smoothed_MotorA Postion")

LRE=ChD(i,"PulseStartChnLine")+0400  '

LRET=ChD(LRE,"Smoothed_MotorA Postion")

LRE=ChD(i,"PulseStartChnLine")+0600  '

LRET=ChD(LRE,"Smoothed_MotorA Postion")

IS there a way to display the three points that I will be using for the average on the Graph?

Thank you in advance for any help

Spidey

Message 1 of 3
(170 Views)
Solution
Accepted by topic author Spidermansrevenge
05-01-2019 08:57 AM

## Re: Displaying a measurement on a Graph.

If I understand correctly, you're looking to add markers for specific coordinates to show which three points are being used on a 2D-axis system. If that's the case, the following example may be helpful to see how that can be done. It first creates a 2D-axis system and plots example data on it, and then starting at line 18 defines a coordinate and places it where the maximum value occurs. It should be relatively straightforward to modify it to reference an existing graph and add multiple coordinates:

```Dim oMy2DAxisSystem, oMyCurveLine, oMyPos, oMyShape, oMyCurveCoord, oMyCoordShape, MaxValX, MaxValY

Call Report.NewLayout()

Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80

Set oMyShape = oMyCurveLine.Shape
oMyShape.XChannel.Reference = "[1]/[1]"
oMyShape.YChannel.Reference = "[1]/[2]"

MaxValY = Data.GetChannel("[1]/[2]").Properties("maximum").Value
MaxValX = Data.GetChannel("[1]/[1]").Values(PNo("[1]/[2]", MaxValY))

Set oMyCoordShape = oMyCurveCoord.Shape
oMyCoordShape.BoundingType = eCoordinateChannelBounded
oMyCoordShape.BoundingPosition =e2DCoordinateBoundingAbsoluteMax
oMyCoordShape.BoundingXChannel.Reference = "[1]/[1]"
oMyCoordShape.BoundingyChannel.Reference = "[1]/[2]"
oMyCoordShape.Settings.Type = eMarkerCircle
oMyCoordShape.Settings.Size = 2

Call oMyCoordShape.Settings.MarkerFilling.SetPredefinedColor(eColorIndexDarkBlue)

oMyCoordShape.XCoordinate.Reference = MaxValX
oMyCoordShape.YCoordinate.Reference = MaxValY

Call Report.Refresh()```

Let me know if I misinterpreted your question!

Justin

Message 2 of 3
(144 Views)

## Re: Displaying a measurement on a Graph.

Thanks You so much for your help JustNI !

You nailed it !

Message 3 of 3
(139 Views)