5 Basic Instruction
5.4 Operating Timer
73
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Program example
1. Program that turns ON Y010 and Y014 in 10 seconds after X000 turns ON.
2. Program that sets the BCD data of X010 to X01F to a timer.
*1. Var_D10 is a global label and is defined as D10.
3. Program that turns ON Y010 in 250 milliseconds after X000 turns ON.
OUT_T
EN ENO
TC1
X000
TCoil
TValue
100
TS1 Y010
Y014
[Structured ladder] [ ST ]
OUT_T(X000,TC1,100);
OUT(TS1,Y010);
OUT(TS1,Y014);
X000
OUT_T
EN ENO
TC2
X002
TCoil
TValue
Var_D10
TS2
BCD data of X010 to X01F is
converted to binary data and
stored in D10.
When X002 turns ON, timer
starts to count using data
stored in D10 as set value.
When T2 timer completes
counting up, Y015 turns on.
Y015
BINP
EN
s
ENO
d
Var_D10
*1
K4X010
[Structured ladder] [ ST ]
BINP(X000,K4X010,Var_D10);
OUT_T(X002,TC2,Var_D10);
OUT(TS2,Y015);
OUT_T
EN ENO
TC200
X000
TCoil
TValue
25
TS200 Y010
[Structured ladder] [ ST ]
OUT_T(X000,TC200,25);
OUT(TS200,Y010);