2 Getting Started - first steps for operating this module
2.2 Getting Started
12
XI/ON: XNE-2CNT-2PWM
04/2011 MN05002035Z-EN
www.eaton.com
2.2
Getting Started
2.2.1
Count function
The following section describes the general procedure to read the count value of counter
CNT1
of XNE-2CNT-2PWM.
Prerequisites / start conditions
The default settings of the module parameters allow immediate access to the module's count
value.
• Parameterization:
mode CNT1 = 0000 = pulse/direction, single sample
(Parameter data of the module (page 25)).
The signals on input A1 are counted, the count direction is defined via signal B1.
Z1 can be used as a HW gate (
→
see below).
• Mapping of the count value into the process data:
The count value is mapped into the process data (Process input / check-back interface
(page 28)):
ADR AUX REG1 RD DATA = 0×20
→
0×20 = register no. of REG_CNT1_CNT (actual count value of CNT1)
→
see also
→
The count value is mapped into bytes 12 to 15 of the process data (
→
see also Process
input / check-back interface (page 28)).
Current count value
Process input / check-back interface (page 28), byte 12 to byte 15:
AUX_REG1_RD_DATA, Byte 0,
to
AUX_REG1_RD_DATA, Byte 3 contain the current count value of
CNT1
Enable
The counter function unit of the CNT-inputs is generally enabled per
default setting
.
→
see Process output / control interface byte 0, bit 0, page 32).
The function unit can be generally disabled by setting
CNT1_ GENERAL_ DISABLE = 1.
The general enabling of the counter function unit is displayed via
STS_CNT1_ GENERAL_ EN = 1.
(
→
see Process input / check-back interface byte 0, bit 0, page 28).
1
If the counter has to count from a defined start value, this value has to be written into the
load value register REG_CNT1_LOADVAL (
→
see Internal registers - reading and writing
2
A state change from 0
→
1 in control bit CNT1_ SW_LR of the process output / control inter-
face executes a Latch Retrigger which is necessary to transfer the load value.
3
An executed Latch Retrigger is confirmed in the process input / check-back interface with
MSG_CNT1_SW_LR = 1.
4
The load value (REG_CNTx_LOADVAL) is transferred into the register for the current count
value CNT1 REG_CNTx_CNT (
→
see also Register interface (page 91)).
Содержание XNE-2CNT-2PWM
Страница 1: ...04 2011 MN05002035Z EN User Manual XI ON XNE 2CNT 2PWM Technology Module...
Страница 10: ...1 About this manual 1 3 Overview 10 XI ON XNE 2CNT 2PWM 04 2011 MN05002035Z EN www eaton com...
Страница 84: ...7 Report of configuration errors 7 1 Error register 84 XI ON XNE 2CNT 2PWM 04 2011 MN05002035Z EN www eaton com...