Workpiece measurement (Index 0x7000:07)

Workpieces or the distances between workpieces can be measured, calculated and evaluated with the aid of the function Workpiece measurement.

A 32-bit filter value [Number of increments] can be defined in Latch filter value (index 0x8000:1B) for reliable distinction between a signal relevant for the measurement and production-related signal interference.

Six different modes are available for the measurement. The measurement mode is defined in Measurement mode (index 0x8000:1C).

Measurement sequence

The workpiece measurement function is activated by setting the Enable measurement bit (index 0x7000:07) to TRUE.

Workpiece measurement (Index 0x7000:07) 1:

No simultaneous activation of the functions Workpiece measurement and Compare function

The simultaneous activation of the functions Workpiece measurement (Enable measurement index: 0x7000:07) and Compare function (Enable output functions index: 0x7000:06) is not possible.

The sequence of measurement for the different measurement modes is described below.

For the time, see following Fig.

HIGH- and LOW-level are detected

Measurement mode:
0: with up counter
1: with down counter

HIGH-level is detected

Measurement mode:
2: with up counter
3: with down counter

LOW-level is detected

Measurement mode:
4: with up counter
5: with down counter

t1

Start of the measurement,
start of the filter

Start of the measurement,
start of the filter

-

t2

The counter value from t1 is written into Latch value, rising edge (index 0x6000:17).

The counter value from t1 is written into Latch value, rising edge (index 0x6000:17).
End of the measurement
The Measurement done bit is set.

-

t3

Start of the filter

-

Start of the measurement,
Start of the filter

t4

The counter value from t3 is written into Latch value, falling edge (index 0x6000:18).
End of measurement
The Measurement done bit is set.

-

The counter value from t3 is written into Latch value, falling edge (index 0x6000:18).
End of the measurement
The Measurement done bit is set.

Workpiece measurement (Index 0x7000:07) 2:
Graphical illustration of the measurement

Left
A: Measurement active in measurement mode 0 and 1
D: Measurement inactive

Right
B: Measurement active in measurement mode 2 and 3
C: Measurement active in measurement mode 4 and 5
D: Measurement inactive

Sequence in case of signal interference (fig. Graphical illustration of measurement in Mode 0 - signal interference)

t1: The measurement begins with a positive edge. The counter value is buffered.

t2: A new edge change takes place within the filter interval; the buffered value is discarded.

t3: When the next corresponding edge arrives, the new value is buffered.

t4: On expiry of the filter interval the counter value buffered at the time t3 is written into Latch value, rising edge (index 0x6000:17).

t5: The counter value is buffered on a falling edge.

t6: On expiry of the filter value the counter value buffered at the time t5 is written into Latch value, falling edge (index 0x6000:18).
The bit in Measurement done (index 0x6001:02) is set to TRUE.

Workpiece measurement (Index 0x7000:07) 3:
Graphical illustration of measurement in Mode 0 - signal interference

A: Measurement valid, B: Measurement inactive, C: Measurement invalid