Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 3 of 3

CPM1A Micro Programmable Controller, pages 17 to 22

Pages 17 to 22 of 22

The original document is the PDF (436 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Omron CPM1A-TS101-DA

Page 17

CPM1A

CPM1A Program Example 1.

Analog timer for 0.0 to 20.0 seconds

2.

A

Analog timer for 0.0 to 60.0 seconds

25313(ON) TIM 000

250

BCD multiplication

MUL(32) 250 #0003 DM0500

Value of the analog setting 0 (0 to 200)

Value of the analog setting 0 (0 to 200) Triples the above value Multiplication result (0 to 600)

B TIM 001

DM 0500

J PULSE OUTPUT FUNCTION The CPM1A transistor output models have an output function capable of outputting a pulse of 20 Hz to 2 kHz (single-phase output). When used in combination with a Stepping Driver or Servodriver, positioning can be easily performed.

Program Example 1 scan turns ON. 25315 MOV(21) #5000 DM 0000

Application Example

MOV(21) #0002 DM 0001

Changing the speed of the Stepping Motor.

Sets the number of output pulses as 25,000 (times) in the data memory area.

DM 0001 0

0

0

DM 0000 2

5

0

0

MOV(21) #0200 DM 0100

Sets the initial frequency to 2,000 pulses/second.

PULS(65) 000 000 DM 0000

Pulse rate setting

@SPED(64) 000 000 DM 0100

Frequency conversion:

0

25315 Output point 01000 or 01001

1 scan turns ON.

00200 15000

Stepping Motor Driver

Speed change limit switch 00001 MOV(21) #0020 DM 0100

Stepping Motor

Pulse rate (BCD 8 digits)

Output port (output point 01000) Output mode (single) Frequency data (x 10 Hz) Changes to 200 Hz when the limit switch is turned ON.

25,000 pulses

ÉÉÉÉÉÉ ÉÉÉÉÉÉ ÉÉÉÉÉÉ ÉÉÉÉÉÉ

15000

Output 1 khzZ frequency

200 Hz

00000 turns ON

Pulse rate

0001 turns ON (limit switch)

17

Page 18

CPM1A

CPM1A

Communications J NT LINK FOR PROGRAMMABLE TERMINALS Use Omron’s high-speed NT Link for real-time communications between the CPM1A and a Programmable Terminal. Programmable Terminal

RS-232C Adapter

Communication Cable C200H-CN320-EU (2 m) C200H-CN520-EU (5 m) CPM1A CPU

J HOST LINK COMMUNICATIONS CPM1A Host Link communications consist of interactive procedures whereby the CPM1A returns a response to a command sent from the IBM PC/AT or compatible computer. These communications allow the IBM PC/AT or compatible computer to read and write in the CPM1A’s I/O Areas and Data Memory Areas as well as in areas containing the status of various settings.

Command

1:1 Host Link Communications

Response

C200HS-CN220-EU cable (2 m)

RS-232C Adapter

CPM1A CPU

1:N Host Link Communications

Response

Command

Computer with a RS-422/RS-485 communications port

RS-422 Adapter

18

CPM1A CPU

RS-422 Adapter

CPM1A CPU

RS-422 Adapter

CPM1A CPU

Page 19

CPM1A

CPM1A J 1:1 CONNECTIONS FOR DATA EXCHANGE

With a 1:1 Link, two CPM1As or a CPM1A and CQM1 or C200Hj are connected 1:1 with one side as the Master and the other as the Slave to provide an I/O link of a maximum of 256 points (LR 0000 to LR 1515).

Example of a 1:1 Link between CPM1As Communication Cable C200H-CN320-EU (2 m)

RS-232C Adapter

CPM1A CPU

RS-232C Adapter

CPM1A CPU

Master

Slave

Link bits

Link bits

WRITE area

READ area

LR 00 WRITE

LR 00

LR 07 LR 08 WRITE area

READ area

READ

READ LR 07 LR 08

LR 15

WRITE LR 15

Limitations of the CPM1A 1:1 Link CPM1A I/O links are limited to 16 words (LR 00 to LR 15). Therefore, use these 16 words (LR 00 to LR 15) on the CQM1 or C200Hj side when forming 1:1 links with a CQM1 or C200Hj.

J PROGRAM TRANSFER UNIT Use Omron’s EEPROM program transfer unit to update programs in machines or program multiple controllers with the same program. The CPM1-EMU01-V1 Expansion Memory Unit connects to the peripheral port of micro and small PLCs.

Uploading Downloading

EEPROM Omron SRM1, CPM1A, CPM2A, CPM2B, CPM2C and CQM1H programmable controllers

19

Page 20

CPM1A

CPM1A

Instruction Set J SEQUENCE INSTRUCTIONS

J DATA CONVERSION INSTRUCTIONS

Sequence Input Instructions

Instruction

Mnemonic

Code

Instruction

Code

BCD TO BINARY

BIN(@)

23

BCD(@)

24

Mnemonic

LOAD

LD f

BINARY TO BCD

LOAD NOT

LD NOT f

4 TO 16 DECODER

MLPX(@)

76 f

16 TO 4 DECODER

DMPX(@)

77

ASC(@)

86

AND

AND

AND NOT

AND NOT f

ASCII CODE CONVERT

OR

OR f

Data Comparison Instructions

OR NOT

OR NOT f

Mnemonic

Code

AND LD f

Instruction

AND LOAD

CMP

20

OR LOAD

OR LD f

COMPARE DOUBLE COMPARE

CMPL

60

Sequence Output Instructions

BLOCK COMPARE

BCMP(@)

68

Instruction

Mnemonic

Code

TABLE COMPARE

TCMP(@)

85

OUTPUT

OUT f

OUT NOT

OUT NOT f

J BCD/BINARY CALCULATION

SET

SET f

Instruction

Mnemonic

Code

RESET

RSET f

BCD ADD

ADD(@)

30

KEEP

KEEP

11

BCD SUBTRACT

SUB(@)

31

DIFFERENTIATE UP

DIFU

13

BCD MULTIPLY

MUL(@)

32

DIFFERENTIATE DOWN

DIFD

14

BCD DIVIDE

DIV(@)

33

BINARY ADD

ADB(@)

50

BINARY SUBTRACT

SBB(@)

51

BINARY MULTIPLY

MLB(@)

52

BINARY DIVIDE

DVB(@)

53

DOUBLE BCD ADD

ADDL(@)

54

DOUBLE BCD SUBTRACT

SUBL(@)

55

DOUBLE BCD MULTIPLY

MULL(@)

56

DOUBLE BCD DIVIDE

DIVL(@)

57

Sequence Control Instructions Instruction

Mnemonic

Code

NO OPERATION

NOP

00

END

END

01

INTERLOCK

IL

02

INTERLOCK CLEAR

ILC

03

JUMP

JMP

04

JUMP END

JME

05

J DATA MOVEMENT INSTRUCTIONS

J TIMER/COUNTER INSTRUCTIONS

Instruction

Mnemonic

Code

Instruction

Mnemonic

Code

MOVE

MOV(@)

21

TIMER

TIM f

MOVE NOT

MVN(@)

22

COUNTER

CNT f

BLOCK TRANSFER

XFER(@)

70

REVERSIBLE COUNTER

CNTR

12

BLOCK SET

BSET(@)

71

HIGH-SPEED TIMER

TIMH

15

DATA EXCHANGE

XCHG(@)

73

SINGLE WORD DISTRIBUTE

DIST(@)

80

J STEP INSTRUCTIONS Instruction

Mnemonic

DATA COLLECT

COLL(@)

81

Code

MOVE BIT

MOVB(@)

82

MOVD(@)

83

STEP DEFINE

STEP

08

MOVE DIGIT

STEP START

SNXT

09

Note: f:

Instruction

Mnemonic

Code

INCREMENT

INC(@)

38

DECREMENT

DEC(@)

39

J INCREMENT/DECREMENT

20

Instruction keys allocated to the Programming Console. (@): Instruction can be differentiated using input rise time to execute the instruction in just one cycle.

Page 21

CPM1A

CPM1A J LOGIC INSTRUCTIONS

J PERIPHERAL DEVICE CONTROL

Instruction

Mnemonic

Code

I/O Unit Instructions

COMPLEMENT

COM(@)

29

Instruction

Mnemonic

Code

LOGICAL AND

ANDW(@)

34

7-SEGMENT DECODER

SDEC(@)

78

LOGICAL OR

ORW(@)

35

I/O REFRESH

IORF(@)

97

EXCLUSIVE OR

XORW(@)

36

EXCLUSIVE NOR

XNRW(@)

37

Instruction

Mnemonic

Code

MESSAGE

MSG

46

J SHIFT INSTRUCTIONS

Display Instruction

Instruction

Mnemonic

Code

High-speed Counter Control Instructions

SHIFT REGISTER

SFT f/10

Instruction

Mnemonic

Code

WORD SHIFT

WSFT(@)

16

MODE CONTROL

INI(@)

61

ASYNCHRONOUS SHIFT REGISTER

ASFT(@)

17

PV READ

PRV(@)

62

ARITHMETIC SHIFT LEFT

ASL(@)

25

COMPARE TABLE LOAD

CTBL(@)

63

ARITHMETIC SHIFT RIGHT

ASR(@)

26

ROTATE LEFT

ROL(@)

27

ROTATE RIGHT

ROR(@)

28

Instruction

Mnemonic

Code

ONE DIGIT SHIFT LEFT

SLD(@)

74

SPEED OUTPUT

SPED(@)

64

ONE DIGIT SHIFT RIGHT

SRD(@)

75

SET PULSES

PULS(@)

65

REVERSIBLE SHIFT REGISTER

SFTR(@)

84

Pulse Output Control Instructions

J DAMAGE DIAGNOSIS INSTRUCTIONS

J SPECIAL CALCULATION INSTRUCTION

Instruction

Mnemonic

Code

Instruction

Mnemonic

Code

FAILURE ALARM

FAL(@)

06

BIT COUNTER

BCNT(@)

67

SEVERE FAILURE ALARM

FALS

07

J SPECIAL SYSTEM INSTRUCTIONS

J SUBROUTINE INSTRUCTIONS Instruction

Mnemonic

Code

Instruction

Mnemonic

Code

SUBROUTINE ENTER

SBS(@)

91

SET CARRY

STC(@)

40

SUBROUTINE ENTRY

SBN

92

CLEAR CARRY

CLC(@)

41

SUBROUTINE RETURN

RET

93

MACRO

MCRO

99

J INTERRUPT CONTROL INSTRUCTIONS Instruction

Mnemonic

Code

INTERVAL TIMER

STIM(@)

69

INTERRUPT CONTROL

INT(@)

89

Note: f:

Instruction keys allocated to the Programming Console. (@): Instruction can be differentiated using input rise time to execute the instruction in just one cycle.

21

Page 22

CPM1A

CPM1A

J SUMMARY OF FUNCTION CODES The following table lists the CPM1A instructions that have fixed function codes. Each instruction is listed by mnemonic and by instruction name. Use the numbers in the leftmost column as the left digit and the number in the column heading as the right digit of the function code. Left digit

Right digit 0

1

2

3

4

5

6

7

8

9

0

NOP No operation

END End

IL Interlock

ILC Interlock clear

JMP Jump

JME Jump end

FAL(@) Failure alarm and reset

FALS Severe failure alarm

STEP Step define

SNXT Step start

1

SFT Shift register

KEEP Keep

CNTR Reversible counter

DIFU Differentiate up

DIFD Differentiate down

TIMH Highspeed timer

WSFT(@) Word shift

ASFT(@) Asynchronous shift register

---

---

2

CMP Compare

MOV(@) Move

MVN(@) Move not

BIN(@) BCD to binary

BCD(@) Binary to BCD

ASL(@) Shift left

ASR(@) Shift right

ROL(@) Rotate left

ROR(@) Rotate right

COM(@) Complement

3

ADD(@) BCD add

SUB(@) BCD subtract

MUL(@) BCD multiply

DIV(@) BCD divide

ANDW (@) Logical AND

ORW(@) Logical OR

XORW (@) Exclusive OR

XNRW (@) Exclusive NOR

INC(@) Increment

DEC(@) Decrement

4

STC(@) Set carry

CLC(@) Clear carry

---

---

---

---

MSG(@) Message display

---

---

---

5

ADB(@) Binary add

SBB(@) Binary subtract

MLB(@) Binary multiply

DVB(@) Binary divide

ADDL(@) Double BCD add

SUBL(@) Double BCD subtract

MULL(@) Double BCD multiply

DIVL(@) Double BCD divide

---

---

6

CMPL Double compare

INI(@) Mode control

PRV(@) Highspeed counter PV read

CTBL(@) Comparison table load

SPED(@) Speed output (See Note)

PULS(@) Set pulses (See Note)

---

BCNT(@) Bit counter

BCMP(@) Block compare

STIM(@) Interval timer

7

XFER(@) Block transfer

BSET(@) Block set

---

XCHG(@) Data exchange

SLD(@) One digit shift left

SRD(@) One digit shift right

MLPX(@) 4-to-16 decoder

DMPX(@) 16-to-4 encoder

SDEC(@) 7-segment decoder

---

8

DIST(@) Single word distribute

COLL(@) Data collect

MOVB(@) Move bit

MOVD(@) Move digit

SFTR(@) Reversible shift register

TCMP(@) Table compare

ASC(@) ASCII convert

---

---

INT(@) Interrupt control

9

---

SBS(@) Subroutine entry

SBN Subroutine define

RET Subroutine return

---

---

---

IORF(@) I/O refresh

---

MCRO (@) Macro

Note: Only for the CPM1A transistor output models.

NOTE: DIMENSIONS SHOWN ARE IN MILLIMETERS. To convert millimeters to inches divide by 25.4.

R

OMRON ELECTRONICS LLC

OMRON CANADA, INC.

One East Commerce Drive Schaumburg, IL 60173

885 Milner Avenue Scarborough, Ontario M1B 5V8

1-800-55-OMRON

416-286-6465

Cat. No. GC MSPLC1

22

03/01

Specifications subject to change without notice.

Printed in U.S.A.