Edge Detection - BR-Automation X20CP1301 Manual

Table of Contents

Advertisement

16.4.2 Edge detection

Digital inputs 11 to 14 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. 2 units are available. A master and a slave edge
can be configured for each unit. At each master edge, the timestamp of the master edge and the differential time
to the previous slave edge (if present) are logged. A "Master count" can always be utilized 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.
The combination of rising/falling edges of each channel can be used to configure the following functions for each
unit:
Function
Edge time
Period duration
Gate time
Time offset
16.4.2.1 Edge detection unit - Mode settings
The edge detection unit needs to be configured according to the desired function.
Function
Basic timestamp, master edge mode
Timestamp and/or differential time, master and
slave edge mode
Name:
X2CfO_EdgeDetectUnit01Mode
X2CfO_EdgeDetectUnit02Mode
These registers are used to configure the mode of the basic function for either just the master edge or both master
and slave edges.
Data type
USINT
16.4.2.2 Edge detection unit - Selection of master edge
Name:
X2CfO_EdgeDetectUnit01Master
X2CfO_EdgeDetectUnit02Master
These registers are used to select the source of the master edge for the respective unit. Either the rising or falling
edge of one of the 4 high-speed digital input channels can be selected. Only one edge can be selected for each unit.
Data type
USINT
Data sheet V1.21
Description
Measure an edge time
Measure the master and differential time
Measure the master and differential time
Measure the master and differential time of edges on different channels
Description
The current system time is saved as the master time at the time of the edge.
The slave edge starts the measurement and the system time is saved temporarily. When the master edge occurs,
the current system time is saved as the master time and the difference between the master and slave edges
is calculated.
Value
Information
0x00
Edge detection disabled on Unit0x: Time measurement not possible
0x80
Edge detection enabled on Unit0x:
Reaction only possible for master edge, no differential measurement possible
0xC0
Edge detection enabled on Unit0x:
Reaction possible for configured master and slave edges
Value
Information
0
Digital input channel 11: Rising edge
2
Digital input channel 12: Rising edge
4
Digital input channel 13: Rising edge
6
Digital input channel 14: Rising edge
1
Digital input channel 11: Falling edge
3
Digital input channel 12: Falling edge
5
Digital input channel 13: Falling edge
7
Digital input channel 14: Falling edge
X20(c)CP1301, X20CP1381 and X20CP1382
43

Advertisement

Table of Contents
loading

Related Products for BR-Automation X20CP1301

This manual is also suitable for:

X20ccp1301X20cp1381X20cp1382

Table of Contents