Omron CJ1W-SCU32 Operation Manual page 188

Machine automation controller, cj / nj-series, serial communications units, cpu unit
Table of Contents

Advertisement

4 Using Protocol Macros
Additional Information
Usage of Receive Data Area before execution of ExecPMCR instruction
When the ExecPMCR instruction is executed, the reception buffer is cleared to 0 immediately
before the communications sequence is executed.
Accordingly, a user program that routinely reads present value data, such as the one shown
below, would clear the present value data to 0 if data could not be retried due to a reception
error, etc.
This means that data corresponding to the first m words in the Receive Area has a function to
read from the memory used for CJ-series Unit of the CPU Unit immediately before the communi-
cations sequence is executed and set again, so that the last receive data will be retained even if
a reception error occurs.
This ensures that the present value data will not be cleared to 0 and that the previous receive
data will be maintained when receptions fail.
Specify m representing the number of data words to be retained. (If 0 or 1 is specified, the last
receive data will not be retained and all data will be cleared to 0.)
Example: Protocol that executes communications sequence once and ExecPMCR instruction to
take in receive data continuously or periodically in the user program.
When the Serial Communications Unit is as follows:
Device name: SCU
Unit number: 0
Port number: 1
Always
TRUE Flag
The Receive Area is not retained
Communications
sequence
Reception
buffer
Receive Area
RecvData[1] onward
The Receive Area is retained
Communications
sequence
Reception
buffer
Receive Area
RecvData[1] onward
Receive Data Area Function
Receive Data Area is used according to the following procedure.
(1) When the ExecPMCR instruction is executed, 250 words of the reception buffer in the Serial
Communications Unit are cleared.
4-52
_Port_isAvailable
SCU_P1_PmrExecSta
(Network Communications
(Protocol Macro
ExecPMCR_
Instruction Enabled Flag)
Executing Flag)
instance.Busy
SendData[0]
RecvData[0]
Recv
Clear
Failure
Recv
Failure
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
ExecPMCR
InPort
610
ExecPMCR
The cleared value is stored
The set value is stored
Set
Reception
buffer
If the receive
attempt fails, the
applicable value is stored
m words

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cj1w-scu22Cj1w-scu42

Table of Contents