Linear Counter Example
Linear Counter Example
The following example uses "1 Phase 2 Multiplication (Low Active)" and counts up from zero (0). When the count value reaches 25, the count ends.
Wiring Diagram
The circuit connection between CM3-SP32MDT and CM0-TB32M is as follows.
A11 and B11 are outputs for configuring pulse and level. Connect A1 with A11 and B1 with B11.
Connect DC + 24V to B15 and A5.
Connect GND to B20. Apply the external preset signal to A3.
High Speed Counter Program Configuration
Configure ‘M100’ for Start Address (You can enter a desired address), Channel as ‘1’
Check [Enable Count] for the Channel Configuration (Device Address will be automatically assigned from M100 to M270).
Select ‘Linear Counter’ for the Count Mode and ‘1 Phase 2 Multiplication (Low Active)’ for the Input Pulse Type.
Enter ‘1000’ for Unit Time and Pulse per 1 Cycle (You can enter any desired value).
Write a Scan Program
Write the scan program as shown below.
The first bit output of Y10 Word is turned ON/OFF while 0-bit is outputted as OFF for every two seconds (F94).
When the current count value is above 25 (M310), the device M260 will be set up as 0.
Check the operation
The current count value increases from 0 by 1, and the operation status is ON.
When the current count reaches 25, the operation status will be OFF.