Магия Времени — Графики, Отчеты, Архивы

Стартовая страница Форумы Ошибки в работе Магия Времени — Графики, Отчеты, Архивы

Просмотр 15 сообщений - с 31 по 45 (из 86 всего)
  • Автор
    Сообщения
  • #35074
    manjey73
    Участник

    Вообще то единственный вариант, это когда оператор, приходя на смену видит на ПК часы, которые показывают X:XX время, на своих часах видит Х:ХХ время и в Интерфейсе Scada оперирует тем же Х:ХХ временем.

    А не высчитывает в уме, сколько и где ему надо отнять или прибавить.

    Так вот вопрос теперь с учетом версии 6 — КАК этого добиться?

    С учетом не только отображения, но и получения отчетов.

    • Этот ответ был изменен 4 месяца, 1 неделя назад от manjey73.
    #35078
    Mikhail
    Модератор

    Оператору высчитывать ничего не нужно. Понимать, в каком времени хранятся данные и работают приложения, необходимо при конфигурировании проекта. Часовой пояс отчётов совпадает с часовым поясом Вебстанции и отображается в печатной форме отчёта.

    Начать стоит с проверки того, с какими метками времени хранятся данные в архивах.

    #35082
    manjey73
    Участник

    Блин, ну 100500 раз уже писал — метки времени в Архивах по умолчанию 0:00:00. Скрины выше.

    1. Учитывая возможность разделения по разным ПК Сервера, Коммуникатора, WEB сервера и тем более WEB клиентов.
    2. Учитывая переход Сервера на UTC

    Работу со временем сразу надо было менять и дорабатывать.
    Например чтобы Сервер всегда понимал, с каким временем и из какой Тайм Зоны было подключение конечного клиента. Перевод уже на уровне сервера в UTC и отдача показаний.

    Сейчас реальный бардак. Даже банальная команда передачи времени в виде строки из Web клиента. Сервер вообще ни сном ни духом что это за время, из какой оно зоны.

    Часовой пояс отчётов совпадает с часовым поясом Вебстанции и отображается в печатной форме отчёта.

    Дневной ни в дугу 🙂

    #35084
    Mikhail
    Модератор

    метки времени в Архивах по умолчанию 0:00:00

    Так может нужно изменить время сохранения данных в суточный архив?

    #35086
    manjey73
    Участник

    Не только в суточный. Доступ к одному и тому же значению в текущем варианте только при значениях -3 и 3 соответственно. Иначе никак.
    То есть везде надо менять настройки, чтобы прийти к единому варианту.

    В общем Время это камень преткновения оказался. Костыль на костыле в итоге.

    #35093
    Mikhail
    Модератор

    Суточные данные должны храниться у Вас в архиве на какое время, 0:00 UTC или 0:00 UTC+3?

    #35094
    manjey73
    Участник

    Получается, что на 0:00 UTC+3.
    Тогда это 21 час предыдущего дня так понимаю для UTC времени.

    #35095
    Mikhail
    Модератор

    Да, это будет 21:00 предыдущего дня. Нужно использовать параметр «Смещение записи» суточного архива. Его значение должно быть >= 0. Поставьте 21, затем проверьте данные в суточном архиве.

    #36500
    Oleg
    Участник

    Здравствуйте. Увидел, что обсуждение сюда переехало. Прошу помощи в устранении ошибки необработанного исключения.
    Отчет с периодом в дни отображается, с периодом месяцы — ошибка. Пробовали и +3, и 0 и -3 смещения в конфиге — не помогает. Куда копать?

    Ошибка:

    System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly. For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local. (Parameter ‘sourceTimeZone’)
    at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
    at System.TimeZoneInfo.ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone)
    at Scada.Report.ReportUtils.GetUtcStartTime(DateTime utcNow, TimeZoneInfo timeZone, PeriodUnit unit)
    at lambda_method18(Closure, Object, Object[])
    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
    — End of stack trace from previous location —
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    — End of stack trace from previous location —
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
    — End of stack trace from previous location —
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
    at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
    at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

    Ссылка:

    ElasticReport/Print/PrintReport2?reportID=2&unit=Month&period=1&archive=Hour&format=Html

    Отчет:

    <?xml version=»1.0″ encoding=»utf-8″ ?>
    <ElasticReport>
    <!— Input form options —>
    <InputOptions>
    <!— User can select report period —>
    <SelectPeriod>true</SelectPeriod>
    <!— User can select archive —>
    <SelectArchive>true</SelectArchive>
    <!— User can select channels —>
    <SelectChannels>false</SelectChannels>
    <!— User can select output format —>
    <SelectFormat>true</SelectFormat>
    <!— Defines how the period is entered. Possible values: SingleDate, SingleMonth, DatePeriod, DateTimePeriod, MonthPeriod —>
    <PeriodControl>MonthPeriod</PeriodControl>
    <!— Maximum report period in days —>
    <MaxPeriod>12</MaxPeriod>
    <!— Default archive code —>
    <DefaultArchive>Hour</DefaultArchive>
    <!— Default output format: Pdf, Xlsx, Html —>
    <DefaultFormat>Pdf</DefaultFormat>
    </InputOptions>

    <!— Output options. Page format and orientation only work for PDF —>
    <OutputOptions>
    <!— Page format: A0, A1, A2, A3, A4, A5, A6, B5, Letter, Legal, Ledger or P11x17 —>
    <PageFormat>A4</PageFormat>
    <!— Page orientation: Portrait or Landscape —>
    <Orientation>Landscape</Orientation>
    <!— Specifies custom report styles —>
    <StyleSheet></StyleSheet>
    </OutputOptions>

    <!—
    Report document consists of sections. Section is a separate block of displayed data.
    Section contains elements such as a table, columns, rows, and cells.
    Section working period is based on the specified report period and shifted according to the section data options.

    Element attributes are inherited from an element to its children and applied to suitable elements.
    The following element attributes are supported:
    * cnlNum — channel number,
    * cnlIdx — channel index if channels are specified as input parameters,
    * calcType — calculation type,
    * calcSum — whether to calculate a sum of a column or row,
    * calcAvg — whether to calculate an average of a column or row,
    * calcMin — whether to calculate a minimum value of a column or row,
    * calcMax — whether to calculate a maximum value of a column or row,
    * colStyle — column style,
    * rowStyle — row style,
    * cellStyle — cell style.

    Table attributes:
    * border — whether to display table border.

    The possible values of the calcType attribute:
    * Val — the value of the bound channel at the processed timestamp,
    * FirstVal — the value at the first timestamp of the working period,
    * LastVal — the value at the last timestamp of the working period,
    * Diff — the difference between the values at the processed and previous timestamps,
    * DiffNext — the difference between the values at the next and processed timestamps,
    * Const — the constant value to insert in the corresponding cell,
    * Formula — the formula to insert in the corresponding cell, supported only by Excel.

    Style names follow the rules:
    Column style name must be in the form «col-*».
    Row style name must be in the form «row-*».
    Cell style name must be in the form «cell-*».

    Variables can be used inside an element name and inside a constant value.
    The following variables are supported:
    {CnlNum} — channel number,
    {CnlName} — channel name.
    —>

    <Document>
    <DocumentOptions>
    <!— Heading of the report —>
    <Heading>Отчет о климате</Heading>
    <!— Show or hide heading —>
    <HeadingVisible>true</HeadingVisible>
    <!— Set text color depending on channel status —>
    <UseStatusColor>true</UseStatusColor>
    </DocumentOptions>

    <!—
    Section of TimeData type.
    Supported calculation types: Val, Diff, DiffNext, Const, Formula.
    —>
    <Section type=»TimeData»>
    <SectionOptions>
    <!— Unique section ID. Use Latin characters without spaces —>
    <ID>Section1</ID>
    <!— Subheading of the section —>
    <Subheading>TimeData Section</Subheading>
    <!— Show or hide subheading —>
    <SubheadingVisible>false</SubheadingVisible>
    <!— Start the section on a new page —>
    <PrependPageBreak>false</PrependPageBreak>
    </SectionOptions>

    <DataOptions>
    <!— Prepend additional time before the report start time —>
    <PrependTime>0:00:00</PrependTime>
    <!— Append additional time after the report end time —>
    <AppendTime>0:00:00</AppendTime>
    <!— Skip the first timestamp from output —>
    <SkipFirst>false</SkipFirst>
    <!— Skip the last timestamp from output —>
    <SkipLast>false</SkipLast>
    <!— Defines how timestamps are enumerated. Possible values: All, Step, Hour, Day, Month, Exact, BeginEnd —>
    <TimeDetailing>Hour</TimeDetailing>
    <!— Time step —>
    <TimeStep>1:00:00</TimeStep>
    <!— Times of day separated by commas —>
    <ExactTimes>0:00, 12:00</ExactTimes>
    <!— Defines how the date and time column is displayed —>
    <ShowDatesOnly>false</ShowDatesOnly>
    </DataOptions>

    <Table border=»true»>
    <ColumnGroup name=»Показания датчиков:»>
    <Column name=»{CnlName}» cnlNum=»900000″ calcType=»Val» />
    <Column name=»{CnlName}» cnlNum=»900002″ calcType=»Val» />
    <Column name=»{CnlName}» cnlNum=»900001″ calcType=»Val» />
    <Column name=»{CnlName}» cnlNum=»900003″ calcType=»Val» />
    </ColumnGroup>
    </Table>

    </Section>
    </Document>
    </ElasticReport>

    #36505
    Mikhail
    Модератор

    Добрый день!
    Уточните, чем отличается отчёт, который вызывает ошибку, от примера отчёта ElasticReport1.xml, который содержится в дистрибутиве плагина?

    #36506
    Mikhail
    Модератор

    Отчёт-пример работает нормально по такой ссылке:
    https://www.rapidscada.net/scada/ElasticReport/Print/PrintReport2?reportID=1&period=1&unit=Month&archive=Hour&format=Html

    #36507
    manjey73
    Участник
    Ошибка
    При обработке вашего запроса произошла ошибка.
    Request ID: 00-2cfce25ac56ce27505e1abcf5dfe1005-dade153d2598984e-00
    
    Development Mode
    Swapping to the Development environment displays detailed information about the error that occurred.
    
    The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.

    При использовании unit=Month

    http://localhost:10008/ElasticReport/Print/PrintReport2?reportID=1&unit=Month&period=-1&archive=Hour&format=Html

    При использовании unit=Day показывает отчет за прошлый день.

    #36508
    manjey73
    Участник

    Да, это для секции <Section type=»DataData»>
    То есть в таком варианте unit=Day работает, а unit=Month вываливает ошибку.

    #36509
    Oleg
    Участник

    Михаил, отчет из дистрибутива плагина тоже не работает. Ошибка такая же, купленный плагин выполняет не все функции

    #36513
    AndreyV
    Участник

    Михаил! Вот в этом то и вопрос!!!
    Отчет-пример на вашей демо версии скады работает по прямой ссылке с месячным периодом. У меня на домашнем ноутбуке (использую пробный ключ) работает этот отчет по такой же ссылке и другие отчеты работают с месячным периодом. А на реальных серверах (проверили на 2-х) с рабочими проектами и купленными лицензиями те же самые отчеты не работают. Ошибка одна и таже, уже неоднократно выкладывалась на форуме.
    И не ясно, что не так и как это исправить.
    Для справки: на одном сервере стоит Win10, Rapid SCADA 6.3.1, на другом сервере Win11, Rapid SCADA 6.3.1., на обоих серверах куплены постоянные ключи — отчеты за месячный период не работают; у меня на ноутбуке Win10, Rapid SCADA 6.2.0, ключ пробный — те же отчеты работают; вчера обновил Rapid SCADA до версии 6.3.1 — те же отчеты работают! Куда копать???

Просмотр 15 сообщений - с 31 по 45 (из 86 всего)
  • Вы должны авторизироваться для ответа в этой теме.