PartCheck

From PlcWiki

Revision as of 08:36, 13 August 2012 by Jan (Talk | contribs)
Jump to: navigation, search

Generally, this type of an operation checks if the scanned part is the correct one, which is requested for this product.

Contents

Mandatory parameters

  • Operation.name.Type = PartCheck
  • Operation.name.Index = (int) index

Other parameters

Bar code settings

  • Operation.name.SelectPattern[i] = Regexp
  • Operation.name.PartStart[i] = int
  • Operation.name.PartLength[i] = int

The above parameters define the bar codes belonging to that operation. The value of SelectPattern is a regular expression (regex) which assignes the scanned barcode to the operation. If they match, the bar code is assigned to the operation. The index of SelectPattern is used for a join between SelectPattern, PartStart and PartLength parameters. These parameters defines the substring of the scanned bar code which is compared with a requested bar code from PartDistribution.cfg table. For example if the secanned bar code matches a SelectPattern[0] parameter, then PartStart[0] and PartLength[0] are used. PartStart parameter points to the first character of the substring (its default value is 0, it means the beginning of the bar code). A parameter PartLength defines the length of of the substring (its default value is 0 and means "till the end of the bar code" otherwise its value define the length).

Example of the barcode definition:
operation.PartCheck_2.SelectPattern[0] = "^204# 1K.*$"
operation.PartCheck_2.PartStart[0] = 5
operation.PartCheck_2.PartLength[0] = 14
operation.PartCheck_2.SelectPattern[1] = ^204#1K.*$
operation.PartCheck_2.PartStart[1] = 4
operation.PartCheck_2.PartLength[1] = 14

PartDistribution record:
1K1614105CG     1K1 614 105 CG  T13     1K1614105CG

Scanned bar code:
204#1K1 614 105 CG#1#081 248 9474#11/10/10/41*204 3VZ10B0WRW1*=
matches SelectPattern[1], then PartStart[1] (4) and PartLength[1] (14)
will be used, it means the substring 1K1 614 105 CG will be compared
with 1K1614105CG (spaces are automatically erased before a comparing).
  • Operation.name.CheckSumType[i] = (int) CheckSumType
Possible values of CheckSumType:
0 - No check (default settings)
1 - SumEven + 3*SumOdd MOD 10
2 - SumEven + 3*SumOdd MOD 36
3 - Sum MOD 43 (Code39)
  • Operation.name.CheckSumSubString[i] = Regexp
It is possible to define the substring from the scanned bar code for the CheckSum test.
For example:
Operation.PartCheck_BrakeBau.CheckSumSubString[0] = ^.*\*(.*)\*.*$                                                                                            
Scanned barcode: 204#6R1 614 105 G##315313184#210510  *204 FTAC00BXGIG*=
Only the highlighted substring (204 FTAC00BXGIG) will be tested for the CheckSum
  • Operation.name.InvalidLabelAllowed = No | Yes
  • Operation.name.SNStore = No | Yes

If this parameter is set to Yes, an operation stores two results from one scanning. The first one is the result of a part check and the second one is the whole scanned bar code as its serial number. The plan (in plan...cfg file) for such an operation should be set to 2.

Sequenced display of part numbers

It is possible to display required part numbers for part check operations in the sequence window. So it shows to an operator which part numbers will come in the following sequence of products. This feature is controlled by following parameters:

  • Operation.name.SequenceDisplay.Width = (int) Width
  • Operation.name.SequenceDisplay.RegExp = Regexp
  • Operation.name.SequenceDisplay.ColorMode = Periodical | PartNum

The following screen is a result of the following configuration:

operation.Scan_P1_Combine.SequenceDisplay.Width = 8
operation.Scan_P1_Combine.SequenceDisplay.RegExp = .*
operation.Scan_P1_Combine.SequenceDisplay.ColorMode = Periodical

operation.Scan_P1_CD.SequenceDisplay.Width = 8
operation.Scan_P1_CD.SequenceDisplay.RegExp = .*
operation.Scan_P1_CD.SequenceDisplay.ColorMode = PartNum

File:Client_scr2.jpg

In case of PartNum ColorMode it is necessary to define the color for those part numbers for which you want to display them in color. In case of a standard JIS communication, this information is stored in PartDistribution.cfg. In case of the extended communication it is defined in JIS system.

Here is an example of PartDistribution definition:
#==========================================================
#    HVAC    |
#-------------
# JIS           PLC             Op.     Barcodes   Colors
#----------------------------------------------------------

AH22 18C424 EB  AH22 18C424 EB  P11     443170446  f@WH
AH22 18C424 DB  AH22 18C424 DB  P11     443170445  f@RE
AH22 18C424 EC  AH22 18C424 EC  P11     443170446  f@YE b@RE
AH22 18C424 DC  AH22 18C424 DC  P11     443170445  f@YE b@GR
AH22 18C424 ED  AH22 18C424 ED  P11     443170446  f@GR
AH22 18C424 DD  AH22 18C424 DD  P11     443170445  b@BU

The default color is f@WH b@BK. It is not necessary to specify it. Then the part number will be displayed with a white font on a black background.

The following color codes are available:

Color Font code Backgroung code
black f@BK b@BK
red f@RE b@RE
green f@GR b@GR
yellow f@YE b@YE
blue f@BU b@BU
magenta f@MG b@MG
cyan f@CY b@CY
white f@WH b@WH

Multipart mode

The multipart mode is used when it is supposed to handle a large amount of part numbers (up to 100) within one operation. The complete list of requested part numbers is displayed in an operation window instead of a single part number. The following parameters define the multipart mode:

operation.name.MultiPartMode = No | Yes
operation.name.MultiPartColumnWidth

The parameter MultiPartColumnWidth defines the width of list columns in the operation window. The default value of this parameter is 11.

The following picture shows the multipart mode for an operation X82: File:multipart_mode.jpg

The operation was defined like the following:

operation.Check_GBX.Type = PartCheck
operation.Check_GBX.Index = 2
operation.Check_GBX.Default = 5
operation.Check_GBX.MultiPartMode = Yes
operation.Check_GBX.MultiPartColumnWidth = 13
operation.Check_GBX.WindowTitle = Scan GBX (Rij 18)
operation.Check_GBX.ToDoMessage = Scan GBX (Rij 18)
operation.Check_GBX.DependsOn = 4
operation.Check_GBX.ToleranceOverPlan = 0
#operation.Check_GBX.SNStore = No
operation.Check_GBX.SelectPattern[0] = ^\d{8}
operation.Check_GBX.PartStart[0] = 0
operation.Check_GBX.PartLength[0] = 8

Compare two operations

Lets have serial check PP3 and serial check CP1 operations. It is possible to set check on operation CP1 to check that we scan the same barcode like on PP3 operation. To do it you have:

In plan configuration file set path to workplace data file f.i. "WorkplaceDataFile = /usr/local/plc/var/PP.wpdata" for workplace PP. In operation CP configuration you have to add parameter "VerifiedOperation", f.i. "operation.SerialCheck_Plancha.VerifiedOperation = PP3"

In operation PP configuration you have to add parameter "SendDataToKernel", f.i. "Operation.PartCheck_Plancha_2.SendDataToKernel = Yes"

It is possible to compare operations locally too. In such case it is not necessary to send data to kernel. We just need set parameter "LocalVerifiedOperation" for CP1 operation.SerialCheck_Plancha.VerifiedOperation = 1 (1 is local operation index).

Personal tools