beautypg.com

App index, Ys sets serial interface parameters, Yl sets modbus master function settings – Yokogawa Button Operated MV2000 User Manual

Page 110: Ym sets a modbus master transmission command

background image

4-37

Commands

M-4662

1

2

3

4

5

6

7

App

Index

YS

Sets serial interface parameters

Syntax

YS p1,p2,p3,p4,p5,p6
p1

Baud rate (1200, 2400, 4800, 9600, 19200,

38400)

p2

Data length (7, 8)

p3

Parity check (ODD, EVEN, NONE)

p4

Handshaking (OFF:OFF, XON:XON, XON:

RS, CS:RS)

p5

RS-422/485 address (01 to 99)

p6

Protocol (NORMAL, MODBUS,

MODBUS-M)

Query

YS?

Example

Set the baud rate to 9600, the data length to
8, the parity check to ODD, handshaking to
OFF:OFF, the RS-422/485 address to 02, and
the protocol to NORMAL.
YS9600,8,ODD,OFF:OFF,02,NORMAL

Description • The settings specified with this command take

effect when you save the settings with the XE
command and power-cycle the MV.

• You can execute this command on models

with the /C2 or /C3 serial interface option.

YL

Sets Modbus master function

settings

Syntax

YL p1,p2,p3,p4,p5
p1

Read cycle (125MS, 250MS, 500MS, 1S,

2S, 5S, 10S)

p2

Timeout (125MS, 250MS, 500MS, 1S, 2S,

5S, 10S, 1MIN)

p3

Retrials (OFF, 1 to 5, 10, 20)

p4

Command wait time (OFF, 5MS, 10MS,

15MS, 45MS, 100MS)

p5

Auto recovery (OFF, 1MIN, 2MIN, 5MIN,

10MIN, 20MIN, 30MIN, 1H)

Query

YL?

Example

Set the read cycle to 500 ms, the timeout to 250
ms, the retrials to 2, the command wait time to
10 ms, and the auto recovery to 5 min.
YL500MS,250MS,2,10MS,5MIN

Description • You can execute this command on models

with the /C2 or /C3 serial interface option.

• You can use this command when the serial

interface protocol is set to Master. For serial
interface settings, see section 3.3.

• The settings specified with this command take

effect when you save the settings with the XE
command and power-cycle the MV.

YM

Sets a Modbus master

transmission command

To not assign a command

Syntax

YM p1,p2
p1

Registration number (1 to 16)

p2

Command ON/OFF (OFF)

Query

YM[ p1]?

Example

Do not assign a command to command
registration number 1.
YM1,OFF

To set a command for reading data into external
input channels

Syntax

YM p1,p2,p3,p4,p5,p6,p7
p1

Registration number (1 to 16)

p2

Command type (R)

p3

First channel number (external input channel

number)

p4

Last channel number (external input channel

number)

p5

Slave device address (1 to 247)

p6

First register number (30001 to 39999,

40001 to 49999, 300001 to 365535, 400001
to 465535)

p7

Type of data assigned to the register (INT16,

UINT16, INT32_B, INT32_L, UINT32_B,
UINT32_L)

Query

YM[ p1]?

Example

Register the following command in command
registration number 2: Read the 32-bit signed
integer data that is assigned to registers 30002
(upper 16 bits) and 30004 (lower 16 bits) on the
slave device at address 5 into MV external input
channels 201 to 203.
YM2,R,201,203,5,30002,INT32_B

To set a command for reading data into
communication input channels

Syntax

YM p1,p2,p3,p4,p5,p6,p7
p1

Registration number (1 to 16)

p2

Command type (R-M)

p3

First channel number (communication input

channel number)

p4

Last channel number (communication input

channel number)

p5

Slave device address (1 to 247)

p6

First register number (30001 to 39999,

40001 to 49999, 300001 to 365535, 400001
to 465535)

p7

Type of data assigned to the register

(INT16, UINT16, INT32_B, INT32_L,
UINT32_B, UINT32_L, FLOAT_B, FLOAT_
L)

Query

YM[ p1]?

Example

Register the following command in command
registration number 2: Read the 32-bit signed
integer data that is assigned to registers
30002 (upper 16 bits) and 30004 (lower 16
bits) on the slave device at address 5 into MV
communication input channels C02 to C05.
YM2,R-M,C02,C05,5,30003,INT32_B

4.6 Basic Setting Commands

This manual is related to the following products: