Citect Trend Interpolation methods

Hello all,

Observation is about Citect 2018. We have created Trend Tags with Sample Period of 2 Sec as below..

Trends are working fine. The observation we had now we export the trend sample in Runtime we found Sample as not for Every 2 secs what we have configured..

I check the help and found this is may be due to Trend Interpolations.

Please help me to understand 

1. Trend interpolations

2. How it affecting the Sample periods to be taken every 6 seconds and overriding the defined sample period of 2 Second.

Apreciate your help.....

Warm regards

Hemant

Parents
  • How are you exporting the trend samples? If you export from Process Analyst, you get whatever is displayed on screen, with the number of samples/sample rate that PA chooses, and by default, only 300 samples.

    If you use the TrnExportCSV() Cicode function, you can set the sample rate (Period argument) to 2sec to get the exact samples recorded in the trends. If you choose to export every 6 seconds it will have to condense 3 recorded samples into one exported sample. The iDisplayMode arguments allows you to choose the interpolation method for each trend tag. By default, if it has to condense multiple recorded samples into one exported sample, it uses the mean value of those (3) samples. You could use Condense Mode 12 to get just the newest sample, if that's what you want. See the TrnExportCSV() help:

Reply
  • How are you exporting the trend samples? If you export from Process Analyst, you get whatever is displayed on screen, with the number of samples/sample rate that PA chooses, and by default, only 300 samples.

    If you use the TrnExportCSV() Cicode function, you can set the sample rate (Period argument) to 2sec to get the exact samples recorded in the trends. If you choose to export every 6 seconds it will have to condense 3 recorded samples into one exported sample. The iDisplayMode arguments allows you to choose the interpolation method for each trend tag. By default, if it has to condense multiple recorded samples into one exported sample, it uses the mean value of those (3) samples. You could use Condense Mode 12 to get just the newest sample, if that's what you want. See the TrnExportCSV() help:

Children
  • Expanding on what Eric said, the crucial sentence being "you get whatever is displayed on screen".   I work a lot with exporting trend data to .csv files, and my tips are (assuming from the context of your post that you are exporting from the process analyst): 

    1. The Number of Samples is the critical value for getting your data exported with the correct time intervals.  Also note the starting date/time of the process analyst.  Ensure you are on a clock time that is an exact multiple of 2 seconds (with 0 milliseconds) to get the neatest time stamps.  In your case it looks like before exporting, you will need to either increase the number of samples by a multiple of 3 (the simplest way, where possible), or reduce the displayed time period.  If for example your process analyst page is being viewed on a full HD monitor with horizontal resolution of 1920 pixels, then at 2 seconds per sample that would let you export 64 minutes of data at a time, provided you first changed the "number of samples" to 1920.  

    2. In the properties of each trend pen, set the desired Request Mode if applicable.  By default the process analyst uses average values, whereas in some cases you might prefer mininum, maximum or latest values.  If your exported time period exactly matches your raw data - as you are doing in this example - then this setting is not really meaningful anyway.  But in general it is good to be aware that average values is the default setting.  It comes into play any time you are exporting a quantity of data that makes Citect export more than 1 raw sampled value into a single exported value.  If exporting using any request mode other than Average, I find it is also good practice to use "Stepped" as the interpolation setting, instead of the default setting of "Straight"   

  • thank you for your reply.

    We are using CSV_Include project and its poptrend template in XGA resolutions. nevertheless yours and MARCO's explanation clearly help to understand the visualization behavoir of the trends.

    Im my case sampling period of the trend configured is 2 Sec. The trend we were using has defined 601 Samples per 1 pixels, which allows is to set a maximum duration of 20 minutes to view sample taken at 2 seconds.

    Just another query if lower the time span for 15 minutes..Still trend retrives 601 Sample from trend file and displaying.

    In this samples it showing values at 1 sec intervals as well, ideally for my trend configuration if my sample period is 2sec then values of this 1 sec intervals showb are interpolated values or calculated or what??

    regards

  • The template you're using is very old (2002?) and uses the legacy trend object (not Process Analyst). I don't believe it supports the newer Request Mode feature. It probably just uses the default request mode.

  • Noted your suggestions...

    trend control is already updated in 2018 environment, and in trend help its mentioned when trend is defined as periodic it is showing samples at specified period.

      

    anyways thank you for your support, I will go with the trend export cicode function to get the result..

    Warm regards

    Hemant