![Mitsubishi Electric CR750 Series Instruction Manual Download Page 141](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840141.webp)
4MELFA-BASIC V
MELFA-BASIC V functions
4-121
Note1) Please refer to
Page 122, "Relative calculation of position data (multiplication)"
Note 2) Please refer to
Page 122, "Relative calculation of position data (Addition)"
.
Logical
operation
And
Logical AND operation M1=M_Inb(1) And &H0F
’Convert the input signal bit 1 to 4 status and substitute in numeric
variable M1. (Input signal bits 5 to 8 remain OFF.)
Or
Logical OR operation M_Outb(20)=M1 Or &H80
’Output the numeric variable M1 value to output signal bit 20 to 27.
Output bit signal 27 is always ON at this time.
Not
NOT operation
M1=Not M_Inw(1)
’Reverse the status of input signal bit 1 to 16 to create a value, and
substitute in numeric variable M1.
Xor
Exclusive OR
operation
N2=M1 Xor M_Inw(1)
’Obtain the exclusive OR of the states of M1 and the input signal bits 1
to 16, convert into a value and substitute in numeric variable M2.
<<
Logical left shift
operation
M1=M1<<2
’Shift numeric variable M1 two bits to the left.
>>
Logical right shift
operation.
M1=M1>>1
’Shift numeric variable M1 bit to the right.
Class
Operator
Meaning
Statement example