CAN-8123/CAN-8223/CAN-8423 user’s manual (Revision 3.00, May/22/2009) ------
179
Owing to the configuration of object index 0x3000 to 0x3007, you may
parameterize the counter modules. The object index 0x3000 records the counter
value of each channel. Each sub-index is corresponding to each channel. Users can
use object index 0x2004~2007 to decide the counting method. Please refer to the
appendix A for more detail information. If users select Dir/Pulse, Up/Down or AB
phase counting, the counter value may be negative value. Therefore, users need to
transfer the UNSIGNED 32 to SIGNED32 by themselves. Object index 0x3001
records the overflow times of object index 0x3000. Therefore, the total counter value
of one channel is the combination of the value of object index 0x3000 and 0x3001.
For example, if users select Dir/Pulse, Up/Down or AB phase counting, there are two
situations. If the object index 0x3000 with sub-index 1 is 16384 and the object index
0x3001 with sub-index 1 is 1, the total counter is 1*0x816384=2147500032.
If the object index 0x3000 with sub-index 1 is -8192 and the object index 0x3001 with
sub-index 1 is -1, the total counter is (-1)*0x80000000-8192=-2147491840. If users
select Frequency or Up counting, there is only one situation. If the object index
0x3000 with sub-index 1 is 16384 and the object index 0x3001 with sub-index 1 is 1,
the total counter is 1*0x1016384=4294983680. Take a note that the
Frequency counting always has no overflow value.
The object index 0x3002 can help users to clear the counter value. Write this
object to 0 once will clear the counter value store in object index 0x3000 and 0x3001.
The object index 0x3003 can set the count mode to high active with value 1 or low
active with value 0. The object index 0x3004 is used to set the frequency mode of
counter module. Value 0 is auto mode, value 1 is low frequency and value 2 is high
frequency. These three frequency modes are decided by the object “update time of
frequency” with index 0x3005.
If users want to set the update time of frequency
measurement, use object 0x3005 to reach this purpose. The object index 0x3006
decide if users want to use low-pass filter or not, set the value 1 to enable the
low-pass filter, or value 0 to disable the low-pass filter. The object index 0x3007 is
used to set the pulse width which will be used in the low-pass filter. If the pulse width
of the signal is less than this value, this signal will be taken into account.