Mitsubishi Electronics MELSEC-F Home Theater Server User Manual


 
H-28
4 Programming
4.12 Basic Program Example
FX
3G
/FX
3U
/FX
3UC
PLC User's Manual - Analog Control Edition
FX
3U
-3A-ADP (2-channel analog Input, 1-channel analog output)
•FX3U, FX3UC Series PLC
The following program will set channel 1 of the 1st adapter to voltage input mode and channel 2 to current
input mode, and will store the converted A/D value of channel-1 data into D100 and that of channel-2 data
into D101. The program will also set "voltage output" for output channels, and set the digital D/A conversion
output to D102.
Even if the input data is not stored into D100 or D101, the data registers D8260 or D8261 can be directly used
in the timer/counter setting value or in a PID instruction.
Using the indicator or the sequence program, input the digital data to be subject to D/A conversion (to be
output as analog data) in D102.
M8002
RST
RST
M8000
FNC 12
MOV
K5 D8264
FNC 12
MOV
K5 D8265
M8000
M8000
FNC 12
MOV
D8260 D100
FNC 12
MOV
D8261 D101
M8001
M8260
M8000
M8261
FNC 12
MOV
D102 D8262
M8001
M8262
M8266
D8268.6
D8268.7
Set the input mode of channel 1 to the voltage
input mode (0 V to 10 V).
Normally OFF
Normally ON
Normally
OFF
Initial
pulse
Set the input mode of channel 2 to the current
input mode (4 mA to 20 mA).
Set the output mode to the voltage output mode
(0 V to 10 V).
Set the output holding function.
Error status: b6 = OFF
Error status: b7 = OFF
Set the averaging time to "5" for channel-1 data.
Set the averaging time to "5" for channel-2 data.
Stores the A/D converted channel-1 digital data
into D100.
Stores the A/D converted channel-2 digital data
into D101.
Performs D/A conversion with the digital data
stored in D102.