更改GT面板的背光亮度
此指令使用数据类型表中描述的变量,来更改GT面板的背光亮度。
输入
亮度值0-15
输入/输出
GT基本通信位区域
输出
亮度值超出范围时打开
所有用于编程此函数的输入和输出变量已在POU头中声明。 所有编程语言使用相同的POU头。
_VAR
VAR
bActivateNewPage: BOOL:=FALSE;
wNewPageNo: WORD:=0;
g_bStartPage: BOOL:=FALSE;
fbChangeScreen: GT_CtrlActivateScreen;
bHoldPage: BOOL:=FALSE;
iBrightness: INT:=0;
bErrorBacklightBrightness: BOOL:=FALSE;
bChangeBacklightBrightness: BOOL:=FALSE;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_CONTACT,,bChangeBacklightBrightness,9,1,11,3,);
B(B_VARIN,,iBrightness,13,2,15,4,);
B(B_VARIN,,g_GT_BitArea,13,3,15,5,);
B(B_VAROUT,,bErrorBacklightBrightness,30,2,32,4,);
B(B_F,GT_ChangeBacklightBrightness!,,15,0,30,5,,?DEN?DiBrightness?DdutGTBitArea?AdutGTBitArea?AENO?AbError);
L(1,2,9,2);
L(11,2,15,2);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
fb_GT_ChangeBacklightBrightness((* EN := TRUE, *)
iBrightness := iBrightness,
dutGTBitArea := g_GT_BitArea,
bError => bErrorBacklightBrightness
(* , ENO => ?BOOL? *));