Download Q-series basic Course(for GX Developer)

Transcript
A: SCHOOL
QTEST11
MAIN
Path name
Project name
Program name
5.7.7
*
Practice Question (7) D , D/
Create a program that performs the BIN-multiplication of the value specified with the
5-digit digital switch (X20 to X33) by 1100 when X2 is turned ON. If the result is less
than 99999999, show the result on the 8-digit display (Y40 to Y5F).
The program should perform the BIN-division of the value specified with the 8-digit
digital switch (X20 to X3F) by 40000 when X3 is turned ON. If X4 is ON, show the
quotient of the result on the 8-digit display (Y40 to Y5F). If X4 is OFF, show the
remainder on the same display.
(X20 to X33)×1100
(Y40 to Y5F)
Quotient
(Y40 to Y5F) X4 ON
(X20 to X3F)÷40000
Remainder (Y40 to Y5F) X4 OFF
Fill in the blank square of the program below, create a program with GX Developer and
check to see if it works properly with the demonstration machine.
0
X2
X3
DBINP K5X20
D0
K1100
D2
D2
D4
Y077
1)
2)
D<
Y77
24
X3
D0
K99999999 D4
Y77
DBCDP D4
X2
5)
X4
X4
1)
2)
3)
4)
5)
6)
7)
5 - 59
K8Y40
3)
K8X20
4)
K40000 D12
D10
D12
D10
D14
Y077
DBCD
6)
K8Y40
DBCD
7)
K8Y40