MODBUS TCP

Avior can activate a MODBUS TCP server (slave) over WiFi network.

Up to 4 clients can connect to the server and request various coils, input and holding register status; a client can also setup coils and holding registers.

MODBUS TCP server handles MODBUS exception if a function code not supported is requested, if the register address is invalid or the requested register number is not correct.

A timeout for inactive client can be setup. If a client doesn't send any MODBUS request in the specified time, its socket will be closed.


Rules associated with WAN devices are stored in

specific unit R folders


MAP

The table shows the function codes and MODBUS address supported by the server


READ DIGITAL INPUTS

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

02

0000

0x00

Digital Input 1

I12

1 bit

0001

0x01

Digital Input 2

I22

0002

0x02

Digital Input 3

I32

0003

0x03

Digital Input 4

I42

0004

0x04

Digital Input 5

I52

0005

0x05

Digital Input 6

I62

0006

0x06

Main Supply

I72

0007

0x07

Aux Supply

I82


READ / WRITE OUTPUTS

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

01

05

15

0100

0x64

Relay output 1

O12

1 bit

0101

0x65

Relay output 2

O22

0102

0x66

Relay output 3

O32

0103

0x67

Relay output 4

O42


READ / WRITE MEMORY BITS

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

01

05

15

0200

0xC8

Memory Bit 1

M11

1 bit

0201

0xC9

Memory Bit 2

M21

0202

0xCA

Memory Bit 3

M31

0203

0xCB

Memory Bit 4

M41

0204

0xCC

Memory Bit 5

M51

0205

0xCD

Memory Bit 6

M61

0206

0xCE

Memory Bit 7

M71

0207

0xCF

Memory Bit 8

M81

0208

0xD0

Memory Bit 9

M91

0209

0xD1

Memory Bit A

MA1

0210

0xD2

Memory Bit B

MB1

0211

0xD3

Memory Bit C

MC1

0212

0xD4

Memory Bit D

MD1

0213

0xD5

Memory Bit E

ME1

0214

0xD6

Memory Bit F

MF1

0215

0xD7

Memory Bit G

MG1

0216

0xD8

Memory Bit H

MH1

0217

0xD9

Memory Bit I

MI1

0218

0xDA

Memory Bit J

MJ1

0219

0xDB

Memory Bit K

MK1

0220

0xDC

Memory Bit L

ML1

0221

0xDD

Memory Bit M

MM1

0222

0xDE

Memory Bit N

MN1

0223

0xDF

Memory Bit O

MO1

0224

0xE0

Memory Bit P

MP1

0225

0xE1

Memory Bit Q

MQ1

0226

0xE2

Memory Bit R

MR1

0227

0xE3

Memory Bit S

MS1

0228

0xE4

Memory Bit T

MT1

0229

0xE5

Memory Bit U

MU1

0230

0xE6

Memory Bit V

MV1

0231

0xE7

Memory Bit W

MW1

0232

0xE8

Memory Bit X

MX1

0233

0xE9

Memory Bit Y

MY1

0234

0xEA

Memory Bit Z

MZ1


READ ANALOG INPUTS - §1

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

04

0000

0x00

Analog Input 1

A19

2 words

32 bits

0002

0x02

Analog Input 2

A29

0004

0x04

Analog Input 3

A39

0006

0x06

Analog Input 4

A49

0008

0x08

Battery

A52

0010

0x0A

Temperature

A62


READ / WRITE PULSE COUNTERS - §2

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

03

16

0100

0x64

Counter Input 1

P12

2 words

32 bits

0102

0x66

Counter Input 2

P22

0104

0x68

Counter Input 3

P32

0106

0x6A

Counter Input 4

P42

0108

0x6C

Counter Input 5

P52

0110

0x6E

Counter Input 6

P62


READ / WRITE DIGITAL TIME COUNTERS - §2

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

03

16

0200

0xC8

Timer Input 1

I13

2 words

32 bits

0202

0xCA

Timer Input 2

I23

0204

0xCC

Timer Input 3

I33

0206

0xC3

Timer Input 4

I43

0208

0xD0

Timer Input 5

I53

0210

0xD2

Timer Input 6

I63


READ / WRITE VARIABLES - §3

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

03

16

0300

0x012C

Variable 1

V11

2 words

32 bits

0302

0x012E

Variable 2

V21

0304

0x0130

Variable 3

V31

0306

0x0132

Variable 4

V41

0308

0x0134

Variable 5

V51

0310

0x0136

Variable 6

V61

0312

0x0138

Variable 7

V71

0314

0x013A

Variable 8

V81

0216

0x013C

Variable 9

V91

0318

0x013E

Variable A

VA1

0320

0x0140

Variable B

VB1

0322

0x0142

Variable C

VC1

0324

0x0144

Variable D

VD1

0326

0x0146

Variable E

VE1

0328

0x0148

Variable F

VF1

0330

0x014A

Variable G

VG1

0332

0x014C

Variable H

VH1

0334

0x014E

Variable I

VI1

0336

0x0150

Variable J

VJ1

0338

0x0152

Variable K

VK1

0340

0x0154

Variable L

VL1

0342

0x0156

Variable M

VM1

0344

0x0158

Variable N

VN1

0346

0x015A

Variable O

VO1

0348

0x015C

Variable P

VP1

0350

0x015E

Variable Q

VQ1

0352

0x0160

Variable R

VR1

0354

0x0162

Variable S

VS1

0356

0x0164

Variable T

VT1

0358

0x0166

Variable U

VU1

0360

0x0168

Variable V

VV1

0362

0x016A

Variable W

VW1

0364

0x016E

Variable X

VX1

0366

0x016E

Variable Y

VY1

0368

0x0170

Variable Z

VZ1







READ BLE DOOR SENSORS

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

02

0300

0x012C

Sensor A Status

HA2

1 bit

0301

0x012D

Sensor B Status 

HB2

0302

0x012E

Sensor C Status

HC2

0303

0x012F

Sensor D Status

HD2

0304

0x0130

Sensor E Status

HE2

0305

0x0131

Sensor F Status

HF2

0306

0x0132

Sensor G Status

HG2

0307

0x0133

Sensor H Status

HH2

0308

0x0134

Sensor A Tamper

HA3

0309

0x0135

Sensor B Tamper

HB3

0310

0x0136

Sensor C Tamper

HC3

0311

0x0137

Sensor D Tamper

HD3

0312

0x0138

Sensor E Tamper

HE3

0313

0x0139

Sensor F Tamper

HF3

0314

0x013A

Sensor G Tamper

HG3

0315

0x013B

Sensor H Tamper

HH3


READ BLE TEMPERATURE SENSORS - §1

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

04

0100

0x64

Temperature 1 

H12

2 words

32 bits

0102

0x66

Temperature 2

H22

0104

0x68

Temperature 3

H32

0106

0x6A

Temperature 4

H42


READ / WRITE WIFI PLUGS

FUNCTION

CODE

COIL

DEC

ADDRESS

HEX

CHANNEL

TAG

AVIOR

LENGTH

01

05

15

0400

0x0190

Plug A Status

OA2

1 bit

0401

0x0191

Plug B Status

OB2

0402

0x0192

Plug C Status

OC2

0403

0x0193

Plug D Status

OD2

0404

0x0194

Plug E Status

OE2

0405

0x0195

Plug F Status

OF2

0406

0x0196

Plug G Status

OG2

0407

0x197

Plug H Status

OH2


§1

Input values are returned in IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985).

The requested number of register must be even. In case an odd number of register is requested, a MODBUS exception is returned.

§2

Pulse and time counters are returned as 32-bit integer values. Each counter is stored in two 16-bit registers.

The requested number of register must be even. In case an odd number of register is requested, a MODBUS exception is returned.

§3

Le Memory variables are returned as 32-bit integer values. Each memory variable is stored in two 16-bit registers.

ZERO is returned when the variable is a string.

The requested number of register must be even. In case an odd number of register is requested, a MODBUS exception is returned.