Export to svb
The TwinCAT Scope also supports the export of data to a binary format specified by Beckhoff. The file extension of the created file is svb. The following parameters can be set:
The header can be shown and hidden and also moved to its own file. You can choose whether to export the values in scaled or unscaled form, with and without sampling rate/time information.
Format description for developers
The binary data format is based on the text format but contains no separators. Instead the byte lengths of all variable data types (such as character strings) are contained in the corresponding headers. All times are specified in the file time format: 1 tick = 100 ns; origin is 1.1.1601 0h. All characters are stored in UTF8.
Variable | Size (Bytes) or Number of character | DataType |
MAIN-HEADER | ||
HeaderSize | 8 | Int64 |
NameSize | 4 | Int32 |
Name | NameSize | Array of Char |
StartTime | 8 | Int64 |
EndTime | 8 | Int64 |
ChannelCount | 4 | Int32 |
|
|
|
Variable | Size (Bytes) | DataType |
Channel - Header #1 | ||
ChannelHeaderSize | 8 | Int64 |
NameSize | 4 | Int32 |
Name | NameSize | Array of Char |
NetIdSize | 4 | Int32 |
NetId | NetIdSize | Array of Char |
Port | 4 | Int32 |
Sample Time | 8 | Int64 |
SymbolBased | 1 | bool (as byte) |
SymoblNameSize | 4 | Int32 |
Symbol name: | SymbolNameSize | Array of Char |
CommentSize | 4 | Int32 |
Comment | CommentSize | Array of Char |
IndexGroup | 8 | Int64 |
IndexOffset | 8 | Int64 |
DataTypeSize | 4 | Int32 |
DataType | DataTypeSize | Array of Char |
DataTypeId | 4 | Int32 |
VariableSize | 4 | Int32 |
Samples in File | 8 | Int64 |
Data in File | 8 | Int64 |
File-StartPosition | 8 | Int64 |
Offset | 8 | Real64 |
Scalefactor | 8 | Real64 |
Bitmask | 8 | Int64 |
Channel-Header #2 | ||
... | ||
Channel-Header #MainHeader.ChannelCount | ||
|
|
|
Variable | Size (Bytes) | DataType |
Data Channel #1 | ||
DataPoint #1 | ||
Timestamp | 4 | UInt32 |
Value | ChannelHeader1.VariableSize | ChannelHeader.DataType |
DataPoint #2 | ||
... | ||
DataPoint ChannelHeader #1.Samples In File | ||
Data Channel #2 | ||
... | ||
Data Channel #MainHeader.ChannelCount |