10-30-2011 06:51 PM
I would like to display specific curve coordinates, so I chose to add new entry "Coordinate" in my diagram. I set my XVALUE and YVALUE via VBscript, and have my Ylabel displayed via Curve Parameters -> Coordinate -> Coordinate Labels -> Text -> Labels -> Coordinate. Everything works fine in linear scaling mode. As soon as I have my diagrams logarithmically scaled, the coordinate label is going wild with strange numbers at strange places while the coordinate symbol on the curve remains correctly displayed. Is there a fix for this?
Further I noticed, that when I do have a diagram with logarithmic scaling, the "Add free coordinate" option in the context menu is greyed out. Does it have something to do with it?
rgds
Phex
10-31-2011 11:08 AM
Dear Phex,
Have you checked whether the curve parameter -> marker -> position -> channel bonded is activated . If yes the coordinate will be correct.
If the diagram is with logarithmic scaling, the "Add free coordinate" option in the context menu is greyed out, thats correct. In my opinion there is a wrong setting.
There is a work arround .
1. in the curve and axis definition you can click on new entry.
2. instead of " line " you chose coordinate.
3. give the x-coordinate and the y-coordinate a value.
Hope it helps, and please inform whether it has helped.
Yours sincerely
Mary-Lee Steffan
Applications Engineer
National Instruments
http://www.ni.com/support
10-31-2011 12:27 PM
Hi Mary-Lee,
thanks for your message, I implemented this work around in my script, but there seems to be further problem.
Could you please do the following to reproduce it:
1. Add a 2D diagram in report
2. Set scaling to manual for both axis systems
3. Add a coordinate as described in the work around and display label -> coordinate (not the comment box with the arrow...)
4. The coordinate should be well displayed together with the coordinate Y-label
5. Now set both axis systems to logarithmically scaling
6. The coordinate marker will still be at the correct position, but the label will be anywhere else displaying a random strange number
Could you reproduce that?
rgds,
Phex
11-03-2011 03:06 AM - edited 11-03-2011 03:09 AM
Dear Phex,
i have tried to reproduced that and my y-coordinate was wrong.
I have already ask my co-worker about this. Unfortunately he will be back in office in the beginning of the next week.
I hope you have the time to wait and I will reply you as soon as possible
rgds,
Mary-Lee Steffan
Applications Engineer
National Instruments
http://www.ni.com/support
11-03-2011 03:59 AM
Thanks. I can wait to next week.
rgds,
Phex
11-07-2011 10:25 AM - edited 11-07-2011 10:25 AM
Dear Phex,
the coordinate function is not able to apply on every scaling.
Regards
11-07-2011 10:34 AM
I am disappointed to hear this. Could you please advice a scriptable work around for this?
11-08-2011 08:37 AM
Dear Phex,
i am really sorry to tell you this,
but currently this is not possible. And there is also no workarround .
Hope this is not too bad for you!
Rgrds
Mary-Lee Steffan
Applications Engineer
National Instruments
http://www.ni.com/support
11-08-2011 10:13 AM
Hey,
I talked with R&D about this, and they provided the following programmatic approach that appears to work for both X and Y axes in logarithmic display. This particular VBScript creates a graph from scratch that uses the Example.TDM data set that loads with DIAdem by default.
Ycoord = 23.895 Xcoord = 50.5391304347826 Call PicDelete PicDefByIdent = TRUE Call GraphObjNew("2D-Axis", "2D-Axis1") Call GraphObjOpen("2D-Axis1") '------------------- Curve list ------------------------------- Call GraphObjNew("2D-Curve","2D-Axis1_Curve1") Call GraphObjOpen("2D-Axis1_Curve1") D2CChnExpand = 1 D2CChnXName = "[1]/Time" D2CChnYName = "[1]/Speed" D2CAxisPairNo = 1 D2CCurveType = "Line" D2CurveColor = "red" Call GraphObjClose("2D-Axis1_Curve1") Call GraphObjNew("2D-Curve","2D-Axis1_Comment") Call GraphObjOpen("2D-Axis1_Comment") D2CCoordinateXName= Xcoord D2CCoordinateYName= Ycoord D2CAxisPairNo = 1 D2CCurveType = "Coordinate" '-------------------------- Marker ---------------------------------- D2CurveMarkType = "rhomb" D2CurveMarkSize = 1 D2CurveMarkLWidt = "min" D2CurveMColAuto = 1 D2CurveMarkColor = "red" D2CurveMarkCoRGB = 255 D2CurveMFColAuto = 0 D2CurveMarkFColo = "" D2CurveMarkFCRGB = 12632256 D2CurveMarkRMode = "CalcNAuto" D2CurveMarkNType = 100 D2CurveMarkRType = 10 D2CurveMarkBType = 0 D2CurveMarkEType = 0 D2CoordinateType = "Free" D2CChnXName = "" D2CChnYName = "" D2CoordinateBoundingType= "NearestValue" D2CConstXName = "23.895" D2CConstYName = "50.5391304347826" '-------------------------- Coordinate label ---------------------------- D2ConstCTType = "none" D2ConstETPos = "largest value" D2CurveETTxt = "" D2CurveETShiftX = 0 D2CurveETShiftY = 0 D2CurveETPosXC = 1 D2CurveETPosYC = 1 D2CurveETColAuto = 1 D2CurveETColor = "red" D2CurveETColRGB = 255 D2CurveETSize = 4 D2CurveETAngle = 0 D2CurveETRelPos = "cent." D2CurveETFont = "Times New Roman" D2CurveETBold = 0 D2CurveETItal = 0 D2CurveETUndl = 0 D2CurveETStrOut = 0 D2CurveETFrame = 0 D2CurveETBackColor= "" D2CurveETBackColorRGB= 0 '-------------------------- Comment -------------------------- D2CurveCommentVisible= 1 D2CurveTxt = "X: @@str(CurrXValue,""AutoAdj"")@@"&VBCRLF&"Y: @@str(CurrYValue,""AutoAdj"")@@" D2CurveTxtFont = "Arial" D2CurveTxtSize = 3 D2CurveTxtColor = "black" D2CurveTxtColorRGB = 0 D2CurveTxtAlignment = "left" D2CurveTxtBold = 0 D2CurveTxtItal = 0 D2CurveTxtUndl = 0 D2CurveTxtStrOut = 0 '-------------------------- Frame and Arrow -------------------------- D2CurveFrameLnColor = "black" D2CurveFrameLnColRGB = 0 D2CurveFrameLnWidth = "0.5" D2CurveFrameLnType = "solid" D2CurveFrameBkColor = "other colors" D2CurveFrameBkColRGB = 15204351 D2CurveFrameBkColRGB2 = 15263976 D2CurveFrameBackFMode = "Vertical" D2CurveFrameBackFVariant= "From bottom" D2CurveArrowLnColor = "black" D2CurveArrowLnColRGB = 0 D2CurveArrowLnWidth = "0.25" D2CurveArrowLnType = "solid" D2CurveArrowSymbBeg = "NoArrow" D2CurveArrowSymbEnd = "DefArrow" '-------------------------- Position -------------------------- D2CurveFrameWidth = 10 D2CurveFrameHeight= 10 D2CurveFrameDeltaX= 55.52 D2CurveFrameDeltaY= 57.82 Call GraphObjClose("2D-Axis1_Comment") '------------------- Axis parameters -------------------------- '------------------- X scaling -------------------------------- Call GraphObjOpen("2D-Axis1_XAxis1") D2AxisXDivMode = "logarithmic" Call GraphObjClose("2D-Axis1_XAxis1") '------------------- Y scala ---------------------------------- Call GraphObjOpen("2D-Axis1_YAxis1") D2AxisYDivMode = "logarithmic" Call GraphObjClose("2D-Axis1_YAxis1") '------------------- Position --------------------------------- D2AxisBottom = 17.5 D2AxisLeft = 29.32 D2AxisTop = 26.89 D2AxisRight = 14.97 Call GraphObjClose("2D-Axis1") Call PicUpdate
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-08-2011 10:36 AM
Great!
Thanks Brad.