主要在DB块里操作读DB块importsnap7importstructdefplc_connection():PLC_IP='192.168.10.10'PLC=snap7.client.Client()PLC.connect(PLC_IP,rack=0,slot=1)r... ...