PartCheck

From PlcWiki

Revision as of 10:04, 3 March 2011 by Petr.zalabak (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 operator which part numbers will come in the following sequence of ptoducts. 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 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
Personal tools