3. Instructions
594
CS/CJ/NSJ Series Instructions Reference Manual (W474)
z Background Processing
The execution time of MAXL will increase proportionately to the size of the table data. Background
processing can be used for MAXL to suppress variations in the cycle time of the CPU Unit when the
table data is too large. (This information applies to MAXF, MAXD, MINL, MINF, and MIND as well.)
Example Programming
When CIO 0.00 turns ON in the following example, a table of four double word values starting at D0 is
searched for the maximum value. The maximum value is stored in W0 and W1.
SET
W511.15
0.00 A202.00
W511.15 A202.00
RSET
W511.15
MAXL
#40000004
D0
W0
Set a flag to indicate that MAXL is being executed.
Execute MAXL in the background.
The Communications Port Enabled Flag (A202.00) will turn
OFF when MAXL is executed. A202.00 will turn ON when
execution of MAXL has been completed.
When A202.00 turns ON, background processing for MAXL
has been completed and the result stored in W0 can be used.
Instructions using results of MAXL in W0
MAXL
#80000004
D0
W0
0.00
D1-D0
D3-D2
D5-D4
D7-D6
+918(#00000396)
-30000(#FFFF8AD0)
+100000(#000186A0)
-1215(#FFFFFB41)
W1-W0 +100000(#000186A0)
Table length: 4
Signed
PLC memory address not output to IR0
Maximum value