You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于Wonderware Historian Server中*.bin(Late Data文件)的结构及解析未知字节组含义的技术咨询

Hey there, let's tackle your questions about Wonderware Historian's Late Data *.bin files step by step:

1. Structure of Wonderware Historian Late Data *.bin Files

First off, these bin files are designed to store "late-arriving" data that missed the regular Historian archive window—think data from devices that had temporary connectivity issues or sync delays. While Wonderware doesn't fully document the exact binary structure publicly, the community has reverse-engineered the core layout over time:

  • File Header: A fixed-size opening section (usually 32-64 bytes) that acts as a signature for the file type. It typically includes:
    • A magic number (unique byte sequence to confirm it's a Late Data bin)
    • Historian server version that generated the file
    • UTC timestamp when the file was created
    • Total number of data records contained in the file
  • Data Records Section: The bulk of the file, made up of sequential, fixed or variable-length records (depending on your Historian version). Each record represents a single data point for a tag, and includes:
    • Tag ID (4-8 bytes, unique identifier linking to the Historian tag database)
    • Data timestamp (8 bytes, usually UTC or server-local time—check your server settings)
    • Data type flag (1-2 bytes, e.g., 0x04 for float, 0x02 for integer, 0x0B for string)
    • Quality code (1 byte, standard OPC quality values: 0xC0 = good, 0x80 = bad, etc.)
    • Raw data value (variable length based on data type—e.g., 4 bytes for float, variable bytes for strings)
  • File Footer: A small trailing section, often containing a checksum (4 bytes) to verify the file hasn't been corrupted, plus an end-of-file marker.
2. Speculating on the Unknown Byte Groups (Red Circles)

Since I can't see your annotated image, I'll go through the most common unknown fields that pop up when parsing these files, based on real-world troubleshooting:

  • Extended Quality Code: Some newer Historian versions add 1-2 extra bytes after the standard 1-byte quality code. These capture granular status details—like whether the data was interpolated, came from a manual override, or had a specific communication error (e.g., timeout vs. bad CRC).
  • Record Type Flag: A 1-byte marker that tells you what kind of data this record is: raw collected data, interpolated fill data, restored archive data, or even a tag configuration snapshot.
  • Timestamp Precision Bytes: If your Historian is configured for high-precision time tracking, you might see 1-2 extra bytes after the main 8-byte timestamp to store microsecond-level precision (the main timestamp usually only goes to milliseconds).
  • Alignment Padding: Binary files often pad records to align with 4-byte or 8-byte memory boundaries. These are just null bytes (0x00) with no functional meaning—they're just there to keep the file structure consistent.
  • Tag Metadata Hash: Rarely, a 4-byte hash of the tag's current configuration (like scan rate or engineering units) is included to flag if the tag's settings changed around the time of the data point.

If you can share more context—like where these bytes sit relative to the fields you've already parsed (e.g., right after the data value, or between timestamp and data type) and their byte length—I can narrow this down further.

内容的提问来源于stack exchange,提问作者Mikhail Kolmykov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 06:51:47