Program Example - Mitsubishi Electric A1S66ADA User Manual

Table of Contents

Advertisement

5 PROGRAMMING

5.3 Program Example

5 - 3
This program example converts the value set by the BCD digital switch into an analog
value (voltage/current) and reads the digital values that have undergone A/D
conversion at channels 3 through 6.
When applying any of the program examples introduced in this chapter to the actual
system, verify the applicability and confirm that no problems will occur in the system
control.
Conditions of program example
(1) System configuration
A
A
1
S
S
C
P
U
A
D
A
X/Y00
to
X/Y3F
(2) Initial setting description
1) D/A conversion value output enable channel···············1 channel
(3) Device to be used by user
1) Offset value setting command signal····························X40
2) Gain value setting command signal······························X41
3) Digital setting value input command signal···················X42
4) Digital output value read command signal····················X43
5) Digital value setting (BCD 4 digits) ·······························X50 to X5F
6) D/A conversion offset value storage data register········D0
7) D/A conversion gain value storage data register··········D1
8) Digital output value read detection data register···········D10 to D13
9) Digital setting value storage data register·····················D20
A
A
1
1
1
S
S
6
Y
X
6
4
4
1
1
32
32
points
points
X40
Y60
to
to
X5F
Y7F
I/O number
MELSEC-A
5 - 3

Advertisement

Table of Contents
loading

Table of Contents