发表于:2008/12/23 15:13:00
#0楼
SET // Initialization of channel fault flag
R #TMP_AI_CH_Fault
//Channel Diagnostic
OPN "COM_DB_HW_IN_Diag" // Open analog input diagnostic memory area
L P##IN_PIW_Address // Load input card address
T #TMP_PIW_PNT // Save analog input address into local pointer
SRD 24 // Move the variable area type into the ACCU1 LSB
L W#16#80 // IF variable area type is a PIW
<I
JC COFF
TAK
L W#16#81 // OR variable area type is a IW
>I
JC COFF // THEN the system enables the channel diagnostic
L #TMP_PIW_PNT
L 2 // Get analog input diagnostic bit address
/I
SRD 3
LAR1 // Point to analog input diagnostic bit
A DBX [AR1,P#0.0] //
= #TMP_AI_CH_Fault // Analog input channel fault
COFF: NOP 0
有谁好好帮我分析一下上面的代码 问什么要这么做 偶是初学 刚学plc没有几天!
还有就是
网络中只有这个
SET
SAVE
就上面的语句是什么意思????
希望高手指点!!!
R #TMP_AI_CH_Fault
//Channel Diagnostic
OPN "COM_DB_HW_IN_Diag" // Open analog input diagnostic memory area
L P##IN_PIW_Address // Load input card address
T #TMP_PIW_PNT // Save analog input address into local pointer
SRD 24 // Move the variable area type into the ACCU1 LSB
L W#16#80 // IF variable area type is a PIW
<I
JC COFF
TAK
L W#16#81 // OR variable area type is a IW
>I
JC COFF // THEN the system enables the channel diagnostic
L #TMP_PIW_PNT
L 2 // Get analog input diagnostic bit address
/I
SRD 3
LAR1 // Point to analog input diagnostic bit
A DBX [AR1,P#0.0] //
= #TMP_AI_CH_Fault // Analog input channel fault
COFF: NOP 0
有谁好好帮我分析一下上面的代码 问什么要这么做 偶是初学 刚学plc没有几天!
还有就是
网络中只有这个
SET
SAVE
就上面的语句是什么意思????
希望高手指点!!!