恭喜,你发布的帖子
发布于 2015-08-08 08:53:29
7楼
Z版你好,我这段程序是模仿一段程序写的,我也是想查看这段程序具体是如何应用。源程序是这样子的:
IN_PIW_Address 是INT类型 #TMP_PIW_PNT是DW类型
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
请填写推广理由:
分享
只看
楼主