Mitsubishi Electronics 13JW55 Network Card User Manual


 
5 - 52
Project name QTEST6
Program name MAIN
5.7.2 Exercise 2 BIN and BCD conversion
Output the number of times that X1 is turned on on the display connected to Y40 to
Y4F in BCD. As a precondition, the set value of the counter (C0) can be input with
the digital switch (X20 to X2F) and the setting will be available by turning on X0.
Create the following program with GX Works2 filling in the blanks .
Then, check the operation using the demonstration machine.
C0
X1
X0
SM401
X2
0
5
9
13
C0RST
C0
D0BINP
1)
2)
3) 4)
Y70
C0
18
Hint
BCD value
BCD digital switch
X20 to X2F (K4X20)
BIN
BIN value
D0
C0
BIN value
CPU
Set
value
X1:ON/OFF
BCD
BCD value
BCD digital display
Y40 to Y4F (K4Y40)
1)
2)
3)
4)