Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 941

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Precaution
• To ensure that CMND(490) is not executed while a port is busy, program the port's Communications
Port Enabled Flag (A202.00 to A202.07) as a normally open condition.
Note Refer to Automatically Allocating Communications Ports (i.e., Internal Logical Ports) on page 1115 for details
on using automatic allocation of the communications port number (logical port).
• Communications port numbers 00 to 07 are shared by the network and serial communications
instructions (SEND(090), RECV(098), CMND(490), PMCR(260), TXDU(256), or RXDU(255)), so
only one of these instructions may be executed for a communications port at one time.
• Always use one of the Communications Port Enabled Flags (A202.00 to A202.07) in an NO input
condition and the File Memory Operation Flag (A343.13) in an NC input condition for CMND(490)
when send a FINS command to the local CPU Unit.
• Noise and other factors can cause the transmission or response to be corrupted or lost, so we
recommend setting the number of retries to a non-zero value which will cause CMND(490) to be
executed again if the response is not received within the response monitoring time.
Sample program
Issuing a FINS command to another CPU unit on the network
The following program section shows an example of sending a FINS command to another CPU Unit.
When CIO 0.00 and A202.07 (the Communications Port Enabled Flag for port 07) are ON, CMND(490)
transmits FINS command 0101 (MEMORY AREA READ) to node number 3. The response is stored in
D200 to D211.
The MEMORY AREA READ command reads 10 words from D10 to D19. The response contains the 2-
byte command code (0101), the 2-byte completion code, and then the 10 words of data, for a total of 14
words or 28 bytes.
0.00
A202.07
Communications
Port Enabled Flag
for port 7
S: D100
S+1:D101
S+2:D102
S+3:D103
C: D300
C+1:D301
C+2:D302
C+3:D303
C+4:D304
C+5:D305
904
@CMND
D100
D200
D300
Command code: 0101 hexadecimal (MEMORY AREA READ)
0
0
D10 (Data area = 82 hexadecimal, address = 000A00)
0
0
Number of words to read = 0A hexadecimal (10 decimal)
0
Bytes of command data: 0008 (8 decimal)
1
Bytes of response data: 0018 (24)
0
Transmit to the local network and the device itself
0
Node number 3, unit address 00 (CPU Unit)
0
Response requested, port number 7, 3 retries
6
Response monitoring time: 0064 hexadecimal (10 seconds)
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents