Emergency strategy

From PlcWiki

Revision as of 06:51, 24 April 2014 by Petr.zalabak (Talk | contribs)
Jump to: navigation, search

Contents

Three levels of emergency strategy

1st level

Data are sent to CLEVER System via an alternative application (ASEC, LES)

2nd level

A data connection from JIS (WSW) and ASEC (LES) to the Kernel is totaly lost, but the connection between stations and the kernel is still working. A 2-D specification barcode is scanned on the first station, that data are sent to the Kernel and prepared for all other stations.

3rd level

A network connection between stations and the kernel is lost. A 2-D specification barcode is scanned on each station, the data are sent to the local Kernel, which temporary replaces the functionality of the main Kernel.

Complete dataflow of incoming data to CLEVER System

Installation

On the Client workstation, install the package plc_local_krnl:

yum -y update --disablerepo fedora --disablerepo updates plc_local_krnl

If needed, the packages plc_client_bins and plc_client_scripts will be updated together with that package automatically.

That package contains a service plc_local_krnl, which is automatically started. This service needs the following configuration files, which are automatically updated from the Kernel after an each their change:

  • plc_krnl_project.cfg
  • plan_project.cfg
  • PartDistribution.cfg
  • /usr/local/plc/etc/pmc/twodcode2xml.cfg
  • /usr/local/plc/etc/pmc/xml2krnl.xsl

After the installation of plc_local_krnl, it is necessary to restart CLEVER Client (scan PLCEOP) to update all these configuration files from the Kernel. Till that update, the service plc_local_krnl is not working properly.

At least the version 11.48.72 1403251504 of the Kernel is needed.

Configuration

Kernel configuration

The following configuration is needed in the Kernel configuration file (plc_krnl_project.cfg):

# Settings for an emergency strategy, when a 2-D bar code is scanned on the Client station,
# it is sent to the kernel and it stores the data into the following directory:
DirQWriter = /usr/local/plc/var/pmc/twodcodedirq

# For JIS data, where the ProductID (VIN) is from the very beginning of the data. The number
# of characters depends on the ProductID length:
ProductIDInForwardedData = ^(.{10}).*$
# For WSW data:
#ProductIDInForwardedData = ^..(.{8}).* 

Alien2XMLConfig = /usr/local/plc/etc/pmc/twodcode2xml.cfg
xslt = /usr/local/plc/etc/pmc/xml2krnl.xsl


For the CLEVER Client version 11.48.72 1404071701 and higher, it is not necessary to configure any dedicated operation for the 2-D code scanning. If there is no sequence on the Client station ("empty sequence"), then this scanning is automatically requested after a scanning of the VIN.

PMC data chain

It is highly recommended to send the data from PMC chain to the Kernel in XML format. It is important for the Kernel, then it is able to send notifications to the stations, that the 2-D data were correctly parsed and returned from PMC back to the Kernel. So the PMC module xml2krnl needs to be ecluded from the PMC chain.

Scanning of 2-D specification barcode (Client configuration)

Even it is not necessary to define any dedicated operation for the emergency 2-D code scanning on the client, sometimes it is necessary to configure some parameters, which are needed for a correct functionality of this feature. Their configuration is derived from the original configuration.

The name of the operation is a very important parameter. It must be "Configuration".

Possible parameters of operation.Configuration
Parameter Default value Usage
Type ProductConfiguration Not configurable
Index internally 11 Not configurable
Default 1 - if the Kernel is used

0 - if the Kernel is not used

It is possible to set this parameter to 0 if you want to disable this feature
ToleranceOverPlan 0 It is possible to set this parameter to 1 if you want to enable this feature even when it is not required
SelectPattern[x] [0] = ^@CS
ProductSpecification.OutgoingFieldSeparator \xC2\x8D for JIS data: \xC2\x8D

for WSW data: \x0D\x0A

ScannedDataStartPosition workplace.KennLength + 6 This parameter should be workplace.KennLength + 6

Zwickau (VIN example: 13402471): 14

Gölcük (VIN example: TTGYDD04749): 17

Parameters Type and Index are not configurable.

Example of the configuration:

#=======================
#[Product configuration]
#=======================
#
#operation.Configuration.Default = 0
#operation.Configuration.ToleranceOverPlan = 1
#operation.Configuration.SelectPattern[0] = ^@CS
operation.Configuration.ProductSpecification.OutgoingFieldSeparator = \x0D\x0A # for WSW data
# The parameter ScannedDataStartPosition should be 6 + KennLength
#operation.Configuration.ProductSpecification.ScannedDataStartPosition = 14 # Zwickau (VIN example: 13402471)
#operation.Configuration.ProductSpecification.ScannedDataStartPosition = 17 # Golcuk (VIN example: TTGYDD04749)
Personal tools