![background image](http://html1.mh-extra.com/html/omron/sysmac-cj1w-scu21-v1/sysmac-cj1w-scu21-v1_operation-manual_743586213.webp)
184
Using Protocol Macros
Section 5-4
Receive Data Storage Area before Executing PMCR(260)
When the PMCR(260) instruction is executed, the reception buffer is cleared
to 0 once immediately before the communications sequence is executed. If a
ladder program is used that regularly reads the present value data, as shown
in the following diagram, the present value data would normally be cleared to
0 if the data is not retrieved due to an error, such as a reception error. If recep-
tion processing fails, however, the data that was stored started at R+1 (i.e.,
the number of words specified in R) is again read from the reception buffer
and stored again beginning at R+1. This ensures that the current data will not
be cleared and that the previous receive data will be maintained when recep-
tions fail. Make sure to set the number of words m for the data that is to be
held. If the data is set to 0 or 1, the most recent receive data will not be held.
Instead, it will be cleared to 0.
Example:
The following protocol can be used to regularly execute the PMCR(260)
instruction to retrieve receive data by performing the send/receive operation
once only.
Receive Data Storage Area Function
The receive data storage area is used according to the following procedure.
1,2,3...
1.
When the PMCR(260) instruction is executed, 250 words of the reception
buffer in the Serial Communications Board or Serial Communications Unit
are cleared.
2.
Before executing the communications sequence, the contents of one less
than the number of words specified in R starting from word R + 1 are used
to overwrite the contents of the reception buffer (excluding the first word).
This becomes the initial value of the reception buffer, and the results of the
RECV command execution are waited for. If the contents of the reception
buffer exceeds the contents of the number of words specified in R (or the
Protocol Macro
Executing Flag
Set
m words
Reception
buffer
Value is stored
when reception
fails.
Always ON Flag
Communications
Port Enabled Flag
Communications
sequence
Reception
buffer
Receive area
R + 1 onwards
Not holding the receive area.
Communications
sequence
Reception
buffer
Receive area
R + 1 onwards
Holding the receive area.
Clear
Clear
Set
RECV
RECV
Failed
Failed
Stores cleared
values
Stores set values
PMCR(260)
R
R
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...