Network Receive: Recv(098) - Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Network Instructions
Example 1
Input
condition
A20200
Example 2

3-25-4 NETWORK RECEIVE: RECV(098)

Purpose
1050
Refer to the FINS command response codes in the CS/CJ Series Communi-
cations Commands Reference Manual (W342) for details on the completion
codes for network communications.
Only one network instruction may be executed for a communications port at
one time. To ensure that SEND(090) is not executed while a port is busy, pro-
gram the port's Communications Port Enabled Flag (A20200 to A20207) as a
normally open condition.
Communications port numbers 00 to 07 are shared by the network instruc-
tions and PMCR(260), so SEND(090) cannot be executed simultaneously
with PMCR(260) if the instructions are using the same port number.
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 SEND(090) to be executed again if the response is not
received within the response monitoring time.
When the input condition and A20200 (the Communications Port Enabled
Flag for port 0) are ON in the following example, the ten words from CIO 100
to CIO 109 are transmitted to the host computer connected to port 1 of the
Serial Communications Unit with unit address 10 (hex) at node number 3 in
network 0.
@SEND
0100
C D00200 0 0 0 A
0000
C+1 D00201 0 1 0 0
D00200
C+2 D00202 0 0 1 0
C+3 D00203 0 0 0 0
C+4 D00204 0 0 0 0
It is necessary create a program at the host computer to receive the data and
send a response.
When CIO 000000 and A20207 (the Communications Port Enabled Flag for
port 07) are ON in the following example, the ten words from D00100 to
D00109 are transmitted to node number 3 in the local network where they are
written to the ten words from D00200 to D00209. The data will be retransmit-
ted up to 3 times if a response is not received within ten seconds.
Requests data to be transmitted from a node in the network and receives the
data.
Number of words to send: 10 words
Transmit to network 0 and port 1 of Serial Communications Board
Node number 0, unit address 10
Response requested, port number 0, no retries
Response monitoring time: 2 seconds (0000: default value)
Number of words to send: 10 words
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
0
Response monitoring time: 0064 hexadecimal (10 seconds)
6
Section 3-25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents