PartCheck
From PlcWiki
Petr.zalabak (Talk | contribs) |
Petr.zalabak (Talk | contribs) |
||
Line 8: | Line 8: | ||
*Operation.''name''.PartStart[i] = int | *Operation.''name''.PartStart[i] = int | ||
*Operation.''name''.PartLength[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 ([http://en.wikipedia.org/wiki/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 | ||
+ | |||
+ | 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) will be used, it means the substring 1K1 614 105 CG will be compared. | ||
+ | |||
*Operation.''name''.CheckSumType[i] = int | *Operation.''name''.CheckSumType[i] = int | ||
Possible values of CheckSumType: | Possible values of CheckSumType: | ||
Line 21: | Line 33: | ||
Only the highlighted substring (204 FTAC00BXGIG) will be tested for the CheckSum | Only the highlighted substring (204 FTAC00BXGIG) will be tested for the CheckSum | ||
*Operation.''name''.InvalidLabelAllowed = No | '''Yes''' | *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. |
Revision as of 20:51, 13 October 2010
Generally, this type of an operation checks if the scanned part is the correct one, which is requested for this product.
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 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) will be used, it means the substring 1K1 614 105 CG will be compared.
- Operation.name.CheckSumType[i] = int
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.