×

Subscribe to newsletter

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




PLC BLOG | Studio 5000 Structured Text Timer
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Studio 5000 Structured Text Timer

in studio three type of timer available in structured text Timer On Delay with Reset (TONR), Timer Off Delay with Reset (TOFR) and Retentive Timer On with Reset (RTOR). these timer unit is 1msec. in structured text these three timer available as statements with have some input and output parameter such as preset value, accumulator value, timer reset etc. as we know structured text is statements and conditional based programming language for industrial control system so in RSLogix 5000 timer declaration is most important. For all these timer use FBD_TIMER as type when you declare timer function. All these instruction is not available in Ladder Logic.


Studio 5000 Structured Text Timer On Delay with Reset (TONR)

Timer On Delay with Reset (TONR) is non-retentive timer. if TimerEnable is set to 1 than timer start to run until it reaches preset time. Timer run in 1msec unit. TONR have some parameter which are as follows
    Input Parameter
  • EnableIn: If it is not set, the Timer On Delay with Reset (TONR) instruction does not execute and outputs are not updated. If set, the instruction executes. Default value for EnableIn is set. Data type is bool.
  • TimerEnable : when Timer enable is set to 1 than timer run if it is not set timer not run.
  • PRE: it is preset value of timer. You can use value may be constant value or tagged value as per your need. Timer run on specified Preset value (PRE). Data type for Preset (PRE) is DINT.
  • Reset: it reset timer operation and accumulator value.
  • Output Parameter
  • EnableOut : data type is bool it set to 1 when timer execute operation without error.
  • ACC : is accumulator value of timer. Accumulated time in milliseconds.
  • ENF: Timer enabled output. Indicates the timer instruction is enabled.
  • TT: Timer timing output. if timing operation is in progress TT bit set 1.
  • DN : timer done bit data type is bool, it indicates accumulated time(ACC) is greater than or equal to preset(PRE).
  • Status : data type of DINT it indicate Status of the function block.
  • Error Output Parameter
  • InstructFault: The instruction detected one of the following execution errors. This is not a minor or major controller error. Data type is bool.
  • PresetInv : The preset value is invalid. Data type is bool.

 Studio 5000 Structured Text Timer On Delay with Reset (TONR)

above is a example of Studio 5000 Structured Text Timer On Delay with Reset (TONR) so in first line "TONR (TONR_01);" TONR is function name for timer on delay with reset and we declare TONR function as TONR_1 and type is FBD_TIMER. In above example if TONR_01.TimerEnable is set to 1 than timer operation start untill Accumulated_TIME is greater than or equal to TONR_01.PRE. if Accumulated_TIME is greater than or equal to TONR_01.PRE so TIMER_STATE is set to 1. TONR_01.Reset reset the timer accumulated value, timer done bit and timer TT bit.


Studio 5000 Structured Text Timer Off Delay with Reset (TOFR)

Timer Off Delay with Reset (TOFR) is also non-retentive timer like TONR. if TimerEnable is set from 1 to 0 than timer start to run until it reaches preset time. Timer off delay instruction delay the output if timer enable input change from 1 to 0. Timer run in 1msec unit. TOFR parameter same as TONR all input and out parameter is same.

 Studio 5000 Structured Text Timer Off Delay with Reset (TOFR)

above is a example of Studio 5000 Structured Text Timer Off Delay with Reset (TOFR). first line "TOFR (TOFR_01);" TOFR is function name for timer OFF delay with reset and we declare TOFR function as TONR_1 and type is FBD_TIMER. In above example if TOFR_01.TimerEnable is set to 1 than timer operation not start if TOFR_01.TimerEnable is changed from 1 to 0 than timer execute operation until Accumulated_TIME is greater than or equal to TONR_01.PRE.

Studio 5000 Structured Text Retentive Timer On with Reset (RTOR)

Retentive Timer On with Reset (RTOR) is retentive timer working and structure of this timer is same as TONR but main difference is store accumulated time when TimerEnable input bit is change from 1 to 0 and again start timer execution from stored value or store value if TimeEnable input bit change from 0 to 1. Both timer not stored or store accumulated time value but retentive timer have capability to store.

 Studio 5000 Structured Text Retentive Timer On with Reset (RTOR)

above is a example of Studio 5000 Structured Text Retentive Timer On with Reset (RTOR). First line "RTOR (RTOR_01);" RTOR is function name for Retentive Timer with reset and we declare RTOR function as RTOR_01 and type is FBD_TIMER. in above example if RTOR_01.TimerEnable is set to 1 than timer operation start if RTOR_01.if TimerEnable is changed from 1 to 0 than timer stop and accumulated value store or hold to timer_acc. if again RTOR_01.TimerEnable is set from 0 to 1 than timer operation start from timer_acc value(Accumulated TIME). if timer_acc greater than or equal to TONR_01.PRE than timer_dn bit set 1 and timer operation stop.

Related Article

Information about Structured text visit link below

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

comment