X90 mobile modules
122
X90 mobile system User's manual V 1.20 - Translation of the original manual
5.2.2.12.6 Edge detection
Digital inputs 1 to 8 can be used for high-speed edge detection. This runs parallel to all other functions such as
counters, etc. This function does not use the digital input filter.
The edge detection function measures edges with µs precision. 8 edge detection units are available. A master and
a slave edge can be configured for each edge detection unit. At each master edge, the timestamp of the master
edge and the timestamp of the previous slave edge are logged. Data points "Master count" and "Slave count" can
always be used to determine how many edges have been detected since the last task class cycle. The timestamp
is based on the system time of the CPU.
5.2.2.12.6.1 Edge detection - Mode settings
Name:
cfgEdgeDetectModeUnit01 to cfgEdgeDetectModeUnit08
These registers configure the mode of the basic function for either just the master edge or both master and slave
edges.
Data type
Values
Information
0x00
Disabled
0x80
Reaction to master edge
USINT
0xC0
Reaction to master/slave edge
5.2.2.12.6.2 Edge detection - Counter
Name:
MasterCount01 to MasterCount08
SlaveCount01 to SlaveCount08
These registers hold the counter values of the detected master edges. The counter value is used to detect new
measurements.
Data type
Values
Information
DINT
-2,147,483,648
to 2,147,483,647
Number of detected master/slave edges
5.2.2.12.6.3 Edge detection - Selection of master edge
Name:
cfgEdgeDetectMasterUnit01 to cfgEdgeDetectMasterUnit08
These registers select the source of the master edge for the respective edge detection unit. Either the rising or
falling edge of one of the 8 high-speed digital input channels can be selected. Only one edge can be selected for
each edge detection unit.
Data type
Values
Information
0
Rising edge on channel 1
1
Falling edge on channel 1
2
Rising edge on channel 2
3
Falling edge on channel 2
...
...
14
Rising edge on channel 8
15
Falling edge on channel 8
USINT
255
Disabled