B-3 arithmetic instructions – KEYENCE KV Series User Manual
Page 189

Appendices
2-165
1
Appendices
B-3
Arithmetic instructions
Instruction name
Mnemonic
Outline of process
Data Memory Write DW
Writes constant directly into data memory.
Trimmer Setting
TMIN
Converts rotation angle of trimmer into a number from
@TMIN
0 to 249, and inputs it back to internal register.
Load A
LDA
Inputs value specified by operand to internal register.
@LDA
* Inputs current value to internal register when timer/
counter is specified by operand.
Store A
STA
Transfers content of internal register to destination
@STA
specified by operand.
* Preset value is changed when timer/counter is
specified by operand.
Compare
CMP
Compares content of internal register with value
@CMP
specified by operand, and outputs result to 2009 to
2011.
Add
ADD
Adds value specified by operand to content of internal
@ADD
register, and inputs result back to same internal
register.
Subtract
SUB
Subtracts value specified by operand from content of
@SUB
internal register, and inputs result back to same internal
register.
Multiply
MUL
Multiplies content of internal register by value specified
@MUL
by operand, and inputs result back to same internal
register.
Divide
DIV
Divides content of internal register by value specified
@DIV
by operand, and inputs result back to same internal
register.
And A
ANDA
ANDs content of internal register and value specified
@ANDA
by operand for each of 16 bits, and inputs result back
to same internal register.
Or A
ORA
ORs content of internal register and value specified by
@ORA
operand for each of 16 bits, and inputs result back to
same internal register.
Exclusive Or A
EORA
EXCLUSIVE ORs content of internal register and value
@EORA
specified by operand for each of 16 bits, and inputs
result back to same internal register.
Shift Right A
SRA
Moves content of internal register serially right by value
@SRA
specified by operand.
Shift Left A
SLA
Moves content of internal register serially left by value
@SLA
specified by operand.
Rotate Right A
RRA
Rotates content of internal register clockwise by value
@RRA
specified by operand.
Rotate Left A
RLA
Rotates content of internal register counterclockwise by
@RLA
value specified by operand.
Complement
COM
Inverts content of each bit in internal register.
@COM
Increment Memory
INC
Adds 1 to content of data memory specified by
@INC
operand.
Decrement
DEC
Subtracts 1 from content of data memory specified by
Memory
@DEC
operand.
Multiplexer
MPX
Converts one digit data of internal register specified by
@MPX
operand into 16-bit data.
Demultiplexer
DMX
Converts into a value in position of most significant bit
@DMX
in internal register.
KVSKA Appendix.P65
08.3.11, 11:26 AM
165