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

The text of a manual · part 42 of 60

SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual: SECTION 6 Host Link Commands, pages 383 to 390

Pages 383 to 390 of 520, from SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual

The original document is the PDF (2.1 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 CQM1-CPU21

Page 383

Section

Host Link Commands

6-3

Note TC number: 0000 to 0511 in CQM1 PCs, 0000 to 0127 in CPM1/CPM1A/SRM1 PCs Response Format @

An end code of 00 indicates normal completion.

x 101 x 100

R

Node no.

Header code

$

Parameters

End code

Operand

SV

↵ x 161 x 160 OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

FCS

Terminator

Name, TC Number (Command) Specify the name of the instruction for reading the SV in “Name.” Make this setting in 4 characters. In “TC number,” specify the timer/counter number used by the instruction. Instruction name OP1

OP2

OP3

Classification

T

I

M

OP4 (Space)

T

I

M

H

HIGH-SPEED TIMER

C

N

T

(Space)

COUNTER

C

N

T

R

REVERSIBLE COUNTER

TIMER

Operand, SV (Response) The name that indicates the SV classification is returned to “Operand,” and either the word address where the SV is stored or the constant SV is returned to “SV.” Operand

Classification OP4 (Space) IR or SR

Constant or word address

OP1 C

OP2 I

OP3 O

CQM1 PCs 0000 to 0255

L

R

(Space) (Space) LR

0000 to 0063

CPM1 PCs 0000 to 0019 0200 to 0255 0000 to 0015

H

R

(Space) (Space) HR

0000 to 0099

0000 to 0019

A

R

(Space) (Space) AR

0000 to 0027

0000 to 0015

D

M

(Space) (Space) DM

0000 to 6655

0000 to 6655

D

M

(Space) DM (indirect)

0000 to 6655

0000 to 6655

C

O

N

(Space) Constant

0000 to 9999

0000 to 9999

Note The instruction name specified under “Name” must be in four characters. Fill any gaps with spaces to make a total of four characters.

6-3-17 SV READ 3 –– R% (CQM1 Only) Reads the constant SV or the word address where the SV is stored. The SV that is read is a 4-digit decimal number (BCD) written in the second word of the TIM, TIMH(15), CNT, or CNTR(12) instruction at the specified program address in the user’s program. With this command, program addresses can be specified for a program of 10K or more. Command Format @ x 101 x 100

R

Node no.

Header code

% x 105 x 104 x 103 x 102 x 101 x 100 OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

Program address

Name

Timer/counter (0000 to 0511)

Must be “0”

FCS

↵

Terminator

365

Page 384

Section

Host Link Commands Response Format @

6-3

An end code of 00 indicates normal completion.

x 101 x 100

R

Node no.

Header code

Parameters

% x 161 x 160 OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

End code

Operand

SV

FCS

↵

Terminator

Name, TC Number (Command) Specify the name of the instruction for reading the SV in “Name.” Make this setting in 4 characters. In “TC number,” specify the timer/counter number used by the instruction. Instruction name OP1

OP2

T T C C

OP3 M M T T

I I N N

OP4 (Space) H (Space) R

Classification

TC number range

TIMER HIGH-SPEED TIMER COUNTER REVERSIBLE COUNTER

0000 to 0511

Operand, SV (Response) The name that indicates the SV classification is returned to “Operand,” and either the word address where the SV is stored or the constant SV is returned to “SV.” Operand OP2

Classification OP4 (Space) IR or SR

Constant or word address

OP1 C

I

OP3 O

L

R

(Space) (Space) LR

0000 to 0063

H

R

(Space) (Space) HR

0000 to 0099

A

R

(Space) (Space) AR

0000 to 0027

D

M

(Space) (Space) DM

0000 to 6655

D

M

(Space) DM (indirect)

0000 to 6655

C

O

N

(Space) Constant

0000 to 9999

0000 to 0255

Note The instruction name specified under “Name” must be in four characters. Fill any gaps with spaces to make a total of four characters.

6-3-18 SV CHANGE 1 –– W# Searches for the first instance of the specified TIM, TIMH(15), CNT, or CNTR(12) instruction in the user’s program and changes the SV to new constant SV specified in the second word of the instruction. The program is searched from the beginning, and it may therefore take approximately 10 seconds to produce a response. Command Format @ x 101 x 100

W

Node no.

Header code

#

OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100 x 103 x 102 x 101 x 100

Name

TC number*

SV (0000 to 9999)

FCS

↵

Terminator

Note TC number: 0000 to 0511 in CQM1 PCs, 0000 to 0127 in CPM1/CPM1A/SRM1 PCs

366

Page 385

Section

Host Link Commands Response Format

6-3

An end code of 00 indicates normal completion. @

Parameters x 101 x 100

W

# x 161 x 160

Node no.

Header code

End code

FCS

↵

Terminator

Name, TC Number (Command) In “Name,” specify the name of the instruction, in four characters, for changing the SV. In “TC number,” specify the timer/counter number used for the instruction. Instruction name OP1

OP2

Classification

OP3

T

I

M

OP4 (Space)

T

I

M

H

HIGH-SPEED TIMER

C

N

T

(Space)

COUNTER

C

N

T

R

REVERSIBLE COUNTER

TIMER

6-3-19 SV CHANGE 2 –– W$ Changes the contents of the second word of the TIM, TIMH(15), CNT, or CNTR(12) at the specified program address in the user’s program. This can only be done with a program of less than 10K. Command Format @ x 101 x 100

W

Node no.

Header code

$ x 103 x 102 x 101 x 100 OP1 OP2 OP3 OP4

Program address x 103 x 102 x 101 x 100

Name

TC number

OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

Operand

SV

FCS

↵

Terminator

Note TC number: 0000 to 0511 in CQM1 PCs, 0000 to 0127 in CPM1/CPM1A/SRM1 PCs Response Format

An end code of 00 indicates normal completion. @

Parameters x 101 x 100

W

$ x 161 x 160

Node no.

Header code

End code

FCS

↵

Terminator

Name, TC Number (Command) In “Name,” specify the name of the instruction, in four characters, for changing the SV. In “TC number,” specify the timer/counter number used for the instruction. Instruction name OP1

OP2

OP3

Classification

T

I

M

OP4 (Space)

T

I

M

H

HIGH-SPEED TIMER

C

N

T

(Space)

COUNTER

C

N

T

R

REVERSIBLE COUNTER

TIMER

367

Page 386

Section

Host Link Commands

6-3

Operand, SV (Response) In “Operand,” specify the name that indicates the SV classification. Specify the name in four characters. In “SV,” specify either the word address where the SV is stored or the constant SV. Operand

Classification OP4 (Space) IR or SR

Constant or word address

OP1 C

OP2 I

OP3 O

CQM1 PCs 0000 to 0252

L

R

(Space) (Space) LR

0000 to 0063

CPM1 PCs 0000 to 0019 0200 to 0252 0000 to 0015

H

R

(Space) (Space) HR

0000 to 0099

0000 to 0019

A

R

(Space) (Space) AR

0000 to 0027

0000 to 0015

D

M

(Space) (Space) DM

0000 to 6655

D

M

(Space) DM (indirect)

0000 to 6655

C

O

N

(Space) Constant

0000 to 9999

0000 to 1023 6144 to 6655 0000 to 1023 6144 to 6655 0000 to 9999

6-3-20 SV CHANGE 3 –– W% (CQM1 Only) Changes the contents of the second word of the TIM, TIMH(15), CNT, or CNTR(12) at the specified program address in the user’s program. With this command, program address can be specified for a program of more than 10K. Command Format @ x 101 x 100

Node no.

W

% x 105 x 104 x 103 x 102 x 101 x 100 OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

Header code

Name

Program address

Timer/counter (0000 to 0511)

Must be “0”

Response Format

OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100

Operand

SV

FCS

↵

Terminator

An end code of 00 indicates normal completion. @

Parameters x 101 x 100

W

% x 161 x 160

Node no.

Header code

End code

FCS

↵

Terminator

Name, TC Number (Command) In “Name,” specify the name of the instruction, in four characters, for changing the SV. In “TC number,” specify the timer/counter number used for the instruction. Instruction name OP1 T T C C

OP2 I I N N

OP3 M M T T

OP4 (Space) H (Space) R

Classification

TC number range

TIMER HIGH-SPEED TIMER COUNTER REVERSIBLE COUNTER

0000 to 0511

Operand, New SV (Response) In “Operand,” specify the name that indicates the SV classification. Specify the name in four characters. In “SV,” specify either the word address where the SV is stored or the constant SV.

368

Page 387

Section

Host Link Commands Operand OP2

Classification

6-3

Constant or word address

OP1 C

I

OP3 O

OP4 (Space) IR or SR

L

R

(Space) (Space) LR

0000 to 0063

H

R

(Space) (Space) HR

0000 to 0099

A

R

(Space) (Space) AR

0000 to 0027

D

M

(Space) (Space) DM

0000 to 6655

D

M

(Space) DM (indirect)

0000 to 6655

C

O

N

(Space) Constant

0000 to 9999

0000 to 0252

6-3-21 STATUS READ –– MS Reads the PC operating conditions. Command Format @ x 101 x 100

M

Node no.

Response Format @

Header code

FCS

↵

Terminator

An end code of 00 indicates normal completion.

x 101 x 100

Node no.

M x 161 x 160 x 163 x 162 x 161 x 160 16 characters

S

Header code

Parameters

End code

Status data

Message

FCS

↵

Terminator

Status Data, Message (Response) “Status data” consists of four digits (two bytes) hexadecimal. The leftmost byte indicates CPU Unit operation mode, and the rightmost byte indicates the size of the program area. x 163

Bit 15

S

14

13

0

0 x 162 12

11

10

0

0

9

8

Bit 1: Fatal error generated 1: FALS generated

Operation mode

9

8

0

0

PROGRAM mode

1

0

RUN mode

1

1

MONITOR mode x 161 Bit

7

6

5

This area is different from that of STATUS WRITE.

x 160 4

1

Bit

3

2

1

0

0

0

0

Program area

6

5

4

0

0

0

None

0

0

1

4 Kbytes

0

1

0

8 Kbytes

Program area write–protection 0: Write-protected 1: Not write-protected (In CQM1 PCs, turn DIP switch pin 1 ON to write-protect the program area.)

In CQM1 PCs, the “Message” parameter is a FAL/FALS number that exists when the command is executed. When there is no message, this parameter is omitted.

369

Page 388

Section

Host Link Commands

6-3

In CPM1/CPM1A/SRM1 PCs, the “Message” parameter is a 16-character message that exists when the command is executed. When there is no message, this parameter is omitted.

6-3-22 STATUS WRITE –– SC Changes the PC operating mode. Command Format @ x 101 x 100

Node no.

Response Format

C x 161 x 160

Header code

Mode data

S

FCS

↵

Terminator

An end code of 00 indicates normal completion. @

Parameters x 101 x 100

S

C x 161 x 160

Node no.

Header code

End code

FCS

↵

Terminator

Mode Data (Command) “Mode data” consists of two digits (one byte) hexadecimal. With the leftmost two bits, specify the PC operating mode. Set all of the remaining bits to “0.” x 161 x 160

Bit 7

6

5

4

3

2

0

0

0

0

0

0

1

0

Bit

Operation mode

1

0

0

0

1

0

1

1

PROGRAM mode MONITOR mode RUN mode

This area is different from that of STATUS READ.

6-3-23 ERROR READ –– MF Reads and clears errors in the PC. Also checks whether previous errors have been cleared. Command Format @

Response Format @

370

M

F x 101 x 100

Node no.

Header code

Error clear

FCS

↵

Terminator

An end code of 00 indicates normal completion.

x 101 x 100

M

Node no.

Header code

Parameters x 101 x 100

F x 161 x 160 x 163 x 162 x 161 x 160 x 163 x 162 x 161 x 160

End code

Error information (1st word)

Error information (2nd word)

FCS

↵

Terminator

Error Clear (Command) Specify 01 to clear errors and 00 to not clear errors (BCD). Fatal errors can be cleared only when the PC is in PROGRAM mode.

Page 389

Section

Host Link Commands

6-3

Error Information (Response) The error information comes in two words. CQM1/CPM1/CPM1A PCs 1st word x 163 Bit 15

14 x 162

13

12

11

0

0

0

10

9 x 161 8

7

0

6

5

0 x 160 4

3

2

1

0

0

0

0

0

0

ON: Battery error (Error code F7, CQM1 only) ON: System error (FAL) ON: Memory error (Error code F1) ON: I/O bus error (Error code C0) ON: No end instruction error (FALS) ON: System error (FAL) 2nd word x 163 Bit 15

14

0

0

13 x 162 12 x 161

11

10

9

8

0

0

0

0

7

6

5 x 160 4

3

2

1

0

FAL, FALS No. (00 to FF) ON: Cycle time overrun (Error code F8) ON: I/O Unit overflow (Error code E1)

SRM1 PCs 1st word x 163 Bit 15

14 x 162

13

12

11

10

9

0

0

0

0

0 x 161 8

7

6

5

0 x 160 4

3

2

1

0

0

0

0

0

0

ON: Battery error (Error code F7, CQM1 only) ON: System error (FAL) ON: Memory error (Error code F1) ON: No end instruction error (FALS) ON: System error (FAL) 2nd word x 163 Bit 15

14

13

0

0

0 x 162 12 x 161

11

10

9

8

0

0

0

0

7

6

5 x 160 4

3

2

1

0

FAL, FALS No. (00 to 99) ON: Cycle time overrun (Error code F8)

6-3-24 FORCED SET –– KS Force sets a bit in the IR, SR, LR, HR, AR, or TC area. Just one bit can be force set at a time. Once a bit has been forced set or reset, that status will be retained until a FORCED SET/RESET CANCEL (KC) command or the next FORCED SET/RESET command is transmitted.

371

Page 390

Section

Host Link Commands

6-3

Command Format @ x 101 x 100

K

Node no.

Header code

S

Response Format

OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100 x 101 x 100

Name

Word address

Bit

FCS

↵

Terminator

An end code of 00 indicates normal completion. @

Parameters x 101 x 100

K

S x 161 x 160

Node no.

Header code

End code

↵

FCS

Terminator

Name, Word address, Bit (Command) In “Name,” specify the area (i.e., IR, SR, LR, HR, AR, or TC) that is to be forced set. Specify the name in four characters. In “Word address,” specify the address of the word, and in “Bit” the number of the bit that is to be forced set.

Name OP1

OP2

OP3

C

I

O

L H A T T C C

R R R I I N N

(Space) (Space) (Space) M M T T

Word address setting range

Classification OP4

Bit

CQM1 PCs

CPM1/ CPM1A/SRM1 PCs

(Space) IR or SR

0000 to 0252

(Space) (Space) (Space) (Space) H (Space) R

0000 to 0063 0000 to 0099 0000 to 0027 0000 to 0511

0000 to 0019 0200 to 0252 0000 to 0015 0000 to 0019 0000 to 0015 0000 to 0127

LR HR AR Completion Flag (timer) Completion Flag (high-speed timer) Completion Flag (counter) Completion Flag (reversible counter)

00 to 15 (decimal)

Always 00

Note The area specified under “Name” must be in four characters. Add spaces after the data area name if it is shorter than four characters.

6-3-25 FORCED RESET –– KR Force resets a bit in the IR, SR, LR, HR, AR, or TC area. Just one bit can be force reset at a time. Once a bit has been forced set or reset, that status will be retained until a FORCED SET/RESET CANCEL (KC) command or the next FORCED SET/RESET command is transmitted. Command Format @ x 101 x 100

Node no.

Response Format

K

R

Header code

Name

Word address

Bit

FCS x 101 x 100

Node no.

R x 161 x 160

Header code

End code

K

FCS

↵

Terminator

An end code of 00 indicates normal completion. @

372

OP1 OP2 OP3 OP4 x 103 x 102 x 101 x 100 x 101 x 100

↵

Terminator