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 2-3-1 DM
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