![background image](http://html1.mh-extra.com/html/omron/sysmac-cj1w-scu21-v1/sysmac-cj1w-scu21-v1_operation-manual_743586209.webp)
180
Using Protocol Macros
Section 5-4
Flag Transitions
Note
Before executing a PMCR(260) instruction, be sure that the communications
port is set to the Protocol Macro serial communications mode. If a
PMCR(260) instruction is executed for a communications port set in Host Link
mode, a meaningless message may be sent from the port. The current serial
communications mode can be checked in bits 12 to 15 (Protocol Macro = 6
Hex) of the following words. Boards: CIO 1905 for port 1 and CIO 1915 for
port 2. Units: CIO n + 5 for port 1 and CIO n + 15 for port 2. Refer to
Area
for DM Area allocations and settings.
5-4-2
Ladder Program Structure
When creating a ladder program, note the following points.
• To ensure that a PMCR(260) instruction is not executed while another
PMCR(260) instruction is being executed, use the Protocol Macro Execut-
ing Flag in an NC input condition.
• Use an OFF condition for the Protocol Macro Executing Flag and perform
processing to read the results of sequence execution, or perform process-
ing when a sequence ends in an error.
Programming Example
Note
When executing the PMCR(260) instruction, be sure to check that the serial
communications mode for the port used for communications is set to protocol
macro. If the PMCR(260) instruction is executed with the serial communica-
tions mode set to Host Link (SYSWAY), messages that cannot be used for the
application will be output from the serial port. The serial communications
mode settings can be confirmed in bits 12 to 15 of the following words in the
CIO Area: Serial Communications Board, port 1: 1905, port 2: 1915; Serial
Communications Unit, port 1 = n+5, port 2 = n+15. The setting for protocol
macro is 6 Hex. For details of DM Area allocations, refer to
2-3-1 DM Area
.
Communications Port
Enabled Flag
Network communications
instructions
(PMCR(260)/SEND(090)/
RECV(098)/CMND(490))
Communications Port
Error Flag
Communications Port
Completion Code
Instruction 1
being
executed
Instruction 2
being
executed
Instruction 3
being
executed
End of previous
processing
(No unit correspond-
ing to unit address)
(Normal end)
(Normal end)
Input condition
Protocol Macro
Executing Flag
Reading of sequence execution results
Processing of sequence errors
Protocol Macro
Executing Flag
Communications
Port Enabled Flags
Summary of Contents for SYSMAC CJ1W-SCU21-V1
Page 3: ...iv...
Page 5: ...vi...
Page 9: ...x...
Page 15: ...xvi...
Page 89: ...60 Basic Operating Procedure Section 1 9...
Page 151: ...122 RS 232C and RS 422A 485 Wiring Section 3 4...
Page 173: ...144 Host Link Function for Replacing Existing PLCs Section 4 6...
Page 223: ...194 Enhanced Protocol Macro Functions Section 5 6...
Page 277: ...248 Communications Frames Section 6 8...
Page 291: ...262 Basic Operating Procedure in No protocol Mode Section 7 4...
Page 301: ...272 Auxiliary Area and CIO Area Allocations Section 8 3...
Page 391: ...362 Introduction Appendix A...
Page 421: ...392 CompoWay F Master Protocol Appendix B...
Page 513: ...484 E5 K Digital Controller Read Protocol Appendix F...
Page 571: ...542 E5ZE Temperature Controller Write Protocol Appendix I...
Page 587: ...558 E5 J Temperature Controller Protocol Appendix J...
Page 627: ...598 ES100 Digital Controller Protocol Appendix K...
Page 661: ...632 V500 V520 Bar Code Reader Protocol Appendix M...
Page 697: ...668 3Z4L Laser Micrometer Protocol Appendix N...
Page 717: ...688 Visual Inspection System Protocol Appendix O...
Page 755: ...726 V600 V620 ID Controller Protocol Appendix P...
Page 763: ...734 Hayes Modem AT Command Protocol Appendix Q...
Page 767: ...738 Changing Communications Port Settings Using STUP 237 Appendix R...
Page 781: ...752 Revision History...