younthue
級(jí)別: 探索解密
![]() |
我定義的WinCC內(nèi)部二進(jìn)制變量ILR.ILR25 和ILR.ILR26,外部無(wú)符號(hào)16位變量PbSlvCommSts1和外部布爾變量DI007EMO。其中外部變量分別關(guān)聯(lián)到PLC內(nèi)的一個(gè)int和bool數(shù),測(cè)試時(shí),ILR.ILR25相關(guān)聯(lián)的WinCC IO域反應(yīng)是正常的,但I(xiàn)LR.ILR26相關(guān)聯(lián)的IO域一直是“0”,不會(huì)變化。 這段代碼是很簡(jiǎn)單的,麻煩大神指教一下,謝謝! Dim ILRILR25 Set ILRILR25 = HMIRuntime.Tags("ILR.ILR25") Dim PbSlvCommSts1 Set PbSlvCommSts1 = HMIRuntime.Tags("PbSlvCommSts1") PbSlvCommSts1.Read ILRILR25.value=PbSlvCommSts1.Value And &h0002 ILRILR25.Write Dim ILRILR26 Set ILRILR26 = HMIRuntime.Tags("ILR.ILR26") Dim DI007EMO Set DI007EMO = HMIRuntime.Tags("DI007EMO") DI007EMO.Read ILRILR26.Value=DI007EMO.Value ILRILR26.Write |
---|---|
|