Step 7 Graph: Variable declaration

ishanivai

Level-1
Beiträge
2
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hello People,
I am new to Simatic manager S7 300. I have to program an FB using S7- Graph language. For that I need to declare local variables in the corresponding instant DB. But when I am creating these Variables, they are directly going to main symbol table and not in the instance DB. And I am not even able to access this IDB for editing purpose. This problem of not able to declare input output variables only occurs for S7 Graph and not with LAD/FBD/STL. How can I solve this problem? It would be great to hear solutions from all of you!

Hallo Leute,
Ich bin neu im Simatic Manager S7 300. Ich muss einen FB mit S7-Graph programmieren. Dazu muss ich lokale Variablen im entsprechenden Instanz-DB deklarieren. Aber wenn ich diese Variablen anlege, gehen sie direkt in die Hauptsymboltabelle und nicht in den Instanz-DB. Und ich kann nicht einmal auf diese IDB zugreifen, um sie zu bearbeiten. Dieses Problem der fehlenden Möglichkeit, Input-Output-Variablen zu deklarieren, tritt nur bei S7 Graph auf und nicht bei LAD/FBD/STL. Wie kann ich dieses Problem lösen? Es wäre toll, von Ihnen allen Lösungen zu hören!


VG,
Ishani
 
Of course. You can create a UDT:

1662615099936.png


use it in a DB:

1662615122631.png

and then access the variables in the graph sequence:

1662615149419.png

Also (but this is in my opinion not very common) you can define the UDT as in/out variable to the graph and use it multiple times and just access the elements of the UDT:

1662615227581.png

with:
1662615291391.png

But it depends on what you want to use it for!
 
Zurück
Oben