WAV File Format¶
The wave audio file format or commonly known as the WAV files are the type of audio files which was developed by Microsoft and IBM. It stores the data in the structured format in the dedicated memory area called as chunks.
The measurement data will be stored in the WAV file format. One WAV file will be created for each active channel.
Data type | Endian | Length | File offset | Identifier | Value |
---|---|---|---|---|---|
BYTE[4] | Big | 4 | 0 (0x00) | bfChunkID | “RIFX” |
DWORD | Little | 4 | 4 (0x04) | dwChunkSize | Data length - 8 |
BYTE[4] | Big | 4 | 8 (0x08) | bfRiffType | “WAVE” |
Data type | Endian | Length | File offset | Identifier | Value |
---|---|---|---|---|---|
BYTE[4] | Big | 4 | 12 (0x0C) | bfChunkID | “fmt” |
DWORD | Little | 4 | 16 (0x10) | dwChunkSize | Data length - 8 |
INT | Little | 2 | 18 (0x12) | wFormatTag | 0x0001 (PCM) |
INT | Little | 2 | 20 (0x14) | wChannels | 0x0001 (1 ch.) |
DWORD | Little | 4 | 24 (0x18) | dwSamplesPerSec | 100 Hz - 50.000 kHz |
DWORD | Little | 4 | 28 (0x1C) | dwBytesPerSec | Sample rate * block align |
WORD | Little | 2 | 32 (0x1E) | wBlockAlign | 4 byte |
WORD | Little | 2 | 34 (0x20) | wBitsPerSample | 32 bit |
Data type | Endian | Length | File offset | Identifier | Value |
---|---|---|---|---|---|
BYTE[4] | Big | 4 | 36 (0x24) | bfChunkID | “data” |
DWORD | Little | 4 | 40 (0x28) | dwChunkSize | Data length - 8 |
BYTE[] | Big | Undefined | 44 (0x2C) | bfData | Measurement data |
Data type | Endian | Length | File offset | Identifier | Value |
---|---|---|---|---|---|
BYTE[4] | Big | 4 | 44+sz(bfData) | bfChunkID | “labl” |
DWORD | Little | 4 | 48+sz(bfData) | dwChunkSize | Data length -8 |
DINT | Little | 4 | 52+sz(bfData) | dwIdentifier | Identifier |
BYTE[256] | Little | 255 | 56+sz(bfData) | bfText | „Label Text“ |
Use of the WAV file
The unique and structured architecture is of a great help in the condition monitoring systems (CMS). The CMS monitors the stability of the mechanical system. The vibration data of the machine/system can be recorded using the sensors. These sensors will convert the physical data into the analog inputs to the CPU and its modules. These data is stored in the WAV file structure and can be re-read for the analysis purpose using the mathematical tools.
Main Purpose of the WAV file
The main purpose of the WAV files is to do the analysis in the CMS. For this purpose the WAV File Library is developed. This would help the user to perform the READ/WRITE operations on the WAV file using the AC500 PLC and its programming tool.