Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Protocollo seriale TP / TW / TO

Serial protocol for TP / TW / TO


Service Book ENGLISH
PIOVAN adopts a policy of on-going development.

With the exception of information required by law, the general information (or
diagrams) featured in this document may depict models and/or versions different
to the one you have purchased.
This will in no way alter the validity or applicability of the information provided.
1. HARDWARE
The transmission is made in RS-485 or 20mA Passive current loop (2 wires connection).
In the case of current loop transmission, the Host has to be active in TX loop and RX loop, while the Device is passive in
both.
The hardware of the Host has to satisfy the following requirements:
- source of current: 17 V / 20 mA (+/- 10%);
- maximum voltage drop: < 2 V.
The serial line could be connected directly to one of the connectors located in the front of the machine.
The connector is a 9 pin male SUB-D: this is the pin assignment:

RS-485

Left connector Right connector

A / A’ 1 1

B / B’ 2 2

C / C’ (shield) 3 3

Passive current Loop

Left connector Right connector

TX / RX + 9 8

TX / RX - 8 9

1- G ENGLISH
2. SERIAL INTERFACE CIRCUIT BOARD
1. Press button 10, in normal viewing mode with 5 indicator light on, until it
goes out or starts blinking. The machine stops automatically.
2. Turn the main circuit breaker on the thermoregulator to 0 (0FF) and discon-
nect power.
3. Open the front panel on the machine.
4. Unscrew the screws on the side panels and remove them.
5 10
5. Unscrew the screws on the cover located on the rear panel and slide it to-
ward the back of the machine far enough to release it from its fastening.
6. Unscrew the screws on the back of the front panel and remove it.
7. Position the dip-switch microswitches of the Fig. 1 on serial interface circuit board A3, as indicated in the table below,
depending on the transmission speed of the serial line.

1 2 3 4 5 6
19200 bps OFF OFF OFF OFF ON ON
9600 bps OFF OFF ON OFF ON ON
4800 bps OFF ON OFF OFF ON ON
2400 bps OFF ON ON OFF ON ON
1200 bps ON OFF OFF OFF ON ON
600 bps ON OFF ON OFF ON ON
300 bps ON ON OFF OFF ON ON
150 bps ON ON ON OFF ON ON

Fig. 1

8. Unplug the connectors indicated in Fig. 2 in order to house serial interface circuit board A3.

Fig. 2

ENGLISH 2- G
9. Insert serial interface circuit board AS in the front panel on the machine as shown in Fig. 3 and fasten it in place with its
screws.

Fig. 3

10. Plug the connector on serial interface circuit board A3 into the microprocessor circuit board as shown in Fig. 4.
11. Plug the connectors indicated in Fig. 2 back in the same position.

Fig. 4

12. Reassemble all the parts of the thermoregulator.


13. Enter the correct configuration parameters for the thermoregulator, after consulting the machine manual.

3- G ENGLISH
3. THE ARBENG PIOVAN PROTOCOL
3.1. Introduction

This document describes implementation of the ARBENG PIOVAN PROTOCOL between:


a) an Injection Moulding Machine (hereinafter referred to as I.M.M.) or a Host PC
and
b) a Mould Temperature Controller or a Dryer.
This document is provided as "stand-alone" documentation for users of I.M.Ms.

3.2. Basic concepts


In this protocol the Master-Slave principle is used. This means that we have a Master (an I.M.M. or an Host Computer) and
a Slave (the Mould Temperature Controller, the Dryer or, generally, another Auxiliary Device).

Data transmission between Master and Slave is basically ordered by the control system of the I.M.M. or the Computer
(hereinafter also called "the Host"); therefore the device ("Slave") sends data only if requested by the Host.

Several Slaves can be connected on the same transmission line. The devices are to be addressed individually with a unique
Address Number. Setting of the device address is made manually with the device keyboard.

3.3. Safety stages

Three safety stages are provided to detect errors:

1. The Master-Slave principle is used; only the Slave confirms the received message, either with the corresponding an-
swer, which contains the same data set identification as the sending request (= reception Ok), or with the message
"NAK" (= faulty reception).
2. Each message (also confirmations) contains 3 bytes which, coded in ASCII, contain the binary number of the bytes of
the whole message (including check sum bytes, see item 3.).

At reception a check is made to verify whether the correct number of bytes has arrived.

3. Each message is terminated by 2 check-sum bytes, which are counted in the block length bytes (see item 2.).

The check-sum bytes are the 8 bit-wide binary sum coded in pseudo-ASCII of all bytes of the message, including block
length bytes but excluding check-sum bytes.

Parity can be selected by the user; transmissions can be with or without parity; in the first case a parity bit can be used to
check whether the preceding 8 bits are received without errors.

3.4. Transmission record


It is used an asynchronous transmission with 8 data bits, 1 start bit and 1 stop bit.

Parity can be selected by the user; he can choose to work with no parity, even parity or odd parity.

The baud rate can also be selected; values are: 1200, 2400, 4800, 9600 and 19200 Bauds.

The LSB (Least Significant Bit) is sent first; all characters are in Hexadecimal format (hex).

Default values are: 8 data bits, 1 start bit, 1 stop bit, even parity, 9600 Baud.

The highest data bit (bit 7) is set to "1" (= 80 hex) for the address code and to "0" for all the following data of the message.
This only applies to transmissions of the Master.

ENGLISH 4- G
The transmission frame looks like the following:

1st byte:

Device address: 30 hex and BO hex reserved.


Master to Slave : B1 hex - BF hex
Slave to Master: 31 hex - 3F hex

2nd-4th byte:

Block length (see section 3.3. item 2.):

Possible values: 30 hex, 30 hex, 37 hex (07 hex = 7 decimal)


30 hex, 31 hex, 33 hex (13 hex = 19 decimal)

5th byte:

Data set identification: identifies the type of message.


Possible values: 41 hex
7F hex

6th-nth byte:

Information bytes. See section 3.5.

(n+1)st-(n+2)nd byte:

Check-sum bytes.

Range of values: 30 hex, 30 hex ... 3F hex, 3F hex


(0 … FF hex = 0 … 255 decimal)

3.5. Message contents

In the following only the information bytes (bytes 6, …, n of message) are indicated.

a) Master writes set values

Identification: 41 hex
Length: 14 bytes

4 bytes (byte 6-9):

Set value, three digits before decimal point. Each byte is coded is ASCII (30 hex - 39 hex). Negative values (minus sign ' -
', 2D hex) are permitted by the protocol but are not considered by the device.

1 byte (byte 10):

Always 60 hex.

5- G ENGLISH
1 byte (byte 11):

72 hex ("r") Start Control (normal mode);


70 hex ("p") Start Forced Cooling (end of work);
6A hex ("j") Immediate Stop.

The commands: 61 hex ("a"), 6B hex ("k"), 73 hex ("s") has the same meaning as 70 hex ("p") and acts to Start Forced
Cooling.

Every other code ignored.

1 byte (byte 12)

Always 20 hex.

b) Slave answers message 41 hex with actual values

Identification: 41 hex
Length: 19 bytes

4 bytes (byte 6-9):

Actual value, coded as above.

4 bytes (byte 10-13):


Percentage of acting power (Mould Temperature Controller) or Dew point value (Dryer).

1 byte (byte 14):

Status Word (no. 1) for feedbacks (bit coded):

Bit 0 : Always 0
Bit 1 : Always 1
Bit 2 : Set value check: 0 = Ok, 1 = value not accepted
Bit 3 : Always 0
Bit 4 : Collective alarm : 0 = no alarm(s), 1 = alarm(s) active(s)
Bit 5 : Always 1
Bit 5 : Always 1
Bit 7 : Always 0

1 byte (byte 15):

Alarm Word (no. 1, bit coded):


MOULD TEMPERATURE CONTROLLER

Bit 0 : = 1 input failure (A_19)


Bit 1 : = 1 high deviation alarm (A_02)
Bit 2 : = 110w deviation alarm (A_03)
Bit 3 : = 1 fluid loss (A_06)
Bit 4 : Always 0
Bit 5 : = 1 heating room thermostat active (A_05)
Bit 6 : Always 1
Bit 7 : Always 0

ENGLISH 6- G
DRYER (1/2 beds, H/G heating device):

Bit 0 : = 1 input failure (A_19)


Bit 1 : = 1 high deviation alarm (A_02)
Bit 2 : = 1 low deviation alarm (A_03)
Bit 3 : Always 0
Bit 4 : =1 bad Dew Point (A~i8)
Bit 5 : = 1 heating room thermostat active (A_05/A_09/A_11/A_13)
Bit 6 : Always 1
Bit 7 : Always 0

1 byte (byte 16):

Alarm Word (no. 2, bit coded):


MOULD TEMPERATURE CONTROLLER

Bit 0 : = 1 pump thermal switch active (A_04)


Bit 1 : Always 0
Bit 2 : Always 0
Bit 3 : Always 0
Bit 4 : Always 0
Bit 5 : = 1 fluid loss (A_07)
Bit 6 : Always 1
Bit 7 : Always 0

DRYER (1/2 beds, H/G heating device):

Bit 0 : = 1 blower thermal switch active (A_04/A_10)


Bit 1 : = 1 wrong drawer position (A_12)
Bit 2 : = 1 hopper air high temperature (A_08)
Bit 3 : = 1 compressed air pressure switch active (A_15)
Bit 4 : = 1 differential pressure switch active (A_16)
Bit 5 : = 1 no material in hopper (A_17)
Bit 6 : Always 1
Bit 7 : Always 0

1 byte (byte 17):

Device Status:

72 hex ("r") : Device ON


70 hex ("p") : Device 0FF
73 hex ("s") : Device in Forced Cooling or in Cooling required with 70 hex ("p") or 73 hex ("s")
commands
61 hex ("a") : Device in Forced Cooling or in Cooling required with 61 hex ("a") command
6B hex ("k") : Device in Forced Cooling or in Cooling required with 6B hex ("k") command

c) Not acknowledged

Identification: 7F hex
Length: 7 bytes

7- G ENGLISH
When a Slave receives a faulty message addressed to it, it answers with this message (the Master never sends this NAK
message).

The message could be faulty because:

- identification different from 41 hex;


- length different from 14 bytes;
- check sum error.

3.6. Note

a) Set Point / Actual value


The Set Point/Actual value (Celsius or Fahrenheit) are transmitted in the four digit format (one decimal digit), but the decimal
point (".", 2E hex) is not required.

The minus sign ("-", 2D hex), if present, is transmitted in the first byte.

Only numerical values (30 hex, ..., 39 hex) and the minus sign are admitted.

Actual value only: in the case of over-range/under-range the maximum/minimum value (9999/-999), respectively, is trans-
mitted.

b) Percentage of acting power / Dew Point value


This field contains the percentage of acting power (Mould Temperature Controller) or the Dew Point value (1/2 bed(s) Dryer
with complete hardware).

The percentage of acting power is transmitted as an integer in the range -100 % /100 % and is to be considered as "Heating
power / Cooling power".

The Dew Point value (Celsius or Fahrenheit) is transmitted in the four digit format without the decimal point (".", 2E hex).

The minus sign ("-", 2D hex), if present, is transmitted in the first byte.

Only numerical values (30 hex, ..., 39 hex) and the minus sign are admitted.

In the case of over-range/under-range the maximum/minimum value (9999/-999), respectively, is transmitted.

If there is no information to send, field 5 is filled with "0" (30 hex).

c) Time behavior
The Slave has to be able to receive messages at any time; it starts to reply in 700 µs ... 500 ms; however it disables receiv-
ing during check-sum control and preparation of reply.

Obviously, because of half-duplex protocol, it disables receiving during transmission of reply to Master.

The Slave has no time-out.

d) Error behavior
Each wrong character (parity error or overflow error) stops and resets each reception.

If the Slave receives any character with bit 7 = 1, it stops and resets reception; this character will be interpreted as a new
address.

ENGLISH 8- G
3.7. Examples

a) Set value transmission (Host --> Device)


B1 hex Device no. 1
30 hex, 30 hex, 3E hex 14 bytes length
41 hex Data set identification
31 hex, 32 hex, 30 hex, 30 hex Set value: 120°C
60 hex (Reserved, always 60 hex)
72 hex Start device (normal- mode of operation)
20 hex (Reserved, always 20 hex)
34 hex, 35 hex Last two bytes of the check-sum (345 hex)

b) Actual value transmission (Device --> Host)

31 hex Device no. 1


30 hex, 31 hex, 33 hex 19 bytes length
41 hex Data set identification
30 hex, 39 hex, 38 hex, 31 hex Actual value: 98.1°C
30 hex, 30 hex, 30 hex, 30 hex No values to transmit
70 hex Status word feedbacks: alarm(s) active
42 hex Alarm word no. 1: High deviation alarm (A_02)
40 hex Alarm word no. 2: no alarms in this word
72 hex Device Status: Device ON
3C hex, 3C hex Last two bytes of the check-sum (3CC hex)

c) Not acknowledged (device --> Host)

31 hex Device no. 1


30 hex, 30 hex, 37 hex 7 bytes length
7F hex Data set identification
34 hex, 37 hex Last two bytes of the check-sum (147 hex)

9- G ENGLISH
4. MODBUS PROTOCOL FOR PIOVAN EQUIPMENT (TP / TW / TO)
4.1. Electronic interface
The electronic interface installed on the Piovan Micro Processor controller is RS485. The serial communication line can link
up to 31 slaves. The wiring between the serial communication line and the Piovan Micro Processor controller is done
through screw terminals.

4.2. Network configuration


MOD-BUS protocol is suitable for a 1-master / 255-slave network. The number of possible slaves can be limited by the elec-
tronic interface used.
The Piovan Micro Processor controller works as a slave.

4.3. Transmission format


This protocol uses a binary method, composed as follows:
1 start bit, 8 data bits, 1 parity bit (optional), 1 stop bit.
The communication speed can be selected from among 1200, 2400, 4800, 9600 and 19200 baud.

4.4. Communication procedure


The communication can be started only from the master unit. The slave unit can transmit only after a query from the master.
The general format of the master / slave transmission is the following:

Range Byte
Slave address 1
Function code 1
Data n
Error check (crcl6) 2

The slave recognizes the transmission of a query frame when the time between two characters is greater than 3½ T.U.
(T.U. = time unit = necessary time to transmit one character).

4.5. Function code 1 and 2: reading of "n" bit


These function codes are used by the master unit to request the value of a certain number of bits, that represent the status
of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (01-02) 1
Bit starting address (high byte) 1
Bit starting address (low byte) 1
Number of bits (high byte) 1
Number of bits (low byte) 1
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (01-02) 1
Byte count 1
Data n
Error check (crcl6) 2

ENGLISH 10 - G
The "data" field indicates the bit requested: the bit with lower address is the bit 0 of the first byte, the next is the bit 1 and
so on.
The possible bit necessary to complete the last byte must be put at 0.

4.6. Function code 3 and 4: reading of n word


These function codes are used by the master unit to read a group of words (16 bit) which contains the value of the variable
of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (03-04) 1
Word starting address (high byte) 1
Word starting address (low byte) 1
Number of word (high byte) 1
Number of word (low byte) 1
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (03-04) 1
Byte count 1
Data n
Error check (crc16) 2

The "data" field indicates the requested words in the following format: high byte of the first word, low byte of the first word,
high byte of the second word, and so on.
For addresses not implemented, the "data" field will show 8000h.

4.7. Function code 5: bit writing


By using this command, the master unit can change the status of one bit of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (05) 1
Bit address (high byte) 1
Bit address (low byte) 1
Data 2
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (05) 1
Bit address (high byte) 1
Bit address (10w byte) 1
Data 2
Error check (crci6) 2

"Data" field =0 to reset the bit


= FF00h to set the bit

11 - G ENGLISH
4.8. Function code 6: word writing
By using this command, the master unit can change the status of one word of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (06) 1
Word address (high byte) 1
Word address (low byte) 1
Data 2
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (06) 1
Word address (high byte) 1
Word address (low byte) 1
Data 2
Error check (crc16) 2

4.9. Function code 15: writing of "n" bit


By using this command, the master unit can change the status of one or more bits of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (i5) 1
Bit starting address (high byte) 1
Bit starting address (low byte) 1
Number of bits (high byte) 1
Number of bits (low byte) 1
Number of data bytes 1
Data n
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (15) 1
Bit starting address (high byte) 1
Bit starting address (low byte) 1
Number of bits (high byte) 1
Number of bits (low byte) 1
Error check (crc16) 2

ENGLISH 12 - G
4.10. Function code 16: writing of n word
By using this command, the master unit can change the state of one or more words of the slave unit.

Range Byte
Slave address (1-255) 1
Function code (16) 1
Word starting address (high byte) 1
Word starting address (low byte) 1
Number of words (high byte) 1
Number of words (low byte) 1
Number of data bytes 1
Data n
Error check (crc16) 2

The slave answers the following:

Range Byte
Slave address (1-255) 1
Function code (16) 1
Word starting address (high byte) 1
Word starting address (low byte) 1
Number of words (high byte) 1
Number of words (low byte) 1
Error check (crc16) 2

NOTES:
• "Broadcast" address
When using writing codes 5 and 6, the address 0 of the slave units is allowed. In this case all the slaves
connected accept the command but do not give any answer.
• Words format
Every time the information transfer is made by using 2 byte (1 word of 16 bit), the first byte transmitted is
the most significant. For the negative numbers is used the "two complement" format.
• Error reply
The slave unit can find out errors in the master query.
If the "error check" is incorrect or the function code is not implemented, the slave does not send any an-
swer to the master.
If other errors are detected on query frame, the slave replies forcing at "1" the bit 7 of the byte "Function
code" and gives an error code.
Error reply
Range Byte
Slave address 1
Function code (+80h) 1
Error code 1
Error check (crc16) 2

List of error code


error #. meaning
2 illegal data address
3 illegal data value
9 illegal number of data
10 the bit or word indicated cannot be modified

13 - G ENGLISH
• Answer time
The slave replies from 2 ms to 700 ms after the end of a query. (That is detected counting the received
bytes).
• Decimal digits/ negative numbers
In case of transmission of decimal digits and/or negative numbers, please see example.
Example:
Number to transmit 205.6 -----------> 2056 is transmitted
Number to transmit -12.50 ----------> -1250 is transmitted

WORDS
Address Description Read / Write
130 Power for heating R
131 Power for cooling R
136 Type of set point R/W
138 Principal set point R/W
142 Maximum set point R/W
144 Ramp applied to a set point change R/W
1010 Temperature for automatic cooling stop R/W
1014 Maximum real temperature over set point R/W
1015 Maximum real temperature under set point R/W
1020 Principal process temperature R

BITS
Address Description Read / Write
218 Local (0) / Remote (1) Control R/W
222 Reset alarm W
1001 Over temperature alarm R
1002 Under temperature alarm R
1003 Pump in alarm R
1004 Over temperature in process heater R
1005 Loading water too long R
1006 Time between two loading too short R
1018 Process temperature probe alarm R
1029 Nr. of all alarms R
1030 Pump on (normal mode) R
1031 Pump on (reverse mode) R
1032 Process heater on R
1033 Pressurization valve R
1034 Cooling valve R
1035 Loading valve R
1036 Alarm R
1061 Start R/W
1062 Automatic cooling stop R/W

ENGLISH 14 - G

You might also like