Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1105

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Network Instructions
Examples
1066
ensure that CMND(490) is not executed while a port is busy, program the
port's Communications Port Enabled Flag (A20200 to A20207) as a normally
open condition.
Always use one of the Communications Port Enabled Flags (A20200 to
A20207) in an NO input condition and the File Memory Operation Flag
(A34313) in an NC input condition for CMND(490) when send a FINS com-
mand to the local CPU Unit.
Noise and other factors can cause the transmission or response to be cor-
rupted 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.
The following program section shows an example of sending a FINS com-
mand to another CPU Unit.
When CIO 000000 and A20207 (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 D00200 to
D00211.
The MEMORY AREA READ command reads 10 words from D00010 to
D00019. 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 12 words or 24
bytes.
The data will be retransmitted up to 3 times if a response is not received
within ten seconds.
0
0
0
0
0
1
0
0
0
6
The following program section shows an example of sending a FINS com-
mand to the local CPU Unit.
When CIO 000000 and A20207 (the Communications Port Enabled Flag for
port 07) are ON and A34313 (File Memory Operation Flag) is OFF,
CMND(490) transmits FINS command 2215 (CREATE/DELETE DIREC-
TORY) to the local CPU Unit. The response is stored in D00100 to D00101.
Here, the FINS command will create a directory called CS/CJ under the
OMRON directory. The command code (2 bytes) and the end code (2 bytes)
will be returned and stored as the response.
Command code: 0101 hexadecimal (MEMORY AREA READ)
D00010 (Data area = 82 hexadecimal, address = 000A00)
Number of words to read = 0A hexadecimal (10 decimal)
Bytes of command data: 0008 (8 decimal)
Bytes of response data: 0018 (24)
Transmit to the local network and the device itself
Node number 3, unit address 00 (CPU Unit)
Response requested, port number 7, 3 retries
Response monitoring time: 0064 hexadecimal (10 seconds)
Section 3-25

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents