• No results found

Receive Buffer and Received Data

Chapter 4 Using the Modbus Protocol

4.4 Setting the Configuration that is Used When the Modbus Protocol is Used

Explanation

Selecting the baud rate

Select the baud rate from the following list. 1200, 2400, 4800, 9600, 19200, 38400

Selecting the parity check

Select the parity check from the following list. Odd, Even, None

Selecting the slave address (valid when Modbus slave function is engaged)

Select the address from the following values. 1 to 32

Selecting the “Modbus” protocol

When communicating using the “Modbus” protocol, select [Modbus].

Selecting the communication interface used to output the data in the internal memory and the files on the external storage medium

Select [Ethernet], if you use output commands (ME/MI/MO commands) to output the data in the internal memory (display data, event data, TLOG data, manual sampled data, and report data) and the files on the external storage medium. Selecting [Serial] has no effect.

Storing the settings

To activate the settings made in the basic setting mode, the settings must be saved. Otherwise, the settings return to the previous values.

Note

When using the Modbus protocol, setting the data length and handshaking produces no effect.

Using the Modbus Protocol

4

Procedure

For the basic flow of operations, see “Flow of Operation using the Operation Keys” on page vi.

1. Press the MENU key to display the setting menu.

2. Press the FUNC key for approximately 3 s to display the basic setting menu.

3. Press the [#10 (Communication)](MV100) or [#6 (Communication)](MV200) soft

key to display the communication function setting menu.

4. Press the [#6 (Serial, Memory out)](MV100) or [#1 (Ethernet, Serial)](MV200)

soft key to display the communication (Serial) menu.

MV200 Communication (Ethernet, Serial) menu MV100 Communication

(Serial, Memory out) menu

Selecting the baud rate

5. Press the arrow keys to move the cursor to the [Baud rate] box.

6. Press one of the soft keys from [1200] to [38400] to select the baud rate.

Selecting the parity check

7. Press the arrow keys to move the cursor to the [Parity] box.

8. Press one of the soft keys from [Odd] to [None] to select the parity check.

Selecting the address

9. Press the arrow keys to move the cursor to the [Address] box.

10. Press one of the soft keys from [1] to [32] to select the address.

Setting the protocol to “Modbus”

11. Press the arrow keys to move the cursor to the [Protocol] box.

12. Press the [Modbus] soft key when using the Modbus slave function.

Press the [Modbus-M] soft key when using the Modbus master function.

Selecting the communication interface used to output the data in the internal memory and the files on the external storage medium

13. Press the arrow key to move the cursor to the [Memory out] box.

14. Press the [Ethernet] soft key when transferring data via Ethernet. Pressing the

[Serial] soft key has no effect.

Confirming/Canceling the new settings

15. To confirm the new settings, press the DISP/ENTER key. To cancel, press the

ESC key.

For detailed operations regarding confirmation and cancellation, see “Flow of Operation using the Operation Keys” on page vi.

Storing the new settings

16. Press the ESC key several times to display the basic setting menu.

17. Pressing the [End] soft key to display a dialog box which you select whether or

not to store the new settings.

18. Select the [Yes] to store the new settings, the [No] to discard them, or the

[Cancel] to return to the basic setting menu by pressing the arrow key. Then, press the DISP/ENTER key.

Using the Modbus Protocol

4

4.5

Setting the Modbus Master Function

Explanation

Selecting the read cycle

The cycle at which data is read from other devices. Select the read cycle from the following:

125 ms, 250 ms, 500 ms, 1 s, 2 s, 5 s, 10 s

Selecting the timeout time

If there is no response from the specified slave device after transmitting a command from the MV over the time specified here (timeout time), the MV repeats the operation of sending the command the specified number of retrials (see below) and waiting. If there is no response from the slave device after the specified number of retrials, the MV stops sending commands to the slave device.

X

Command sending is stopped. Operation when there is no response from the slave device (the number of retrials is set to 2)

: Commands are sent to the slave device at the read cycle. : The slave device responds.

: The slave devide does not respond.

X X

The slave device responds to the retrial. Time Retrials

X X X

Time Retrials

Select the timeout time from the following:

125 ms, 250 ms, 500 ms, 1 s, 5 s, 2 s, 10 s, and 1 min

Selecting the number of retrials

The number of times to retransmit the command when there is no response from the specified slave device. If there is no response from the slave device after the specified number of retrials, the MV stops sending commands to the slave device. Select the number of retrials from the following:

Off (0), 1, 2, 3, 4, 5, 10 and 20

Setting the command

The commands are used to read data from slave devices at the read cycle, and put them to the communication input data of the MV. Data from the consecutive registers with the same type of data in a slave device, can be read and put to the consecutive

communication input data of the MV using a command.

Read channel (start CH, end CH)

Specify which communication input data will be assigned the data that is read from the slave device (MV100: C01 to C12, MV200: C01 to C30).

Communication input data of the MV (Modbus master) Registers in slave device A Registers in slave device B C01 C02 C30 30001 30002 30001 30002

(Two registers are used for a 32-bit datum)

Address

Specify the address of the slave device from the following: 1 to 247

Register

Specify the register number of the slave device. 32-bit data is assigned to two registers. Thus, specify the smaller register number (see “Type” below). Input register: 30001 to 39999, 300001 to 365535

Hold register: 40001 to 49999, 400001 to 465535

Type

Specify the type of data that is assigned to the Modbus register of the slave device (the MV reads all data as floating point data).

INT16

Specify this parameter when a “16-bit signed integer” is assigned to the Modbus register.

Communication input data of the MV

Modbus register

16-bit signed integer Cxx

UINT16

Specify this parameter when a “16-bit unsigned integer” is assigned to the Modbus register.

INT32_B

Specify this parameter when a “32-bit signed integer” is assigned to the Modbus register in the order upper 16 bits followed by the lower 16 bits.

Specify the smaller register number (the higher register number in this case) in Register. Communication input data of the MV Modbus register Cxx (Upper 16 bits)

(Lower 16 bits) 32-bit signed integer

INT32_L

Specify this parameter when a “32-bit signed integer” is assigned to the Modbus register in the order lower 16 bits followed by the upper 16 bits.

Specify the smaller register number (the lower register number in this case) in Register. Communication input data of the MV Modbus register Cxx (Lower 16 bits)

32-bit signed integer

Related documents