3 - 4 3 - 4
MELSEC-Q
3 LET'S CREATE AND EXECUTE A PROGRAM
Enter line 10 as shown in the program example and press the Enter key.
REM Calculation of compound interest Enter
The line number 20 will be displayed on the screen. Enter the instructions until you
reach line 70 in the same way.
When you finish entering line 70, the screen should look as follow :
70 END
80
This is the end of the program, so let's end the line number display of the AUTO
instruction.
Press the following keys.
Ctrl + C • • • • • • Press the C key while holding down the Ctrl key.
OK is displayed on the screen again.
Now let's verify that you have entered the program properly. Use the LIST instruction
to display the program you have entered. Please enter the following.
LIST Enter
If the program looks just like the one written on the previous page, it is a success.
LIST
10 REM Calculation of compound interest
20 INPUT "Principal=";M
30 INPUT "Interest Rate=";R
40 INPUT "Period=";K
50 RR=R/100
60 G=M (1+RR)^K
70 PRINT "Interest included=";INT(G); "YEN"
80 END
OK
REMARK
• If the display does not match the program on the previous page, re-enter the
contents of the wrong line starting with the line number while OK is displayed. Then
press the Enter key. Issuing the LIST instruction again will display the revised
contents.
An easier way of editing is described in Section 3.2.3.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...