• No results found

Specify the type of Conversion required, if any, on the data before it is sent to the host or before it is written to the FloBoss The conversions are used to allow integer values to be

SECTION 5 – CONFIGURING THE METER SETUP

7. Specify the type of Conversion required, if any, on the data before it is sent to the host or before it is written to the FloBoss The conversions are used to allow integer values to be

transmitted and received instead of floating point values. Table 6-9 lists the Convert Codes used with the Modbus Protocol Emulation program.

Rev 05/03 Extended Functions 6-33

Table 6-9. Modbus Function Convert Codes

Convert

Code Description

Slave

Function Definition

0 No Conversion –

1 Float to integer, Float Scale 1 3,4 2 Float to integer, Float Scale 2 3,4 3 Float to integer, Float Scale 3 3,4 4 Float to integer, Float Scale 4 3,4 5 Float to integer, Float Scale 5 3,4 6 Float to integer, Float Scale 6 3,4 7 Float to integer, Float Scale 7 3,4 8 Float to integer, Float Scale 8 3,4

The Float to Integer conversion changes FloBoss floating point data to an integer for transmission to the host. The number of the Convert Code specifies which floating point scaling value is to be used for the conversion.

9 to 16 No Conversion 6,16 17 Integer to Float, Float Scale 1 6,16 18 Integer to Float, Float Scale 2 6,16 19 Integer to Float, Float Scale 3 6,16 20 Integer to Float, Float Scale 4 6,16 21 Integer to Float, Float Scale 5 6,16 22 Integer to Float, Float Scale 6 6,16 23 Integer to Float, Float Scale 7 6,16 24 Integer to Float, Float Scale 8 6,16

The Integer to Float conversion changes a

transmitted integer value to a floating point value for the FloBoss. The number of the Convert Code specifies which floating point scaling value is to be used for the conversion. If no fractional part is coming through on conversion from integer to float, use a float conversion that more closely fits the range of integer to be converted, such as float range 0 to 10 instead of 0 to 1000.

25 Integer to Float, No Scaling 3,4,6,16 When using Function Code 3 or 4, this conversion changes any data type (unsigned or signed Character, Integer, or Long) in the FloBoss to a floating point value for transmission to the Host. When using function code 6 or 16, this conversion changes a transmitted floating point value to the correct data type for the FloBoss TLP.

26 to 32 No Conversion –

33 Character to Integer 3,4 The Character to Integer conversion changes a FloBoss character data type to an integer for transmission to the host.

34 Integer to Character 6,16 The Integer to Character conversion changes a transmitted integer value to a character data type for the FloBoss.

35 Long to Integer 3,4 The Long to Integer conversion changes a FloBoss long data type to an integer for transmission to the host.

36 Integer to Long 6,16 The Integer to Long conversion changes a

transmitted integer value to a long data type for the FloBoss.

39 Float to Integer, No Scaling 3,4 The Float to Integer conversion changes a FloBoss floating point data type to an integer for

transmission to the Host.

40 Integer to Float, No Scaling 3,4,6,16 The Integer to Float conversion changes a transmitted integer value to a floating point data type for the FloBoss.

41 Float to Byte, No Scaling 3,4 The Float to Byte conversion changes a FloBoss floating point data type to a byte for transmission to the Host.

42 Byte to Float, No Scaling 3,4,6,16 The Byte to Float conversion changes a transmitted byte value to floating point data type for the

6-34 Extended Functions Rev 05/03

Convert

Code Description

Slave

Function Definition

43 Float to Long, No Scaling 3,4 TheFloat to Long conversion changes a FloBoss floating point data type to a Long Integer for transmission to the Host.

44 Long to Float, No Scaling 3,4,6,16 The Long to Float conversion changes a transmitted Long Integer value to a floating point data type for the FloBoss.

45 Float to Byte 6,16 The Float to Byte Unsigned Character conversion changes a transmitted floating point value to an unsigned character data type for the FloBoss. 46 Float to Unsigned Integer 6,16 The Float to Unsigned Integer conversion changes

a transmitted floating point value to an unsigned integer data type for the FloBoss.

47 Float to Unsigned Long 6,16 The Float to Unsigned Long conversion changes a transmitted floating point value to an unsigned long data type for the FloBoss.

48 No Conversion –

57 to 64 No Conversion –

65-72 IEEE Floating Point Number 3,4,16 Convert Codes 65 to 72 allow a four-byte IEEE formatted floating point number to be sent or received in two Modbus registers with the byte orders configurable and listed next. Because these conversions require two registers, Modbus Function Code 6 is not supported. A check is made to ensure that an even number of registers is requested, that the Starting Register number does not begin in the middle of a register pair, and that the number of registers does not exceed the number of registers configured.

Byte 0 seee eeee Byte 1 emmm mmmm Byte 2 mmmm mmmm Byte 3 mmmm mmmm

Where s = Sign Bit e = Exponent Bit m = Matissa Bit

65 IEEE Floating Point Number 3,4,16

66 IEEE Floating Point Number 3,4,16

Code 65 places byte 0 and byte 1 in register xxxxx; byte 2 and byte 3 are placed in register xxxxx + 1. This places a 4-byte floating point value into two, 2- byte registers to allow integer values to be

transmitted. Code 66 does the same as Code 65 regardless of the Byte Order field in the Modbus Configuration screen.

Register xxxxx byte 0, byte 1 Register xxxxx + 1 byte 2, byte 3 67 IEEE Floating Point Number 3,4,16

68 IEEE Floating Point Number 3,4,16

Code 67 reverses byte 0 and byte 1 order in register xxxxx; reverses byte 2 and byte 3 order in register xxxxx + 1. This places a 4-byte floating point value into two, 2-byte registers to allow integer values to be transmitted. Code 68 does the same as Code 67 regardless of the Byte Order field in the Modbus Configuration screen.

Register xxxxx byte 1, byte 0 Register xxxxx + 1 byte 3, byte 2

Rev 05/03 Extended Functions 6-35

Convert

Code Description

Slave

Function Definition

69 IEEE Floating Point Number 3,4,16 70 IEEE Floating Point Number 3,4,16

Code 69 places byte 2 and byte 3 in register xxxxx; byte 0 and byte 1 are placed in register xxxxx + 1. This places a 4-byte floating point value into two, 2-byte registers to allow integer values to be transmitted. Code 70 does the same as Code 69 regardless of the Byte Order field in the Modbus Configuration screen.

Register xxxxx byte 2, byte 3 Register xxxxx + 1 byte 0, byte 1 71 IEEE Floating Point Number 3,4,16

72 IEEE Floating Point Number 3,4,16

Code 71 reverses byte 2 and byte 3 order in register xxxxx; reverses byte 0 and byte 1 order in register xxxxx + 1. This places a 4-byte floating point value into two, 2-byte registers to allow integer values to be transmitted. Code 72 does the same as Code 71 regardless of the Byte Order field in the Modbus Configuration screen.

Register xxxxx byte 3, byte 2 Register xxxxx + 1 byte 1, byte 0 73 IEEE Floating Point Number 3,4.6,16

74 IEEE Floating Point Number 3,4,6,16

Convert Codes 73 and 74 send the IEEE formatted floating point number as four bytes with a single register request. These conversions can be used with Modbus Function Code 6 in addition to Modbus Functions 3, 4, and 16. Only the byte order is changed: Function Code 73 loads register xxxxx in byte 2, byte 3, byte 0, byte 1 order. Function Code 74 does the same as Function Code 73 regardless of the Byte Order field in the Modbus Configuration screen.

75 to 255 No Conversion –

8. Select the type of Indexing to define the block of Register values for the Point Types or the