Configuration Data. Allen-Bradley 1734 IJ, 1734 IK
Werbung
Werbung
3-4 Encoder/Counter Module Input and Output Data
Zero frequency Detected (ZD) - This bit is operational when frequency configurations are programmed (configurations: period/rate
[5], rate measurement [7]).
In period/rate [5] configuration, counts are acquired during the ON state of the Z input. At very low frequencies the counter saturates, indicating a zero frequency detect. The time it takes to determine a zero frequency in these two configurations can be as long as 6.7 seconds ( 16,777,216 counts x 1/5MHz x 2 half cycles of Z ).
In rate measurement [7] configuration pulses on the A input are counted over a sample interval specified by the time base.
The time it takes to determine a zero frequency in this configuration will be determined by the sample interval (ex: time base = 0.300 second
∴
300 milliseconds to determine ZF).
Configuration Data
The following represents the configuration data used by the
1734-VHSC24 module.
Parameter
1
2
3
6
7
4
5
8
9
10
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Set/Get
Configuration Information
Counter Configuration
Filter Selection
Decimal Position
Reserved
Time Base
Gate Interval
Scalar
Rollover Value
Preset Value
Counter Control SS Value
Size (bytes)
1
1
1
1
1
1
2
4
4
1
Publication 1734-UM006A-EN-P - August 2000
Encoder/Counter Module Input and Output Data 3-5
Counter Configuration (Configuration Word 1)
Use this byte to select the type of counter desired.
0
1
07 06 05 04 03 02 01 00
ZI MD
0 0
CF Counter 0
0 0 Counter
0 0
0 0
0 0
0 1
0
1
1
0
1
0
1
0
Encoder X1
Encoder X2
Reserved
Encoder X4
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
0
1
0
1
0
1
0
1
0 1
0 1
0 1
0
1
1
1
0
1
Period/Rate
Reserved
Rate Measurement
Store Count Disabled
Mode 1 - store/continue
Mode 2 - store/wait/resume
Mode 3 - store, reset/wait/start
Mode 4 - store, reset/start
Reserved
Reserved
Reserved
Z input - 0 = not inverted
Z input - 1 = inverted
Filter Selection (Configuration Word 2
This byte sets the A/B/Z input filters
Filter Selection
07 06 05 04 03 02 01 00
0 ZF BF AF FS
0 0 0 0 No Filter
0 0 0 1 50kHz (10
µ s + 0
µ s/-1.6
µ s)
0 0 1 0 5kHz (100
µ s + 0
µ s/-13.2
µ s)
0 1 0 0 500Hz (1.0ms + 0
µ s/-125
µ s)
1 0 0 0 50Hz (10ms + 0ms/-1.25ms)
0
1
0
1
A input not filtered
A input filtered
B input not filtered
B input filtered
0
1
Z input not filtered
Z input filtered
Publication 1734-UM006A-EN-P - August 2000
3-6 Encoder/Counter Module Input and Output Data
Decimal Position (Configuration Word 3)
This byte changes the significant digits of the frequency or counter display.
In the frequency modes (period/rate [5], rate measurement [7]) for example, a -2 will move the decimal point left 2 places, dividing the frequency value by 100, a +1 moves it right, multiplying by 10. The firmware checks for placement to be in the range -4
≤
value
≤
+2. A value outside the range will move the decimal point to the zero position and assert the programming error (PE) bit. Moving the decimal point to the left (i.e. negative), allows high frequencies, commonly present in rate measurement mode, to fit within a single 16 bit word. Moving the decimal point to the right (i.e. positive), allows low frequencies, commonly present in period and continuous rate modes, to have resolution displayed to 0.1Hz and 0.01Hz. Frequencies should be kept below 3.2kHz for 0.1Hz resolution and below 320Hz for 0.01Hz. Scalars of Z/128, Z/64, Z/32 and Z/16 should not be used when positioning is applied. 0 is the default setting.
In the counter modes (counter [0], x1 encoder [1], x2 encoder [2], x4
encoder [4]), it attenuates the counter display, for example, 20 divides count+1 by 20. The value may be in the range 0 < value
≤
255. The result of requesting a number other than 1 performs the function:
(COUNT + 1)/ATTENUATION. This is useful for scaling a large counter value to a smaller 16 bit value or a percentage. 1 is the default setting and zero reverts to 1 to prevent a divide by zero.
Word 4 is reserved.
Time Base and Gate Interval (Configuration Words 5 and 6)
The gate interval byte sets the counter’s gate intervall using the time base setting (16-bit word 5) as its time unit. (i.e. its resolution is determined by the time base). The actual gate interval is the product of the time base and the gate interval (ex: 50ms gate interval may be produced with a time base of 10 and a gate interval of 5 or a time base of 50 and a gate interval of 1). The maximum value of the product of time base x gate interval is 3 seconds. The gate interval must be entered when rate measurement [7] configurations are used.
The maximum value is 200.
Publication 1734-UM006A-EN-P - August 2000
Encoder/Counter Module Input and Output Data 3-7
Scalar (Configuration Word 7)
This bytel scales the Z signal in the period/rate [5] configuration. If the filter is applied, then the filtered Z is scaled. Only one bit of the scalar should be set. Selecting a scalar will cause accumulated counts to be adjusted accordingly (i.e. selecting a scalar of 128 will increase the accumulated count by 128 after 128 Z pulses have been received). It
is highly recommended that anytime Z is scaled (divide by 2, 4,
8, etc), the Z input should be filtered, otherwise, noise could cause erroneous frequency readings.
Scalar Selection
07 06 05 04 03 02 01 00
Scalar
1
0 0 0 0 0 0 0 1 Z - F min
= 0.149Hz
0 0 0 0 0 0 1 0 Z/2 - F min
= 0.298Hz
0 0 0 0 0 1 0 0 Z/4 - F min
= 0.596Hz
0 0 0 0 1 0 0 0 Z/8 - F min
= 1.192Hz
0 0 0 1 0 0 0 0 Z/16 - F min
= 2.384Hz
0 0 1 0 0 0 0 0 Z/32 - F min
= 4.768Hz
0 1 0 0 0 0 0 0 Z/64 - F min
= 9.537Hz
1 0 0 0 0 0 0 0 Z/128 - F min
= 19.073Hz
1 Where F min
indicates the frequency at which the zero frequency detect is asserted
due to counter overflow.
Rollover (Configuration Word 8)
This long word sets the number of counts the counter will accumulate before rolling over. For example, a value of 1000 will produce a count sequence of: 998, 999, 0, 1, 2
…
while incrementing or 2, 1, 0, 999, 998
…
while decrementing. Rollover is a 32 bit number with a useable range of 1
≤
value
≤
0x01000000 (16,777,216). In count
[0], x1 encoder [1], x2 encoder [2] and x4 encoder [4] configurations, it should be specified to some non-zero value; and in period/rate [5], and rate measurement [7] configurations is a ‘don’t care’.
Preset (Configuration Word 9)
This long word sets the preset value the counter will be loaded with, when a Counter Preset, CP, command is issued. Preset is a 32 bit number with a range of 0
≤
value
≤
0x00FFFFFF (16,777,215).
Publication 1734-UM006A-EN-P - August 2000
Herunterladen
Werbung