Connect IoT - PanaCIM#
Panasonic PanaCIM is one of the leading softwares in the world of SMT, for interfacing with equipments that are part of the Panasonic portfolio.
PanaCIM is a protocol that requires Connect IoT to work as a TCP-IP Server and then the machine will open client connections. All communication is done through a particular message format, where the body is XML.
Note
The PanaCIM driver connects, by default, all interfaces to the same port. We recommend distributing the load by configuring each interface with its own instance, on its own port.
Data Types#
These are the supported specific data types:
| Name | Description |
|---|---|
| Integer | Integer number |
| Numeric | Decimal number |
| String | String value |
| Boolean | Boolean value |
| DateTime | Date/Time value |
| Object | Json formatted value |
| List | Json formatted array of values |
| Header | Object Representing the Header of the Message |
| Body | Object Representing the Body of the Message |
Most of these datatypes are common throughout other drivers. We will focus on the one's that aren't.
The List datatype will be used to represent cases where we intend to send or receive a list. When receiving an event with a List, choose device type List.
For example, consider this message body (this is just an example, this message in particular according to the specification should only be sent by PanaCIM and not ConnectIoT):
<message>
<header messageClass="520" transactionID="1234567890" reply="1">
<location routeID="1001" routeName="LINE1" equipmentID="1000"
equipmentName="equip1" zoneID="1000" zonePos="1" zoneName="SMT1"
laneNo="0" controllerGuid="abcd12345678"/>
</header>
<body>
<cart ID= "pre_1000" serial="27301*-AIW-1511-0124" />
<operation type="1" operator="Tom" timestamp="2008-07-17T15:26:59+05:30"/>
<products>
<product name="AB0001" side="1" setupId="1002" mixID="AUD-PRD1" />
<product name="TB0005" side="0" setupId="1005" mixID="AUD-PRD5" />
</products>
<material id="ABC0011" part=" CPU001" qty="1000" lot="l10" vendor="v1" userdata="data code" partclass="" childID="" childQty="-1" />
<position p1="21004" p2="-1" p3="2" p4="0" feederID="" trayMaster="21001" />
</body>
</message>
In order to send this message from Connect IoT as a command we will need to reproduce the products list in a certain fashion. The List datatype resolves that issue (only applies to commands). We would select the List as our deviceType, in the extended data we will fill the path with the path to our list, so in this case Body.Products and in the objectDefinition we will define our list, giving for each member a path a type and a name. The path of the member of the list will match with the attribute that element of the list will match.
{
"name": "products", "deviceType": "List",
"extendedData": {
"path": "Body.Products",
"objectDefinition": [
{
"path": "Product.Name",
"name": "Name",
"type": "String"
},
{
"path": "Product.Side",
"name": "Side",
"type": "String"
},
{
"path": "Product.SetupId",
"name": "SetupId",
"type": "String"
},
{
"path": "Product.MixID",
"name": "MixId",
"type": "String"
}
]
}
}
The Header datatype will be used to represent cases where we don't need to map all the elements of the message header, and want to receive simply an object.
Consider these two representations of the same event:
{
"name": "PCB-ID Request", "deviceId": "500", "isEnabled": true,
"extendedData": { "eventType": "Request" },
"properties": [
{ "name": "header", "deviceId": "header", "dataType": "Object", "deviceType": "Header", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "barcode", "deviceId": "Body.Pcb.Barcode", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "modelCode", "deviceId": "Body.Pcb.ModelCode", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "serialNo", "deviceId": "Body.Pcb.SerialNo", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "pcbSide", "deviceId": "Body.Pcb.Side", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "scannerMountSide", "deviceId": "Body.Pcb.ScannerMountSide", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true }
],
}
{
"name": "PCB-ID Request", "deviceId": "500", "isEnabled": true,
"extendedData": { "eventType": "Request" },
"properties": [
{ "name": "routeId", "deviceId": "Header.Location.RouteID", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "routeName", "deviceId": "Header.Location.RouteName", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "equipmentID", "deviceId": "Header.Location.EquipmentID", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "equipmentName", "deviceId": "Header.Location.EquipmentName", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "zoneId", "deviceId": "Header.Location.ZoneID", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "zonePos", "deviceId": "Header.Location.ZonePos", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "zoneName", "deviceId": "Header.Location.ZoneName", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "laneNo", "deviceId": "Header.Location.LaneNo", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "barcode", "deviceId": "Body.Pcb.Barcode", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "modelCode", "deviceId": "Body.Pcb.ModelCode", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "serialNo", "deviceId": "Body.Pcb.SerialNo", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "pcbSide", "deviceId": "Body.Pcb.Side", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true },
{ "name": "scannerMountSide", "deviceId": "Body.Pcb.ScannerMountSide", "dataType": "String", "deviceType": "String", "extendedData": {}, "isReadable": true, "isWritable": true }
],
}
Header type allows us to have much simpler definitions that focus on what we really want to retrieve. The Body datatype will be used to represent cases where we want to receive simply the body as an object. In the event define the automation property as a Body device type.
Extended Data#
See Extended Data for the concept behind these protocol-specific attributes. The PanaCIM driver declares extended data for events, event properties, commands, and command parameters. Properties have no extended data.
Event#
| Name | Type | Possible Values | Default Value | Description |
|---|---|---|---|---|
| eventType | Enum | EventRequest | Event | Type of event received from PanaCIM. Event is a notification. Request expects a reply for the request. |
Table: PanaCIM specific extended event attributes
Event Property#
| Name | Type | Possible Values | Default Value | Description |
|---|---|---|---|---|
| path | String | Optional event-specific path used to retrieve the property value from the received message. |
Table: PanaCIM specific extended event property attributes
The device ID of a property is the path that describes the property in the message XML, for example Body.Pcb.Barcode. When an event occurs, the driver retrieves the value of each event property using the path extended data of the event property, if it is set. Otherwise, the driver uses the device ID of the property.
Use the event-specific path when one property is shared by events with different message layouts. In the following example, the barcode property keeps the device ID Body.Pcb.Barcode for the other events, and the driver reads the value from Body.Result.Barcode for this event:
{ "name": "barcode", "deviceId": "Body.Pcb.Barcode", "dataType": "String", "deviceType": "String", "extendedData": { "path": "Body.Result.Barcode" }, "isReadable": true, "isWritable": true }
Command#
| Name | Type | Possible Values | Default Value | Description |
|---|---|---|---|---|
| executionMode | Enum | PublishSendRequest | SendRequest | Defines the mode of the execute command. Publish publishes the message as an event. SendRequest sends a request and expects a reply. |
Table: PanaCIM specific extended command attributes
Command Parameter#
| Name | Type | Possible Values | Default Value | Description |
|---|---|---|---|---|
| path | String | Path to the parameter in the XML structure, for example Header.Location.RouteID. When empty, a parameter with the Header or Body device type maps to the whole message header or body. | ||
| objectDefinition | Object | Applies to the List device type. Expects an array of objects with path, name, and type, for example [{ "path": "Product.Name", "name": "Name", "type": "String" }]. See the List data type in Data Types. |
Table: PanaCIM specific extended command parameter attributes
Supported Functionalities#
The PanaCIM tasks package (controller-engine-panacim-tasks) has direct support for the following tasks/functionalities:
| Task | PanaCIM Functionality | Description |
|---|---|---|
| onPanacimRequest, sendPanacimReply | PCB-ID Request | PCB Interlocking |
| executeCommand | Request Message | Request Message '553' - Total Placement data, '601' - PCB End |
Protocol Parameters#
The protocol supports the following parameters, used to define the communication parameters, as well as the expected behavior of the driver:
| Name | Type | Possible Values | Default Value | Description |
|---|---|---|---|---|
| address | String | "0.0.0.0" | Address where the PanaCim interface will be connecting to. | |
| port | Integer | 0 | Port where PanaCim interface will be connecting to. | |
| family | Enum | IPV4, IPV6 | IPV4 | Version of IP stack, can be either 4 or 6. Default: 4. |
| keepAliveTime | Integer | 10000 | Time interval to send the for the server to consider the client connected (ms). | |
| keepAliveTimeout | Integer | 150000 | The PanaCIM issues a connection check request (PING) to the host computer at regular intervals (default: 120 seconds). PING timeout (ms) - timeout to receive a PING from equipment (default: 150 seconds). | |
| maxClients | Integer | 10 | Maximum Number of concurrent clients the server can have connected at the same time. | |
| equipmentRequestTimeout | Integer | 10000 | Timeout to Requests sent to controller (ms). | |
| controllerRequestTimeout | Integer | 10000 | Timeout to Requests sent to equipment (ms). |
Driver Extensions#
Deprecated
The extensibility mechanisms described in this section are deprecated and will be removed in a future version. Define custom properties, events, and commands at runtime with the Custom Driver Definition task (which calls driverProxy.registerCustomDriverDefinitions under the hood) instead.
This protocol driver provides a set of extension that allow the customization to perform actions that are independent of the Driver Definitions associated. This means you can, using customization, register events that are not present in the Driver Definition.
This is particularly useful when accessing equipment data that is shared/too complex to access using the regular mechanisms. Also useful when needing to access data whose naming convention may vary from device to device.
Objects#
The objects are structures that are either passed as parameters or returned as result values.
RegisterHandler#
| Name | Type | Description |
|---|---|---|
| event | Event | Event to register (full information) |
UnregisterHandler#
| Name | Type | Description |
|---|---|---|
| event | Event | Event to unregister (at least the property name must be supplied) |
Methods#
Register Event#
Notifies the protocol driver to raise the occurrences of a specific PanaCIM message type when it occurs.
Signature
Example
Notify connect.iot.driver.panacim.registerEvent
Unregister Event#
Notifies the protocol driver to stop raising the occurrences of a specific message when it occurs.
Signature
Example
Notify connect.iot.driver.panacim.unregisterEvent
Execute Command#
Executes a custom command.
Signature
Example
SendRequest connect.iot.driver.panacim.executeCommand