Mitsubishi Electric MELSEC iQ-R Series User Manual page 46

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

Advertisement

■Considerations for configuring packet element
To place a Conversion variable in a packet, the following requirements need to be met.
• To place Conversion variable in send packet
Multiple Conversion variable elements can be placed in one packet, and they can be placed in desired positions in the data
portion.
• To place Conversion variable in receive packet
Multiple Conversion variable elements can be placed in one packet in the cases other than "Variable number of data" and
(3) of "Fixed number of data".
Variable number of data
( Only one Conversion
variable can be placed in one
packet, and either of the
following (1) or (2) need to be
met. )
Fixed number
Variable
of data
number of
digits
Fixed
number of
digits (1 to
10)
Precautions
An error may occur on C24 in any of the following cases.
• A string other than '0'-'9', 'A'-'F', or 'a'-'f' is received
When "Conversion" is "ASCII HexadecimalHEX", an ASCII  BIN conversion error (7F20H) may occur if a string other
than '0'-'9', 'A'-'F', or 'a'-'f' is received.
• A string other than '0'-'9' is received
When "Conversion" is "ASCII DecimalHEX", an ASCII  BIN conversion error (7F20H) may occur if a string other than
'0'-'9' is received. However, the error does not occur in the following cases.
Item
Sign/Sign Character
Number of Decimals
Delimiter
2 DATA COMMUNICATION USING PREDEFINED PROTOCOL
44
2.3 Packet
■For discriminating the data length of a Conversion variable, any of the following items is placed immediate after the
(1)
Conversion variable.
• Static data
• Terminator
• Check code + Static data
• Check code + Terminator
■A "Length" is placed before a Conversion variable. (The Conversion variable needs to be included in the calculating
(2)
range.)
■When the number of data is 2 or more, or the number of data is 1 with no delimiter, only one Conversion variable can
(3)
be placed in a packet and it needs to be placed in the order mentioned in [Variable number of data].
(4)
■When a Conversion variable (the number of data is 1, with delimiter, and variable number of digits) and the following
four elements are placed in the same packet, these four elements need to be placed behind the Conversion variable (the
number of data is 1, with delimiter, and variable number of digits).
• "Conversion Variable" (variable number of data)
• Conversion variable (fixed number of data and variable number of digits) (The case of (3). Excluding a case where
"Number of Send Data" is '1' and "Delimiter" is not "No Delimiter".)
• Non-conversion variable (variable length)
• Non-verified reception (variable number of characters)
Note that two or more of these four elements cannot be placed in the same packet.
■When a Conversion variable (variable decimal point) and the four elements mentioned in (4) are placed in the same
(5)
packet, these elements need to be placed behind the Conversion variable (variable decimal point).
■When a Conversion variable (unsigned) and the four elements mentioned in (4) are placed in the same packet, these
(6)
elements need to be placed behind the Conversion variable (unsigned).
C24 operation
When "Signed" is selected, a signed character can be received.
However, when a signed character which is not at the head of data is received, an ASCII  BIN conversion error
(7F20H) may occur.
When any other than "No decimal point" is selected, '. ' (a period) can be received.
However an ASCII  BIN conversion error (7F20H) may occur when '. ' (a period) which is not at the specified number
of digits of data is received.
An ASCII  BIN conversion error (7F20H) may also occur when "Variable point" is selected and '. ' (a period) which is
at the head or end of a unit of data is received.
When any other than "No delimiter" is selected, a delimiter can be received.
However an ASCII  BIN conversion error (7F20H) may occur when a delimiter which is not at a boundary of data is
received.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents