Applies To:
  • CitectSCADA 5.xx, 6.xx, 7.xx 

The second argument on the TrnNew Cicode function states that you need to pass in the "trend definition number (as a STRING)". However, it is not clear as to what the significance of this argument is, and what the allowable values are.

The trend definition is actually referring to a Citect symbol which contains a trend object. If you look inside the Include project you will find 6 symbols in the GLOBAL library which have a trend object in them (trn001 through to trn006):

These symbols have been provided as examples of trend definitions. You will see that each of these symbols is slightly different to the other in size and/or colour of trend pens. This is why the example in the TrnNew Cicode function help shows "trn002".

You can make your own trend definition by creating a symbol in your own project, adding the trend object into it and customising it to suit your needs. Once you've saved that symbol then it is just a matter of passing its name as a STRING (within double quotations - e.g. "myTrendDefinition") into the TrnNew Cicode function.