Applies To:
  • CitectSCADA 5.xx
  • CitectHMI 5.xx

I am using TrnSetTable() to set weekly averages manually into the Citect trend system. For values that I do not know yet I use an 'invalid value'. However sometimes nothing appears on my trend graph.

To set a not known value for the Citect Trend system you can either use the TrnGetInvalidValue() or TrnGetGatedValue() function to fill the Cicode array that you need for the TrnSetTable() function, with a trend value to reflect the not-known status of that point. In the example below I set 16 values (for a daily average) back into the Citect trend system.

TrnSetTable("Test_Trend",iTime,24*60*60, 16, rDummy[0],0);

I find that if I use a sequence 'invalid point - valid point - invalid point' that Citect has difficulty displaying the valid value in a trend graph. This probably comes the fact that Citect cannot draw a line from an invalid point to valid point and then again to an invalid point.

However if I used the sequence 'gated point - valid point - gated point' then I see all the valid values appearing correctly in the trend graph.

This is more a display issue than anything else, since if you do a TrnExportDBF() from your trend graph, you will find that all the values present.