登录
首页 PLC论坛 西门子SIEMENS
回帖 发帖
正文

主题:通道诊断程序求助

点击:927 回复:1

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
           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
就上面的语句是什么意思????
希望高手指点!!!
08-12-23 15:13
我一直在等候呀!
08-12-23 15:16

工控新闻

更多新闻资讯