You are on page 1of 11

Connectivity High Level Communications Protocol

Profile Series Metal Detector

Version 7.6 created on 26/01/2017


1.0 Contents
1.0 Contents................................................................................................................................................. 1
2.0 Introduction ............................................................................................................................................ 3
3.0 Reference .............................................................................................................................................. 3
4.0 Functional Overview .............................................................................................................................. 4
4.1 Document Clarification ....................................................................................................................... 4
4.2 General Concepts .............................................................................................................................. 4
4.3 High Level Communications .............................................................................................................. 7
4.4 High Layer Protocol Overview ........................................................................................................... 9
4.5 Data Classes ................................................................................................................................... 12
4.6 Implementation ................................................................................................................................ 14
5.0 Product Classes ................................................................................................................................... 20
5.1 Current Status .................................................................................................................................. 22
5.2 Product Settings .............................................................................................................................. 29
5.3 Cluster Settings ............................................................................................................................... 41
5.4 Cluster Status .................................................................................................................................. 44
5.5 Real Time Data Settings .................................................................................................................. 47
5.6 Real Time Product Data .................................................................................................................. 55
5.7 Machine Status ................................................................................................................................ 59
5.8 Reject Cluster .................................................................................................................................. 65
5.9 Reject Product ................................................................................................................................. 73
5.10 Real Time Comm Port Data............................................................................................................. 81
5.11 Real Time Product Histogram Data ................................................................................................. 83
5.12 Real Time Cluster Histogram Data .................................................................................................. 87
6.0 Auto Mode Classes .............................................................................................................................. 89
6.1 Auto Action Control .......................................................................................................................... 91
6.2 Auto Status .................................................................................................................................... 100
6.3 Auto Setup Settings ....................................................................................................................... 108
7.0 System Configuration Classes .......................................................................................................... 112
7.1 Install Settings ............................................................................................................................... 114
7.2 Detect and Reject Settings ............................................................................................................ 129
7.3 Customer IO................................................................................................................................... 136
7.4 Port Communications Setup .......................................................................................................... 141
7.5 Printer Setup .................................................................................................................................. 148
7.6 Sensitivity Limit Settings ................................................................................................................ 151
7.7 Save and Restore Settings ............................................................................................................ 153
7.8 User Account Management ........................................................................................................... 155
7.9 System Settings ............................................................................................................................. 161
7.10 Customer Programmable Inputs .................................................................................................... 166
7.11 Customer Programmable Outputs ................................................................................................. 169
7.12 Customer Programmable Input Output .......................................................................................... 174
7.13 Performance Verification Settings ................................................................................................. 176
7.14 Pack Space Monitoring Settings .................................................................................................... 180
7.15 VNC Settings ................................................................................................................................. 183
7.16 Conveyor Settings ......................................................................................................................... 187
8.0 QA Classes ........................................................................................................................................ 191
8.1 Performance Test Setup ................................................................................................................ 193
8.2 Product Test Sample Setup ........................................................................................................... 205
8.3 Cluster Test Sample Setup ............................................................................................................ 209
8.4 Shift Report Setup ......................................................................................................................... 213
8.5 Performance Test Report .............................................................................................................. 217
8.6 Performance Test Status ............................................................................................................... 219
8.7 Performance Test Results ............................................................................................................. 224

1
Contents

8.8 Consecutive Test Materials ........................................................................................................... 228


8.9 Memory Test Materials .................................................................................................................. 231
8.10 ATS Status ..................................................................................................................................... 234
9.0 Diagnostics & Error Classes .............................................................................................................. 239
9.1 Diagnostics And Errors .................................................................................................................. 241
9.2 Diagnostics Confirmation ............................................................................................................... 244
9.3 Early Warning ................................................................................................................................ 247
9.4 VNC Connection Status ................................................................................................................. 249
10.0 Gateway Setup Classes .................................................................................................................... 251
10.1 Gateway Configuration .................................................................................................................. 253
10.2 Gateway Information ...................................................................................................................... 260
10.3 Gateway Recipient ......................................................................................................................... 266
11.0 Head Setup Classes .......................................................................................................................... 274
11.1 Factory Machine Setup .................................................................................................................. 276
11.2 Frequency Setup ........................................................................................................................... 278
11.3 Head Monitoring ............................................................................................................................ 281
11.4 Machine Characteristics ................................................................................................................ 286
11.5 System Information ........................................................................................................................ 294
11.6 Self Check Calibration ................................................................................................................... 300
11.7 Head Monitoring Channel .............................................................................................................. 302
11.8 Mode Settings ................................................................................................................................ 306
12.0 PackML Classes ................................................................................................................................ 309
12.1 PackML Commands ...................................................................................................................... 311
12.2 PackML Status ............................................................................................................................... 316
12.3 PackML Administration .................................................................................................................. 323
12.4 PackML Alarms .............................................................................................................................. 334
13.0 Secure Options Classes .................................................................................................................... 337
13.1 Option Enabling ............................................................................................................................. 339
13.2 Host Id............................................................................................................................................ 341
13.3 Secure Option Info ......................................................................................................................... 343
14.0 Enumeration Appendix ...................................................................................................................... 345
15.0 Tables Appendix ................................................................................................................................ 379
15.1 Product Frequency ........................................................................................................................ 380
15.2 Presentation of Class Arrays ......................................................................................................... 380
15.3 Access Accounts ........................................................................................................................... 380
15.4 Peak Log Data ............................................................................................................................... 381
15.5 Supporting Notes for Timer & Reject Setup .................................................................................. 381
15.6 Auto Class Support Notes ............................................................................................................. 383
15.7 Supporting Notes for Programs ..................................................................................................... 383
15.8 Languages ..................................................................................................................................... 383
15.9 Set Attribute Time Format.............................................................................................................. 384
15.10 Program Inputs .......................................................................................................................... 384
15.11 Program Outputs ....................................................................................................................... 386
15.12 Performance Test Setup: Interval Setup ................................................................................... 387
15.13 Shift Report Setup: Interval Setup. ............................................................................................ 387
15.14 PVR Support Notes ................................................................................................................... 388
15.15 Diagnostic and Error Class ........................................................................................................ 389
15.16 Mirror Level ................................................................................................................................ 390
15.17 User Account Management ....................................................................................................... 390

2
Introduction & Reference

2.0 Introduction
The purpose of this document is to define the High Level protocol that is used by the V4, V45, V48
and V4 ASN series of metal detectors. It defines how a host should interact with the metal detector,
as well as the data that the host has access to.
The metal detector communications protocol is split into two parts High Level, and Low Level. The
High level handles the Metal detector specific messages, whereas the Low Level handles the
transmission of the data across a communications link.
The purpose of this document is to define the High Level communications to enough degree to enable
a third party to write interface applications.
It is intended that this protocol will be run over a number of interfaces including asynchronous
(RS232/422) and Ethernet. It shall not only allow feedback of all pertinent information including
important event alerts (e.g. metal detected), but also allow remote control and setup of the metal
detector.

3.0 Reference
Related Documents:
Low Level Comms Protocol Specification

3
Functional Overview

4.0 Functional Overview


4.1 Document Clarification
4.1.1 Conventions
In this document the term ‘Metal Detector’ denotes a V4, V45, V48 or V4ASN series metal detector
unless stated otherwise.
‘Controller’ shall be used to refer to a unit interfacing to the metal detector, such as a PC. It is deemed
to be the controller (master) as it commands and interrogates one or more unit, but there can only be
one controller per Metal Detector.
All Defaults, Min and Max values relate to metric units only where applicable.

4.2 General Concepts


4.2.1 Communications Overview
The metal detector communications protocol has been designed around a Master Slave relationship.
There shall be one controller on the network and one or more slaves (metal detectors). Apart from
events (see section 4.3.2) that indicate an important occurrence that needs to be reported
immediately, all communications shall be instigated by the Controller. It asks for information or an
action which the metal detector then acts upon.

4.2.2 Communications Protocol Design


The protocol has been designed around two distinct layers, High Level and Low Level.
High Level communications requests and checks the data, whereas Low Level communications
ensures the data gets to the other end intact and complete.

4.2.3 High Level and Low Level Interaction


Below shows an overview of the High Level and Low level interaction.

4
Functional Overview

Figure 1 – Overview
Master Slave
(Controller) (Metal Detector)

Data
High Level High Level
Comms Comms

Virtual
Connection

Data Data

Low Level Low Level


Comms Network Comms

Low Level Control Data Low Level Control

Must Monitor (minimum)


Slave address, Event sequence count,
Uplink Service Count, Downlink Service Count,
Previous sent message if un-acknowledged, ready for retransmission

4.2.4 Delimiting Data in the High Level Protocol


To enable the various fields of the high level protocol to be identified, as well as to provide support for
variable length fields and arrays of data, the concept of delimiting has been introduced. Please see
section 4.2.5 below for the list of special delimiting characters used by the high level protocol.

4.2.5 Special Characters


Table 1 – Special characters

Name Hex Value Document Description


Representation

Used to delimit the fields of the high level protocol.


Record Separator 1E : E.g. Service ID, Class ID, Instance ID, Attribute ID,
Data.
Used in two ways:
To delimit the elements of arrays of primitive data
types. E.g. each entry of an array of unsigned 32-bit
integers will be separated by this character.
Unit Separator 1F |
To delimit the individual fields of a complex data type.
E.g. Peak Log Data is a complex type that consists of
4 fields. Each field will be separated by this
character.
Used to delimit the elements of arrays of complex
data types. E.g. For an array of the complex data
File Separator 1C ¦
type Peak Log Data, each array entry will be
separated by this character.

4.2.6 Frame Encoding


All fields except special characters (see section 4.2.5 above) shall be ASCII encoded unless stated
and delimited by a ‘:’ (colon) to enable easier decoding and debugging.
For fields of 12 (decimal) and “Cheese” the following is an example transmission fragment
<Preceding fields>... ‘1’ ‘2’ 0x1E ‘C’ ‘h’ ‘e’ ‘e’ ‘s’ ‘e’ 0x1E … <following fields>

5
Functional Overview

Note: All field sizes stipulated in this document are of the transmitted data so if 12 (decimal) is ASCII
encoded meaning the size would be 2 bytes.

4.2.7 UTF-8 Encoding


To be compatible with extended character sets the ASCII transmission shall use UTF-8 (UCS
Transform Format where UCS is Universal Character Set).
Table 2 ci-dessousshows the table for encoding UTF-8.
Table 2 – UTF-8 Encoding
Character Range UTF-8 Octet sequence
0000 – 007F 0xxxxxxx
0080 – 07FF 110xxxxx 10xxxxxx
0800 – FFFF 1110xxxx 10xxxxxx 10xxxxxx

As can be seen from the table above, char values 0x00 to 0x7F are identical to the single char
representation so numbers (decimal and hexadecimal) are unaffected as well as the most commonly
used chars.
e.g. the French word hôtel (ô = 0xF0 => 0xC3 0xB4) would be transmitted as
h ô t e l
0x68 0xC3 0xB4 0x74 0x65 0x6C

4.2.8 Time Stamp


To aid traceability in all uplink and downlink messages have the ability to be time stamped
The timestamp is generated when the data requiring transmission is ready and placed on a transmit
queue. This means:
Uplink : (compulsory)The timestamp is inserted by the metal detector as the data is created and
added to a transmit queue, whether it be next to go out or not.
Downlink : (optional) The timestamp should be added when the data is placed on the transmit queue,
whether it be next to go out or not. This timestamp is not used by the metal detector, but makes the
communication more translucent when analysed.

4.2.9 Timestamp Format


As the timestamp is created when the high level data is generated it is part of the high level data. Due
to this the timestamp has been implemented in the following way:
<Low Level Protocol>,[<TIME STAMP>]<High Level Message><Low Level Protocol>
The format of the <TIME STAMP> is as follows:
As with other high level data the timestamp is ASCII encoded
Length (fixed 12 bytes + [] ) = 14 bytes fixed.
(It shall not require delimiting as ‘]’ does that task.)
Each field below shall be 2 bytes of the 12 byte array transmitted in the following order.
Year : 00 - 99 (2000 - 2099)
Month : 01 - 12
Date : 01 - 31
Hour : 00 - 23
Min : 00 - 59
Sec : 00 - 59

6
Functional Overview

Investigating validity of class attributes (per out of date class).


If a class version is different, it shall usually mean that the Metal Detector software has been updated and attributes
have been added to the class. In this case there should be little problems for the controller except the “Get All
Attributes” and “Set All Attributes” commands. The “Get All Attributes” command shall return extra attributes that can
simply be discarded. Care should however be taken when using “Set All Attributes” as the extra attributes would be
required. In this instance “Set Attribute List” would be a preferred option.

Any attributes and services no longer in their respective lists should be disabled in the application for that class.
Note: An attribute can be added or disabled but not replaced. If an attribute needs to be replaced, the existing attribute
2c will be disabled creating a gap in the attribute numbers and its replacement will be added to the end of the class.

E.g. if attribute 2 is replaced in a class containing 3 attributes (1,2,3) its new Attribute list would be “1,3,4”. A “Get
Attribute All” would actually only get attributes 1,3,4 ignoring the invalid attribute.

When using a “Set Attribute All” service the User should be aware that in the example where attribute 2 is disabled,
and replaced by attribute 4, only set values should be specified for the current (not disabled) attributes. Using the same
example again, to “Set Attribute All” of the class containing active attributes 1,3,4 the User would:
<Set All Attributes>:<Class No>:<Instance Id>:<Attribute No>:<Attribute Val(1)>:<Attribute Val(3)>:<Attribute Val(4)>
Note the ordering of the attribute values, and the omission of attribute value 2.

Communicate
3 Communication can continue as before, as long as the restrictions listed above are observed e.g. invalid data must not
be used or errors shall be generated.

4.6.3 Data Class List


Below is a list of classes available for the Profile/PowerPhasePRO with the code that appears in the
message and how the data in indexed, e.g. a class of products.
Product Classes (Allocated 1 – 50)
Class ID Class Name Indexed Page
1 Current Status Metal Detector 22
2 Product Settings Product 29
3 Cluster Settings Cluster 41
4 Cluster Status Cluster 44
5 Real Time Data Settings Metal Detector 47
6 Real Time Product Data Metal Detector 55
7 Machine Status Metal Detector 59
8 Reject Cluster Cluster 65
9 Reject Product Product 73
10 Real Time Comm Port Data Comm 81
11 Real Time Product Histogram Data Product 83
12 Real Time Cluster Histogram Data Cluster 87
Auto Mode Classes (Allocated 51 – 60)
Class ID Class Name Indexed Page
51 Auto Action Control Metal Detector 91
52 Auto Status Metal Detector 100
53 Auto Setup Settings Metal Detector 108
System Configuration Classes (Allocated 101 – 200)
Class ID Class Name Indexed Page
101 Install Settings Metal Detector 114
102 Detect and Reject Settings Metal Detector 129
103 Customer IO Metal Detector 136
104 Port Communications Setup Comm 141

16
Functional Overview

105 Printer Setup Metal Detector 148


106 Sensitivity Limit Settings Frequency 151
107 Save and Restore Settings Metal Detector 153
108 User Account Management Access 155
109 System Settings Metal Detector 161
110 Customer Programmable Inputs Customer Prog Input 166
111 Customer Programmable Outputs Customer Prog Output 169
112 Customer Programmable Input Output Metal Detector 174
113 Performance Verification Settings Metal Detector 176
114 Pack Space Monitoring Settings Metal Detector 180
115 VNC Settings Metal Detector 183
151 Conveyor Settings Metal Detector 187
QA Classes (Allocated 201 – 300)
Class ID Class Name Indexed Page
201 Performance Test Setup Metal Detector 193
202 Product Test Sample Setup Product 205
203 Cluster Test Sample Setup Cluster 209
204 Shift Report Setup Metal Detector 213
205 Performance Test Report Metal Detector 217
206 Performance Test Status Metal Detector 219
207 Performance Test Results Metal Detector 224
208 Consecutive Test Materials Metal Detector 228
209 Memory Test Materials Metal Detector 231
210 ATS Status Metal Detector 234
Diagnostics & Error Classes (Allocated 301 – 400)
Class ID Class Name Indexed Page
301 Diagnostics And Errors Metal Detector 241
302 Diagnostics Confirmation Metal Detector 244
303 Early Warning Metal Detector 247
304 VNC Connection Status Metal Detector 249
Gateway Setup Classes (Allocated 401 – 500)
Class ID Class Name Indexed Page
401 Gateway Configuration Metal Detector 253
402 Gateway Information Metal Detector 260
403 Gateway Recipient Recipient 266
Head Setup Classes (Allocated 501 – 600)
Class ID Class Name Indexed Page
501 Factory Machine Setup Metal Detector 276
502 Frequency Setup Frequency 278
503 Head Monitoring Metal Detector 281
504 Machine Characteristics Metal Detector 286
505 System Information Metal Detector 294
506 Self Check Calibration Metal Detector 300
507 Head Monitoring Channel Channel 302
508 Mode Settings Mode 306

17
Functional Overview

PackML Classes (Allocated 601 – 700)


Class ID Class Name Indexed Page
601 PackML Commands Metal Detector 311
602 PackML Status Metal Detector 316
603 PackML Administration Metal Detector 323
604 PackML Alarms PackML Alarms 334
Secure Options Classes (Allocated 801 – 900)
Class ID Class Name Indexed Page
801 Option Enabling Metal Detector 339
802 Host Id Metal Detector 341
803 Secure Option Info Options 343

18
Class 1: Current Status

Table 9

Attribute ID: 1 Product Number


Get the current running product's memory slot number.
Description
Set the current running product by product memory slot.
01: GET_ATTRIBUTE_SINGLE 02: SET_ATTRIBUTE_SINGLE
Services (Get/Set)
03: GET_ATTRIBUTE_ALL 07: GET_ATTRIBUTE_LIST
CLASS 1

OPC Tag Name RUN/CurrentPrdNum Number of Instances/Depth 1 (Metal Detector)


Data Type 16-bit unsigned integer Mirror Level 1
Gettable Data Range 0 – 100 Units N/A
Settable Data Range 1 – 100
V4 V45 V4ASN V48
Default Value 1 1 1 1
Available Since F4.2.0 F45.1.0 F4A.7.0 F48.1.0
Retired Since N/A N/A N/A N/A
Comments A cluster is running if a value of 0 is returned.

Message request examples (Service : Class : Instance : Attribute ID)

Get the current product number: 1:1:1:1


Set the current product by number: 2:1:1:1:(enter product number)
Table 10

Attribute ID: 2 Product Name


Get the current running product's name.
Description
Set the current running product by product name.
01: GET_ATTRIBUTE_SINGLE 02: SET_ATTRIBUTE_SINGLE
Services (Get/Set)
03: GET_ATTRIBUTE_ALL 07: GET_ATTRIBUTE_LIST
CLASS 1

OPC Tag Name RUN/CurrentPrdName Number of Instances/Depth 1 (Metal Detector)


Data Type String Mirror Level 1
Gettable Data Range 0 – 16 Characters Units N/A
Settable Data Range 1 – 16 Characters
V4 V45 V4ASN V48
Default Value Not Configured Not Configured Not Configured Not Configured
Available Since F4.2.0 F45.1.0 F4A.7.0 F48.1.0
Retired Since N/A N/A N/A N/A
Comments

Message request examples (Service : Class : Instance : Attribute ID)

Get the current product name: 1:1:1:2


Set the current product by name: 2:1:1:2:(enter product name)

23

You might also like