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
The following figure shows a programming example and timing chart for a PT of T#10ms. Variable abc
changes to TRUE as soon as variable A changes to TRUE. Variable abc changes to FALSE 10 ms later.
LD
A
T#10ms
TRUE
In=A
FALSE
TRUE
Q=abc
FALSE
ET=def
Additional Information
• Use the TON instruction (page 2-126) for a timer that starts when In changes to TRUE and then
changes the timer output to TRUE when the elapsed time reaches the set time.
• Use the TOF instruction (page 2-132) for a timer that starts when In changes to FALSE and then
changes the timer output to FALSE when the elapsed time reaches the set time.
• If you are connected to an HMI that does not support TIME data, you must convert the set time from
integer data to TIME data before you input it to this instruction. Use the NanoSecToTime instruction
(page 2-634) to convert integer data to TIME data. Use the TimeToNanoSec instruction (page 2-632)
to convert TIME data to integer data. Both instructions express the time in nanoseconds. The user
programming for when the INT variable msIntVar is the set time in milliseconds is given below.
LD
Setparameter
LINT#1000000
Trigger
TP_instance.Q
ST
tmpLintVar:=msIntVar*LINT#1000000;
msTimeVar:=NanoSecToTime(tmpLintVar);
TP_instance(In:=Trigger, PT:=msTimeVar, Q=>Tout);
2-136
TP_instance
abc
TP
In
Q
def
PT
ET
PT=T#10ms
MUL
EN
ENO
msIntVar
In1
tmpLintVar
In2
NanoSecToTime
EN
In
tmpLintVar
TP_instance
TP
In
msTimeVar
PT
Tout
ST
TP_instance(A, T#10ms, abc, def);
ENO
msTimeVar
Q
ET

NY-series Instructions Reference Manual (W560)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents