В данной главе рассказывается, как настраивать и использовать выборки данных.
8.1 Обзор
Для сбора данных вы должны определить, как именно должна работать выборка: время сборки, адрес, длина данных. Также необходимо назначить место для хранения данных: память панели, SD-карта или USB-диск. Pull it.
Для просмотра записей вы можете использовать объекты [Отображение трендов] и [Отображение исторических данных].
8.2 Управление выборками данных
Для создания нового объекта выборки данных выполните следующие действия :
- Перейдите в меню [Данные/История] и нажмите [Выборка данных] .
-
Нажмите кнопку [Создать] для открытия окна настройки.
8.3 Создание новой выборки данных
Настройка выборки данных для панелей серий: eMT, iE, XE, mTV, iP
Настройка | Описание |
---|---|
Режим выборки |
Высокий приоритет Временная Триггерная [Режим] Условия инициализации процесса сбора данных: |
Адрес чтения |
Выберите адрес, который будет источником для считывания данных. |
Запись данных (в реальном времени) |
Если не выбрано [Авто стоп], то максимальное число записей, сохраняемых в выборку, равно 86400. При превышении этого количества, начинают удаляться старые записи. [Формат данных] [Авто стоп] Выборка данных автоматически остановится, когда количество записей достигнет числа [Кол-во записей].
|
Очистить адреса данных реального времени |
Если состояние назначенного адреса изменится [OFF -> ON] или [ON -> OFF] (в соответствии с выбранным режимом), то данные полученные объектом [Отображение трендов] режима реального времени [real-time] будут удалены и число данных будет установлено равным 0. |
Адрес удержания |
Если состояние указанного адреса будет установлено в «ON» или «OFF» (в соответствии с выбранным режимом), то сбор данных приостановиться до тех пор, пока состояние не сменится обратно. |
Файлы журнала |
В памяти панелиСохраняет выборку данных каждые 10 секунд. Можно использовать системный регистр [LB-9034] для немедленного сохранения данных. Смотрите подробности по ограничению использования LB-9034 в примечании ниже. На SD-карте/ USB-дискеСохраняет выборку данных на определенное внешнее устройство. Каждый файл содержит все записи дняКаждый файл будет содержит все записи за день. Файл опрашиваемых данных будет сохранен в специальной папке ежедневно с именем файла yyyymmdd.dtl, с указанием даты сохранения файла. Имя папкиОпределяет название файла, которое должно состоять из символов ASCII. Ограничить историюОпределяет количество хранимых файлов. В это ограничение не входит текущий файл .dtl. |
Настриваемая обработка файла |
Эта опция используется для настройки имен папки и названий файлов. |
Примечания
-
В выборке данных могут содержаться записи различных типов. За один раз система получает сразу всю запись, состоящую из различных типов данных. Например, если задано три типа данных общей длиной в четыре слова, то система за раз будет получать данные с назначенного адреса из 4-х слов. Полученные данные станут одной записью в выборке.
-
При использовании [Каждый файл содержит все записи дня] и установке [Ограничить историю] в два файла, будут сохраяться данные за вчерашний день и позавчерашний. Данные вне этого периода будут удалены, чтобы избежать переполнения памяти.
-
При использовании [Настраиваемая обработка файла] и установке [Ограничить историю] в два файла, будет сохранен не только созданный в настоящий момент файл, но и еще два предыдущих файла (всего три файла). Остальные данные будут удалены, чтобы избежать переполнения памяти.
-
При имитации работы на ПК, вся выборка данных сохраняется в папке: C:EBPro[Storage Location]datalog. Если изменить формат данных выборки, необходимо удалить предыдущие записи данных в директории установки для освобождения системы от старых записей.
-
При сохранении файлдов на USB-диске или SD-карте, объем папки формата FAT32 зависит от длины имен файлов. Чем длиннее имена, тем меньшее количество файлов может храниться.
-
При использовании немедленного сохранения данных [LB-9034], минимальный временной промежуток между сохранениями две секунды.
Настройка выборки данных для панелей серии cMT
Настройки панелей серии cMT во многом схожи с настройками серий eMT, iE, XE, mTV, iP. Далее описываются только те, которые отличаются.
Настройка | Описание | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Запись данных | Данные различных форматов могут сохраняться в регистрах, расположенных последовательно. | ||||||||||||||||||||||||||||||
Управление |
Устанавливается адрес регистра, в который можно посылать следующие команды:
|
||||||||||||||||||||||||||||||
Включить адрес состояния |
Когда используется адрес управления LW-n, то следующие четыре адреса после LW-n (LW-n+1~LW-n+4) могут использоваться для отслеживания статуса и ошибок. Названия статусов указаны в диалоговом окне настроек.
|
||||||||||||||||||||||||||||||
Файл журнала |
Исторические данные могут сохраняться на USB-диск, SD-карту или в базу данных. Когда количество записей достигает 10000 и выбрана опция [память HMI (ограничено 10000)], то записи автоматически сохраняются на выбранное устройство, а самые ранние 1000 записей удаляются. Когда выбрана опция [Память панели (до полного объема)], система продолжит сохранение данных до полного заполнения памяти, без удаления ранних записей. В этом случае данные не синхронизируются с базой данных. Чтобы сохранить данные в базу данных, настройте IP адрес сервера БД. |
||||||||||||||||||||||||||||||
Настраиваемая обработка файла |
Эта опция используется для настройки имен папки и названий файлов (*db).
Про процесс настройки имен файлом смотрите в п.8.3.2 НастраиваемаяCustomized File Handling”. |
||||||||||||||||||||||||||||||
Control address
Entering a value in the control address sends the corresponding command.
Status & Error address
When LW-n is used as the control address, the four consecutive addresses following LW-n (LW-n+1~LW-n+4) will show status and error, please see the prompt in the settings dialog box.
History files History data can be saved to USB disk, SD card, and
Database Server. When the sampled data reaches 10000 records, and [Save to HMI memory (10000 limited)] is selected, the sampled data is automatically saved to the selected external device, and the earliest 1000 records are deleted. When [Save to HMI memory (until space full)] is selected, the system will keep on saving data to HMI memory without clearing the earlier racords. In this case, the data will not be synchronized to Database. To save data in Database Server, please set the computer’s IP address.
See synchronization rules in “8.4 Synchronizing cMT
Cutomized file handling
Auto sync. periodically
All record in one file Customized file handling
Viewer data and Saving to External Device”.
See Database Server usage in “13.44 Database Server”.
Data will be automatically synchronized to the designated
external device in the specified time interval, regardless of the rules explained above. Please note that the timer will reset when a control address is used.
See “8.4 Synchronizing cMT Viewer data and Saving to External Device or Database Server”.
When Sync. Destination is USB disk / SD card, the
preservation limit is 1 to 65535 days.
When Sync. Destination is USB disk / SD card, the preservation limit is 1 to 65535 files.
When Sync. Destination is HMI memory, the preservation limit is 1 to 1000 files.
History source Data can be read from USB disk, SD card, or Database.
-
This feature depends on the arrangement of different objects and modes. (Set [Max. data records] to n.)
Object [Auto. stop] not selected [Auto. stop] selected
Trend Display- Real time
Deletes the earlier records and displays the latest number of records
(n) in Trend Display. See
Stops after reaching the specified number of data records (n).
the following figure.
Trend Display- Historical History Data Display
Keeps on sampling data and displays all history data in Trend Display.
Keeps on sampling data and displays all history data in History Data
Stops after reaching the specified number of data records (n).
Stops after reaching the specified number of data records (n).
Display.
Data Sampling Keeps on sampling new
data.
Stops after reaching the specified number of
data records (n).
The figure illustrates how the data is sampled in Trend Display – Real Time mode when [Auto. stop check] box is not selected. Set the number of data records to 10, when the 11th data is generated, the earliest record is deleted and the newest record is added.
-
Customized File Handling
This feature can be used to customize naming and management of data sampling files (*.dtl,
*db).
Setting Description
File creation Automatic mode
A new file will be created when the name of an existing file is changed.
Trigger mode
A new file will be created according to the [Trigger method] settings.
Trigger method Limit by number of data records
A new file will be created when the number of data sampling records reaches the specified "Max. data records in a file"
Register status
A new file will be created when the status of a designated bit address meets the specified condition. The condition is specified in Mode field.
Set ON/OFF after triggered
If selected, after the new file is created, the system will set the designated bit address back to ON/OFF state.
File name The file name can be an alphanumeric name, and certain half-width symbols are allowed. The file name can also be specified by a file name syntax.
Dynamic format
The file names can be set by a designated word address, or by a file name syntax indicating the current system time. The file name syntax can be specified by selecting time buttons or entering the syntax in Format field. The length limit is from 1 to 25.
The following half-width characters are not allowed:
/ : * ? “ < > |
Note
-
If both [Limit by number of data records] and [Dynamic format] check boxes are selected, before startup HMI, please enter the name in the designated register for Dynamic Format, otherwise, it is impossible the reach the “Max. data records in a file”, and the data sampling file will not be generated.
-
When a new file is generated, the systm will first detect if the filename already exists. If the file name does exist, the newly sampled data will be appended to the existing file.
-
Synchronizing cMT Viewer data and Saving to External Device or Database
History data in external device Real-time data
For other series, when displaying the sampled data in Trend Display object, it is necessary to select from Real-time mode or History mode and the two modes cannot simultaneously be displayed in one object.
cMT Series allows displaying history data and at the same time updates real-time data in one Trend Display or History Data Display object. The data saved in the external device can be updated.
The rule of synchronizing the data saved in the external device:
-
When the sampled data reaches 10000 records, HMI will automatically save data to the external device and deletes the earliest 1000 records in HMI.
-
If the external device is removed from HMI, and inserted back again at the time when the sampled data is under 9000 records, the data generated during the time the external device is removed is saved in HMI and is not cleared. If the data exceeds 9000 records during the time the external device is removed, the earlier data is cleared and cannot be synchronized even to insert the external device back to the HMI.
-
If there already exists sampled data in the external device, the new data is appended without overwriting the original data each time in synchronization.
-
-
Checking History Data of a Specific Date / File on cMT Viewer.
To check the history data, see the following steps (Use Trend Display object as example).
-
Tap the
icon in the upper-right corner of the Trend Display object.
-
The following dialog box appears.
-
Specify the date or the file.
-
Tap [Done] button to finish setting.
-