Showing results 1 to 4 of 4

Thread: Report Generator - the last few values of archive.

  1. #1
    Join Date
    01.06.2020
    Posts
    2

    Default Report Generator - the last few values of archive.

    Hello, 

    I would like to do some calculation in Report Generator based on archive values.
    Calculations are based on increase of the value over some time, so I want to use two last values from aggregated archive. 

    Problem is, that when I used function archivesp(2,"value","bottom",1,0,0) in previous build (8.20, 65486) I got only two last values of archive. After update to 66627 the same function returns full row starting from the oldest.
    Function archivesp(2,"value","bottom",0,0,0) returns last value of the archive.

    Could you help me with getting last two values from aggregated archive?


    Thank you in advance.

  2. #
    Join Date
    10.12.2007
    Posts
    235
    Best Answer

    Default AW: Report Generator - the last few values of archive.

    Hi, I think you misunderstood the way how the archive functions work in a report. The picture switch function to the report defines the time range for the archive values that are displayed in the report. So the archive functions in the report generator mostly show all the values for selected Archive-Variable that fit this time frame. The different atchive functions only arrange them in different ways or allow them to be manipulated in the report and so on.
    Without looking in the manual, I think archivesp function is normally used to show the entries in some kind of table-design. If you use it with ,0,0,0 at the end, all values will be entered in the same cell. Therefore you only see the last value as the report seems to insert the values in order of timestamp. There is no function that will return only the last two values if there are more than two fitting the time frame.

    I would recommend to have a look on the arcive values with the archive revision screen in the runtime, you will find out that there are more than two archive entries in the time frame of the report. Maybe you started the runtime sometimes during the installation of build and this caused a base archive to stop and start more often as usually...
    With the archivesp function and ,0,0,0 at the end you will never see more than one value - change it back to 1,0,0 and check the archive values with archive revision screen in the runtime - there you can also delete values that are wrong (or simply wait for the next closed time frame if your customer is ok with it - I'm sure this will correct itself)

  3. #2
    Join Date
    18.08.2015
    Posts
    14

    Default Re: Report Generator - the last few values of archive.

    Dear Igor,

    Since the behavior reportedly changes from one build version to another, I would suggest to contact your local support team. They will investigate this issue and suggest possible solutions or workarounds.

    Best regards,
    Leo

  4. #3
    Join Date
    10.12.2007
    Posts
    235
    Best Answer

    Default AW: Report Generator - the last few values of archive.

    Hi, I think you misunderstood the way how the archive functions work in a report. The picture switch function to the report defines the time range for the archive values that are displayed in the report. So the archive functions in the report generator mostly show all the values for selected Archive-Variable that fit this time frame. The different atchive functions only arrange them in different ways or allow them to be manipulated in the report and so on.
    Without looking in the manual, I think archivesp function is normally used to show the entries in some kind of table-design. If you use it with ,0,0,0 at the end, all values will be entered in the same cell. Therefore you only see the last value as the report seems to insert the values in order of timestamp. There is no function that will return only the last two values if there are more than two fitting the time frame.

    I would recommend to have a look on the arcive values with the archive revision screen in the runtime, you will find out that there are more than two archive entries in the time frame of the report. Maybe you started the runtime sometimes during the installation of build and this caused a base archive to stop and start more often as usually...
    With the archivesp function and ,0,0,0 at the end you will never see more than one value - change it back to 1,0,0 and check the archive values with archive revision screen in the runtime - there you can also delete values that are wrong (or simply wait for the next closed time frame if your customer is ok with it - I'm sure this will correct itself)

  5. #4
    Join Date
    01.06.2020
    Posts
    2

    Default Re: Report Generator - the last few values of archive.

    mst, your post completely makes sense, but it actually worked with previous build, not only for single archive records.

    Anyway, your post is very helpful, my mistake is using one report with 1 day time frame to calculate increments for 1 min, 15 min, 1 hour and 1 day, instead of creating 4 separate reports with different time frames to reduce amount of data loaded and then easily deal with calculations.

Similar Threads

  1. Replies: 5
    Last Post: 26th November 2019, 09:34
  2. Archive values after communication loss
    By joelprasad in forum zenon Supervisor
    Replies: 1
    Last Post: 10th September 2018, 09:06
  3. Replies: 9
    Last Post: 20th April 2011, 18:30
  4. Report Generator
    By rolindo in forum zenon Supervisor
    Replies: 1
    Last Post: 21st November 2009, 23:50
  5. problem with archive values in report
    By shahramkh59 in forum zenon Supervisor
    Replies: 1
    Last Post: 20th October 2009, 13:40

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •