E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-220
API Mnemonic
Operands
Function
80
RS
S, m, D, n
Serial Data Communication
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX
KnY
KnM KnS T
C D E
F
S
*
m
*
*
*
D
*
n
*
*
*
RS: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P
32 16 P 32 16 P
Operands:
S
: Starting address of transmit data
m
: Transmit data length (
m
=0~256)
D
: Starting address of
receive data
n
: receive data length (
n
=0~256)
Description:
1.
The RS instruction is used for transmitting data and/or receiving data between an ELC
controller and an external device. Data needs to be entered into registers starting from
S
with
length
m
. Then, specify the data receive register
D
and the receiving data length
n
.
2.
ELC-PB/PV/PA/PH/PV, ELCB-PB series, RS instruction supports communication on COM2
(RS-485).
3.
ELCM-PH/PA series, RS instruction supports communication on COM1 (RS-232), COM2
(RS-485) and COM3 (RS-485).
4.
If data does not need to be transmitted,
m
must be K0. If it doesn’t need to receive data,
n
must be K0.
5.
There is no limit on the number of times this instruction can be used, however, only 1
instruction can be executed on one communication port at the same time.
6.
During execution of the RS instruction, the data being sent cannot be changed.
7.
For Flags: M1120~M1131, M1140~M1143, M1161, see the examples below.
8.
The ELC-PB, ELCB-PB series do not support the index registers E, F.
Program Example 1: COM2 RS-485
1.
Enter data into the registers that start with D100 and set M1122=ON (send request-flag).
2.
If the RS instruction is executed when X20=ON, the ELC will transmit the 10 data values that
start from D100, then wait for the receive data. M1122 will be set to OFF at the end of
transmitting (do not use the program to reset M1122). After a 1ms delay, it will start to receive
the 10 external data values and store them into consecutive registers that start from D120.
3.
When the receive operation is complete, M1123 will be set to ON. The ELC program should
reset M1123 = OFF when the receive is complete. Do not use ELC program to continuously
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...