Você está na página 1de 22

Part no

Issue no
Language
Date
Page

Desoutter - ZAC de la Lorie - 38 rue Bobby Sands


BP 10273 - 44818 Saint-Herblain Cedex - France - www.cp.com

6159935751
01
English
04/2008
1 / 22

MODBUS / MODBUS TCP


User manual
N 6159935751-01

Copyright 2008, St Herblain France


All rights reserved. Any unauthorized use or copying of the
contents or part thereof is prohibited. This applies in particular to
trademarks, model denominations, part numbers and drawings.
Use only authorized parts. Any damage or malfunction caused
by the use of unauthorised parts is not covered by Warranty or
Product Liability.

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
2 / 22

MODBUS / MODBUS TCP

TABLE OF CONTENTS
GLOSSARY ..........................................................................................................................................3
1 - MODBUS .............................................................................................................................................. 4
1.1 - Introduction ............................................................................................................................................ 4
1.1.1 - Communication over RS232 networks ....................................................................................................... 4
1.1.2 - Communication over RS485 networks ........................................................................................................ 4
1.2 - Description ............................................................................................................................................. 5
1.2.1 - Technical features ....................................................................................................................................... 5
1.2.2 - Peripheral Address in the Network .............................................................................................................. 5
1.2.3 - Wiring ........................................................................................................................................................... 5
1.3 - Settings................................................................................................................................................... 6
1.3.1 - Configuring the CVI ..................................................................................................................................... 6
1.3.2 - Configuration with the CVIPC2000 software: .............................................................................................. 7

2 - MODBUS TCP ...................................................................................................................................... 9


2.1 - Introduction ............................................................................................................................................ 9
2.2 - Description ............................................................................................................................................. 9
2.2.1 - Technical features ....................................................................................................................................... 9
2.2.2 - Peripheral Address in the Network .............................................................................................................. 9
2.3 - Settings................................................................................................................................................. 10
2.3.1 - Configuring the CVI ................................................................................................................................... 10
2.3.2 - Configuration with the CVIPC2000 software: ............................................................................................ 11

3 - MODBUS / MODBUS TCP PROTOCOL............................................................................................ 14


3.1 - Supported Functions ........................................................................................................................... 14
3.2 - Memory addresses .............................................................................................................................. 14

4 - DESCRIPTION OF THE MEMORY ZONE ......................................................................................... 17


4.1 - Date programming zone ...................................................................................................................... 17
4.2 - Input / output zone............................................................................................................................... 17
4.2.1 - 24 V Inputs/Outputs .................................................................................................................................. 18
4.2.2 - Network inputs/outputs............................................................................................................................... 18
4.2.3 - Input mask.................................................................................................................................................. 18
4.3 - Machine 1 and 2 write zone ................................................................................................................ 18
4.3.1 - Cycle number selection ............................................................................................................................. 18
4.3.2 - Spindle validation ....................................................................................................................................... 18
4.3.3 - Specific code .............................................................................................................................................. 19
4.4 - Machine 1 and 2 read zone ................................................................................................................. 19
4.4.1 - Bar code .................................................................................................................................................... 19
4.4.2 - Spindle list .................................................................................................................................................. 19
4.4.3 - Number of spindles .................................................................................................................................... 19
4.4.4 - Selected cycle ............................................................................................................................................ 19
4.4.5 - Number of programmed OK cycles ........................................................................................................... 19
4.4.6 - Number of executed OK cycles ................................................................................................................. 19
4.4.7 - General report ............................................................................................................................................ 19
4.4.8 - Result number............................................................................................................................................ 19
4.4.9 - Report......................................................................................................................................................... 19
4.5 - Machine 1 and 2 results zone ............................................................................................................. 20
4.5.1 - Result format options ................................................................................................................................ 20
4.5.2 - Result per spindle read zone ..................................................................................................................... 21
4.5.3 - Size of result per spindle............................................................................................................................ 21
4.6 - Specific data zone ............................................................................................................................... 21
4.7 - Option zone .......................................................................................................................................... 21
4.8 - Example ................................................................................................................................................ 22

MODBUS / MODBUS TCP

GLOSSARY
PLC. Programmable logic controller
Field bus network. An industrial communications network
Byte. 8 bits
Word. 16-bit value
Long word. 32-bit value
CVI. Tightening controller
Floating. Real value whose decimal point has a variable position
SCY command. Tightening command: start cycle
RxD. Received data on RS232 serial link
TxD. Transmitted data on RS232 serial link
RT+. Received and transmitted data polarised '+' on RS485 serial link
RT-. Received and transmitted data polarised '-' on RS485 serial link
GND. Ground

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
3 / 22

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
4 / 22

MODBUS / MODBUS TCP

1 - MODBUS
1.1 - Introduction
MODBUS is a data exchange protocol for field bus networks. This protocol is used between a master unit and several slave
units. The master and slaves communicate using RS232 or RS485.
Answer
Master
Question

Slave 2

Slave 1

Slave 3

1.1.1 - Communication over RS232 networks


This type of communication is used in short-distance field bus networks only. Communications can be made at
baud rates of 300 to 115,200 bauds. RS232 links can only be established between one master and one slave.
Master
RS232

RS232

RS232

RS-B

RS-B

Slave 2

Slave 1

RS-B

Slave 3

1.1.2 - Communication over RS485 networks


This type of communication is used in medium-distance field bus networks only. Communications can be made
at baud rates of 300 to 115,200 bauds. RS232 links can be established between one master and up to 31 slaves.
Master
RS485i

RS485i

RS485f

RS-B

Slave 1

RS-B

Slave 2

Caution: the network must be considered as a chain made up of links:


- the master is at the start of the chain,
- the slaves represent the intermediate links (RS485i),
- the last slave (RS485f) forms the end of the chain.

RS-B

Slave X

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

6159935751
01
English
04/2008
5 / 22

1.2 - Description
Example RS845:
Connector with 2
cable inputs

Connector with 1
cable input

SUBD25

SUBD25

SUBD25

Station A

Station B

Station C

Master

1.2.1 - Technical features


The technical features of the MODBUS network are the following:
Type

Master/Slave

Interface
CVI socket
Speed
Length

RS232
RS485
SUBD25 contact socket
300 > 115,200 Mbaud
Max. 15 m
Max. 1,000 m

1.2.2 - Peripheral Address in the Network


A network can include no more than 32 peripherals.
A unique network address must be assigned to each peripheral (between 1 and 254).
1.2.3 - Wiring

RS232
Mapping between the wiring paths from the PLC to the RS-B port of the CVI controller.
RxD
Master

TxD
0V

Male SUB D25


0 V (7)

Rx (3)

Tx (2)

RS485
Mapping between the wiring paths from the PLC to the RS-B port of the CVI controller. The 0 V link between
the different peripherals is optional.
RT+
Master

0V
RT-

Male SUB D25


RT+ (11) 0 V (7)

RT- (19)

RT+ (11) 0 V (7)

RT- (19)

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
6 / 22

MODBUS / MODBUS TCP

1.3 - Settings
The tightening controller must be configured to be included in the MODBUS network.
Caution: to use MODBUS, the field bus network daughterboard (Modbus+, Profibus, InterbusS, Devicenet) in the
controller must not be connected. If there is an ETHERNET board in the controller, check that SOCKET 3 is not used.
1.3.1 - Configuring the CVI
Initial status: the machine is powered up and running.

Serial ports:
1. Press

L on the keyboard to view the configuration screen.

2. Open the PARAMETERS / PERIPHERALS / SERIAL PORTS menu.


3. In the RS-B screen, select the same settings as the master PLC.

Serial port type


(RS232 / RS485i / RS485f )
Speed
(300 to 115,200)

4. Save the settings and exit by pressing

PLC link on the RS-B channel:


1. Press

L on the keyboard to view the configuration screen.

2. Open the PARAMETERS / PERIPHERALS / PLC menu.


3. Select the required settings.

Slave number
(1 to 253)

4. Save the settings and exit by pressing

K.

MODBUS / MODBUS TCP

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
7 / 22

1.3.2 - Configuration with the CVIPC2000 software:


Initial status: the CVIPC2000 software is open. Open the Parameters > Controller menu.

Serial ports:
1. Click on "Serial ports" to enter the settings of the link(s) between the controller and the master.

2. Open the "RSB port" tab.


Select the same settings as the
master PLC.
Serial port type
(RS232 / RS485i / RS485f )
Speed
(300 to 115,200)

3. Press "OK" to validate.

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
8 / 22

MODBUS / MODBUS TCP

PLC link on the RS-B channel:


1. Click on "Peripherals" to enter the settings of the master's link on the RS-B channel.

2. Open the "PLC" tab.

Master

CVI

Network address
(1 to 253)

3. Press "OK" to validate.

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

6159935751
01
English
04/2008
9 / 22

2 - MODBUS TCP
2.1 - Introduction
MODBUS TCP is a data exchange protocol for field bus networks. This protocol is used between a server unit and one
or several client units. The server and the client communicate over ETHERNET.
Answer
Server
Question

Client 1

Client 2

Client 3

This means of communication is faster and more reliable than MODBUS for field bus networks.
2.2 - Description
Switch / Hub
Server

RJ45 Connector
RJ45

Client A

RJ45

RJ45

Client B

Client C

2.2.1 - Technical features


The technical features of the MODBUS TCP network are as follows:
Type
Interface
Connector
Speed
Length

Server/Client
TCP/IP
RJ45
10 - 100 Mb/s
Max. 100 m

2.2.2 - Peripheral Address in the Network


A network can include no more than 32 peripherals.
A unique network address must be assigned to each peripheral.

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
10 / 22

MODBUS / MODBUS TCP

2.3 - Settings
The tightening controller must be configured to be included in the MODBUS TCP network.
Caution: to use MODBUS TCP, the field bus network daughterboard (Modbus+, Profibus, InterbusS,
Devicenet) in the controller must not be connected. Check that the RSB is not configured as Controller / Slave.
2.3.1 - Configuring the CVI
Initial status: the machine is powered up and running.

Ethernet client configuration:


1. Press

L on the keyboard to view the configuration screen.

2. Open the PARAMETERS / PERIPHERALS / ETHERNET menu.


3. Enter the IP address of the controller

Client IP

4. Save the settings and exit by pressing

K.

MODBUS TCP server configuration:


1. Press

L on the keyboard to view the configuration screen.

2. Open the PARAMETERS / PERIPHERALS / SOCKET 3 menu.


3. Enter the IP address of the server.

Server IP

4. Save the settings and exit by pressing

K.

MODBUS / MODBUS TCP

Part no
Issue no
Language
Date
Page

2.3.2 - Configuration with the CVIPC2000 software:


Initial status: the CVIPC2000 software is open. Open the Parameters > Controller menu.

Ethernet:
1. Click on "Ethernet" to enter the settings of the link(s) between the client and the server.

2. Click on "Ethernet" to view the "Ethernet.ini" file.

6159935751
01
English
04/2008
11 / 22

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
12 / 22

MODBUS / MODBUS TCP

3. Enter the IP address of the client (controller) in the "Ethernet.ini" file.

Save the changes.

4. Select Socket 3.

Example: 192.168.5.167
(IP - Controller/PC)
IP address of the PC

5. Transfer the data from the PC to the controller using the "Transfer > PC-Station" menu.

MODBUS / MODBUS TCP

6. Send the new program configuration.

7. Transfer progress bar.

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
13 / 22

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
14 / 22

MODBUS / MODBUS TCP

3 - MODBUS / MODBUS TCP PROTOCOL


3.1 - Supported Functions
Only the following MODBUS / MODBUS TCP functions can be supported:
Function code

Type

Max.()

3 Reading of N internal registers


16 Writing of N internal registers

Word
Word

100
100

3.2 - Memory addresses


The memory address table below includes:
- the internal address for access to the CVI data in bytes and words,
- the name of the data,
- read/write access (R/W) by the master PLC,
- the size of the data in bytes,
- the permitted range of values.
Information: "Page" refers to the number of the page containing the corresponding information in detail.
Address
bytes
words
Description
Hexa. Deci. Hexa. Deci.
0x0000
0x0080

0
128

0x0000
0x0040

0
64

0x0100
0x0102
0x0104
0x0106
0x0108
0x010A
0x010C
0x010E

256
258
260
262
264
266
268
270

0x0080
0x0081
0x0082
0x0083
0x0084
0x0085
0x0086
0x0087

128
130
132
134
136
138
140
142

0x0200
0x0202
0x0206
0x0208

512
514
518
520

0x0100
0x0101
0x0103
0x0104

256
257
259
260

0x0400
0x0402
0x0406
0x0408
0x0600

1024
1026
1030
1032
1536

0x0200
0x0201
0x0203
0x0204
0x0300

512
513
515
516
768

0x1000
0x1002
0x1020
0x1024
0x1028
0x102C
0x102E
0x1030
0x1032
0x1034
0x1036
0x1038
0x103A

4096
4098
4128
4132
4136
4140
4142
4144
4146
4148
4150
4152
4154

0x0800
0x0801
0x0810
0x0812
0x0814
0x0816
0x0817
0x0818
0x0819
0x081A
0x081B
0x081C
0x081D

2048
2049
2064
2066
2068
2070
2071
2072
2073
2074
2075
2076
2077

Reserved
Date programming zone
Input / output zone
24-volt outputs, port 1
24-volt outputs, port 2
24-volt inputs, port 1
24-volt inputs, port 2
Network inputs, port 1
Network inputs, port 2
24-volt input mask 1
24-volt input mask 2
Machine 1 write zone
Cycle number selection (cycle n)
Spindle validation
Specific code length
Specific code (write bar code)
Machine 2 write zone
Cycle number selection (cycle n)
Spindle validation
Specific code length
Specific code (write bar code)
Reserved
Machine 1 read zone
Bar code
List of OK spindles
List of NOK spindles
List of ready spindles
Number of spindles
Selected cycle (cycle acknowledge)
Number of programmed OK cycles
Number of executed OK cycles
Number of results
General report
Simple report (spindle 1)
Simple report (spindle 2)

Access
x
R/W
R/W
R
R
R
R
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
x
R
R
R
R
R
R
R
R
R
R
R
R
R
R

Size
Value
(bytes)
128
128
16
2
2
2
2
2
2
2
2
36
2
4
2
30
36
2
4
2
30
2560
120
2
30
4
4
4
2
2
2
2
2
2
2
2

0 - 250
0 - 30

0 - 250
0 - 30

1 - 32
0 - 250
0 to 999
0 to 999
0-65535
0/1/2
0/1/2
0/1/2

Page
17
17
17
18
18
18
18
18
18
18
18
18
18
19
19
18
18
18
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

Address
bytes
words
Description
Hexa. Deci. Hexa. Deci.
0x103C
0x103E
0x1040
0x1042
0x1044
0x1046
0x1048
0x104A
0x104C
0x104E
0x1050
0x1052
0x1054
0x1056
0x1058
0x105A
0x105C
0x105E
0x1060
0x1062
0x1064
0x1066
0x1068
0x106A
0x106C
0x106E
0x1070
0x1072
0x1074
0x1076

4156
4158
4160
4162
4164
4166
4168
4170
4172
4174
4176
4178
4180
4182
4184
4186
4188
4190
4192
4194
4196
4198
4200
4202
4204
4206
4208
4210
4212
4214

0x081E
0x081F
0x0820
0x0821
0x0822
0x0823
0x0824
0x0825
0x0826
0x0827
0x0828
0x0829
0x082A
0x082B
0x082C
0x082D
0x082E
0x082F
0x0830
0x0831
0x0832
0x0833
0x0834
0x0835
0x0836
0x0837
0x0838
0x0839
0x083A
0x083B

2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107

0x2000
0x2002
0x2020
0x2024
0x2028
0x202C
0x202E
0x2030
0x2032
0x2034
0x2036
0x2038
0x203A
0x203C
0x203E
0x2040
0x2042
0x2044
0x2046
0x2048
0x204A
0x204C
0x204E

8192
8194
8224
8228
8232
8236
8238
8240
8242
8244
8246
8248
8250
8252
8254
8256
8258
8260
8262
8264
8266
8268
8270

0x1000
0x1001
0x1010
0x1012
0x1014
0x1016
0x1017
0x1018
0x1019
0x101A
0x101B
0x101C
0x101D
0x101E
0x101F
0x1020
0x1021
0x1022
0x1023
0x1024
0x1025
0x1026
0x1027

4096
4097
4112
4114
4116
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135

Simple report (spindle 3)


Simple report (spindle 4)
Simple report (spindle 5)
Simple report (spindle 6)
Simple report (spindle 7)
Simple report (spindle 8)
Simple report (spindle 9)
Simple report (spindle 10)
Simple report (spindle 11)
Simple report (spindle 12)
Simple report (spindle 13)
Simple report (spindle 14)
Simple report (spindle 15)
Simple report (spindle 16)
Simple report (spindle 17)
Simple report (spindle 18)
Simple report (spindle 19)
Simple report (spindle 20)
Simple report (spindle 21)
Simple report (spindle 22)
Simple report (spindle 23)
Simple report (spindle 24)
Simple report (spindle 25)
Simple report (spindle 26)
Simple report (spindle 27)
Simple report (spindle 28)
Simple report (spindle 29)
Simple report (spindle 30)
Simple report (spindle 31)
Simple report (spindle 32)
Machine 2 read zone
Bar code
List of OK spindles
List of NOK spindles
List of ready spindles
Number of spindles
Selected cycle (cycle acknowledge)
Number of programmed OK cycles
Number of executed OK cycles
Number of results
General report
Simple report (spindle 1)
Simple report (spindle 2)
Simple report (spindle 3)
Simple report (spindle 4)
Simple report (spindle 5)
Simple report (spindle 6)
Simple report (spindle 7)
Simple report (spindle 8)
Simple report (spindle 9)
Simple report (spindle 10)
Simple report (spindle 11)
Simple report (spindle 12)

Access
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R

6159935751
01
English
04/2008
15 / 22

Size
Value
(bytes)
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
120
2
30
4
4
4
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2

1 - 32
0 - 250
0 to 999
0 to 999
0-65535
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2

Page
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
16 / 22

MODBUS / MODBUS TCP

Address
bytes
words
Description
Hexa. Deci. Hexa. Deci.
0x2050
0x2052
0x2054
0x2056
0x2058
0x205A
0x205C
0x205E
0x2060
0x2062
0x2064
0x2066
0x2068
0x206A
0x206C
0x206E
0x2070
0x2072
0x2074
0x2076
0x3000
0x5000
0x7000
0xEFFF

8272
8274
8276
8278
8280
8282
8284
8286
8288
8290
8292
8294
8296
8298
8300
8302
8304
8306
8308
8310
12288
60481
28672
61439

0x1028
0x1029
0x102A
0x102B
0x102C
0x102D
0x102E
0x102F
0x1030
0x1031
0x1032
0x1033
0x1034
0x1035
0x1036
0x1037
0x1038
0x1039
0x103A
0x103B
0x1800
0x2800
0x3800
0x77FF

4136
4137
4138
4139
4140
4141
4142
4143
4143
4144
4145
4146
4147
4148
4150
4151
4152
4153
4154
4155
6144
50241
14336
30719

0xF000
0xF040
0xF0C0

61440
61504
61632

0x7800
0x7820
0x7860

30720
30752
30816

Simple report (spindle 13)


Simple report (spindle 14)
Simple report (spindle 15)
Simple report (spindle 16)
Simple report (spindle 17)
Simple report (spindle 18)
Simple report (spindle 19)
Simple report (spindle 20)
Simple report (spindle 21)
Simple report (spindle 22)
Simple report (spindle 23)
Simple report (spindle 24)
Simple report (spindle 25)
Simple report (spindle 26)
Simple report (spindle 27)
Simple report (spindle 28)
Simple report (spindle 29)
Simple report (spindle 30)
Simple report (spindle 31)
Simple report (spindle 32)
Machine 1 results zone
Machine 2 results zone
Specific data zone
Option zone
64 option bytes
64 option words
32 long option words

Access

Size
Value
(bytes)

R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R/W

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
Srv
Srv
Srv

R
R
R
R

320
64x1
64x2
32x4

0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2
0/1/2

Page
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
19
20
20
21
21

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

6159935751
01
English
04/2008
17 / 22

4 - DESCRIPTION OF THE MEMORY ZONE


The memory of a tightening controller contains seven main categories of information:
- date setting zone, inputs/outputs, 24 V inputs/outputs, inputs/outputs and network mask,
- control zone,
- read zone,
- simple reports per spindle zone,
- results per spindle results zone,
- special data zone (IsaGraf),
- option zone.
In the event of asynchronous operation, the tightening controller can be made up of two machines (TWINCVI). Therefore,
the seven main information categories above are available for both machines.
Reminder: a multi-spindle station can include no more than 32 spindles (MULTICVI).
4.1 - Date programming zone
This zone is used to program the data and time across a network so that the time in the PLCs is coherent.
Description

Access Size

Year (0 to 59 for 2000 to 2059)


Month (1 to 12)
Day (1 to 31)
Hours (0 to 23)
Minutes (0 to 59)
Seconds (0 to 59)
Control word for access to the date

R/W
R/W
R/W
R/W
R/W
R/W
R/W

Type

1
1
1
1
1
1
2

Integer
Integer
Integer
Integer
Integer
Integer
Integer

When the PLC accesses the date, it must reset the acknowledge flag (least significant byte) and set the most significant
byte.
Example: Control word for access to the date
Action (PLC)

Most significant byte


(first byte - Hexa.)

Least significant byte


(second byte - Hexa.)

Write

40

00

Request to read the date

Read

00

80

Date information available

Description of the action

Data processing time


Write

80

00

Request to write the date and time

Read

00

80

Date and time successfully loaded

When the CVI has finished programming or reading the date, it resets the most significant byte and provides a report in
the least significant byte:
Bit7

Bit6

Bit6

Completed

NOK

Year error

1
0

Yes
No

1
0

NOK
OK

1
0

Error
OK

Bit4
Month
error
1
0

Error
OK

Bit3

Bit2

Day error Hours error


1
0

Error
OK

1
0

4.2 - Input / output zone


A machine has 14 inputs and 16 x 24 Volt outputs which are in read only mode.

Error
OK

Bit1
Minutes
error
1
0

Error
OK

Bit0
Seconds
error
1
0

Error
OK

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
18 / 22

MODBUS / MODBUS TCP

4.2.1 - 24 V Inputs/Outputs
This zone represents the 24 Volt inputs/outputs of the tightening controller. They can be accessed in read-only
mode.
Input Description

Bit

(See Input mask)


Cycle 1
Cycle 2
Cycle 4
Cycle 8
Cycle 16
Cycle start
Direction
Report request
Emergency stop (ES)
Reset
Clear fault
Spindle validation
Synchro In
External stop

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Maskable

9
9
9

9
9
9

Output Description
Cycle 1 acknowledge
Cycle 2 acknowledge
Cycle 4 acknowledge
Cycle 8 acknowledge
Cycle 16 acknowledge
Report OK
Report NOK
N of cycles OK
Running
Ready
Reverse run detected
Reverse run detected
Synchro out
-

4.2.2 - Network inputs/outputs


The same functions executed by the 24V inputs can be used with MODBUS. However, not all of the input
functions are available over MODBUS type field bus networks.
Only the "Cycle start", "Direction", "Report request", "Emergency stop", "Reset", and "Clear fault" functions
are available across field networks.
4.2.3 - Input mask
Masks are used to enable or disable the functions of maskable inputs.
Masks are only of any use with tightening controllers without an IsaGRAF application.
Tightening controllers with an IsaGRAF application can redefine their network inputs/outputs.
Example: To enable the "Cycle start" over the field bus network and disable this function by the 24V input, the
input mask must be set to 0x0020 (bit n 5 is set).
When an input can be accessed by the network and a 24 V input, an "OR" function is executed between the
network input and the 24 V input.
4.3 - Machine 1 and 2 write zone
4.3.1 - Cycle number selection
This data is only taken into consideration if "Source of cycle number" is set to "PLC" in the tightening controller.
4.3.2 - Spindle validation
This data is only taken into consideration when "Spindle validation" is set to "PLC" in the tightening controller.
This list is a 32-bit long word. Each bit corresponds to one spindle.
A list of spindles is encoded as follows.
Byte N

Spindles

1st byte
2nd byte
3rd byte
4th byte

Spindles 25 to 32
Spindles 17 to 24
Spindles 9 to 16
Spindles 1 to 8

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

6159935751
01
English
04/2008
19 / 22

4.3.3 - Specific code


Writing the specific code in the memory serves two purposes:
- to memorise a code in the tightening results of the tightening controller,
- to select a cycle using a code. In order to use the code as the source of the cycle number, the following
options must be selected:
"cycle source n" to "bar code",
"read by PLC" in the bar code settings.
Note: the PLC must program the specific code and its length in a single record. When the controller takes the
specific code into account, it resets the length.
4.4 - Machine 1 and 2 read zone
Note: the size of the machine read zone depends on the number of spindles in the machine.
4.4.1 - Bar code
This code is the result of reading a standard bar code connected to the station, or copying of the specific code in
the write zone.
If the code is less than 30 characters in length, the unused memory is filled with zeros (0x00).
4.4.2 - Spindle list
This list is a 32-bit long word. Each bit corresponds to one spindle. A list of spindles is encoded as follows.
Byte n

Spindles

1st byte
2nd byte
3rd byte
4th byte

Spindles 25 to 32
Spindles 17 to 24
Spindles 9 to 16
Spindles 1 to 8

4.4.3 - Number of spindles


For a TWINCVI or a MODCVI, the maximum number of spindles per machine is 2.
For a MULTICVI, the maximum number of spindles per machine is 32.
4.4.4 - Selected cycle
This zone is the equivalent to the cycle acknowledge.
4.4.5 - Number of programmed OK cycles
This zone contains the number of OK cycles programmed in the selected cycle.
4.4.6 - Number of executed OK cycles
This zone contains the number of executed OK cycles in the selected cycle since the last reset.
4.4.7 - General report
This zone contains the general report of the last executed cycle.
0

No general report

General report OK

General report NOK

4.4.8 - Result number


This value indicates the number of the result (0 to 65535). This value is reset when it reaches the maximum.
4.4.9 - Report
The reports per spindle are encoded as follows:
Tension
X

Torque rate
X

Torque
X

Angle
X

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
20 / 22

MODBUS / MODBUS TCP

Each setting may take the following values:


01

(binary)

Min.

11

(binary)

OK

10

(binary)

Max.

00

(binary)

The spindle did not rotate or was stopped during the cycle.

4.5 - Machine 1 and 2 results zone


The size used for this zone depends on the number of spindles and format.
4.5.1 - Result format options
The results zone is made up of the following:
- a general report,
- a results zone, the size of which is the size of a spindle result multiplied by the number of spindles in the
machine.
The description of a result per spindle depends on three options programmed in the tightening controller:
- The type of data saved is used to select whether the following data are saved: torque, angle, torque rate
and tension.
The type of data is programmed in word N 10 as follows:
Bit 0

Torque

Bit 1

Angle

Bit 2

Torque rate

Example: word no. 10 = 0x0007Torque + Angle + Torque rate


- The data format is used to select the type of data encoding: ASCII or floating IEEE 754.
The data format is programmed in word N 11 as follows:
0

ASCII

floating MOTOROLA

floating INTEL

- The type of saved values is used to select the following data for each type of data saved: tolerance, final
value and report.
The type of values is programmed in word N 12 as follows:
0

Tolerance + Final value + Report

Final Value + Report

Report

These three options are used to adapt the size and presentation of a result per spindle to the user's requirements.
Remark: these options can be accessed through an option configuration utility.

Part no
Issue no
Language
Date
Page

MODBUS / MODBUS TCP

6159935751
01
English
04/2008
21 / 22

4.5.2 - Result per spindle read zone


The size of this zone depends on the number of spindles and the size of each result depends on the type
requested.
Report description table according to type
Example Size Natural MOTOROLA type

Description

ASCII type

General report

Min. torque

" ": No report


"A": Accepted
"R": Rejected
-6.x

Torque

-6.x

Max. torque

-6.x

Torque pattern

Min. angle

" ": no result


" < ": value is too low
" > ": value is too high
" = ": result OK
-6.1

Angle

-6.1

Max. angle

-6.1

" ": no result


" < ": value is too low
" > ": value is too high
" = ": result OK
Min. torque rate -6.3
Torque rate
-6.3
Max. torque rate -6.3
Torque rate
" ": no result
pattern
" < ": value is too low
" > ": value is too high
" = ": result OK

" "
"A"
"R"
"49.97"
"100.2"
"49.97"
"100.2"
"49.97"
"100.2"

"9999.1"
"25.2"
"9999.1"
"25.2"
"9999.1"
"25.2"

Angle pattern

"10.158"
"10.158"
"10.158"

Size
2

0x0000 : no report
0x0001: report OK
0x0002: report NOK
Floating

Floating

Floating

0x0000: no result
0x0001: value is too low
0x0010: value is too high
0x0011: result OK
Floating

Floating

Floating

0x0000: no result
0x0001: value is too low
0x0010: value is too high
0x0011: result OK
Floating
Floating
Floating
0x0000: no result
0x0001: value is too low
0x0010: value is too high
0x0011: result OK

6
6
6
2

4
4
4
2

4.5.3 - Size of result per spindle


Depending on the three options programmed in the tightening controller, the size of a spindle result takes the
following values:
Value mask
Torque
(word N 10 = 0x0001)
Torque, angle
(word N 10 = 0x0003)
Torque + Angle + Torque Rate
(word N 10 = 0x0007)

Format 0 (full)
Tolerance, final, pattern
ASCII
Natural
20
(6x3 + 2)
40
((6x3 + 2)x2)
60
((6x3 + 2)x3)

14
(4x3 + 2)
28
(4x3 + 2)x2
42
(4x3 + 2)x3

Format 1 (partial)
Final, pattern
ASCII
Natural
8
(6 + 2)
16
((6 + 2)x2)
24
((6 + 2)x3)

6
(4 + 2)
12
(4 + 2)x2
18
(4 + 2)x3

Format 2 (reduced)
Pattern
ASCII
Natural
2

4
(2x2)
6
(2x3)

4
(2x2)
6
(2x3)

4.6 - Specific data zone


This zone is used for specific applications. It can only be used with IsaGRAF applications. This memory zone can be
accessed by both the PLC and the IsaGRAF application of the tightening controller.
The data stored in this memory zone is saved even when the controller power supply is cut.
4.7 - Option zone
This memory zone is read-only. It displays the options used to code the result per spindle zone, as well as the size reserved
for the specific zone.

Part no
Issue no
Language
Date
Page

6159935751
01
English
04/2008
22 / 22

MODBUS / MODBUS TCP

4.8 - Example
Sequence of a complete tightening cycle by MODBUS.

Select cycle N
(1 to 250)
Address = 256

Read cycle
acknowledge
Address = 2071

echo = 0

Cycle acknowledge = cycle requested


Write SCY command = 1
Address = 132

Cycle in progress = 0

Read input
Cycle in progress = 1
Address = 0128
Cycle in progress = 1
YES

Cycle in progress = 1

Read input
Cycle in progress = 0
Address = 0128
Cycle in progress = 0
Write SCY command =1
Address = 0132

Read results
Address = 6144

22

Error: the cycle n does not


exist or selection impossible
(cycle source <> PLC)

Você também pode gostar