![Panasonic FP2 Series Скачать руководство пользователя страница 60](http://html.mh-extra.com/html/panasonic/fp2-series/fp2-series_user-manual_262311060.webp)
FP2 Serial Data Unit
Communication with External Devices
4
−
18
4.4
Sample Program
Sample Program
In the example shown in this program, the serial data unit is installed in slot 0 of the FP2,
and the various PLCs are connected to the COM.1 port of the serial data unit.
X1
, K0 , K251 , K8
, DT0
X1
Y11
F150 READ
X20
DF
, K0 , DT100, K10 , K1
R0
R0
Y10
F151 WRT
R0
M %01#RDD00000 , DT100
F95 ASC ,
, HD
, DT109
F6 DGT
X0
Y10
M 00001
**
⊔⊔⊔⊔⊔
, DT106
F95 ASC ,
, H210
DF
Sending
Reception
Specifies the FP2 serial data unit
in slot no. 0.
The contents of 10
−
word of data regis-
ter DT100 to DT109
is written to the shared memory addresses 1 to 10.
Specifies the FP2 serial data unit in
slot no. 0.
The contents of 8
−
word of shared memory
addresses 251 to 258
is read to the data register DT0 to DT 7.
Internal relay (R0) goes on at timing
of sending condition (X20).
“%01#RDD00000” is converted to
ASCII code, and written to DT100 to
DT105.
“00001
**
” is converted to ASCII
code, and written to DT106 to DT111.
End code C
R
(H0D) sent to DT109
using digit move instruction F6
(DGT), so that it is inserted directly
after the command.
Data written to address 1 area (sent
buffer of CH1) in shared memory.
After sending has started, the send-
ing directive continues until sending
has been completed.
At the timing of the reception com-
pleted (X1), data is read from the ad-
dress 251 area (received buffer of
CH1) in the shared memory.
When reception and reading of the
data have been completed, Y11 is
turned on, and the received buffer is
cleared.
X1
=, DT1, H2431
DF
R1
, DT3
, K8
, DT50
F72 AHEX
R1
To determine whether the received
data is a normal response, the com-
parison instruction is used to check
whether the character string ”1$” is
stored in DT1.
The eight
−
character ASCII code be-
ginning with DT3 is converted to a
hexadecimal value and stored in
DT50 and DT51.
Содержание FP2 Series
Страница 1: ......
Страница 6: ...FP2 Serial Data Unit Table of Contents iv ...
Страница 18: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 2 ...
Страница 22: ...FP2 Serial Data Unit Functions of Serial Data Unit 1 6 1 3 Restrictions on Units Combination ...
Страница 24: ...FP2 Serial Data Unit Parts and Functions 2 2 ...
Страница 30: ...FP2 Serial Data Unit Confirming the Unit Settings and Design Contents 3 2 ...
Страница 44: ...FP2 Serial Data Unit Communication with External Devices 4 2 ...
Страница 66: ...FP2 Serial Data Unit Precautions Regarding Serial Data Unit Operation and Programs 5 2 ...
Страница 72: ...FP2 Serial Data Unit Operation If an Error Occurs 6 2 ...
Страница 78: ...FP2 Serial Data Unit Specifications 7 2 ...
Страница 86: ...FP2 Serial Data Unit Specifications 7 10 7 4 Transmission Format ...
Страница 88: ...FP2 Serial Data Unit Sample Programs 8 2 ...
Страница 98: ...FP2 Serial Data Unit Sample Programs 8 12 8 2 Table of ASCII Codes ...
Страница 100: ...Record of changes FP2 Serial Data Unit R 2 ...
Страница 101: ......
Страница 102: ......