A-19
Appendices
NJ-series CPU Unit Software User’s Manual (W501)
A-2 Calculating Guidelines for the Real Processing Times of Tasks
App
A-2-1 Calculating the Average Real Processing Times of Tasks
• Configuration of Trigonometric Instructions for LREAL Data
Execution Time for Standard ST Instructions
• Instruction Configuration for Standard ST Instructions
Instructions Percent of instructions [%]
Addition instructions for LREAL data 20.0%
Subtraction instructions for LREAL data 20.0%
Multiplication instructions for LREAL data 30.0%
Division instructions for LREAL data 30.0%
Tot al 10 0. 0%
Instructions Percent of instructions [%]
Sin of LREAL data 16.7%
Cos of LREAL data 16.7%
Tan of LREAL data 16.7%
Sin
1
of LREAL data
16.7%
Cos
1
of LREAL data
16.7%
Tan
1
of LREAL data
16.7%
Total 100.0%
Types of instructions Instructions
Percent of
instruc-
tions [%]
Percent of exe-
cution time in
instruction
group [%]
ST constructs IF ELSIF END_IF 75.4% 41.6%
Comparison instructions EQ and LT 5.2% 8.7%
Timer and counter instructions Timer, TON/TOF, and CTU/CTD 2.1% 18.8%
Math instructions +, -, *, and / 3.1% 10.2%
BCD conversion instructions and
data conversion instructions
INT_TO_DINT and
WORD_BCD_TO_UINT
0.2% 1.6%
Bit string processing instructions AND and OR 8.0% 11.7%
Data movement instructions := 5.9% 7.3%
Tot al 100.0% 100.0%
0 5000 10000 15000 20000 25000 30000 35000
0
200
400
600
800
1000
1200
1400
1600
1800
2000
NJ301-
NJ501-
Execution time (
μ
s)
Total number of instructions