22
of 175
5.4 Data conversion
5.4.1 Description of the data formats in this manual
Data transfer for the various modes is described below. The terms PLC inputs and PLC outputs refer
to the DIGIFORCE
9307 unit. These terms are reversed when referred to the master.
The function of the PLC-In / PLC-Out bits is identical to the parallel PLC I/O ports on the unit itself and
can be found from the DIGIFORCE
9307 operating manual.
The floating-point numbers ("float") mentioned are four bytes long (32 bits) and are based on the
IEEE-754 standard.
Numbers that are not specifically labeled or are labeled with "d" or "dec" are decimal numbers.
(Example: 1234, 1234dec, dec1234, 1234d)
Numbers that are labeled with "0x" or "hex" are hexadecimal numbers. (Example: 0x1234, hex1234,
1234hex, 1234h)
Numbers that are labeled with "b" or "bin" are binary numbers. (Example: b1100, bin1100, 1100b,
1100bin)
5.4.2 Handling problems that arise when reading floating-point numbers
This only concerns cases in which floating-point numbers need to be read from the DIGIFORCE
9307 unit (in the cyclic protocol with Profimode >1).
Floating-point numbers (data type REAL), according to IEEE 754, are encoded as four bytes for
transfer (see chapter 6 PROFIBUS DP Data Protocol page 23). This may create problems depending
on the type of PLC used.
Cause
In the DIGIFORCE
9307-PROFIBUS, the sign byte is transferred first. Some PLCs expect this byte in
the highest of the four addresses not in the lowest address. This inevitably leads to misinterpretation
of the numeric value. In this case the order of the four bytes has to be changed by the PLC as shown
in the figure.
Byte 4
Byte 3
Byte 2
Byte 1
Byte 4
Byte 3
Byte 2
Byte 1
High address
Low address
Diagram 2: Exchange of the order of bytes caused by misinterpretation of the numeric
value