Applies To:
  • CitectSCADA 5.40

Summary:
I am using the TrnPlot() function to print out some of my trends in a report or I am calling it when no trend page is displayed. Since I upgraded to version 5.40 the plot prints out blank. What can I do? 

Solution:
This is due to an extra argument added to the TrnPlot function - an animation number. To work around this problem firstly make sure that you call the TrnPlot function with this new argument (see the Citect Online Help for details on these arguments):

TrnPlot(sPort, nSamples, iTime, rPeriod, sTitle, hAn, Tag1 ..... Tag8, iMode, sComment, rLoScale1, rHiScale1, .....rLoScale8, rHiScale8)

When you call this function for a report or in Cicode when no trend page is displayed, pass 0 to the hAn argument, then make the following change to the graph.ci file in the Include project:

In the function _PltPenDataSet() you will see a line that reads

iDisplayMode=TrnGetDisplayMode(hAn, iPen);

Edit this line so that it reads:

IF hAN = 0 Then
    iDisplayMode=256;
Else
    iDisplayMode=TrnGetDisplayMode(hAN, iPen);
End

You will now be able to use the TrnPlot() function within reports again.

Note:    Modifying the Include project is not recommended unless it is necessary. Installing Citect service packs or releases may overwrite the Include project files, so it will be necessary to redo any changes. The Include project is not backed up when you back up your project. Please make a copy of any files that you modify in case the changes do not work as expected.

CIT has confirmed this to be a problem in Citect for Windows version 5.40. This problem has been fixed in version 5.41. This fixes NCR16902

 

Keywords:
 

Attachments