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

The text of a manual · part 14 of 60

SYSMAC CQM1/CPM1/CPM1A/SRM1 Programmable Controllers Programming Manual: SECTION 1 PC Setup and Other Features, pages 121 to 130

Pages 121 to 130 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 121

Section

Communications Functions

1-9

Link Errors

If a slave does not received a response from the master within one second, the 1:1 Link Error Flag (AR 0802) and the Communications Error Flag (AR 0804) will be turned ON.

Application Example

This example shows a program for verifying the conditions for executing a oneto-one link using the RS-232C ports. Before executing the program, set the following PC Setup parameters. Master: DM 6645: 3200 (one-to-one link master; Area used: LR 00 to LR 15) Slave: DM 6645: 2000 (one-to-one link slave) The defaults are assumed for all other PC Setup parameters. The words used for the one-to-one link are as shown below. Master

LR00 LR07 LR08

Slave

Area for writing

Area for reading

Area for reading

Area for writing

LR15

LR00 LR07 LR08 LR15

When the program is executed at both the master and the slave, the status of IR 001 of each Unit will be reflected in IR 100 of the other Unit. Likewise, the status of the other Unit’s IR 001 will be reflected in IR 100 of each Unit. IR 001 is an input word and IR 100 is an output word In the Master

25313 (Always ON) MOV(21) 001 LR00

MOV(21) LR08 100

In the Slave

25313 (Always ON) MOV(21) 001 LR08

MOV(21) LR00 100

1-9-8 CPM1/CPM1A One-to-one Link Communications In a one-to-one link, a CPM1/CPM1A is linked to another CPM1/CPM1A, a CQM1, or a C200HS through an RS-232C Adapter and standard RS-232C cable. One of the PCs will serve as the master and the other as the slave. The one-to-one link can connect up to 256 bits (LR 0000 to LR 1515) in the two PCs.

101

Page 122

Section

Communications Functions One-to-one CPM1/CPM1A Links

1-9

The following diagram shows a one-to-one link between two CPM1s PCs. Refer to the CPM1A Operation Manual for the corresponding information on the CPM1A. RS-232C Cable

RS-232C Adapter

RS-232C Adapter CPM1 CPU Unit

CPM1 CPU Unit

The words used for the one-to-one link are as shown below. LR00 Write data Read data

Master

Slave

Area for writing LR07 LR08

LR00 Read data

Area for reading

Area for reading

Area for writing

LR15

LR07 LR08

Write data

LR15

Limitations of One-to-one Links with a CPM1/CPM1A

Only the 16 LR words from LR 00 to LR 15 can be linked in the CPM1/CPM1A, so use only those 16 words in the CQM1 or C200HS when making a one-to-one link with one of those PCs. A one-to-one link cannot be made to a CPM1/CPM1A PC using LR 16 through LR 63 in the CQM1 or C200HS.

PC Setup Settings

The settings relating to 1-to-1 PC communications must be set as shown in the following table.

Word

Bit

DM 6650 00 to 07

Function Port settings1 00: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 01: Settings in DM 6651

Setting (Slave) 00 (Any value is OK)

08 to 11

Link area for one-to-one PC link via peripheral port 0: LR 00 to LR 15

0

0 (Any value is OK)

12 to 15

Communications mode1 0: Host link; 2: 1-to-1 PC link (slave); 3: 1-to-1 PC link (master); 4: NT link

3

2

Note

102

Setting (Master) 00 (Any value is OK)

1. If an improper setting is used, a non-fatal error will occur, AR 1302 will be turned ON, and the default setting (0 or 00) will be used. 2. For information on the 1-to-1 link settings for another OMRON PC, refer to that PC’s Operation Manual. 3. For information on CPM1/CPM1A one-to-one link connections and wiring diagrams refer to 3-4-7 Host Link Connections in the CPM1 Operation Manual or CPM1A Operation Manual. For the SRM1 refer to 3-4-4 RS-232C Port Wiring in the SRM1 Master Control Unit Operation Manual. 4. If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range. Communications mode: Host Link Communications format: Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps) Transmission delay: No Node number: 00

Page 123

Section

Communications Functions Example Program

This example shows ladder programs that copy the status of IR 000 in each CPM1/CPM1A to SR 200 in the other CPM1/CPM1A. Program in the Master

Program in the Slave

25313 (Always ON)

25313 (Always ON) MOV(21)

MOV(21) 000

000

LR00

LR08

MOV(21)

MOV(21) LR08

LR00

200

200

LR00 IR 000

Write

SR 200

1-9

Read

LR00 Writing area

LR07 LR08

Reading area

Reading area

Writing area

LR15

LR07 LR08

Read

SR 200

Write

IR 000

LR15

1-9-9 CPM1/CPM1A NT Link Communications Using the NT link, the CPM1/CPM1A PC can connected to the Programmable Terminal (NT Link Interface) through an RS-232C Adapter. CPM1 PCs RS-232C Adapter

Programmable Terminal

CPM1 CPU Unit CPM1 CPU

RS-232C Cable

CPM1A PCs RS-232C Adapter

OMRON Programmable Terminal

CPM1A CPU Unit

RS-232C Cable

PC Setup Settings Word Bit DM 6650 00 to 07

The settings relating to NT link PC communications must be set as shown in the following table. Function Port settings1 00: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 01: Settings in DM 6651

Setting 00 (Any value is OK)

08 to 11

Link area for one-to-one PC link via peripheral port 0: LR 00 to LR 15

0 (Any value is OK)

12 to 15

Communications mode1 0: Host link; 2: 1-to-1 PC link (slave); 3: 1-to-1 PC link (master); 4: NT link

4

103

Page 124

Section

Communications Functions Note

1-9

1. If an improper setting is used, a non-fatal error will occur, AR 1302 will be turned ON, and the default setting (0 or 00) will be used. 2. For information on the NT link settings for another OMRON PC, refer to that PC’s Operation Manual. 3. If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range. Communications mode:

Host Link

Communications format:

Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps)

Transmission delay:

No

Node number:

00

1-9-10 SRM1 One-to-one Link Communications In a one-to-one link, a SRM1 is linked to another SRM1, CPM1/CPM1A, a CQM1, or a C200HS through an RS-232C Adapter and standard RS-232C cable. One of the PCs will serve as the master and the other as the slave. The one-to-one link can connect up to 256 bits (LR 0000 to LR 1515) in the two PCs. One-to-one SRM1 Links

The following diagram shows a one-to-one link between two SRM1s.

SRM1

SRM1

RS-232C Port

RS-232C Port

The words used for the one-to-one link are as shown below.

LR00 Write data Read data

Area for writing LR07 LR08 LR15

Limitations of One-to-one Links with a SRM1

104

Master

Area for reading

Slave

LR00 Read data

Area for reading Area for writing

LR07 LR08

Write data

LR15

Only the 16 LR words from LR 00 to LR 15 can be linked in the SRM1, so use only those 16 words in the CQM1 or C200HS when making a one-to-one link with one of those PCs. A one-to-one link cannot be made to a SRM1 PC using LR 16 through LR 63 in the CQM1 or C200HS.

Page 125

Section

Communications Functions PC Setup Settings

Word

The settings relating to 1-to-1 PC communications must be set as shown in the following table.

Bit

DM 6645 00 to 03

Function Port settings1 00: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 01: Settings in DM 6651

Setting (Master) Any

Setting (Slave) Any

04 to 07

CTS Control settings 0: Disable 1: Set

0

0

08 to 11

Link area for one-to-one PC link via peripheral port 0: LR 00 to LR 15 Communications mode1 0: Host link; 1: No protocol; 2: 1-to-1 PC link (slave); 3: 1-to-1 PC link (master); 4: NT link

0

0

3

2

12 to 15

1-9

Note

1. If an improper setting is used, a non-fatal error will occur, AR 1302 will be turned ON, and the default setting (0 or 00) will be used. 2. For information on the 1-to-1 link settings for another OMRON PC, refer to that PC’s Operation Manual. 3. If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range.

Example Program

Communications mode:

Host Link

Communications format:

Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps)

Transmission delay:

No

Node number:

00

This example shows ladder programs that copy the status of IR 000 in each SRM1 to SR 200 in the other SRM1.

Program in the Master

Program in the Slave

25313 (Always ON)

25313 (Always ON) MOV(21)

MOV(21) 000

000

LR00

LR08

MOV(21)

MOV(21) LR08

LR00

200

200

LR00 IR 000 SR 200

Write Read

LR00 Writing area

LR07 LR08 LR15

Reading area

Reading area Writing area

LR07 LR08

Read

SR 200

Write

IR 000

LR15

105

Page 126

Section

Communications Functions

1-9

1-9-11 SRM1 NT Link Communications Using the NT link, the SRM1 PC can be connected to the Programmable Terminal (NT Link Interface.) The RS-232C port can be used to the NT Link. SRM1 Programmable Terminal

NT Link is possible only with the SRM1-C02-V1, which has an RS-232C port. PC Setup Settings Word Bit DM 6645 00 to 03

The settings relating to NT link PC communications must be set as shown in the following table. Function Port settings1 00: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 01: Settings in DM 6646

00 (Any value is OK)

04 to 07

CTS control settings 0: Disable 1: Set

0 (Any value is OK)

08 to 11

Link area for one-to-one PC link via peripheral port 0: LR 00 to LR 15 Communications mode1 0: Host link; 1: No protocol; 2: 1-to-1 PC link (slave); 3: 1-to-1 PC link (master); 4: NT link

0

12 to 15

Note

106

Setting

4

1. If an improper setting is used, a non-fatal error will occur, AR 1302 will be turned ON, and the default setting (0 or 00) will be used. 2. For information on the NT link settings for another OMRON PC, refer to that PC’s Operation Manual. 3. If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range. Communications mode: Host Link Communications format: Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps) Transmission delay: No Node number: 00

Page 127

Section

Communications Functions

1-9

1-9-12 SRM1 No Protocol Communications Peripheral Port Settings

Word

When the peripheral port is used to conduct no protocol communications, the following settings must be made from the peripheral device to DM 6650 to DM 6653 in the SRM1.

Bit

Function

Setting

Peripheral Port Settings The following settings are effective after transfer to the PC. DM 6650 00 to 03 Port settings 0: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 1: Settings in DM 6651

As required

(Other settings will cause a non-fatal error, the default setting (0) will be used, and AR 1302 will turn ON.) 04 to 07 08 to 11 12 to 15

DM 6651

00 to 07 08 to 15

DM 6652

DM 6653

00 to 15

00 to 07

08 to 11

12 to 15

Not used. Not used. Communications mode 0: Host link; 1: No protocol (Other settings will cause a non-fatal error, the default setting (0) will be used, and AR 1302 will turn ON.) Baud rate 00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K Frame format Start Length Stop Parity 00: 1 bit 7 bits 1 bit Even 01: 1 bit 7 bits 1 bit Odd 02: 1 bit 7 bits 1 bit None 03: 1 bit 7 bits 2 bit Even 04: 1 bit 7 bits 2 bit Odd 05: 1 bit 7 bits 2 bit None 06: 1 bit 8 bits 1 bit Even 07: 1 bit 8 bits 1 bit Odd 08: 1 bit 8 bits 1 bit None 09: 1 bit 8 bits 2 bit Even 10: 1 bit 8 bits 2 bit Odd 11: 1 bit 8 bits 2 bit None (Other settings will cause a non-fatal error, the default setting (00) will be used, and AR 1302 will turn ON.) Transmission delay (Host Link) 0000 to 9999 (BCD): Set in units of 10 ms. (Other settings will cause a non-fatal error, the default setting (0000) will be used, and AR 1302 will turn ON.) Node number (Host link) 00 to 31 (BCD) (Other settings will cause a non-fatal error, the default setting (0000) will be used, and AR 1302 will turn ON.) Start code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.) 0: Disable 1: Set End code enable (RS-232C, effective when bits 12 to 15 of DM 6650 are set to 1.) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF

0 0 1: No protocol

As required As required

To match host parameters 00 to 31

As required As required

107

Page 128

Section

Communications Functions Word DM 6654

Bit

Function

Setting

00 to 07

Start code (effective when bits 08 to 11 of DM6650 are set to 1.) 00: 256 bytes 01 to FF: 1 to 255 bytes

As required

08 to 15

End code (no protocol)

As required

When bits 12 to 15 of DM6653 are set to 0: 00: 256 bytes 01 to FF: 1 to 255 bytes

1-9

When bits 12 to 15 of DM6653 are set to 1: Setting: 00 to FF (binary)

Note If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range.

RS-232C Port Settings

Word

Bit

Communications mode:

Host Link

Communications format:

Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps)

Transmission delay:

No

Node number:

00

When the RS-232C port is used to conduct no protocol communications, the following settings must be made from the peripheral device to DM6645 to DM6649 in the SRM1. Function

Setting

RS-232C Port Settings The following settings are effective after transfer to the PC. DM 6645 00 to 03 Port settings 0: Standard (1 start bit, 7-bit data, even parity, 2 stop bits, 9,600 bps) 1: Settings in DM 6646 04 to 07 08 to 11 12 to 15

DM 6646

00 to 07 08 to 15

DM 6647

108

00 to 15

CTS control settings 0: Disable; 1: Set Link words for 1:1 link 0: LR 00 to LR 15; Other: Not effective Communications mode 0: Host link; 1: RS-232C (no protocol); 2: 1:1 data link slave; 3: 1:1 data link master; 4: NT Link Baud rate 00: 1.2K, 01: 2.4K, 02: 4.8K, 03: 9.6K, 04: 19.2K Frame format Start Length Stop Parity 00: 1 bit 7 bits 1 bit Even 01: 1 bit 7 bits 1 bit Odd 02: 1 bit 7 bits 1 bit None 03: 1 bit 7 bits 2 bit Even 04: 1 bit 7 bits 2 bit Odd 05: 1 bit 7 bits 2 bit None 06: 1 bit 8 bits 1 bit Even 07: 1 bit 8 bits 1 bit Odd 08: 1 bit 8 bits 1 bit None 09: 1 bit 8 bits 2 bit Even 10: 1 bit 8 bits 2 bit Odd 11: 1 bit 8 bits 2 bit None Transmission delay (Host Link) 0000 to 9999 (BCD): Set in units of 10 ms, e.g., setting of 0001 equals 10 ms

As required 0

0 1: No protocol As required As required

As required

Page 129

Section

Communications Functions Word DM 6648

Bit

Function

00 to 07

Node number (Host link, effective when bits 12 to 15 of DM 6645 are set to 0.) 00 to 31 (BCD) Start code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.) 0: Disable; 1: Set End code enable (RS-232C, effective when bits 12 to 15 of DM 6645 are set to 1.) 0: Disable (number of bytes received) 1: Set (specified end code) 2: CR, LF Start code (RS-232C) 00: 256 bytes 01 to FF: 1 to 255 bytes

08 to 11 12 to 15

DM 6649

00 to 07

08 to 15

1-9

Setting As required As required

End code enable (RS-232C) 00 to FF (BIN)

Note If an out-of-range value is set, the following communications conditions will result. In that case, reset the value so that it is within the permissible range. Communications mode: Communications format:

Transmission delay: Node number:

Host Link Standard settings (1 start bit, 7-bit data; even parity, 2 stop bits, 9,600 bps) No 00

109

Page 130

Section

Communications Functions

1-9

1-9-13 Transmission Data Configuration When no-protocol communications are used, TXD(48) is used to send data and RXD(47) to receive data. The maximum amount of data that can be either sent or received is 259 bytes, including the start/end code. • No Start or End Code: Data (256 bytes max.)

• Only a Start Code: ST

Data (256 bytes max.)

• Only an End Code: Data (256 bytes max.)

ED

• Both an Start and End Code: ST

Data (256 bytes max.)

ED

• End Code of CR, LF: Data (256 bytes max.)

CR

LF

CR

LF

• Start Code 00-FF/End Code CR,LF: ST

Note

Data (256 bytes max.)

1. The start and end codes are set in DM 6648 to DM 6649 and DM 6653 to DM 6654 of the PC Setup. 2. When there are several start and end codes, the first part of each will be effective. 3. When the end code duplicates the transmission data and the transmission is stopped part way through, use CR or LF as the end code. 4. The start and end codes are not stored.

1-9-14 Transmission Flags When sending data from the SRM1, check that the Transmission Enable Flag is ON for executing the TXD(48) instruction. The Transmission Enable Flag will turn OFF while the data is being transmitted and will turn ON again when transmission is complete. After the SRM1 has received data, the Receive Enable Flag turns ON. When the RXD instruction is executed, the data received will be written to the specified words and the Reception Complete Flag will turn OFF. Flag

Peripheral port

RS-232C port

Transmission Enable Flag

AR 0813

AR 0805

Reception Complete Flag

AR 0814

AR 0806

Note The timing from data reception starting to completion for the SRM1 is as indicated below. Reception Start: Without start code: With start code:

110

Normal reception status After start code is received.