Lesen Sie alle Tags von Allen-Bradley PLCPython

Python-Programme
Anonymous
 Lesen Sie alle Tags von Allen-Bradley PLC

Post by Anonymous »

Ich muss mit Python auf Tags von einer ControlLogix 1756-L7SP/B LogixSafety-SPS zugreifen.
Ich habe erfolgreich eine Verbindung hergestellt und allgemeine SPS-Informationen über Code abgerufen, aber wenn ich versuche, die Tags aufzulisten, zeigt die Ausgabe keine Ergebnisse:

Code: Select all

Total tags found: 0
Hier ist der Code, den ich verwende:

Code: Select all

from pycomm3 import LogixDriver

with LogixDriver('192.168.1.5/1', init_program_tags=True) as plc:
tags = plc.tags

print(f'Total tags found: {len(tags)}')

for name, info in list(tags.items())[:40]:
print(name, info)

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post