Professional Documents
Culture Documents
WWW.PRECIAMOLEN.COM
04-52-00-1 MR A / 03/2014
Communication Protocols
Contents
1. Introduction .......................................................................................................................................... 3
Foreword .................................................................................................................................................... 3
Pictogram .............................................................................................................................................. 3
Marking ................................................................................................................................................. 3
Communication protocols available ........................................................................................................... 3
Serial protocols ..................................................................................................................................... 3
Field bus ............................................................................................................................................... 5
Additional information ................................................................................................................................ 5
04-52-00-1 MR A 1
i 30 - i 35 indicators
2 04-52-00-1 MR A
Introduction 1
Foreword
Pictogram
Marking
Menu or parameters options (executed in CONFIGURATION mode on the indicator) are noted:
• OPTION 1 / OPTION 2... / PARAMETER
Serial protocols
Physical ports
04-52-00-1 MR A 3
i 30 - i 35 indicators
Configuration
The protocol selection is done by configuring the indicator for the selected communication port (serial, USB,
etc.). The procedure is described in the Installation Manual, P/N 04-52-00 MI.
The table below shows the main configuration parameters to be set for proper operation of the communication
protocol used.
(The format parameters, 1 to 5, relate only to the serial links.)
ASCII Protocols
Parameter Item Modbus.
A+ Slave A+ Master
1. Transmission speed SPEED 300, 1200, 2400, 4800, 9600, 19200, 38400, 115200
2. Number of Bits NB.B ITS (7 or 8 bits)
3. Parity PARITY Even, odd or none
4. Number of stop bits NB.S TOP (1 or 2 stop bits)
ASCII protocols allow the definition of a configured frame. This is established in the configuration section
TRAME.CONF where you must validate the block numbers to be sent.
4 04-52-00-1 MR A
3. Connect the indicator to the computer with the USB cable.
1. Specify:
-IP ADDRESS
- Subnet MASK If DHCP disabled
- GATEWAY (optional)
2. Connect on port 11001.
The link is interrupted after 30 s of inactivity. A single "client" connection possible (TCP server).
Field bus
Additional information
The protocols use standard ASCII coding denoted in hexadecimal (00 to FF). Codes 0-20 have special
meaning; they are defined in the table below:
04-52-00-1 MR A 5
i 30 - i 35 indicators
6 04-52-00-1 MR A
ASCII Serial Protocols 2
General principle
Message structure
SOH 1 Message 2 CR LF
1 Instrument number:
09H HT Slave protocol
• 1 start character
0BH VT Master protocol
• Instrument Number of 2 ASCII coded numeric characters (0-9)
2 Check-sum: or exclusive of all previous characters on 2 bytes encoded ASCII
The instrument number and the checksum are optional elements defined by configuration.
Ininstrument
the case where there is no slave no. ( id.nr = 00), the instrument number (1: = 00), the
number (1: or VTxx) must not appear in the frame.
HTxx
A+ Master protocol
Communication principle
Periodic
The Master Protocol A+ ensures the periodic emission of the frame configured to a destination slave computer.
The message transmission frequency is configurable. Any configuration with a zero period (= 0 ms) comes down to
sending as often as possible (no frequency management).
On stability
The frame is transmitted when a configured stable weight above the configured threshold is detected and the
weight is passed below this same threshold since the last transmission.
04-52-00-1 MR A 7
i 30 - i 35 indicators
Message structure
A+ Slave Protocols
Communication principle
Computer request
SOH HTxx CS CR LF
Instrument response
SOH HTxx 1 1 CS CR LF
Computer request
SOH HTxx 1 1 CS CR LF
8 04-52-00-1 MR A
Instrument response
SOH HTxx 1 1 CS CR LF
Computer request
SOH HTxx 1 1 CS CR LF
Computer request
SOH HTxx 1 1 CS CR LF
Instrument response
SOH HTxx 1 1 CS CR LF
04-52-00-1 MR A 9
i 30 - i 35 indicators
Sending a command
Computer request
SOH HTxx 1 1 CS CR LF
We can only send one command at a time (the 2nd will not be treated).
1 Command block to execute:
• 1 block start character 10H DLE
• 2 ASCII numeric coded characters (30H to 39H) definition of the block number(i)
• Switch 0BH M Execution of the command
Computer request
SOH HTxx 1 1 CS CR LF
Instrument response
SOH HTxx 1 1 CS CR LF
10 04-52-00-1 MR A
Information block and command details
Information blocks
The accessibility of certain information blocks available at the configuration level of the indicator is determined
by the functional configuration. The following table briefly describes the different blocks and associated transmission
conditions.
Access
• L Read only.
• R/W Read / Write.
functional
CAUTION: the same block number may have a different name according to the instrument
configuration.
30H 31H 1 2
1 Absolute value of the gross weight using 7 ASCII numeric characters and decimal point (0 to 9 and .)
6BH 67H 20H kg_ kilogram
2 Unit on 3 ASCII coded bytes
20H 67H 20H _g_ gram
30H 32H 1 2
1 Absolute value of the Tare weight using 7 ASCII numeric characters and decimal point (0 to 9 and .)
6BH 67H 20H kg_ kilogram
2 Unit on 3 ASCII coded bytes
20H 67H 20H _g_ gram
04-52-00-1 MR A 11
i 30 - i 35 indicators
30H 33H 1 2
1 Absolute value of the Net weight using 7 ASCII numeric characters and decimal point (0 to 9 and .)
6BH 67H 20H kg_ kilogram
2 Unit on 3 ASCII coded bytes
20H 67H 20H _g_ gram
30H 34H 1
• Byte 1
0 0 1 1 b3 b2 * b0 * Reserved
• Byte 2
0 0 1 1 b3 b2 b1 b0
00 XXXXX
01 XXXX.X
b3 b2 Decimal point position
10 XXX.XX
11 XX.XXX
b1 Stability
b0 Out of range (Gross PMAX or Gross 0)
• Byte 3
0 0 1 1 b3 b2 b1 b0
• Byte 4
0 0 1 1 * * b1 b0 * Reserved
12 04-52-00-1 MR A
Bloc 05: Status of measurement range
30H 35H 1
• Byte 1
0 0 1 1 * * b1 b0 * Reserved
30H 38H 1
38H 30H 1
38H 31H 1
1 DSD registration Number using : 5 ASCII numeric (0-9) (If I200 compatibility = YES)
: 6 characters (If I200 compatibility = NO)
04-52-00-1 MR A 13
i 30 - i 35 indicators
Commands
• The following commands are for immediate execution (if the command is accepted):
- 02: Change to range 2.
- 99: DSD registration request (if the conditions are met DSD no. 0, otherwise DSD no. =0).
- 06: Print request
• The following commands are with deferred execution, if the order is accepted and the conditions fulfilled
(stability, zero range, etc.):
- 01: Reset request,
- 04: Semi-automatic taring
14 04-52-00-1 MR A
Examples of sending a frame using the A+ Slave protocol
Without checksum
• Implementation
The speed ??and transmission format are presumed to be identical on indicator and computer sides and the
serial connection is in operation.
activated,
By default, blocks 4 (status), 1 (gross), 2 (tare) and 3 (net) are activated. If no other block is
blocks 4, 1, 2, 3 constitute the "configured frame".
REMINDER: In the case where there is no slave no. ( id. = 00), the instrument number (1:
VTxx) must not appear in the frame.
HTxx or
In the above conditions the request for the configured frame boils down to:
Computer request
SOH CR LF
Hex.: 01H 0DH 0AH
CtrL A Ctrl M Ctrl J
Instrument response
1. Status Block no. 2. Status (using 4 bytes) 3. Gross Block no. 4. Gross weight
5. Tare block no. 6. Tare weight 7. Net block no. 8. Net weight
Computer request
1
SOH ENQ 01 L CR LF
Hex. : 01H 05H 30H 31H 4CH 0DH 0AH
CtrL A Ctrl E 0 1 L Ctrl M Ctrl J
04-52-00-1 MR A 15
i 30 - i 35 indicators
Instrument response
2. Gross weight
• Request to write an information block
Computer request
1
SOH STX 02 000123.kg_ CR LF
Hex.: 01H 02H 30H 32H 30H30H30H31H32H33H2EH6BH67H20H 0DH 0AH
CtrL A Ctrl B 0 2 000123.kg_ Ctrl M Ctrl J
2
2. (space)
Computer request
1
SOH DLE 01 M CR LF
Hex.: 01H 10H 30H 31H 4DH 0DH 0AH
CtrL A Ctrl P 0 1 M Ctrl M Ctrl J
1. Command no.
Computer request
1
SOH DLE 04 M CR LF
Hex.: 01H 10H 30H 34H 4DH 0DH 0AH
CtrL A Ctrl P 0 4 M Ctrl M Ctrl J
1. Command no.
16 04-52-00-1 MR A
- e.g.: DSD registration request (Command no.: 99)
Computer request
1
SOH DLE 99 M CR LF
Hex.: 01H 10H 39H 39H 4DH 0DH 0AH
CtrL A Ctrl P 9 9 M Ctrl M Ctrl J
1. Command no.
In case the DSD is configured with the default settings, the indicator returns the configured frame + DSD No.*
of 5** characters (0).
Instrument response
2. DSD no.
*If the DSD number = 00000, registration has not been made.
** or 6, if compatibility i 200 at NO
04-52-00-1 MR A 17
i 30 - i 35 indicators
With check-sum
• Definition and calculation
The checksum is the exclusive or of all characters that precede, converted using 2 ASCII bytes.
Calculation algorithm:
Checksum
CHK = 0
CHK = CHK +
+ : means EXCLUSIVE OR
decimaled byte
Next Byte
Last Byte
NO
(before check-sum)
CHK
YES
END
18 04-52-00-1 MR A
• Implementation
The speed and transmission format are assumed identical on the indicator and computer side and serial links is
operating.
activated,
By default, blocks 4 (status), 1 (gross), 2 (tare) and 3 (net) are activated. If no other block is
blocks 4, 1, 2, 3 constitute the "configured frame".
REMINDER: In the case where there is no slave no. (id. = 00), the instrument number (1:
VTxx) must not appear in the frame.
HTxx or
In the above conditions the request for the configured frame boils down to:
Computer request
Checksum
SOH 01 CR LF
Hex.: 01H 30H 31H 0DH 0AH
CtrL A 0 1 Ctrl M Ctrl J
Instrument response
Checksum
SOH STX 04 0200 STX 01 000456.kg_ STX 02 000000.kg_ STX 03 000456.kg_ CS CR LF
1 2 3 4 5 6 7 8
1. Status Block no. 2. Status (using 4 bytes) 3. Gross Block no. 4. Gross weight
5. Tare block no. 6. Tare weight 7. Net block no. 8. Net weight
Computer request
1 Checksum
SOH ENQ 02 L 4A CR LF
Hex.: 01H 05H 30H 32H 4CH 34H 3AH 0DH 0AH
CtrL A Ctrl E 0 2 L 4 : Ctrl M Ctrl J
04-52-00-1 MR A 19
i 30 - i 35 indicators
Instrument response
Checksum
SOH STX 02 000123.kg_ CS CR LF
1 2
2. Tare
• Sending a command
- e.g.: Tare request (Command no.: 04)
Computer request
1 Checksum
SOH DLE 04 M 58 CR LF
Hex.: 01H 10H 30H 34H 4DH 35H 38H 0DH 0AH
CtrL A Ctrl P 0 4 M 5 8 Ctrl M Ctrl J
1. Command no.
Computer request
1 Checksum
SOH DLE 01 M 5= CR LF
Hex.: 01H 10H 30H 31H 4DH 35H 3DH 0DH 0AH
CtrL A Ctrl P 01 M 5 = Ctrl M Ctrl J
1. Command no.
Computer request
1 Checksum
SOH DLE 99 M 5C CR LF
Hex.: 01H 10H 39H 39H 4DH 35H 3CH 0DH 0AH
CtrL A Ctrl P 9 9 M 5 < Ctrl M Ctrl J
1. Command no.
20 04-52-00-1 MR A
With checksum and slave no. set to 1
In the case where several instruments are connected to one master, they should be identified with a slave
no.: (idnrA).
• Implementation
Computer request
1 1 Checksum
SOH HT 01 DLE 99 M 54 CR LF
Hex.: 01H 09H 30H 31H 10H 39H 39H 4DH 35H 34H 0DH 0AH
CtrL A Ctrl I 0 1 Ctrl P 9 9 M 5 4 Ctrl M Ctrl J
1. Slave no. 01
2. Command no.
04-52-00-1 MR A 21
i 30 - i 35 indicators
22 04-52-00-1 MR A
Modbus RTU 3
The Modbus communication protocol is normalised, the dialogue principle is assumed to be known.
In the following table, the Address column specifies the address of variables exchanged between the I 35 - i 30
indicator and the client's equipment, where @ is the starting value of the starting address zone defined by the
configuration of the serial port considered.
- COM x / PC/PLC / ADVANCED / PROTOCOL / MODBUS / ADDRESS
- USB / PROTOCOL / MODBUS
Type of information
• 16 bit integer E16
Unsigned binary value using 1 word (2 bytes): 0 to + 65535.
• 32 bit integer E32
Signed binary value using 2 words (4 bytes): - 2147483648 to + 2147483647.
Access
• L Read only.
• R/W Read / Write.
Channel # 1
@ + 256 Gross E32 L Gross current weight or Gross DSD Weight
@ + 258 Tare E32 L Current Tare or DSD Tare
@ + 260 Net E32 L Current Net weight or DSD Net Weight
@ + 262 DSD number E32 L Stored DSD number
Status (See “Status of the
@ + 264 measurement”, page 24.) E32 L State of weighing channel / controls / inputs
Channel # 1
@ + 00 Metrological control E16 L/E See “Command”, page 25.
@ + 01 Command parameter E32 L/E
@ + 03 Forcing digital outputs E32 L/E See “Forcing outputs”, page 25.
04-52-00-1 MR A 23
i 30 - i 35 indicators
24 04-52-00-1 MR A
Command
The "Application for DSD Registration" command (if done correctly) causes the rise of "bit 9" of the word
STATE (weight B/T/N DSD) and the replacement of current B/T/N weight by the weight recorded in DSD.
The command "Release of Gel of DSD weights" allows finding the current B/T/N weights.
The "Choosing the type of weight" command, allows presenting the current weights in standard resolution or
high resolution. DSD weights are always presented in standard resolution.
Forcing outputs
Bit Meaning
b0 Forcing logical output logic # 1
b1 Forcing logical output logic # 2
b2 Forcing logical output logic # 3
b3 Forcing logical output logic # 4
b4
... Bits 4 to 31 not used
b31
The status of the outputs is normally controlled by the indicator configuration. See the
installation manual (ref. 04-52-00 MI).
04-52-00-1 MR A 25
i 30 - i 35 indicators
It is important to follow the process as shown below to ensure the correct use of a command.
START
No CDE = 0
?
Writing the
command to be executed
in the exchange table
Writing the
command 00 in Equivalent to an end of
exchange table command acknowledgement
26 04-52-00-1 MR A
Synchronisation for sending commands between PLC and indicator.
Host Output
"Command" word
Acknowledgement of command
Non zero value = command executed by the PLC
Value = 0 Value = 0
Host input
"Status" word
Bit 11(OK) Bit 12 (NOK)
Value = 1
Value = 0
04-52-00-1 MR A 27
i 30 - i 35 indicators
28 04-52-00-1 MR A
Field bus 4
The CANopen field bus uses a specific exchange table described in the following pages.
CANopen
Download the peripheral description EDS file from the PRECIAMOLEN Website.
04-52-00-1 MR A 29
i 30 - i 35 indicators
Exchange table
1 2 3 4 5 6 7 8
Weight 1 Status Weight 2 Scales + Mode
Weight 1
Weight 2
Comments:
• The controller can recalculate the gross weight as: Gross = Net + Tare.
• Depending on the indicator's configuration, weights 1 and 2 are expressed in the displayed resolution
(metrological) or high resolution (by default, the resolution is 10 times higher).
- Example:
Normal: Displayed weight 10.536, weight transmitted 10535
High resolution: Displayed weight 10556, weight transmitted 105563
Status
000 Measurement OK
001 - 7 e < Gross < 0
7 6 5 4 3 2 1 0 010 Pmax < Gross < Pmax + 7 e
011 Gross - 7 e
100 GrossPmax + 7 e
101 Out of converter range (invalid measurement)
110 Converter read error (invalid measurement)
111 Parameter faults (invalid measurement)
0 Unstable weight
1 Stable weight
0 Weighted tare or 0
1 Preset tare (a tare was downloaded)
* The "toggle bit" state change allows the controller to make sure that a command has been interpreted by the i40 indicator and the command
status corresponds properly to the command that the controller has just sent (and not the previous one).
30 04-52-00-1 MR A
Scales + Mode
7 6 5 4 3 2 1 0
Tare scale:
00 Scale No. 1
01 Scale No. 2
10 Scale No. 3
Net scale:
00 Scale No. 1
01 Scale No. 2
10 Scale No. 3
Mode in progress
00 Stop
01 User
10 Setting
The logical inputs-outputs (2 inputs, 4 outputs) and the analogue output of the indicator are not
managed by CANopen.
04-52-00-1 MR A 31
i 30 - i 35 indicators
1 2 3 4 5 6 7 8
Command
ASCII command Additional status NU
status
Command status
Additional status
Value Description
0x00 No error
0x01 Reserved
0x02 Unknown command
0x03 Reserved
0x04 Command rejected
0x05 Reserved
0x06 Time-out
0x07 Adjustment mode
0x08 Already in adjustment mode
0x09 Unstable measurement
0x0A Measurement out of range
0x0B Reserved
0x0C Zero out-of-limits
0x0D Out of limit
0x0E Invalid setting
32 04-52-00-1 MR A
• Input data (PLC output)
RPDO2: Commands
COB-ID= 0x300+indicator ID
1 2 3 4 5 6 7 8
Tare Tare decimal point ASCII command NU
Tare
Corresponds to the preset tare (tare value to be downloaded into the indicator), this value is a 24-bit signed
integer.
Determines the number of digits after the decimal point of the preset tare value.
To be valid, this value must be associated with the Tare decimal point byte as shown below:
(e=0.005) B=20.000
Command
chaining Tare field Decimal point field Command value Displayed Net Displayed Net after
before
1 0x2710 (10000) 0x03 0x06 20.000 10.000
2 0x2713(10003) 0x03 0x06 10.000 9.995
3 0x0 0x03 0x06 9.995 20.000
4 0x3E8 (1000) 0x02 0x06 20.000 10.000
Command code
Value Description
0x01 Semi-automatic zero (>> Gross Weight = 0 if in allowable zone)
0x02 Range change (only in multi-range use)
0x04 Taring (Tare = Current Gross) >> Net = 0 if stable weight
0x05 Taring on the fly (only possible outside legal metrology)
0x06 Preset tare (Tare download)
0x0F Initial zero (Dead load cancellation if in allowable zone)
04-52-00-1 MR A 33
i 30 - i 35 indicators
It is important to follow the process as shown below to ensure the correct use of a command.
START
Writing 0
into command code **
Yes
Yes: "t"
* TPDO3 - byte 1 (See “TPDO3: Data, Command status and Unit”, page 32.)
** RPDO2 - byte 5 (See “RPDO2: Commands”, page 33.)
*** TPDO3 - byte 2 (See “TPDO3: Data, Command status and Unit”, page 32.)
34 04-52-00-1 MR A
WWW.PRECIAMOLEN.COM