Measurement Files¶
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“ |
The WAV files will be stored in an uncompressed ZIP file at the destination path of CMS_IO_MEASMNT_CTRL. The name of the WAV files is given by the Function Module and is corresponds directly with the analog channel and encoder configuration. For every encoder synchronized shannel with different sample rate, there will be a new encoder track which will be used for synchronization.
Example
Encoder is configured as:
Channel 0: Sample rate 50 kHz, synchronized encoder file
Channel 1:Sample rate 12,5 kHz, synchronized encoder file
Channel 2:Sample rate 6,25 kHz, synchronized encoder file
Result: The ZIP file contains the WAV files: CH00_ENA.wav, CH01_ENB.wav, CH02_ENC.wav, Enc_A.wav, Enc_B.wav, Enc_C.wav
Example
Encoder is configured as:
Channel 0: Sample rate 50 kHz, synchronized encoder file
Channel 1:Sample rate 50 kHz, synchronized encoder file
Channel 2:Sample rate 6,25 kHz, synchronized encoder file
Result: The ZIP file contains the WAV files: CH00_ENA.wav, CH01_ENA.wav, CH02_ENB.wav, Enc_A.wav, Enc_B.wav
Note
The encoder/counter value at the output of the function block will reset when configuration data of the Function Module will be written in IEC 61131-3 editor.