-
-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function to match the native DB TIA portal export with the python snap 7 db specification layout #530
Conversation
…ecification layout
Nice ! I a have, do locally a branch, the same, with interpretation from Inputs/Outputs/Merk and DB with the S7 But with TIA, I am blocked with non-optimized DB's that aren't exported in the |
wait let me understand better: you made a branch to ingest input/outputs/merk/db through an .xml generated by the winCCconverter. It is also able to read/write optimized dbs? |
Hi nice work / effort. When I created the first version of this layout parsing code I copy pasted the DB information / the view from inspecting the DB object in siematic.manager i think. I discovered that the layout often required manual edits amd changes. Sometimes the starting point of the entire DB object was just moved. I did not find a reliable way to just access a DB objects layout. How DB object ended up in a plc seemed a bit unpredicatble for me. If there is a way that can reliable work to extract that information that would be awesome! Cheers, Stephan. |
Hi, thankyou what I want to add, is the possibility to copy and paste the view from the TIA portal to a file and therefore use it to construct a db object. |
also, a discussion that I would like to brought up is about the arrays of structs. There will be multiple variables with the same name.. how to manage them ? |
No, optimized or non optimized db, because the export of the variable in TIA doesn't include DB's variables. For the moment, on TIA Project, I use OPC UA with the XML that can be exported from TIA or only the variable table from TIA (Inputs/Output/Merkers) |
Optimized DB's didn't exist, at the time of Simatic Manager. |
In the case you want to handle custom Structs, I would prefer use OPC UA, because of the description of the Struct built in the export |
well I would prefer it too, except it seems too slow for some applications that I need to implement. For the moment, I just added "_0", "_1" , "_X" to the variabile name in case of arrays and it works |
I did the same lol for arrays |
okay, I'm going to implement the changes then, I will submit a new cleaner PR, this one has the commits of my last one.... |
Hi,
the siemens tia portal permits the export of a DB in a semi automatic method (copy and paste the view). The result is a text like this:
the DB layout specification of this library is currently formatted as follow,:
Since a DB can contain thousands of variables modified daily (by machine manufacturers for example) converting the native TIA export to this db layout is source of errors and fatigue
I decided to firstly create an utiliy function that convert the native tia layout to the current accepted layout as a starting point that therefore can pass the string argument as the db specification
The ideal solution could be directly change the DB layout format that snap7 library takes in and therefore the parsing block.
let me know your thoughts
thanks