plc["plcObj"].disconnect()return1## 读取DB块defdbRead(plcObj,type, dbnum, startAddress, address, dblength, boolX):""" DB块的读操作;如果是200smart系列的将dbnum设置为0 :param dbnum: DB1 :param dblength: :return: """data = plcObj.read_area(snap7.types.Areas.DB, dbnum, startAd...
=None: plc["plcObj"].disconnect()return1## 读取DB块defdbRead(plcObj,type, dbnum, startAddress, address, dblength, boolX):""" DB块的读操作;如果是200smart系列的将dbnum设置为0 :paramdbnum: DB1 :param dblength: :return: """data = plcObj.read_area(snap7.types.Areas.DB, dbnum,...
=None:plc["plcObj"].disconnect()return1## 读取DB块defdbRead(plcObj,type,dbnum,startAddress,address,dblength,boolX):""" DB块的读操作;如果是200smart系列的将dbnum设置为0 :param dbnum: DB1 :param dblength: :return: """data=plcObj.read_area(snap7.types.Areas.DB,dbnum,startAddress,dblen...