Omron CJ1W-PNT21 Operation Manual page 121

Profinet io controller unit
Hide thumbs Also See for CJ1W-PNT21:
Table of Contents

Advertisement

Configuring the IO Controller
Text strings
All conversions work both ways, i.e. when transferring data from the PLC data
area to the PROFINET IO network and when transferring data from the
PROFINET IO network to the PLC data area.
The following conversion steps are required here: Every two data bytes are
stored in 1 word in the same sequence as in the case of 16-bit integer data,
but the two words, required to store the 4 bytes must be swapped, for the PLC
data area. The conversion has to be reversed when transferring data from the
PLC data area to the PROFINET network.
Both PROFINET IO and the CJ1 System define the ASCII text strings as data
format. The figure below shows the format both on the PROFINET IO network
and in the PLC data area. The data bytes on the PROFINET IO network are
transmitted in the sequence shown in the figure, i.e. Byte 0 is transmitted and
received first, after that byte 1, etc.
PLC Data area
Bit 15
Word 0
Char 0
Word (n+2)/2
Char n-1
The following format conversions are required:
1 On the PROFINET IO network, the text strings are handled as a sequence
of 8-bit bytes, but the storage in the PLC data area is following the
(unsigned 16-bit) word storage method, i.e. the bytes are stored in a high-
byte/low-byte sequence.
2 If the number of text characters is even, all bytes will fit in the words, but
one additional word must be set to 0000. If the number of bytes is odd, the
last byte of the sequence will be mapped to the high-byte of the last word.
The low-byte of the last word must be padded with a 0.
In case of transmissions of text strings, the trailing zero byte or word is not
transmitted along with the string.
Bit 07
Bit 00
Char 1
Char n
Figure 7.18: String conversion
Section 7-4
PROFINET
Bit 00
Char 0
Char 1
ASCII Text string
Char n-1
Char n
107

Advertisement

Table of Contents
loading

Table of Contents