2 modbus protocol using one of the comx ports, Modbus, Protocol using one of the – K-Patents SeedMaster 2 User Manual

Page 82: Comx, Ports

Advertising
background image

11 COMMUNICATION

82

82

The Exponent field contains the sum of the actual exponent and a bias. Bias is used to make the number in
the Exponent field always positive. The value of Bias is always 127. The largest and the smallest value of the
exponent is used for error signalization, therefore the range of the exponent is – 127…+ 127.

Floating point number = (-1)*S*(1+Bit22*2

-1

+Bit21*2

-2

+…+Bit0*2

-23

) *2

Exponent-127

11.2 MODBUS protocol using one of the COMX ports


SeedMaster 2 is able to exchange different types of data by using one of the serial COMX ports of the
device. The applied protocol is the MODBUS protocol. Both the MODBUS RTU and the MODBUS ASCII are
implemented in SeedMaster 2.

SeedMaster 2 operates as a SLAVE device/station. The MASTER, typically a PC sends requests to a slave
station and the addressed SeedMaster 2 answers if the required information (registers) are available.
The accessible data are listed in the SeedMaster 2 register set table (see: SeedMaster 2 register set, page
85).

A subset of the MODBUS protocol is implemented:

Command 3: Read Multiple Registers

Command 16: Write Multiple Registers


Important note:
The slave address parameter – together with the parameters of the serial line and the protocol- has to be
given / defined before the installation of SeedMaster 2.

Remark: for more details please use “Modicon Modbus Protocol Reference Guide PI MBUS 300 Rev. J”.

The COMX ports of SeedMaster 2
There are 3 COM ports (COM1 to COM3, galvanically isolated) in the SeedMaster 2 device.
It is recommended to use COM1 for communication with a PCS or PC.
COM2 and COM3 can be used for connecting 1 or 2 refractometers to SeedMaster 2.

Setting the protocol parameters
The parameters of the serial line and the protocol have to be defined before the installation of SeedMaster 2
(see Ch. 7.7.1 for details).

The physical type of the serial line is user selectable:

• RS232
• RS485

• RS422 point to point

• RS422 multidrop


The serial line parameters:
Baud rate:

1200…38400


Data format : RTU mode
Bits per Byte:

1 start bit

8 data bits, least significant bit sent first

1 bit for even/odd parity; no parity bit for not defined parity

1 stop bit if parity is used; 2 stop bits if parity is not defined


Data format : ASCII mode
Bits per Byte:

1 start bit

7 data bits,

least significant bit sent first

1 bit for even/odd parity; no parity bit for not defined parity

1 stop bit if parity is used; 2 stop bits if parity is not defined


Users can configure SeedMaster 2 for Even or Odd Parity checking or for No Parity checking (only when
using ASCII mode)
For example if the eight data bits are 1100 0101, the total quantity of 1 bits in the frame is four. If Even Parity
is used, the frame’s parity bit will be 0, making the total quantity of 1 bits still an even number (four). If Odd
Parity is used the parity bit will be 1, making an odd quantity (five).


Advertising