×

Subscribe to newsletter

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




PLC BLOG | Mitsubishi | Mitsubishi PLC Low Speed Timer and Retentive Timer in Structured Text
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Mitsubishi PLC Low Speed Timer and Retentive Timer in Structured Text

Structured Text is a high level programming language, it is statement based language. timer is very important instruction in automation and control system. in structured text also have timer as a function. in Mitsubishi structured text generally have low speed timer, high speed timer and retentive timer. we already discussed Timer in Mitsubishi plc Mitsubishi PLC timer introduction. in structured text you can declare timer as function after declaration of timer declare enable timer input, timer coil number and preset value of timer. in structured text The timer preset value can be specified within the range 0 to 32767. for preset value you can use constant value or you can also set value using data register. We already discussed timer in separate article.


Structured Text low speed timer

Structured Text low speed timer Counts time in increments of 100 Ms. Low speed timer function delay the output of timer. if the input bit of this timer is set to active than timer operation start and increment timer current value by (every 100ms) until current time reached to preset time. When current time equal to preset time than timer coil (TC) is set to active. Otherwise timer coil (TC) bit is zero. you can declared this timer as TIMER_M (BOOL EN,TCoil, TValue); where
    Input of timer function
  • BOOL EN : enable bit of timer when it active or ON than timer operation start. example X0, M1, X4 etc.
  • TCoil : this define timer device number example TC0, TC1 TC23 etc.
  • TValue : preset value of timer. example K30, D0, D1 K45 etc.
output of low speed timer function
  • TS : it is a timer status coil you can use this coil as output of timer. if the timer operation is completed than TS coil bit set. device number of timer status coil(TS) is same as Tcoil(TC).
  • TN or T : it is 16 bit word value, it show current timer value. you can store timer current value in data register by using TN or T register. TN or T device number is same as Tcoil(TC).

Structured Text low speed timer

above is the example of timer function in Structured Text
  • first line is declaration of timer function where M1 is EN, TC0 is timer coil(TCoil) and K30 is preset value of timer(Tvalue).
  • in second line timer status coil TS0 is declared as we know we have timer coil TC0 than all output used same device number.
  • in third and fourth line timer current value store in data register D0 and D1. TN0 and T0 is word type both have same value you can use any of them. device number is same as timer coil.
  • fifth line timer reset function is used to reset timer. timer reset when X1 is active.
when input M1 is set to ON (active) than timer operation start until to reach timer preset value once timer preset value is equal to timer current value than timer stop. D0 and D1 store timer current value.


Structured Text Retentive timer

Structured Text Retentive timer is a timer which are hold or elapsed time when input change from true to false and again increment from elapsed time when timer start input change from false to true. Basically retentive timer store timer accumulator value when timer start input turnoff. you can declare Retentive timer asTIMER_M (BOOL EN,TCoil, TValue); where
    Input of timer function
  • BOOL EN : timer start bit. example X0, X2, M2 etc.
  • TCoil : this define timer device number example STC0,STC1,STC4 etc
  • TValue : preset value of timer. use any constant value or data register (16 bit)
output of low speed timer function
  • STS : Retentive timer status coil, if the timer current value is equal to preset value than STS coil bit set. device number of Retentive timer status coil(STS) is same as Tcoil(STC).
  • STN or ST : it is 16 bit word value, it show current timer value. you can store timer current value in data register by using STN or ST register. STN or ST device number is same as Tcoil(STC).

Structured Text Retentive timer

above is the example of timer function in Structured Text
  • first line is declaration of timer function where M2 is EN, STC0 is timer coil(TCoil) and K30 is preset value of timer(Tvalue).
  • in second line timer status coil STS0 is declared.
  • in third and fourth line timer current value store in data register D3 and D4.
  • fifth line timer reset function is used to reset timer. Timer reset when X2 is active.


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 18 19 20 21

comment