Omron FQM1-CM001, FQM1-MMA21, FQM1-MMP21 operation manual Programming, Appendix A, Operand

Models: FQM1-MMP21 FQM1-MMA21 FQM1-CM001

1 414
Download 414 pages 44.52 Kb
Page 297
Image 297
Manual background

Programming

 

 

 

 

 

 

 

 

Appendix A

 

 

 

 

 

 

 

 

 

 

 

Operand

 

 

Description

 

 

Notation

 

 

 

Application examples

 

 

 

 

 

 

 

 

 

 

 

Specifying

Indirect

The bit or word with the memory

,IR0

 

LD ,IR0

 

an indirect

address

address contained in IR@ will be speci-

 

 

 

Loads the bit with the memory address

address

(No offset)

fied.

 

 

 

 

 

in IR0.

 

using a reg-

 

Specify ,IR@ to specify bits and words

,IR1

 

MOV #0001 ,IR1

ister

 

for instruction operands.

 

 

 

 

Stores #0001 in the word with the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

memory address in IR1.

 

 

 

 

 

 

 

 

 

 

 

Constant

The bit or word with the memory

+5,IR0

 

LD +5 ,IR0

 

offset

address in IR@ + or – the constant is

 

 

 

Loads the bit with the memory address

 

 

specified.

 

 

 

 

in IR0 + 5.

 

 

Specify +/– constant ,IR@. Constant off-

+31,IR1

 

MOV #0001 +31 ,IR1

 

 

sets range from –2048 to +2047 (deci-

 

 

 

Stores #0001 in the word with the

 

 

mal). The offset is converted to binary

 

 

 

memory address in IR1 + 31

 

 

data when the instruction is executed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Auto Incre-

The contents of IR@ is incremented by

,IR0 ++

 

LD ,IR0 ++

 

ment

+1 or +2 after referencing the value as

 

 

 

Increments the contents of IR0 by 2

 

 

an memory address.

 

 

 

 

after the bit with the memory address

 

 

+1: Specify ,IR@+

 

 

 

 

in IR0 is loaded.

 

 

+2: Specify ,IR@ + +

 

,IR1 +

 

MOV #0001 ,IR1 +

 

 

 

 

 

 

 

 

Increments the contents of IR1 by 1

 

 

 

 

 

 

 

 

after #0001 is stored in the word with

 

 

 

 

 

 

 

 

the memory address in IR1.

 

 

 

 

 

 

 

 

 

 

 

Auto Dec-

The contents of IR@ is decremented by

,– –IR0

 

LD ,– –IR0

 

rement

–1 or –2 after referencing the value as

 

 

 

After decrementing the contents of IR0

 

 

an memory address.

 

 

 

 

by 2, the bit with the memory address

 

 

–1: Specify ,–IR@

 

 

 

 

in IR0 is loaded.

 

 

–2: Specify ,– –IR@

 

,–IR1

 

MOV #0001 ,–IR1

 

 

 

 

 

 

 

 

After decrementing the contents of IR1

 

 

 

 

 

 

 

 

by 1, #0001 is stored in the word with

 

 

 

 

 

 

 

 

the memory address in IR1.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data

Operand

Data form

Symbol

 

Range

 

Application example

16-bit con-

All binary data or

Unsigned binary

#

 

#0000 to #FFFF

 

---

stant

a limited range of

 

 

 

 

 

 

 

Signed decimal

±

 

–32768 to

 

 

---

 

binary data

 

 

 

 

+32767

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unsigned deci-

&

 

&0 to &65535

 

---

 

 

 

mal

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

All BCD data or a

BCD

#

 

#0000 to #9999

 

---

 

limited range of

 

 

 

 

 

 

 

 

 

BCD data

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

32-bit con-

All binary data or

Unsigned binary

#

 

#00000000 to

 

---

stant

a limited range of

 

 

 

#FFFFFFFF

 

 

 

binary data

 

 

 

 

 

 

 

 

 

 

 

Signed decimal

±

 

–2147483648 to

 

---

 

 

 

 

 

 

 

 

 

 

 

+2147483647

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unsigned deci-

&

 

&0 to

 

 

---

 

 

 

mal

 

 

&4294967295

 

 

 

 

 

 

 

 

 

 

 

All BCD data or a

BCD

#

 

#00000000 to

 

---

 

limited range of

 

 

 

#99999999

 

 

 

 

BCD data

 

 

 

 

 

 

 

 

 

274

Page 297
Image 297
Omron FQM1-CM001, FQM1-MMA21, FQM1-MMP21 operation manual Programming, Appendix A, Operand