Discover our Clipsal Smart Home packages as seen on the Block

in location


I'm looking for

  • Wholesalers
    • Uncheck All Check All
    • Expand
    • Expand
    • Expand
    • Uncheck All Check All
  • Switchboard Manufacturers
    • Uncheck All Check All

The best way to see what Clipsal electric products can do for your home is seeing them in action at a Clipsal Display Centre.

Product stock may vary according to location. If you're after a specific product range, please check with your chosen location before visiting.

10 Results
    Load More Load Complete
    Change Location

    Example of using TrendSpec in Template Instances

    This sample program is intended to demonstrate one or more programming functions or methods and is presented as programming example only. Schneider Electric assumes no liability for the use or application of this example program or any portion thereof.

    This example shows how to use TrendSpec in a Template. Since the full names of points will change from instance to instance, these names cannot be hard coded and an argument needs to be used instead.

    Below is an example of a function that uses an argument in TrendSpec instead of the full name of a point. PointName is the argument in this example. The function code resides in one of the mimics from which it needs to be called to generate an Ad Hoc trend. For example, the function can be called from a button and the argument can be passed as below. 
    Note the value of the argument is the point in the template.

    Function DisplayTrends (PointName)

    Dim showTrend, sTrendProperties, sTraces, sYAxis, sXAxis, 

    showTrend = False

    msgbox ("You are trending " & PointName)

    'Use TrendSpec to generate an Ad Hoc trend.
    sTrend = "SCX:////Trend/TREND("
    sTrendProperties = "Title = '" & PointName & "',"
    sTrendProperties = sTrendProperties & "TitleColour = RGB(50,50,50),"
    sTrendProperties = sTrendProperties & "TitleFontStyle = FontStyleBold),"

    sXAxis = "XAXIS(RelativeNow, Position=Bottom,"
    sXAxis = sXAxis & "Colour = RGB(50,50,50)),"

    sTraces = "TRACE(ProcessedHistoric,'Y Axis 1',"
    sTraces = sTraces & "SOURCE('" & PointName & "',XOffset = 0,"
    sTraces = sTraces & "YOffset = 0, Multiplier = 1),"
    sTraces = sTraces & "Label = '" & PointName & "',TraceStyle = TraceLine,"
    sTraces = sTraces & "Interval = 200, PointLimit = 50,"
    sTraces = sTraces & "ExtendToNow = True,"
    sTraces = sTraces & "LineColour = RGB(50,50,50),"
    sTraces = sTraces & "LineStyle = DashSolid," 
    sTraces = sTraces & "LineWidth = 4, MarkerStyle = Diamond,"
    sTraces = sTraces & "MarkerLimit = 250, MarkerSize = 2),"

    sYAxis = "YAXIS('Y Axis 1',Label = 'Point Value',"
    sYAxis = sYAxis & "LabelPos = Centre,LabelStyle = Normal,"
    sYAxis = sYAxis & "Position = Left,ScaleType = Range,"
    sYAxis = sYAxis & "Invert = False,ShowGrid = True,"
    sYAxis = sYAxis & "Format = '%23%23.%23%23%23',"
    sYAxis = sYAxis & "Colour = RGB(50,50,50)),"

    'Display the Ad Hoc trend by setting the showTrend flag to True
    showTrend = True

    If showTrend = True Then
    sTrend = sTrend & sTraces
    sTrend = sTrend & sYAxis
    sTrend = sTrend & sXAxis
    sTrend = sTrend & sTrendProperties 
    Mimic.OpenInset( sTrend ),10,10,80,80 
    End If

    End Function

    Didn’t find what you were looking for?

    Try Searching Again View Our Categories

    Need further assistance?

    Our Customer Care department provides total customer service solutions for our residential, industrial and commercial applications.

    Get Assistance