15 Converter Instructions in Siemens PLC Programming | Free PLC Tutorials

The programmable logic controller has several converter instructions. Let’s study converter instructions in the Siemens PLC programming.

Till now you can see the various instructions of the PLC like Logic Gates, Bit Logic Instructions, 20+ Arithmetic instructions, PLC Timers and PLC Counters, etc.

There are 15 converter instructions you can find while programming. Let’s study each of these instructions in detail.


Converter Instructions in PLC Programming

Integer to BCD conversion

converter instructions

This instruction converts the integer value into a three-digit Binary Coded Decimal value. It can convert integer value into BCD up to +/- 999.

converter instructions


Double Integer to BCD Conversion

converter instructions

This instruction converts the double integer value into a seven-digit Binary Coded Decimal value. It can convert double integer value into BCD up to +/- 9999999.

converter instructions


BCD to Integer Conversion

converter instructions

This instruction converts a three-digit Binary Coded Decimal value into an integer value.

converter instructions


BCD to Double Integer Conversion

converter instructions

This instruction converts a seven-digit Binary Coded Decimal value into a double integer value.

converter instructions


Integer to Double Integer Conversion

converter instructions

This instruction converts an integer value(16-bit) in double integer value(32-bit). The input parameter is a single word while the output parameter is the double word here.

converter instructions


Double Integer to Real Conversion

converter instructions

This instruction converts a double integer value into a floating-point number.

converter instructions


Invert Integer(One’s Complement of Integer)

converter instructions

This instruction does the one’s complement with the 16-bit integer value and gives the output. Here both the input and output values are 16-bit.

converter instructions


Invert Double Integer(One’s Complement of Double Integer)

converter instructions

This instruction does the one’s complement with the 32-bit integer value and gives the output. Here both the input and output values are 32-bit.

converter instructions


Negative Integer(Two’s Complement of Integer)

converter instructions

This instruction does the two’s complement with the 16-bit integer value and gives the output. Here both the input and output values are 16-bit.

converter instructions


Negative Double Integer(Two’s Complement of Double Integer)

converter instructions

This instruction does the two’s complement with the 32-bit integer value and gives the output. Here both the input and output values are 32-bit.

converter instructions


Negative Real

converter instructions

This instruction multiplies the input floating-point number by -1 and gives the output. The input and output both here are floating-point numbers.

converter instructions


ROUND

converter instructions

This instruction reads the input value as a floating-point number and converts it into a 32-bit double integer value. The result is the nearest integer number.

converter instructions


TRUNC

converter instructions

This instruction reads the input value as a floating-point number and converts it into a 32-bit double integer value. The result is the nearest integer number to zero.

converter instructions

 


CEIL

converter instructions

This instruction reads the input value as a floating-point number and converts it into a 32-bit double integer value. The result is the nearest integer number to the + infinity.

converter instructions


FLOOR

converter instructions

This instruction reads the input value as a floating-point number and converts it into a 32-bit double integer value. The result is the nearest integer number to the – infinity.

converter instructions


Summary

These are all the converter instructions in PLC. Please feel free to give your feedback in the comment section below. You can also find my previous tutorial about the plc programming instructions.

What is PLC? How does it work?

Logic gates using PLC ladder logic.

Basic bit logic instructions with PLC programming examples.

5 different types of PLC programming languages.

Three different types of electric motor starter with its PLC program.

30+ Most useful PLC communication protocols

How timer works in PLC?

How counter works in PLC?

 

You can also find the important questions and answers asked in the interview.

25+ Most important questions asked in the PLC interview

Top 15 always asked questions in the SCADA interview


I hope you like this article. Please share this article with your friends and colleagues. Each share count for us. Thanks!

You can read more articles about Instrumentations and find the books that boost your knowledge in the field of instrumentation ⇒

SHARE THIS BLOG,

Leave a Comment