Historian client upgrade of Intouch

The old Intouch had Historian Client Active X component that was used as a trend tool within Intouch and in the new Intouch we use the .NET Historical trend within Industrial graphics. The scripting meant for the old Historian client rightly doesnt work anymore. So how do we do the scripting for the new .NET Historical trend client within industrial graphics ? Does anyone have a sample ?

Parents
  • Here are some of my examples using the .Net aaTrendControl.

    Let me know if there are anything else you are looking for 

    Richard

    ' ------------------------------------------------------
    ' Connects to Wonderware Historian and
    ' set trend properties
    '
    ' Written by: Richard Köhlerstrand
    ' Company: Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    'Connect to trend using CP parameters and remember session password
    aaTrendControl1.AddServerEx(Srv,Usr,Pwd,TRUE);

    'Set live Mode
    'aaTrendControl1.Trend.LiveMode = TRUE;

    'Remove Tag picker toolbox
    aaTrendControl1.TagPicker.Visible = FALSE;

    'Remove top toolbar
    aaTrendControl1.ToolBarVisible = FALSE;

    'Remove Time toolbar
    aaTrendControl1.TimeBarVisible = FALSE;

    'Remove Grid
    'aaTrendControl1.GridVisible = FALSE;

    'Remove XAxis
    'aaTrendControl1.ShowXAxisCursors = FALSE;

    'Remove YAxis
    'aaTrendControl1.ShowYAxisCursor = FALSE;


    ' ------------------------------------------------------
    ' Add the required pens to trend
    '
    ' Written by: Richard Köhlerstrand
    ' Company: Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    IF InstanceName <> "" Then

    IF Pen1 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen1, 0);
    ENDIF;
    IF Pen2 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen2, 0);
    ENDIF;
    IF Pen3 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen3, 0);
    ENDIF;
    IF Pen4 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen4, 0);
    ENDIF;
    IF Pen5 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen5, 0);
    ENDIF;
    ENDIF;

    ' ------------------------------------------------------
    ' Calculate duration in milliseconds
    '
    ' Written by: Richard Köhlerstrand
    ' Company:Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    '(Tag for duration linked to control)
    Duration = DTime * 1000;

    ' ------------------------------------------------------
    ' Alternative quick logon, show flter
    '
    ' Written by: Richard Köhlerstrand
    ' Company:Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    if Server <> "" then
    aaTrendControl1.AddServerEx(Server,"","",true);
    aaTrendControl1.TagPicker.FilterVisible = true;
    aaTrendControl1.Servers.QuickLogon();
    endif;

Reply
  • Here are some of my examples using the .Net aaTrendControl.

    Let me know if there are anything else you are looking for 

    Richard

    ' ------------------------------------------------------
    ' Connects to Wonderware Historian and
    ' set trend properties
    '
    ' Written by: Richard Köhlerstrand
    ' Company: Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    'Connect to trend using CP parameters and remember session password
    aaTrendControl1.AddServerEx(Srv,Usr,Pwd,TRUE);

    'Set live Mode
    'aaTrendControl1.Trend.LiveMode = TRUE;

    'Remove Tag picker toolbox
    aaTrendControl1.TagPicker.Visible = FALSE;

    'Remove top toolbar
    aaTrendControl1.ToolBarVisible = FALSE;

    'Remove Time toolbar
    aaTrendControl1.TimeBarVisible = FALSE;

    'Remove Grid
    'aaTrendControl1.GridVisible = FALSE;

    'Remove XAxis
    'aaTrendControl1.ShowXAxisCursors = FALSE;

    'Remove YAxis
    'aaTrendControl1.ShowYAxisCursor = FALSE;


    ' ------------------------------------------------------
    ' Add the required pens to trend
    '
    ' Written by: Richard Köhlerstrand
    ' Company: Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    IF InstanceName <> "" Then

    IF Pen1 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen1, 0);
    ENDIF;
    IF Pen2 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen2, 0);
    ENDIF;
    IF Pen3 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen3, 0);
    ENDIF;
    IF Pen4 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen4, 0);
    ENDIF;
    IF Pen5 <> "" THEN
    aaTrendControl1.AddTag(Srv,InstanceName + "." + Pen5, 0);
    ENDIF;
    ENDIF;

    ' ------------------------------------------------------
    ' Calculate duration in milliseconds
    '
    ' Written by: Richard Köhlerstrand
    ' Company:Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    '(Tag for duration linked to control)
    Duration = DTime * 1000;

    ' ------------------------------------------------------
    ' Alternative quick logon, show flter
    '
    ' Written by: Richard Köhlerstrand
    ' Company:Roima Sverige AB
    ' Edited by:
    ' Last edited:
    ' ------------------------------------------------------

    if Server <> "" then
    aaTrendControl1.AddServerEx(Server,"","",true);
    aaTrendControl1.TagPicker.FilterVisible = true;
    aaTrendControl1.Servers.QuickLogon();
    endif;

Children
No Data