5
Setting parameters
Festo – GDCP-CMMP-M3/-M0-C-CO-EN – 1510b – English
137
5.15
Sampling of Positions
Overview
The CMMP family offers the possibility to save the actual position value on the rising or falling edge of a
digital input. This position value can then be read out for calculation within a controller, for example.
All necessary objects are summarised in the record sample_data: The object sample_mode establishes
the type of sampling: whether only a one-time sample event should be recorded or continuous
sampling take place. Through the object sample_status, the controller can query whether a sample
event has occurred. This is signaled by a set bit, which can also be displayed in the status word if the
object sample_status_mask is set correspondingly.
The object sample_control controls enabling of the sample event, and the stamped positions can ulti
mately be read via the objects sample_position_rising_edge and sample_position_falling_edge.
Which digital input is used can be established with the parametrisation software under Controller –
I/O configuration – Digital inputs – Sample input.
Description of the objects
Objects treated in this chapter
Index
Object
Name
Type
Attr.
204A
h
RECORD
sample_data
ro
204A
h
_01
h
VAR
sample_mode
UINT16
rw
204A
h
_02
h
VAR
sample_status
UINT8
ro
204A
h
_03
h
VAR
sample_status_mask
UINT8
rw
204A
h
_04
h
VAR
sample_control
UINT8
wo
204A
h
_05
h
VAR
sample_position_rising_edge
INT32
ro
204A
h
_06
h
VAR
sample_position_falling_edge
INT32
ro
Object 204A
h
: sample_data
Index
204A
h
Name
sample_data
Object Code
RECORD
No. of Elements
6
The following object can be used to select whether the position should be determined for each occur
rence of a sample event (continuous sampling) or sampling should be blocked after a sample event
until sampling is approved again. Observe that even just one bounce can trigger both edges!