Considerations For Data Communication - Mitsubishi Electric MELSEC iQ-R Series User Manual

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

4.4

Considerations for Data Communication

The following describes the considerations for data communications using the bidirectional protocol.
Factor of C24 transmission sequence initialization
The initial status means the status where transmission has stopped and received data has been discarded.
C24 transmission sequence initialization factors are as follows.
• When the power is turned ON, or the CPU module is reset.
• When some operation is performed, or the mode is being switched.
• When a response message (ACK, NAK, etc.) was received in reply to data transmission.
• When a response message (ACK, NAK, etc.) was transmitted in reply to data reception.
• When the CD (DCD) signal was turned OFF during data communications with the CD terminal check enabled for full-duplex
communications via the RS-232 interface.
Data transmission procedure
As a data transmission procedure, data transmission from the target device or C24 should be performed after a response
message for the immediately preceding data transmission has been received.
Units of data length (word/byte) in message to be transmitted/received
Specify the same units of data length (words/bytes) of the messages to be transmitted/received between a target device and
the CPU module.
The word/byte units designation can be set with Engineering tool for the CPU module.
Make the length of the data portion in the message to be transmitted and received as long as the size of the send data
specification area and the receive data storage area, or less.
NAK code response
■Response from C24 to target device
After the completion of error detection message reception, it transmits the NAK code to the target device.
■Response from target device to C24
Transmit the error code (0022H to 005FH) immediately after the NAK response.
• Perform error processing according to the error code received immediately after the NAK message at the
device that received NAK as the response message after data transmission.
For more details on error codes that are transmitted from C24, refer to the following section.
(Page 473 Error Code List)
• If C24 receives an NAK response while transmitting data to a target device, it completes data transmission,
then reads the NAK to complete the processing abnormally.
• If C24 detects an error while receiving data, it ignores the received data equivalent to the data length.
If the data length is abnormal, C24 ignores all the data up to the head data for reception message (ENQ,
etc.) received thereafter.
Target device time-out check
When checking time-out up to reception of the response message at the target device during data transmission from the
target device to C24, set the timeout time to the time shown below, or longer.
• (CPU module maximum scan time2) + 100 ms
4 DATA COMMUNICATION USING BIDIRECTIONAL PROTOCOL
4.4 Considerations for Data Communication
4
107

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents