Skip to main content

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 AddressDetailsLow
Active
High
Active
Initial ValueRead
Write
Ch. 1Ch. 2
Hex.Dec.Hex.Dec.
00H020H32Currently Counted Value-0R
01H121H33-
02H222H34Overflow Detected Flag--0R
03H323H35Sampling-Counted or Periodic Pulse-Counted Flag--0R
04H424H36Latch-Counted Value-0R
05H525H37-
06H626H38Sampling-Counted Value-0R
07H727H39-
08H828H40Previous Periodic Pulse-Counted Values-0R
09H929H41-
0AH102AH42Current Periodic Pulse-Counted Values-0R
0BH112BH43-
0CH122CH44Reserved----
0DH132DH45----
0EH142EH46----
0FH152FH47----
10H1630H48Preset Value-0R/W
11H1731H49-
12H1832H50Set Coincidence Comparison value 1-0R/W
13H1933H51-
14H2034H52Set Coincidence Comparison Value 2-0R/W
15H2135H53-
16H2236H54Set Lowest Limit Value of Ring Counting-0R/W
17H2337H55-
18H2438H56Set Upper Limit Value of Ring Counting-0R/W
19H2539H57-
1AH263AH58Counting Function Setup--0R/W
1BH273BH59Sampling/Periodic Time--0R/W
1CH283CH60Counting Mode--0R/W
1DH293DH61Pulse Input Method--7R/W
1EH303EH62Counting Down by Software--0R/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:
StatusBuffer Memory Value
No overflow0
Overflow occurs1

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 DataStatus
0Stop counting
1Counting

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 DataStatus
0Disable counting
1Latch counting
2Sampling counting
3Periodic 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 DataCounting Mode
0Linear counting
1Ring 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 DataInput Method
01-Phase 1-Multiplication
B-Phase for H/W Input
11-Phase 1-Multiplication
B-Phase for S/W Input
21-Phase 2-Multiplication
B-Phase for H/W Input
31-Phase 2-Multiplication
B-Phase for S/W Input
4Clockwise or Counter-clockwise
52-Phase 1-Multiplication
62-Phase 2-Multiplication
72-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.