# Mitsubishi plc programming How to convert the pressure sensor pressure signal into 4-20ma analog

You need to convert the input engineering quantity value into actual reading according to the module. 4ma corresponds to 0, 20ma corresponds to 4000, and the other is the proportional correspondence between the other, then see the example program of the program processing in the module manual, directly apply.

Note the module address. The same is true for D/A conversion. By arithmetic processing, the actual reading is multiplied by 4000. After dividing by the range, the data is stored in the D area, and then the manual is displayed, and there is a D/A conversion program.

# How to write a program for Mitsubishi plc output analog

According to the analog module you selected to confirm the programming, the basic framework is unchanged, use TO to write the BFM value of your module’s buffer memory, use FROM to read the module’s BFM value, current value, channel selection Wait for some parameters you need.

The CPU has a digital module and two analog input modules. The order of the modules is the first digital quantity and then the analog quantity. The module number analog quantity becomes 1 and 2.
The first k1 represents the module number, k12 represents the read module 12 register, d0 represents the presence of the d0 data area, and k1 represents the reading of a data.
The cup+ digital module + special module is the order. Mitsubishi’s special modules have special numbers, and the number added in front is the same. Module 4-20ma is the input standard for the module

# Mitsubishi PLC analog program example

LD M0

TO K0 K17 H0 K1

TO K0 K17 H2 K1

FROM K0 K0 D0 K1

; select ad input channel 1

; start the input channel 1 ad conversion

; store the current value of channel 1 in register d0

LD M2

TO K0 K17 H1 K1

TO K0 K17 H3 K1

FROM K0 K0 D2 K1

; select ad input channel 2

; start the input channel 2 ad conversion

; store the current value of channel 2 in register d2

LD M4

TO K0 K16 D4 K1

TO K0 K17 H4 K1

TO K0 K17 H0 K1

;d4 is the value of the analog signal output, the value is between 0–255

; start the output channel da conversion processing

; in the edit command to make m0 m2 m4 cycle on and off

;d0 inputs the current value of 1 channel, d2 inputs the current value of 2 channels, and d4 outputs the current value of the channel.