Mitsubishi Q00JCPU User Manual page 935

Hide thumbs Also See for Q00JCPU:
Table of Contents

Advertisement

APPENDICES
(c) Replacing a part of floating-point operation instructions with double-
precision floating-point operation instructions using subroutine programs
The flow of a replacement program described in (b) can be regarded as one
subroutine program. Create subroutine programs for each floating-point operation
instruction and then replace the original floating-point operation instructions with
the CALL(P) instructions so that subroutine programs are called.
With this method, changes in the program are minimized, but the processing for
calling subroutine programs increases the scan time. In addition, since
conversions from double precision to single precision are performed for each
instruction, rounding-off errors generated during operations are larger than those
in the replacement program described in (b).
Example) Replacing the floating-point operation [A
1) Device assignment
Application
Data A
Data B
Data C
Operation
result
2) Program before replacement
Appendix 5 Method of replacing High Performance model QCPU with Universal model QCPU
subroutine program)
TableApp.77 Device assignment
Before replacement
Device
Data type
D0 to D1
D2 to D3
Floating-point
data (single
D4 to D5
precision)
D6 to D7
Figure App.24 Sample program
B+C] (Using a
After replacement
Application
Device
Data A
D0 to D1
Data B
D2 to D3
Data C
D4 to D5
Operation
D6 to D7
result
Data A (D)
D900 to D903
Data B (D)
D904 to D907
Data C (D)
D908 to D911
9
10
11
12
Data type
Floating-point
data (single
precision)
Floating-point
data (double
precision)
App
- 146

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents