×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | Panasonic PLC Arithmetic instructions
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Panasonic PLC Arithmetic instructions

Arithmetic instructions perform mathematical operation on numerical value. inputs and output of these instructions is same data type for example if we use a add instructions than inputs of this instruction is same data type and out is also same data type. if input and output theses differ from each other than plc shows error. in this article we discuss only normal arithmetic instructions like addition, subtraction etc. REAL, INT, DINT, UINT, UDINT data types are allowed in arithmetic instruction input and output. maximum 28 input allowed in Panasonic PLC Arithmetic instructions.


Panasonic PLC ADD Instruction

Panasonic PLC ADD Instructions perform addition of it's input and return addition result in output. more than two input allowed in add instruction, but data type of these input is same.

Panasonic PLC ADD Instruction

in above example of Panasonic PLC ADD Instruction all input is real data type and output is also a real data type. result of this instruction is input_1+input_2+input_3+input_4=output_add.


Panasonic PLC SUB Instruction

Panasonic PLC SUB Instruction or Subtract instruction it perform subtraction of input and return result to output. it allowed only two same data type input variable.

Panasonic PLC SUB Instruction

above example of Panasonic PLC SUB Instruction it subtract input_1 - input_2 = output_sub.


Panasonic PLC MUL Instruction

Panasonic PLC MUL Instruction multiplies the values of the input variables with each other and writes the result into the output variable.

Panasonic PLC MUL Instruction

above example of Panasonic PLC MUL Instruction it subtract input_1 x input_2 x input_3 x input_4 = output_mul.


Panasonic PLC DIV Instruction

Panasonic PLC DIV Instruction divides the first input variable by the second input variable and write result into the output variable. DIV instruction allowed only two same data type input variables and a single output variable.

Panasonic PLC DIV Instruction

above example of Panasonic PLC DIV Instruction it subtract input_1 / input_2 = output_div.


Panasonic PLC SQRT Instruction

Panasonic PLC SQRT Instruction is a single input variable and single output variable that caluclate square root of input variable and return result into output variable. SQRT instruction only allowed REAL data type as input and output. Input value is ≥ 0.0.

Panasonic PLC SQRT Instruction

above example of Panasonic PLC SQRT Instruction √ input_1 = output.


Panasonic PLC MOD Instruction

Panasonic PLC MOD Instruction write The remainder of the division into the output variable. first input this instruction is a dividend second input is a divisor and output is a remainder result. MOD instruction not allowed real data type only allowed INT, DINT, UINT, UDINT data type or you can use a constant value as input.

Panasonic PLC MOD Instruction

above example of Panasonic PLC MOD Instruction in this example value of the first input variable is divided by second input variable. The remainder of this division is return into the output variable.


Panasonic PLC ABS Instruction

Panasonic PLC ABS Instruction convert input variable into an absolute value. output of this instruction is always a positive number or zero, regardless of whether the original number is positive or negative. it have only single input variable and single output variable. data type is DINT, INT, REAL.

Panasonic PLC ABS Instruction

above example of Panasonic PLC ABS Instruction output=|input_1|


 
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

comment