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

The text of a manual · part 22 of 27

SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual: Appendix, pages 172 to 179

Pages 172 to 179 of 211, from SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual

The original document is the PDF (2.2 MB). 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 C28P

Page 172

Appendix B

Programming Instructions Basic Instructions Name Mnemonic

Symbol

Function

Load LD

Operands

Used to start instruction line with status of designated bit.

B: IR SR HR AR LR TC TR

Used to start instruction line with inverse of designated bit.

B: IR SR HR AR LR TC

Logically ANDs status of designated bit with execution condition.

B: IR SR HR AR LR TC

Logically ANDs inverse of designated bit with execution condition.

B: IR SR HR AR LR TC

Logically ORs status of designated bit with execution condition.

B: IR SR HR AR LR TC

Logically ORs inverse of designated bit with execution condition.

B: IR SR HR AR LR TC

Block AND AND LD

Logically ANDs results of preceding blocks.

None

Block OR OR LD

Logically ORs results of preceding blocks.

None

B

Load NOT LD NOT B

AND AND

B

AND NOT AND NOT B

OR OR B

OR NOT OR NOT B

Area

166

Bits/Words

IR 0000 to 1807

SR 1808 to 1907

HR HR 000 to 915

TR TR 0 to 7

TC TC 00 to 47

DM

#

DM 00 to DM 63

0000 to 9999 or 0000 to FFFF

Page 173

Appendix B

Programming Instructions Name Mnemonic

Symbol

Function

Output OUT

Turns ON B for ON execution condition; turns OFF B for OFF execution condition.

B: IR SR HR AR LR TR

Turns OFF B for ON execution condition; turns ON B for OFF execution condition.

B: IR SR HR AR LR

ON–delay (decrementing) timer operation. Set value: 999.9 s; accuracy: +0/–0.1 s. Same TC bit cannot be assigned to more than one timer/ counter. The TC bit is input as a constant.

N: TC

SV: IR HR AR LR DM #

A decrementing counter. SV: 0 to 9999; CP: count pulse; R: reset input. The TC bit is input as a constant.

N: TC

SV: IR HR AR LR DM #

B

Output NOT OUT NOT B

Timer TIM TIM N

SV

Counter CNT CP R

CNT N

Operands

SV

Special Instructions Name Mnemonic

End END(01)

Interlock IL(02) Interlock Clear ILC(03)

Jump JMP(04) Jump End JME(05)

Symbol

Function

Operands

Required at the end of the program.

None

If interlock condition is OFF, all outputs are turned OFF and all timer PVs reset between this IL(02) and the next ILC(03). Other instructions are treated as NOP; counter PVs are maintained.

None

All instructions between JMP(04) and the next JME(05) are ignored when execution condition is OFF. No more than eight jumps can be used.

None

END(01)

IL(02) ILC(03)

JMP(04) JME(05)

167

Page 174

Appendix B

Programming Instructions Name Mnemonic

Symbol

Shift Register SFT(10)

Function

I SFT(10) St E

P R

Creates a bit shift register from the starting word (St) through the ending word (E). I: input bit; P: shift pulse; R: reset input. St must be less than or equal to E and St and E must be in the same data area. 15

0

15

St/E: IR HR AR LR

0 IN

St

E

Latching Relay KEEP(11)

Operands

Defines a bit (B) as a latch controlled by set (S) and reset (R) inputs.

B: IR HR AR LR

N: TC

CNTR(12) N SV

Increases or decreases PV by one whenever the increment input (II) or decrement input (DI) signals, respectively, go from OFF to ON. SV: 0 to 9999; R: reset input. Must not access the same TC bit as another timer/counter. The TC bit is input as a constant.

DIFU(13) B

DIFU turns ON the designated bit (B) for one scan on the rising edge of the input signal; DIFD turns ON the bit for one scan on the trailing edge.

B: IR HR AR LR

A high-speed, ON-delay (decrementing) timer. SV: 0.01 to 99.99 s; accuracy: +0/–0.1 s. Must not be assigned the same TC bit as another timer or couter. The TC bit is input as a constant.

N: TC

Left shifts data between starting (St) and ending (E) words in word units, writing zeros into starting word. St must be less than or equal to E and St and E must be in the same data area.

St/E: IR HR AR LR DM

Compares two sets of four–digit hexadecimal data (Cp1 and Cp2) and outputs result to GR, EQ, and LE.

Cp1/Cp2: IR SR HR AR LR TC DM #

S

KEEP(11) B R

Reversible Counter CNTR (12)

II DI R

Differentiate Up DIFU(13) Differentiate Down DIFD(14)

DIFD(14) B

High–speed Timer TIMH(15) TIMH N

SV

Word Shift WSFT(16) WSFT(16) St E

Compare CMP(20) CMP(20) Cp1 Cp2

Area

168

SV: IR SR HR AR LR DM #

Bits/Words

IR 0000 to 1807

SR 1808 to 1907

HR HR 000 to 915

TR TR 0 to 7

TC TC 00 to 47

SV: IR SR HR AR LR HR #

DM

#

DM 00 to DM 63

0000 to 9999 or 0000 to FFFF

Page 175

Appendix B

Programming Instructions Name Mnemonic

Symbol

Move MOV(21)

Function

Operands

Transfers source data (S) (word or four–digit constant) to destination word (D).

S: IR SR HR AR LR TC DM #

D: IR HR AR LR DM

Inverts source data (S) (word or four–digit constant) and then transfers it to destination word (D).

S: IR SR HR AR LR TC DM #

D: IR HR AR LR DM

Converts four–digit, BCD data in source word (S) into 16–bit binary data, and outputs converted data to result word (R).

S: IR SR HR AR LR TC DM

R: IR HR AR LR DM

S: IR SR HR AR LR DM

R: IR HR AR LR DM

Au/Ad: IR SR HR AR LR TC DM #

R: IR HR AR LR DM

Mi/Su: IR SR HR AR LR TC DM #

R: IR HR AR LR DM

MOV(21) S D

Move NOT MVN(22) MVN(22) S D

BCD to Binary BIN(23)

Binary to BCD BCD(24)

BCD Add ADD(30)

BCD Subtract SUB(31)

BIN(23) S R

BCD(24) S R

ADD(30) Au Ad R

SUB(31) Mi Su R

S (BCD)

R

(BIN) x100 x160 x101 x161 x102 x162 x103 x163

Converts binary data in source word (S) into BCD, and outputs converted data to result word (R). S

R (BCD)

(BIN) x160 x100 x161 x101 x162 x102 x163 x103

Adds two four–digit BCD values (Au and Ad) and content of CY, and outputs result to specified result word (R). Au + Ad +

CY

R CY

Subtracts both four–digit BCD subtrahend (Su) and content of CY from four–digit BCD minuend (Mi) and outputs result to specified result word (R). Mi – Su

CY

R CY

169

Page 176

Appendix B

Programming Instructions Name Mnemonic

Symbol

Function

Set Carry STC(40)

Operands

Sets carry flag (i.e., turns CY ON).

None

CLC clears carry flag (i.e, turns CY OFF).

None

Converts up to four hexadecimal digits in source word (S) into decimal values from 0 to 15 and turns ON, in result word(s) (R), bit(s) whose position corresponds to converted value. Digits to be converted designated by Di (rightmost digit: indicates the first digit; next digit to left: gives the number of digits minus 1).

S: IR SR HR AR LR TC DM

Di: IR HR AR LR TC DM #

R: IR HR AR LR DM

S: IR SR HR AR LR TC DM

R: IR HR AR LR DM

Di: IR HR AR LR TC DM #

STC(40)

Clear Carry CLC(41) CLC(41)

4-to-16 Decoder MLPX(76)

MLPX(76) S Di R

S

0 to F

R 15

16-to-4 Encoder DMPX(77)

DMPX(77) S R Di

00

Determines position of highest ON bit in source word(s) (starting word: S) and turns ON corresponding bit(s) in result word (R). Digits to receive converted value are designated by Di (rightmost digit: indicates the first digit; next digit to left: gives number of words to be converted minus 1). 15

00

S

R

High-speed Counter HDM(98)

170

Used to create and control a high-speed (2-kHz) counter for IR 0000 with software and hardware (IR 0001) resets.

HDM(98) D

Area Bits/Words

IR 0000 to 1807

0 to F

SR 1808 to 1907

HR HR 000 to 915

TR TR 0 to 7

TC TC 00 to 47

D: IR HR DM

DM

#

DM 00 to DM 63

0000 to 9999 or 0000 to FFFF

Page 177

Appendix C Programming Console Operations

System Operations Operation/Description

Modes*

Password Input Controls access to the PC’s programming functions. To gain access to the system once “PASSWORD” has been displayed, press CLR, MONTR, and then CLR.

RMP

Buzzer ON/OFF The buzzer can be switched to operate whenever Programming Console keys are pressed (as well as for the normal error indication). BZ is displayed in the upper right corner when the buzzer is operative. The buzzer can be enabled by pressing SHIFT and then 1 immediately after entering the password or after changing the mode.

RMP

Data Clear Unless otherwise specified, this operation will clear all erasable memory in Program Memory and IR, HR, DM, and TC areas. To clear EEPROM memory the write-enable switch must be ON. The branch lines shown are used only when performing a partial memory clear, with each of the memory areas entered being retained. Specifying an address will result in the Program Memory from that address on being deleted. All memory up to that address will be retained. When installing a new program, all memory areas should be cleared.

P

Error Message Read Displays error messages in sequence with most severe mes-sages displayed first. Press monitor to access remaining messages.

RPM

Program Header Display

RPM

Key sequence CLR

MONTR

CLR

B SHIFT

1

PLAY CLR

NOT

REC

MONTR

All Clear

RESET

SET

[Address]

Partial Clear

HR

CNT

DM

CLR

FUN

MONTR

Retained if pressed

MONTR

Displays the name of the program, along with the version number and the time it was last revised (given in year, month, day, hour, and minute). *Modes in which the given instruction is applicable: R = RUN, M = MONITOR, P = PROGRAM

171

Page 178

Appendix C

Programming Console Operations Programming Operations Operation/Description

Modes*

Address Designation RPM Displays the specified address. Can be used to start programming from a non-zero address or to access an address for editing. Leading zeros need not be entered. The contents of the designated address will not be dislayed until the down key is pressed. The up and down keys can then be used to scroll through the Program Memory. Program Input Used to enter or edit program instructions. This operation overwrites the contents of the memory at the displayed address. Input NOT for differentiated instructions. Input any operands and press WRITE after each.

[Address]

[Address displayed]

[Instruction

[Operand] word]

Address currently displayed

RPM

Instruction Insert/Delete P The displayed instruction can be deleted, or another instruction can be inserted before it. Care should be taken to avoid inadvertant deletions as there is no way of recovering them. When an instruction is deleted all subsequent instruction addresses are adjusted so that there are no empty addresses.

172

CLR

P

Program Read RPM Allows the user to scroll through the program address-by-address. If the Program Memory is read in RUN or MONITOR mode, the ON/OFF status of each displayed bit is also shown. Program Search Allows the program to be searched for occurrences of any desiganted instruction or data area address. To designate a bit address, press SHIFT, CONT/#, and then input the address, including the data area code if required. Finally, press SRCH. Pressing SRCH again will fnd the next occurrence. For multiword instructions, the up and down keys can be used to scroll through the words before continuing the search. If the Program Memory is in RUN or MONITOR mode, the ON/OFF status of each displayed bit will also be displayed.

Key sequence

CLR

[Instruction]

CLR

SHIFT

SRCH

SRCH

CONT

[Address]

# LR

HR

SHIFT

HR

TIM

CNT

Locate position in program then enter

[Enter new instruction]

INS

Instruction currently displayed

DEL

SRCH

(AR)

SRCH

Page 179

Appendix C

Programming Console Operations Operation/Description

Program Check Once a program has been entered, it should be checked for errors. The address where the error was generated will also be displayed.

Modes*

Key sequence

P

A CLR

SRCH

To check up to END(01)

1

CLR

To abort

2

(0, 1, 2: check level)

0

SRCH

SRCH

B

C

*Modes in which the given instruction is applicable: R = RUN, M = MONITOR, P = PROGRAM

173