
26
ATIM_ACW-MR4_UG_EN_V1.5
For each channel, a header is inserted afterwards and is constituted as follows:
Channel header
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Reserved
= 0
Numbers of channel
Type of measurement
In the case of ACW-MR4,
the measurement type
can be worth
0x01
for the state of the inputs or
0x04
for the value
of a counter. The state of the four inputs of the MR4 is on 1 byte, the value of a counter on 4 bytes (
Little Endian
encoding, LSB first.
In the case of input status measurement, the channel number will always be 0. In the case of a counter value, the
channel 1 will correspond to the counter number (see the table below).
Type of measurement
Units
Data size
Data type
Descriptions
0x01
Bit
1 byte
Bit field
Status of 4 inputs (on the first 4
bits of the byte: Bit 0 -> IN1 / bit 1
-> IN2 / bit 2 -> IN3 / bit 3 -> IN4)
0x04
Pulse
4 bytes (Big Endian)
Unsigned integer
Counter value
Then follow the data of the measurement sample (s) (depending on the configuration of the product).
NOTE
When the frame contains several samples (number of samplings > 1 or depth history > 1), the samples are sorted
from the latest to the oldest.
The number of bytes sent can be determined as follows:
(Size in bytes of the measure) * (number of samplings) * (depth history)
EXAMPLE
For a frame containing the state of 8 inputs (measure 0x01 on 1 byte) with a history depth of 1 and number of
samples of 3, we are left with 3 bytes of data (1x1x3).
Specific case: In and out configured in Edge mode
When at least one of the inputs is configured in change of state detection, the ACW-MR4 emits a measurement frame
immediately after each change of state on this input (based on the type of detection selected during configuration).
This measurement frame only contains the measurement type 0x01, even if some inputs have been configured as
counting.