Mitsubishi PLC structured text arithmetic operator - Addition, Subtraction, Multiplication and Division
operator in structured text are symbol that represent specific operation. Generally in structured text operators like arithmetic operator, Comparison Operators, logical operator, bitwise operator and assignment operator. each operator Have specific symbol for example + is symbol for Addition. in this article we discuss only arithmetic operator and their uses in programming. arithmetic operator used for mathematical operation. in structured text follows BODMAS rule for perform mathematical process. you can used these arithmetic operator for mathematics operation. in structured text you can perform mathematical operation in multiple values, you can also define formula here. Multiple arithmetic operators can be combined in expressions to perform complex calculations.
Addition arithmetic operator in Mitsubishi PLC structured text
+ is a Addition arithmetic operator, this operator perform addition in structured text below is the example of Addition arithmetic operator in structured. in first example two constant value are added and result store in D0. in second example we have three data register D10, D11 , D13 which are added together. in third example one is real value and second is non real value which are added.
Subtraction arithmetic operator in Mitsubishi PLC structured text
- is subtraction arithmetic operator in structured text. this operator perform subtraction more than two value. below is the example of Mitsubishi plc subtraction operator.
Multiplication arithmetic operator in Mitsubishi PLC structured text
* Multiplication arithmetic operator in Mitsubishi PLC structured text, this operator perform multiplication of more than two values. below is the example of Multiplication arithmetic operator in Mitsubishi PLC structured text
Division arithmetic operator in Mitsubishi PLC structured text
/ is Division arithmetic operator in Mitsubishi PLC structured text, this operator perform division operation. for real value division operation use proper data type and conversion function to get a result in decimal place. plc show an error if you divide 0 into 0. so before download to plc assign any constant value in your data register.
MOD arithmetic operator in Mitsubishi PLC structured text
MOD operator perform Modulus operation.MOD operator Gives the remainder of a division as result. you can this MOD operator only in integer value not in real value. below is the example of Mod operator in Mitsubishi PLC structured text.
Multiple arithmetic operator in Mitsubishi PLC structured text
in a structured text you can use multiple arithmetic operator in single expression. arithmetic operator use bodmas rules for calculation. below is the examples of multiple arithmetic operator in a single expression. for performing complex operation use proper brackets to get proper result.