×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | Mitsubishi | Mitsubishi FX Series Counter Instructions: Mitsubishi PLC Programming with Counter, High speed Counter and Bi-directional Counters
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Mitsubishi FX Series Counter Instructions: Mitsubishi PLC Programming with Counter, High speed Counter and Bi-directional Counters

A Counter count input bit generally we have a two type of counter up counter which is a incremental counter it increment current value of counter when input bit is set to ON. Second counter is decrement counter it decrement value by 1 when input bit is changed from off to ON. another counter is up/down counter, this counter have both function increment and decrement current counter value by 1.in Mitsubishi have also all counter present you can use as your need. Mitsubishi FX series have also high speed counter which are very helpful to count in high speed processing sensor. Mitsubishi counter are designed for 16 bit and 32 bit. a counter device represent by alphabet C with decimal address like C0, C1, C2 etc. Where C is counter device and decimal value is a counter number. Counter uses as a output instruction with some preset value. range of preset value is depend on which type of counter device is used. Following are available counter device in Fx series plc
  • General 16bit up counter
  • Latched 16bit up counter
  • General 32bit bi-directional counter
  • Latched 32bit bi-directional counter
32 bit bi-directional general and latched counter are not available for FX(0)S and FX(0)N device.


Mitsubishi PLC Counter range

Counter range is a value which are use as preset value of counter. if the counter is Up counter is increment until to reach preset. once preset value is equal to counter current value counter done bit is set to ON. You can use constant value with using K device and you can also set value during program execution by using data register. the value of counter is specific range
  • 16bit counters: -32,768 to +32,767
  • 32bit counters: -2,147,483,648 to +2,147,483,647

set manual value to Mitsubishi PLC Counter

above is the example of Counter with pre-defined preset value by using K device. in this example Counter preset value is equal to 5. when input bit change from Off to On counter increment by value 1. if the counter current value is equal to preset value than counter done bit set(K5). in second example counter preset value set by data register D1 using mov Instruction.

Mitsubishi PLC General 16bit up counter

Mitsubishi PLC General 16bit up counter is incremental type counter. this counter value is increment value by 1 when input is change from OFF to ON. Counter preset value range is -32,768 to +32,767. so more than range of this value you can’t use counter preset value. it is very simple counter. following are available device for Mitsubishi PLC General 16bit up counter.
  • Latched 16bit up counter :C0 to C13 for FX0(S), C0 to C15 for FX0N, FX, C0 to C99 for FX(2C),FX2N(C)

Mitsubishi PLC General 16bit up counter

above is the example of Mitsubishi PLC General 16bit up counter. in this example X001 is input of counter and C0 is counter device and 0 is counter number and counter preset value is defined as K5 so counter increment it's current value to reach counter preset value. Counter value is increment when X001 change Off to On. each change of X001 increment counter current value by 1 until to reach counter preset value once counter current value reach preset value than counter C0 bit set to ON this set Y001 to ON.


Mitsubishi PLC General 32bit bi-directional counter

Mitsubishi PLC General 32bit bi-directional counter is a Up Down counter. you can use Bi-directional counter like up counter(incremental) or Down counter. this counter available only for 32 bit Fx series plc. C200 to C219 is available device for 32 bi-directional counter. for using counter like up or down you first activate relay (M8200, M8234) following relay are used for up and down counter
  • M8200 is special relay when M8200 is turned ON than counter work as decrement or Down counter.
  • M8234 is a special relay. if the M8234 relay is turned on than counter work as general up counter or incremental counter.
we already discussed up counter and down counter. device range for Mitsubishi PLC General 32bit bi-directional counter is C200 to C219(20 Device). if you want to use bi-directional counter than only 20 device available.(C200 - C219).
The counters current value increases or decreases independently of the output contact state (ON/OFF). Yet, if a counter counts beyond +2,147,483,647 the current value will automatically change to -2,147,483,648. Similarly, counting below -2,147,483,648 will result in the current value changing to +2,147,483,647. This type of counting technique is typical for “ring counters”.

Mitsubishi PLC General bi-directional counter

above is the example of Mitsubishi PLC General 32bit bi-directional counter in this example
  • Case 1:if M8200 and M8234 is turned off than counter work like up counter.
  • Case 2:if M8200 is turned On and M8234 is turned off than counter work like Down counter.
  • Case 3:if M8200 is turned Off and M8234 is turned ON than counter work like up counter.
output of this counter is C200 is activated when counter reached to preset value.


Mitsubishi PLC Battery backed/latched counters

Counters which are battery backed/ latched are able to retain their status information, even after the PLC has been powered down. This means on re-powering up, the latched counters can immediately resume from where they were at the time of the original PLC power down. In Mitsubishi PLC 16 bit and 32 bit counter are available in Battery backed/latched counters. this counter is helpful if power interruption occur in plc or system. Available device of Mitsubishi PLC Battery backed/latched counters
  • Latched 16bit up counter :C14 to C15 for FX0(S), C16 to C31 for FX0N, FX, C220 to C234 for FX(2C),FX2N(C)
  • Latched 16bit up counter : C220 to C234 only for 32 bit CPU. or read manual of plc.


How to reset Mitsubishi PLC Counter?

You can use reset instruction to reset counter current value to 0. following is the example of reset counter. in this example reset instruction reset counter value if the input is activated. for resetting counter in reset instruction add counter device with number to reset counter. in this example C1 reset if the input X004 is activated.

How to reset Mitsubishi PLC Counter?
 
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

comment