×

Subscribe to newsletter

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




PLC BLOG | Mitsubishi | Mitsubishi PLC Comparison Instruction - Mitsubishi 16 bit, 32 bit, floating point and Character string data Comparison Instruction
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Mitsubishi PLC Comparison Instruction - Mitsubishi 16 bit, 32 bit, floating point and Character string data Comparison Instruction

Mitsubishi PLC Comparison Instruction is used to compare two value. Comparison Instructions are equal to, greater than, less than greater than or equal to. in comparison instruction generally have two value S1 and S2, Data value of S2 is compared with data value S1 if the comparison result of S1 and S2 is true than output is activated otherwise output is is OFF condition. S1 is first source value of comparison and S2 is second source value of comparison. Mitsubishi PLC Comparison Instruction is divide as 16 bit, 32 bit, floating point, and character string, 16 bit block and 32 bit block comparion.in this article we discuss only 16 bit, 32 bit, floating point and Character string data Comparison Instruction. block comparison instruction in separate article. each Comparison Instruction have symbol which are help to determine which type of instruction is used following are the Comparison Instruction is available in 16 bit, 32 bit, floating point and character string
  • = Mitsubishi PLC Equal to Comparison Instruction.
  • <>Mitsubishi PLC Not Equal to Comparison Instruction.
  • > Mitsubishi PLC Greater Than Comparison Instruction.
  • >=Mitsubishi PLC Greater Than or Equal to Comparison Instruction.
  • <Mitsubishi PLC Less than Comparison Instruction.
  • <=Mitsubishi PLC Less than or Equal to Comparison Instruction.


Mitsubishi PLC 16 bit Comparison Instruction

Mitsubishi PLC 16 bit Comparison Instruction only compare 16bit value all above instruction. so if you want to comparison of 16 bit value than use 16 bit compare. below is the example of Mitsubishi PLC 16 bit Comparison Instruction in this example S1 is assigned by data register D0 and S2 assigned by data register D1. with and input and Output coil.

Mitsubishi PLC 16 bit Comparison Instruction

above is the example of Mitsubishi PLC 16 bit Comparison Instruction, in these example we have all comparison instruction.
  • first line is example of 16 bit Equal to comparison instruction if the input X0 is set to active or ON than comparison operation perform. if the value of D0 and D1 are Equal than output Y0 is set ON otherwise off.
  • second line is example of 16 bit Not Equal to comparison instruction output Y1 is set to active if the D0 is not equal to D1 and X1 is set to ON.
  • third example is 16 bit greater than instruction if the X2 is set on and value of D0>D1 than output Y2 is set ON
  • fourth example is a 16 bit greater than or equal to instruction operation of this example is if the X3 is set on and value of D0>=D1 than output Y3 is set to ON otherwise output is OFF.
  • fifth example is a less than instruction if the X4 is set to ON and DO<D1 than output Y4 is set to ON otherwise OFF.
  • sixth example is a less than or equal to instruction if the X5 is set to ON and DO<=D1 than output Y5 is set to ON otherwise OFF.


Mitsubishi PLC 32 bit Comparison Instruction

Mitsubishi PLC 32 bit Comparison Instruction used to compare 32 bit value. range of 32 bit value is more as compared to 16 bit data value. all instruction is same used as described in 16 bit comparison instruction only difference is the value range. so if your application have 32 bit value operation than use 32 bit comparison instruction.

Mitsubishi PLC 32 bit Comparison Instruction

above is the example of Mitsubishi PLC 32 bit Comparison Instruction -
  • first line is example of 32 bit Equal to(=) comparison instruction if the input X0 is set to active and D0 = D10 than output is set to ON otherwise off.
  • second line is example of 32 bit Not Equal to comparison instruction output is set ON if X1 is ON and D0 not equal to D10.
  • third example is 32 bit greater than instruction if the X2 is set on and value of D0<D10 than output Y2 is set ON
  • fourth example is a 32 bit greater than or equal to instruction operation of this example is if the X3 is set on and value of D0<=D10 than output Y3 is set to ON otherwise output is OFF.
  • fifth example is a less than instruction if the X4 is set to ON and D0>D10 than output Y4 is set to ON.
  • sixth example is a less than or equal to instruction if the X5 is set to ON and D0>=D10 than output Y5 is set to ON.


Mitsubishi Floating Point Comparison Instruction

Mitsubishi Floating Point Comparison Instruction is used for floating point and real type value 16 bit and 32 bit comparison instruction only compare numerical value without decimal but if your value is real or floating point than use floating point comparison instrunction.in floating point have same comparison instruction and same structure. in Mitsubishi Floating Point Comparison Instruction have two types
  • single precision floating point comparison instruction (E=,E<E>,E<,E<=,E>,E>=)
  • Double precision floating point comparison instruction (ED=,ED<ED>,ED<,ED<=,ED>,ED>=)
  • range for single precision floating point and Double precision floating point is different. used according your need.

Mitsubishi single precision Floating Point Comparison Instruction

above is the example of Mitsubishi single precision Floating Point Comparison Instruction in these example S1 is assigned by Data register D0 and S2 is assigned by D10.
  • first example is equal to comparison when X0 is set to active than comparison instruction perform if the value of D0 is equal to D10 than output is set to active.
  • second example is a Not equal comparison instruction output if X1 is set to active and D0≠D10 than output is set to active.
  • third example output is set to active if X1 is active and D0<D10.
  • Fourth example output is set to active if X1 is active and D0<=D10.
  • Fifth example output is set to active if X1 is active and D0>D10.
  • Sixth example output is set to active if X1 is active and D0>=D10.


Mitsubishi Double precision Floating Point Comparison Instruction

above is the example of Mitsubishi Double precision Floating Point Comparison Instruction in this example S1 is assigned by SD20 and S2 is assigned by SD30
  • first example output is set to active if X1 is active and SD20=SD30.
  • second example output is set to active if X1 is active and SD20≠SD30.
  • third example output is set to active if X1 is active and SD20<SD30.
  • first example output is set to active if X1 is active and SD20<=SD30.
  • first example output is set to active if X1 is active and SD20>SD30.
  • first example output is set to active if X1 is active and SD20>=SD30.


Mitsubishi character string data Comparison Instruction

Mitsubishi character string data Comparison Instruction compare two string according to comparison result output is set to active. A comparison operation involves the character-by-character comparison of the ASCII code of the first character in the character string. in this string comparison only for character or string.

Mitsubishi character string data Comparison Instruction

above is the example of Mitsubishi character string data Comparison Instruction -
  • in first example we use equal to comparison instruction for string . output is active only if the both character string is same otherwise false.
  • second example is a not equal to comparison for string if both string is not equal than out put is set active.
  • third and fourth example is less than and less than or equal to comparison instruction.
  • fifth and sixth example is greater than and greater than or equal to comparison instruction.

 
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