vt_trend in the mainModule

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
tmalone
Posts:192
Joined: Mon Nov 22, 2010 11:21 pm

vt_trend in the mainModule

Post by tmalone »

we have customers who love the vt_trend and the features that it provides. The ability to configure a trend group and bring it up on demand within a timeframe, etc. are all great features.

I spent a couple of hours taking the buttons apart in the Panel Topology for the trend, and I just can't seem to figure out how to get it to open in the mainModule, not as a floating popup.

Our customer wants to always open the alarm panel on one monitor, the trend on another monitor and then navigate in a 3rd monitor. The trend and alarms screens won't change very often.

Before I spend another day messing with this, has anyone built a button that opens the standard VtTrend in the mainModule frame rather than a popup.

Todd Malone
HMI CoC USA

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: vt_trend in the mainModule

Post by Gertjan van Schijndel »

You can easily do this by adding a optional parameter to the 'openTrend' function like this:

Code: Select all

void openTrend(string trendName, int trendType, string moduleName = "Trend_" + myModuleName())
And change the previously fixed module name (at the end of the function) with the new parameter like this:

Code: Select all

    mergeToString(transferstring, transfer);
    
    dpSet("_VarTrendOpen.UiNumber",  myUiNumber(),
          "_VarTrendOpen.PanelName", moduleName + ": " + trendName, 
          "_VarTrendOpen.TrendData", transferstring);
  }
  else
  {
    DP = "";
  }
  
  ModuleOnWithPanel(moduleName,
                    0, 0, 0, 0, 1, 1, "",
                    "vision/trend/VT_trend.pnl",
                    trendName,
                    makeDynString("$VARTRENDDP:" + DP));
}
With these changes you can call the 'openTrend' function to open the trend in your module, like this:

Code: Select all

openTrend("VarTrend_0001", -1, "myMainModule");
To prevent from making these changes also in future versions, you could try if ETM is willing to incorporate these changes in their product.

2 posts • Page 1 of 1