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:

  • 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"   

Reply
  • 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"   

Children
No Data