Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions
Function
The Timer instruction outputs TRUE when the set time elapses after the timer starts. The time is set in
increments of 100 ms.
The timer is reset when timer input In changes to FALSE. Remaining time ET is set to set time PT, and
timer output Q changes to FALSE.
The timer starts when In changes to TRUE. The value of ET is timed down. When the value of ET
reaches 0, timer output Q changes to TRUE. ET is not timed down after that.
The timer is reset if In changes to FALSE after the timer starts but before ET reaches 0.
The data type of timer status TimerDat is structure _sTimer.
The following figure shows a programming example and timing chart when PT is UINT#10. Variable ghi
will change to TRUE 1,000 ms (1 s) after variable A changes to TRUE.
LD
A
UINT#10
abc
TRUE
In=A
FALSE
TRUE
Q=ghi
FALSE
ET=jkl
Additional Information
For more precise timing, use the TON instruction (page 2-126), which is set in nanoseconds. The TON
instruction times in nanoseconds when the instruction is executed, so it is more precise than the Timer
instruction. However, the execution time of the Timer instruction is shorter.
Precautions for Correct Use
• Timing is performed at the beginning of the POU that contains this instruction. Therefore, the value of
ET will be the same regardless of where the instruction is executed in the POU.
• The timing error for which Q is TRUE for PT is + 1 task period.
The above range includes the following:
• Time ET is judged to see if it has reached PT every task period. If time ET reaches PT immedi-
ately after the judgement is completed, there is a delay of one task period.
• Although TimerDat is an in-out variable, it is not necessary to pass any values. Create a memory
area for the size of the _sTimer structure and pass it to the instruction.
• Do not change the contents of TimerDat.
• The timer starts as soon as operation starts if In is already TRUE.
• If the value of PT changes, the new value is used from the next time that the timer is reset. The value
is not updated while timing is in progress.
• If this instruction is in a master control region and the master control region is reset, the timer is reset.
ET is set to the value of PT and the value of Q changes to FALSE.
2-142
def
Timer
In
ghi
PT
Q
TimerDat
abc
jkl
ET
PT=UINT#10
ST
def:=Timer(A, UINT#10, abc, ghi, jkl);

NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents