diff --git a/LSL2/STPROC/LABELING_SERVICES.txt b/LSL2/STPROC/LABELING_SERVICES.txt index ea382c6..fdde8c4 100644 --- a/LSL2/STPROC/LABELING_SERVICES.txt +++ b/LSL2/STPROC/LABELING_SERVICES.txt @@ -80,6 +80,62 @@ Service PrintLabel(ZPLString, PrinterId) end service +Service PrintCalibrationLabel(EquipmentID, LastCalibration, NextCalibration, CalibratedBy, FrequencyVal, FrequencyUnit, PrinterSelect) + + If (EquipmentID NE '') AND (LastCalibration NE '') AND (NextCalibration NE '') AND (CalibratedBy NE '') AND (FrequencyVal NE '') AND (FrequencyUnit NE '') then + ZPLString = '' + // Print Params + ZPLString := '^XA' + ZPLString := '^LH0,0' + ZPLString := '^PR1' + ZPLString := '^LL406' + ZPLString := '^PW900' + ZPLString := '^MD22' + ZPLString := '^MMT' + // Calibration Header + ZPLString := '^FO280,24,2^FWN^A050,50^FDCalibration^FS' + // Equipment ID + ZPLString := '^FO40,90,2^FWN^A035,35^FDEquipment ID:^FS' + ZPLString := '^FO280,90,2^FWN^A035,35^FD^FS' + // Last calibration + ZPLString := '^FO40,150,2^FWN^A035,35^FDLast Calibration:^FS' + ZPLString := '^FO280,150,2^FWN^A035,35^FD^FS' + // Next calibration + ZPLString := '^FO40,210,2^FWN^A035,35^FDNext Calibration:^FS' + ZPLString := '^FO280,210,2^FWN^A035,35^FD^FS' + // Calibrated by + ZPLString := '^FO40,270,2^FWN^A035,35^FDCalibrated By:^FS' + ZPLString := '^FO280,270,2^FWN^A035,35^FD^FS' + // Calibration frequency + ZPLString := '^FO40,330,2^FWN^A035,35^FDCalibration Freq:^FS' + ZPLString := '^FO280,330,2^FWN^A035,35^FD^FS' + ZPLString := '^FO460,330,2^FWN^A035,35^FD^FS' + // End + ZPLString := '^XZ' + + + + Swap '' With EquipmentID in ZPLString + Swap '' With LastCalibration in ZPLString + Swap '' With NextCalibration in ZPLString + Swap '' With CalibratedBy in ZPLString + Swap '' With FrequencyVal in ZPLString + Swap '' With FrequencyUnit in ZPLString + + + If PrinterSelect NE '' then + Labeling_Services('PrintLabel', ZPLString, PrinterSelect) + end else + Labeling_Services('PrintLabel', ZPLString, Printer) + end + + end else + Error_Services('Add', 'Missing parameter. EquipmentID, LastCalibration, NextCalibration, CalibratedBy, FrequencyVal, and FrequencyUnit are required fields.') + end + +end service + + Service ReprintHoldLabel(EntityType, LotID) WOMatKey = '' @@ -404,3 +460,4 @@ Service GetReturnToFabLabelZPL(RTFId) end service +