ACCON AGLink liest Variablen von Siemens SPS

Sergio

Level-1
Beiträge
12
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Ciao,

sto provando a leggere la lista delle variabili di un PLC 1513 che funziona nel simulatore "S7-PLCSIM Advanced V4.0" con la libreria ACCON AGLInk , riesco a connettermi, scaricare e salvare il file .agl dal PLC. Il file ha la struttura che si può vedere nell'immagine allegata "saved_symbols.jpg". Quando provo a leggere le variabili ottengo l'errore "de.deltalogic.accon.aglink4.AglIOException: Method: 'symbolic_CreateAccessByPath', Error Code: 'AGL40_SYMBOLIC_PATH_UNKNOWN_FIELD', Error Nr: '0xFFFA0009', Error Message: 'Pfad enthaelt unbekanntes Feld', AdditionalInfo: '0',
" quando provo a usare l'API "AgLink.symbolic_CreateAccessByPath(root_node, symbol_path);". Il parametro "root_node" lo ottengo dal PLC, mentre "symbol_path" è una stringa che ho scritto io, credo sia sbagliata, l'ho costruita partendo dai dati di TIAExpert che si vedono nell'immagine allegata "saved_symbols.jpg". Se è sbagliata sapete dirmi come scrivere correttamente la variabile "symbol_path"?

String symbol_path = "CPU 1513-1 PN.Blocks.testFB_DB.input.S7_Bool";

long symbol_access=AgLink.symbolic_CreateAccessByPath(root_node, symbol_path);



Fehler


de.deltalogic.accon.aglink4.AglIOException: Method: 'symbolic_CreateAccessByPath', Error Code: 'AGL40_SYMBOLIC_PATH_UNKNOWN_FIELD', Error Nr: '0xFFFA0009', Error Message: 'Pfad enthaelt unbekanntes Feld', AdditionalInfo: '0',
at de.deltalogic.accon.aglink4.FunctionsTIA.symbolic_CreateAccessByPath(FunctionsTIA.java:606)
at de.deltalogic.accon.aglink4.AgLink.symbolic_CreateAccessByPath(AgLink.java:1149)
at accon.aglink.HelperFunctions.CreateSymbolicRWs(HelperFunctions.java:22)
at accon.aglink.Programm.<init>(Programm.java:53)
at accon.aglink.Main.main(Main.java:50)

Grazie

Sergio
 

Anhänge

  • saved_symbols.png
    saved_symbols.png
    53,5 KB · Aufrufe: 16
Hello Sergio,
Try this string: "PLC.Blocks.testFB_DB.input";
You can check in the API-Guide how you have to create the Node (variable):
e.g.
1683615392903.png
Hanns-Joerg Renschler
 
Original post in German that could be useful to the other members

Ich versuche, die Variablenliste einer 1513-SPS zu lesen, die im Simulator "S7-PLCSIM Advanced V4.0" mit der ACCON AGLInk-Bibliothek ausgeführt wird. Ich kann die .agl-Datei von der SPS verbinden, herunterladen und speichern. Die Datei hat die Struktur, die im angehängten Bild "saved_symbols.jpg" zu sehen ist. Beim Versuch die Variablen auszulesen bekomme ich den Fehler "de.deltalogic.accon.aglink4.AglIOException: Method: 'symbolic_CreateAccessByPath', Error Code: 'AGL40_SYMBOLIC_PATH_UNKNOWN_FIELD', Error Nr: '0xFFFA0009', Error Message: 'Pfad enthaelt unbekanntes Feld ' , Zusatzinfo: '0',
" Wenn ich versuche, die API "AgLink.symbolic_CreateAccessByPath(root_node, symbol_path);" zu verwenden. Den Parameter "root_node" bekomme ich von der SPS, während "symbol_path" eine Zeichenfolge ist, die ich geschrieben habe, ich denke, es ist falsch, ich habe sie erstellt Ausgehend von den TIAExpert-Daten, die im angehängten Bild "saved_symbols.jpg" zu sehen sind. Wenn es falsch ist, können Sie mir sagen, wie die Variable "symbol_path" richtig geschrieben wird?
 
Zurück
Oben