Todo's for Source creation...
fixed:
- Real-Werte in Datenbausteinen schauen so aus: "X : REAL := 0;" sollten aber so ausschauen "X : REAL := 0.000000e+000;" um sie übersetzen zu können
- In FCs (wahrscheinlich auch FBs) werden Sprungmarken nicht dargestellt, wenn sie in einer Zeile mit Code sind (z.B. M001: L DB3.DBD0)
- Funktionsblöcke müssen auf END_FUNCTION_BLOCK und nicht END_FUNCTION enden
- Umlaute und Sonderzeichen (in meinem Fall ä, ö, ü, °, ³) in den Kommentaren werden alle als ? dargestellt
- Mehrere oder alle Quellen auf einmal erzeugen ware super
- Wenn es keine temporären Variablen gibt, darf es auch die VAR_TEMP - END_VAR nicht geben
- UDT Quellen werden falsch erzeugt (mit DB-Header und Initialisierungswerten)
- Temporäre Variablen haben keinen Anfangswert
- Konstante Realwerte bei FC-Aufrufparametern wurden als DINT interpretiert, und nicht als REAL
- Realwerte mit Kommastellen bei Datenbausteinen: Das Komma ist ein Beistrich anstelle eines Punktes
- Funktionsaufrufe werden nicht richtig übersetzt: keine Klammern, keine Beistriche zw. den Parametern
- Aktualwerte bei den Datenbausteinen wären auch noch super
todo:
- ein kleiner Bug, der mir noch aufgefallen ist: Wenn der Name der Quelle von vorhanden ist, dann fragt er ob er überschreiben soll. Die neue Dateigröße ist anscheinend über 1 TB groß!?
- OUT-Parametern werden Lokaldaten anstelle des richtigen Parameters zugewiesen
http://www.sps-forum.de/simatic/73429-baustein-ordner-verschwunden.html
Fixed:
- FC not properly generated, parenthesis added and commas to separate the parameters, but i am not sure about empty parameters if is a compile error if they have only a comma, in that case the parameter should be removed only when generating sources.
Open:
- i updated my code with all your source changes and still the jump labels are not completely shown (only some of them)
- Multi instance calls are generated as symbolic/fbnumber but they have no instance db, should take the name of the static variable.
- static variables used as parameter dont have the preceding # sign
- with the removed regex logic the +I +D is still missing when getting the source of a source (call of GetSourceBlock(true) ) from a blockInfo inside the "Quellen" folder. anyway the RegExes where only active for generating source from AWL, not for the "Quellen" generated and saved from simatic manager.
Can you send me a Example Project with all the errors you mentioned here?
But a small one if it's possible
I confirmed today that an empty parameter is a compile error for a source, so i think when UseSemicolonAfterCommand is true, the empty parameter should not be added, i will try to send you today the project
Feel free to change, add it to your Pull Req. and I will merge it!
Have you a Example Project for me?
sorry i've been very very busy ill try to send it today
sent finally!
Im looking tomorrow... wich errors are now all in that Project?