hit counter script

Mitsubishi Electric FX5 User Manual page 144

Melsec iq-f series
Hide thumbs Also See for FX5:
Table of Contents

Advertisement

Function and operation
RS2 instruction specifies head device of the send data, no. of data, head device for storing the received data, the maximum
no. of data that can be received.
Create a program as shown below.
Drive
contact
M0
RS2
• When the drive contact (M0) is set to ON, the PLC waits for sending and receiving.
Sending command (pulse operation type)
M1
• When the sending command (M1) is set to ON, write the send data from D100 onwards
(for no. of devices specified). Issue the sending command as a pulse.
In the example above, write send character string "TEST SEND1" in D100 onwards,
and store number of characters of the send character string (10) in D0.
• After writing the send data, set the sending request (SM8561). The data is sent.
• When sending is completed, the sending request (SM8561) is automatically reset.
Do not reset it in the program.
Receiving
complete
SM8562
• When the PLC receives data from the counterpart equipment, the receiving completed flag
(SM8562) turns ON. When SM8562 turns ON, move the received data stored in D200 to
another device.
In the example above, the data received in 16bit processing mode (stored data from D200
onwards) is moved to the 15 data register points from D500 onwards.
• After moving the received data, reset the receiving completed flag (SM8562).
While SM8562 is ON, the PLC cannot receive the next set of receive data.
*1 For handling of send and receive data, refer to Page 143 Send/receive data and amount of data.
*2 For the operation when sending data, refer to Page 146 Operation during data send.
*3 For the operation when receiving data, refer to Page 147 Operation during data receive.
5 NON-PROTOCOL COMMUNICATION
142
5.7 Programming
D100
D0
D200
$MOV
"TEST SEND1"
MOV
K10
SET
*2
BMOV
D200
RST
K30
K1
D100
Program example for
writing send data
D0
Sending request
SM8561
Program example for
D500
K15
moving received data
Receiving completed
SM8562
*1
*3

Advertisement

Table of Contents
loading

Table of Contents