DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a measurement on a Graph.

Solved!
Go to solution
Highlighted

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

I am using :

CallChnPulseDetection("","[1]/Smoothed_LoadCell","PulseStartTime","Absolute",16500,1,"Absolute",10,10,"RISING",0)

CallChnPulseDetection("","[1]/Smoothed_LoadCell","PulseStartChnLine","Absolute",16500,1,"Absolute",10,10,"RISING",0)

CallChnPulseDetection("","[1]/Smoothed_LoadCell","PulseStartDetected","Absolute",16500,1,"Absolute",10,10,"RISING",0)

 

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

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

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 oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem,"My2DAxisSystem")
Set oMyCurveLine = oMy2DAxisSystem.Curves2D.Add(e2DShapeLine,"My2DCurveLine")

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]"

Set oMyCurveCoord = oMy2DAxisSystem.Curves2D.Add(e2DShapeCoordinate,"My2DCurveCoord")
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)

Thanks You so much for your help JustNI !

 

You nailed it !

0 Kudos
Message 3 of 3
(139 Views)