7 Applied Instructions
7.7 Handy Instruction
340
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
2. 32-bit operation(DABSD)
This is an example for explaining the ON/OFF control of the output by one revolution of table (0 to 360
degrees).
(Rotation angle signal one degree per pulse)
Data table (occupying n lines × 4 points) of n lines from the device designated in is compared with the
present value of the counter of the device designated in , and outputs of n points continuous from the
device designated in are controlled to be ON/OFF.
1) Write the following data in ( , +1) to ( +4n+2, +4n+3), preliminarily by using transfer
command.
For example, rise point data is stored in even-number device, and fall point data in odd-number device,
by 32-bit data.
2) Output pattern
When command input is turned ON, n points are changed as follows, starting from the device designated
in .
Rise point and fall point may be individually changed by rewriting data in ( +1, ) to
(+(n×2)+3, +(n×2)+2).
Rise point Fall point
Object
output
Data value
(example)
Data value
(example)
[+1, ]
40
[+3, +2]
140
[+5, +4]
100
[+7, +6]
200
+1
[+9, +8]
160
[ +11, +10]
60
+2
[ +13, +12]
240
[ +15, +14]
280
+3
…
-
…
-
…
[ +4n+1, +4n] [ +4n+3, +4n+2] +n-1
X001
Rotation angle signal one degree per pulse
Command input
RST
EN ENO
d
X001
Beginning device for storing
table data (rise point, fall point)
Beginning bit device to be output
ABSD
EN
s1
s2
ENO
d
n
Number of lines of table and
number of points of bit device
to be output
Counter for present value
monitor to compare with
table data (C )
CC
CS
OUT_C
EN
CCoil
CValue
ENO
K360
CC
40 140
100 200
160
240 280
180
360
60
0
+3
+2
+1
d
d
d
d