CM3 High-Speed Counter Module Buffer Memory
To write to buffer memory, use the TO instruction.
To read from buffer memory, use the FROM instruction.
Please refer to the table below for writing to and reading from buffer memory.
CM3-SP02HSC & CM3-SP02HSD Buffer Memory
| CM3-SP02HSC & CM3-SP02HSD Buffer Memory | ||||||||
|---|---|---|---|---|---|---|---|---|
| Memory Address | Details | Low Active | High Active | Initial Value | Read Write | |||
| Ch. 1 | Ch. 2 | |||||||
| Hex. | Dec. | Hex. | Dec. | |||||
| 00H | 0 | 20H | 32 | Currently Counted Value | ✓ | - | 0 | R |
| 01H | 1 | 21H | 33 | - | ✓ | |||
| 02H | 2 | 22H | 34 | Overflow Detected Flag | - | - | 0 | R |
| 03H | 3 | 23H | 35 | Sampling-Counted or Periodic Pulse-Counted Flag | - | - | 0 | R |
| 04H | 4 | 24H | 36 | Latch-Counted Value | ✓ | - | 0 | R |
| 05H | 5 | 25H | 37 | - | ✓ | |||
| 06H | 6 | 26H | 38 | Sampling-Counted Value | ✓ | - | 0 | R |
| 07H | 7 | 27H | 39 | - | ✓ | |||
| 08H | 8 | 28H | 40 | Previous Periodic Pulse-Counted Values | ✓ | - | 0 | R |
| 09H | 9 | 29H | 41 | - | ✓ | |||
| 0AH | 10 | 2AH | 42 | Current Periodic Pulse-Counted Values | ✓ | - | 0 | R |
| 0BH | 11 | 2BH | 43 | - | ✓ | |||
| 0CH | 12 | 2CH | 44 | Reserved | - | - | - | - |
| 0DH | 13 | 2DH | 45 | - | - | - | - | |
| 0EH | 14 | 2EH | 46 | - | - | - | - | |
| 0FH | 15 | 2FH | 47 | - | - | - | - | |
| 10H | 16 | 30H | 48 | Preset Value | ✓ | - | 0 | R/W |
| 11H | 17 | 31H | 49 | - | ✓ | |||
| 12H | 18 | 32H | 50 | Set Coincidence Comparison value 1 | ✓ | - | 0 | R/W |
| 13H | 19 | 33H | 51 | - | ✓ | |||
| 14H | 20 | 34H | 52 | Set Coincidence Comparison Value 2 | ✓ | - | 0 | R/W |
| 15H | 21 | 35H | 53 | - | ✓ | |||
| 16H | 22 | 36H | 54 | Set Lowest Limit Value of Ring Counting | ✓ | - | 0 | R/W |
| 17H | 23 | 37H | 55 | - | ✓ | |||
| 18H | 24 | 38H | 56 | Set Upper Limit Value of Ring Counting | ✓ | - | 0 | R/W |
| 19H | 25 | 39H | 57 | - | ✓ | |||
| 1AH | 26 | 3AH | 58 | Counting Function Setup | - | - | 0 | R/W |
| 1BH | 27 | 3BH | 59 | Sampling/Periodic Time | - | - | 0 | R/W |
| 1CH | 28 | 3CH | 60 | Counting Mode | - | - | 0 | R/W |
| 1DH | 29 | 3DH | 61 | Pulse Input Method | - | - | 7 | R/W |
| 1EH | 30 | 3EH | 62 | Counting Down by Software | - | - | 0 | R/W |
Currently Counted Value
- This is used to store the currently counted values.
- The counting range is -2,147,483,648 ~ 2,147,483,647 (232).
Overflow Detected Flag
- Overflow may occur when using linear counting:
| Status | Buffer Memory Value |
|---|---|
| No overflow | 0 |
| Overflow occurs | 1 |
Sampling-Counted or Periodic Pulse-Counted Flag
- This is used to store the counting status when sampling counting or periodic pulse counting is selected.
| Sampling-Counted or Periodic Pulse-Counted Flag | |
|---|---|
| Buffer Memory Data | Status |
| 0 | Stop counting |
| 1 | Counting |
Latch-Counted Value
- The latch-counted value is used when the CM3-SP02HSC and CM3-SP02HSD modules latch count.
- This will store the latch-counted value.
- The range for latch counting is -2,147,483,648 ~ 2,147,483,647 (232).
Sampling-Counted Value
- The sampling-counted value is used when the CM3-SP02HSC and CM3-SP02HSD modules sampling count.
- This will store the sampling-counted value.
- The range for sampling counting is -2,147,483,648 ~ 2,147,483,647 (232).
Previous & Current Periodic Pulse-Counted Values
- When the CM3-SP02HSC and CM3-SP02HSD modules periodic pulse count, this is used to store the previous and current periodic pulse-counted values.
- The range for sampling counting is -2,147,483,648 ~ 2,147,483,647 (232).
Preset Value
- The preset value is used to store the preset value for counting.
- The range for sampling counting is -2,147,483,648 ~ 2,147,483,647 (232).
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
Set Coincidence Comparison Values 1 & 2
- The set coincidence comparison values 1 and 2 are used to store a set value which is compared with the current value for coincidence output.
- 2 coincidence output values can be set up by the channels.
- The range for sampling counting is -2,147,483,648 ~ 2,147,483,647 (232).
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
Set Lowest and Upper Limit Value of Ring Counting
- In case of ring counting, this is used to select the range.
- The range for sampling counting is -2,147,483,648 ~ 2,147,483,647 (232).
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
Counting Function Setup
- The counting function setup is used to set up the counting method.
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
| Counting Function Setup | |
|---|---|
| Buffer Memory Data | Status |
| 0 | Disable counting |
| 1 | Latch counting |
| 2 | Sampling counting |
| 3 | Periodic counting |
Sampling/Periodic Time
- When sampling or periodic pulse counting is selected, this is used to store the value for setting up the time used.
- The range is 0 ~ 65,535.
- The unit time is 10ms.
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
Counting Mode
- The counting mode is used to set up whether linear or ring counting is operated.
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
| Counting Mode | |
|---|---|
| Buffer Memory Data | Counting Mode |
| 0 | Linear counting |
| 1 | Ring counting |
Pulse Input Method
- The pulse input method is used to select the method to input the pulses counted.
- To make the set value available, Request DPRAM (Yn.3/Yn.B), is ON or OFF.
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.
| Pulse Input Method | |
|---|---|
| Buffer Memory Data | Input Method |
| 0 | 1-Phase 1-Multiplication B-Phase for H/W Input |
| 1 | 1-Phase 1-Multiplication B-Phase for S/W Input |
| 2 | 1-Phase 2-Multiplication B-Phase for H/W Input |
| 3 | 1-Phase 2-Multiplication B-Phase for S/W Input |
| 4 | Clockwise or Counter-clockwise |
| 5 | 2-Phase 1-Multiplication |
| 6 | 2-Phase 2-Multiplication |
| 7 | 2-Phase 4-Multiplication |
Counting Down by Software
- If 1 is written to the buffer memory when the CM3-SP02HSC and CM3-SP02HSD modules are counting in 1-Phase input, the modules can count down.
- To count down by software:
- 1-Phase 1-Multiplication Phase-B software input: enter 1 into the Pulse Input Method buffer memory, 3DH (29).
- 1-Phase 2-Multiplication Phase-B software input: enter 3 into the Pulse Input Method buffer memory, 3DH (39).
- As a set value is stored in EEPROM, the CM3-SP02HSC and CM3-SP02HSD modules are operated as previously set values even though the power is ON or OFF.