Omron CX-PROGRAMMER V9 Operation Manual page 201

Table of Contents

Advertisement

PART 1: CX-Programmer
CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format
Before conversion
C500
C**P
Example
/C120
DIFD
DIFD 0000
TIMH
TIMH 002 #0150
WSFT
WSFT 01 02
CMP
CMP 00 #0012
MOV
MOV #0100 05
MVN
MVN #0100 05
BIN
BIN 10 20
BCD
BCD 10 20
ASL
ASL 01
ASR
ASR 01
ROL
ROL 01
ROR
ROR 01
COM
COM 00
ADD
ADD 00 #1100 02
SUB
SUB 00 #1100 02
MUL
MUL 00 #1100 02
DIV
DIV 00 #1100 02
ANDW
ANDW 10 #1001 02
ORW
ORW 10 #1001 02
XORW
XORW 10 #1001 02
XNRW
XNRW 10 #1001 02
INC
INC 00
DEC
DEC 00
STC
STC
CLC
CLC
FUN70
FUN70 #0003 01 10
FUN71
FUN71 #1000 00 10
FUN72
FUN72 00 10
FUN73
FUN73 00 10
FUN74
FUN74 00 10
CX-Programmer _Page 118
CS/CJ
Example
Series
DIFD 000000
TIMH 2 #0150
WSFT #0000 0001 0002
CMP 0001 #0012
MOV #0100 0005
MVN #0100 0005
BIN 0010 0020
BCD 0010 0020
ASL 0001
ASR 0001
ROL 0001
ROR 0001
COM 0000
+BC
+BC 0000 #1100 0002
-BC
-BC 0000 #1100 0002
*B
*B 0000 #1100 0002
/B
/B 0000 #1100 0002
ANDW 0010 #1001 0002
ORW 0010 #1001 0002
Same as before
conversion
XORW 0010 #1001 0002
XNRW 0010 #1001 0002
++B
++B 0000
--B
--B 0000
STC
Same as before
conversion
CLC
XFERC
XFERC #0003 0001
0010
BSET
BSET #1000 0000 0010
ROOT
ROOT 0000 0010
XCHG
XCHG 0000 0010
SLD
SLD 0000 0010
After conversion
CV Series
Example
DIFD 000000
TIMH 0002 #0150
WSFT #0000 0001 0002
CMP 0001 #0012
MOV #0100 0005
MOV #0100 0005
BIN 0010 0020
BCD 0010 0020
ASL 0001
ASR 0001
ROL 0001
ROR 0001
COM 0000
+BC
+BC 0000 #1100 0002
-BC
-BC 0000 #1100 0002
*B
*B 0000 #1100 0002
/B
/B 0000 #1100 0002
ANDW 0010 #1001 0002
ORW 0010 #1001 0002
XORW 0010 #1001 0002
XNRW 0010 #1001 0002
INC 0
Same as
before
conversion
DEC 0
STC
CLC
XFER
XFER #0003 0001 0010
BSET
BSET #1000 0000 0010
ROOT
ROOT 0000 0010
XCHG
XCHG 0000 0010
SLD
SLD 0000 0010
OMRON
Remarks
---
---
- This instruction has only
two operands for the
C500/C120/C**P. After
conversion, a fixed value of
#0000 is added as the first
operand.
- After conversion, the first
operand of the old
instruction is moved to the
second operand.
- After conversion, the
second operand of the old
instruction is moved to the
third operand.
---
---
---
---
---
---
---
---
---
---
ADD is converted to its
corresponding instruction,
+BC.
SUB is converted to its
corresponding instruction, -
BC.
MUL is converted to its
corresponding instruction,
*B.
DIV is converted to its
corresponding instruction,
/B.
---
---
---
---
For CS/CJ-H PLCs, INC is
converted to its
corresponding instruction,
++B.
For CS/CJ-H PLCs, DEC is
converted to its
corresponding instruction, --
B.
---
---
- For CS/CJ-H PLCs,
FUN70 is converted to its
corresponding instruction,
XFERC.
- For the CV Series, FUN70
is converted to its
corresponding instruction,
XFER.
FUN71 is converted to its
corresponding instruction,
BSET.
FUN72 is converted to its
corresponding instruction,
ROOT.
FUN73 is converted to its
corresponding instruction,
XCHG.
FUN74 is converted to its
corresponding instruction,
SLD.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents