added printing message and centered label

This commit is contained in:
Infineon\StieberD 2025-01-13 16:19:59 -07:00
parent 8b25784ba3
commit 84ab215aee
2 changed files with 12 additions and 6 deletions

View File

@ -189,19 +189,19 @@ end service
Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
If ( (ReactNo NE '') and (LoadLockSide NE '') ) then
BaseZpl = '^XA^LH10,10^FO70,20^BY2^B3N,,80,N^FD10SR{ReactNo}.{LoadLockSidePrefix}^FS^FO10,120^A045,90^FB400,1,,C^FDR{ReactNo} {LoadLockSide}^FS^XZ'
BaseZpl = '^XA^LH10,10^FO35,5^BY2^B3N,,80,N^FD10SR{ReactNo}.{LoadLockSidePrefix}^FS^FO10,105^A045,90^FB400,1,,C^FDR{ReactNo} {LoadLockSide}^FS^XZ'
Convert 'R' to '' in ReactNo
If LoadLockSide _EQC 'Both' then
LoadLockSidePrefix = 'L'
ZplLeft = BaseZpl
Swap '{ReactNo}' with ReactNo in ZplLeft
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplLeft
Swap '{LoadLockSide}' with LoadLockSide in ZplLeft
Swap '{LoadLockSide}' with 'Left' in ZplLeft
ZplRight = BaseZpl
LoadLockSidePrefix = 'R'
Swap '{ReactNo}' with ReactNo in ZplRight
Swap '{LoadLockSidePrefix}' with LoadLockSidePrefix in ZplRight
Swap '{LoadLockSide}' with LoadLockSide in ZplRight
Swap '{LoadLockSide}' with 'Right' in ZplRight
Zpl = ZplLeft:ZplRight
end else
LoadLockSidePrefix = LoadLockSide[1, 1]
@ -218,3 +218,4 @@ Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
end service

View File

@ -34,6 +34,7 @@ Compile function NDW_PRINT_REACTOR_LABELS_EVENTS(CtrlEntId, Event, @PARAMS)
$Insert APP_INSERTS
$Insert EVENT_SETUP
$Insert MSG_EQUATES
Declare function Reactor_Services
Declare subroutine PlaceDialog, Labeling_Services
@ -76,9 +77,14 @@ end event
Event PUB_PRINT.CLICK()
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
ReactNo = Get_Property(@Window:'.COB_REACTOR', 'TEXT')
LLSide = Get_Property(@Window:'.COB_LOAD_LOCK_SIDE', 'TEXT')
Def = ""
Def<MTEXT$> = "Printing label..."
Def<MTYPE$> = "U"
MsgUp = Msg(@window, Def) ;* display the processing message
Labeling_Services('PrintReactorLabel', ReactNo, LLSide)
Msg(@window, MsgUp) ;* take down the processing message
If Error_Services('HasError') then Error_Services('DisplayError')
end event
@ -95,4 +101,3 @@ EnablePrintButton:
return