MODBUS TCP

Avior can activate a MODBUS TCP server 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.


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


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

0x13A

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

ME1

0328

0x0148

Variable F

MF1


§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

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.