Tag Archives: mitsubishi plc programming examples

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.