12 app, Smodmaster modbus master (/c2/mc or /c3/mc) – Yokogawa Touch Screen GP20 User Manual

Page 49

Advertising
background image

2-35

IM 04L51B01-17EN

Commands and Responses

1

2

App

p2 Output type

Alarm Output alarms

Manual Specify the output value

p3 Operation

And

Operate when all set alarms are

in the alarm state.

Or

Operate when any of the set

alarms are in the alarm state.

Query

SSwitch[,p1]?

Example Output an alarm on internal switch 3. Use “OR”

logic.

SSwitch,3,Alarm,Or

Description
p3 is valid when p2=Alarm.

SSerialBasic

Serial Communication Basics (/C2 or /

C3)

Sets basic serial communication parameters.

Not Use

Syntax SSerialBasic,p1

p1 Function (Off)

Normal
Syntax
SSerialBasic,p1,p2,p3,p4,p5,p6,p7

p1 Function (Normal)

p2 Address (1 to 99)

p3 Baud rate [bps] (1200, 2400, 4800, 9600,

19200, 38400, 57600, 115200)

P4 Parity (Odd, Even, None)

p5 Stop bits (1, 2)

p6 Data length [bit] (7, 8)

p7 Handshaking (Off:Off, XON;XON,

XON:RS, CS:RS)

Modbus Master and Modbus Slave
Syntax
SSerialBasic,p1,p2,p3,p4,p5

p1 Function (Master, Slave)

p2 Address (1 to 247)

p3 Baud rate [bps] (1200, 2400, 4800, 9600,

19200, 38400, 57600, 115200)

P4 Parity (Odd, Even, None)

p5 Stop bits (1, 2)

Query

SSerialBasic?

Example Set the baud rate to 9600, the data length to 8,

the parity check to ODD, the stop bits to 1, the

handshaking to OFF:OFF, the address to 02,

and the protocol to NORMAL.

SSerialBasic,Normal,2,9600,Odd,1,8

,Off:Off

Description

• You can set p1=Master only on GXs/GPs that have the

/MC option.

• The settings specified with this command takes effect

with the

OSeriApply

command. The GX/GP serial

settings do not change until you send the OSeriApply

command.

SModMaster

Modbus Master (/C2/MC or /C3/MC)

Sets the Modbus master operation.

Syntax SModMaster,p1,p2,p3,p4,p5,p6

p1 Master function (Off, On)

p2 Read cycle (100ms, 200ms, 500ms, 1s,

2s, 5s, 10s)

p3 Communication timeout (100ms, 200ms,

250ms, 500ms, 1s, 2s 5s, 10s, 1min)

P4 Gap between messages (Off, 5ms, 10ms,

20ms, 50ms, 100ms)

p5 Recovery action: retransmission (Off, 1, 2,

3, 4, 5, 10, 20)

p6 Recovery action: wait time (Off, 5s, 10s,

30s, 1min, 2min, 5min)

Query

SModMaster?

Example Set the read cycle to 500ms, the

communication timeout to 250ms, the

gap between messages to 10ms, the

retransmission to 2, and the recovery wait time

to 5min.

SModMaster,On,500ms,250ms,2,5min

SModMCmd

Modbus Master Transmission Command

(/C2/MC or /C3/MC)

Sets a transmit command of the Modbus master.

Syntax SModMCmd,p1,p2,p3,p4,p5,p6,p7,p8

p1 Command number (1 to 100)

p2 Command type

Off

Disable command

Write

Write a value to a Modbus

register of another device

Read

Read a value from a Modbus

register of another device

p3 Slave number (1 to 247)

P4 Data type

BIT

Bit String data

INT16

16-bit signed integer

UINT16

16-bit unsigned integer

INT32_B 32-bit signed integer (big

endian)

INT32_L 32-bit signed integer (little

endian)

UINT32_B 32-bit unsigned integer (big

endian)

UINT32_L 32-bit unsigned integer (little

endian)

FLOAT_B 32-bit floating point (big

endian)

FLOAT_L 32-bit floating point (little

endian)

2.4 Setting Commands

Advertising
This manual is related to the following products: