SA0048:直接地址的 AT 声明 检测到 AT 直接 [...] 错误的原因并导致代码的可读性和可维护性较差。因此,最好在设备编辑器的 I/O
_GLOBAL g_xVar AT %QX0.0 : BOOL ; g_iTest AT [...] _wTest AT %QW2 : WORD
0028:iVar1 AT %QB21 SA [...] PLC_PRG VAR iVvar1 AT %QB21: INT; dw
_GLOBAL g_xVar AT %QX0.0 : BOOL ; g_iTest AT [...] _VAR PROGRAM PLC_PRG IF g_i
_GLOBAL g_xGlob AT %QX0.0 : BOOL ; g_iGlob AT [...] ; END_VAR VAR i
_Address_Type_PRG VAR iVar AT %QB [...] .: %QW0 xTest AT %QW [...] .: %QX1.0 END_VAR i
. 例子 VAR_GLOBAL g_iVar AT %QW1 : INT; END_VAR PROGRAM PLC_PRG VAR i
_GLOBAL g_xGlob AT %QX [...] VarIn2 : BOOL; END_VAR VAR iCondition : INT; END_VAR i
: BOOL; END_VAR VAR i [...] _VAR //Implementation METH(i); IF b THEN METH(i*i); END