Стартовая страница › Форумы › Ошибки в работе › Магия Времени — Графики, Отчеты, Архивы
- В этой теме 85 ответов, 4 участника, последнее обновление 1 неделя, 4 дня назад сделано
Oleg.
-
АвторСообщения
-
09.10.2024 в 13:48 #35074
manjey73
УчастникВообще то единственный вариант, это когда оператор, приходя на смену видит на ПК часы, которые показывают X:XX время, на своих часах видит Х:ХХ время и в Интерфейсе Scada оперирует тем же Х:ХХ временем.
А не высчитывает в уме, сколько и где ему надо отнять или прибавить.
Так вот вопрос теперь с учетом версии 6 — КАК этого добиться?
С учетом не только отображения, но и получения отчетов.
-
Этот ответ был изменен 4 месяца, 1 неделя назад от
manjey73.
10.10.2024 в 14:08 #35078Mikhail
МодераторОператору высчитывать ничего не нужно. Понимать, в каком времени хранятся данные и работают приложения, необходимо при конфигурировании проекта. Часовой пояс отчётов совпадает с часовым поясом Вебстанции и отображается в печатной форме отчёта.
Начать стоит с проверки того, с какими метками времени хранятся данные в архивах.
10.10.2024 в 14:16 #35082manjey73
УчастникБлин, ну 100500 раз уже писал — метки времени в Архивах по умолчанию 0:00:00. Скрины выше.
1. Учитывая возможность разделения по разным ПК Сервера, Коммуникатора, WEB сервера и тем более WEB клиентов.
2. Учитывая переход Сервера на UTCРаботу со временем сразу надо было менять и дорабатывать.
Например чтобы Сервер всегда понимал, с каким временем и из какой Тайм Зоны было подключение конечного клиента. Перевод уже на уровне сервера в UTC и отдача показаний.Сейчас реальный бардак. Даже банальная команда передачи времени в виде строки из Web клиента. Сервер вообще ни сном ни духом что это за время, из какой оно зоны.
Часовой пояс отчётов совпадает с часовым поясом Вебстанции и отображается в печатной форме отчёта.
Дневной ни в дугу 🙂
11.10.2024 в 12:12 #35084Mikhail
Модераторметки времени в Архивах по умолчанию 0:00:00
Так может нужно изменить время сохранения данных в суточный архив?
11.10.2024 в 12:26 #35086manjey73
УчастникНе только в суточный. Доступ к одному и тому же значению в текущем варианте только при значениях -3 и 3 соответственно. Иначе никак.
То есть везде надо менять настройки, чтобы прийти к единому варианту.В общем Время это камень преткновения оказался. Костыль на костыле в итоге.
14.10.2024 в 13:09 #35093Mikhail
МодераторСуточные данные должны храниться у Вас в архиве на какое время, 0:00 UTC или 0:00 UTC+3?
14.10.2024 в 13:11 #35094manjey73
УчастникПолучается, что на 0:00 UTC+3.
Тогда это 21 час предыдущего дня так понимаю для UTC времени.15.10.2024 в 13:11 #35095Mikhail
МодераторДа, это будет 21:00 предыдущего дня. Нужно использовать параметр «Смещение записи» суточного архива. Его значение должно быть >= 0. Поставьте 21, затем проверьте данные в суточном архиве.
25.01.2025 в 19:33 #36500Oleg
УчастникЗдравствуйте. Увидел, что обсуждение сюда переехало. Прошу помощи в устранении ошибки необработанного исключения.
Отчет с периодом в дни отображается, с периодом месяцы — ошибка. Пробовали и +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>27.01.2025 в 15:16 #36505Mikhail
МодераторДобрый день!
Уточните, чем отличается отчёт, который вызывает ошибку, от примера отчёта ElasticReport1.xml, который содержится в дистрибутиве плагина?27.01.2025 в 15:18 #36506Mikhail
МодераторОтчёт-пример работает нормально по такой ссылке:
https://www.rapidscada.net/scada/ElasticReport/Print/PrintReport2?reportID=1&period=1&unit=Month&archive=Hour&format=Html27.01.2025 в 15:27 #36507manjey73
УчастникОшибка При обработке вашего запроса произошла ошибка. 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
При использовании unit=Day показывает отчет за прошлый день.
27.01.2025 в 15:41 #36508manjey73
УчастникДа, это для секции <Section type=»DataData»>
То есть в таком варианте unit=Day работает, а unit=Month вываливает ошибку.27.01.2025 в 15:55 #36509Oleg
УчастникМихаил, отчет из дистрибутива плагина тоже не работает. Ошибка такая же, купленный плагин выполняет не все функции
27.01.2025 в 18:08 #36513AndreyV
УчастникМихаил! Вот в этом то и вопрос!!!
Отчет-пример на вашей демо версии скады работает по прямой ссылке с месячным периодом. У меня на домашнем ноутбуке (использую пробный ключ) работает этот отчет по такой же ссылке и другие отчеты работают с месячным периодом. А на реальных серверах (проверили на 2-х) с рабочими проектами и купленными лицензиями те же самые отчеты не работают. Ошибка одна и таже, уже неоднократно выкладывалась на форуме.
И не ясно, что не так и как это исправить.
Для справки: на одном сервере стоит Win10, Rapid SCADA 6.3.1, на другом сервере Win11, Rapid SCADA 6.3.1., на обоих серверах куплены постоянные ключи — отчеты за месячный период не работают; у меня на ноутбуке Win10, Rapid SCADA 6.2.0, ключ пробный — те же отчеты работают; вчера обновил Rapid SCADA до версии 6.3.1 — те же отчеты работают! Куда копать??? -
Этот ответ был изменен 4 месяца, 1 неделя назад от
-
АвторСообщения
- Вы должны авторизироваться для ответа в этой теме.