9/21/2021 4:39 PM | |
Joined: 12/9/2020 Last visit: 10/19/2022 Posts: 46 Rating: (0) |
I am currently using TIA openness demo to import blocks in TIA portal. My current TIA portal project has one DB block which is the type of SW.blocks.InstanceDB. I use export button to get the XML file of this block. However, I can't import these DB blocks with XML. I always met this error. Error: Error when calling method 'Import' of type 'Siemens.Engineering.SW.Blocks.PlcBlockComposition'. Cannot create the 'SW.Blocks.InstanceDB' object with Simatic ML ID '0' at line number 34 at line position 4. Error when calling method 'Create' of type 'Siemens.Engineering.SW.Blocks.PlcBlockComposition'. Block 'Conveyor' does not exist at the object with UID ''. Please find the XML file attached. Can anybody help me? Thanks a lot! AttachmentInstConveyor.txt (190 Downloads) |
9/22/2021 12:40 PM | |
Joined: 12/9/2020 Last visit: 10/19/2022 Posts: 46 Rating: (0) |
Here is the XML file I use to import FB, I always met error
AttachmentConveyor.txt (196 Downloads) |
Last edited by: James_Peter at: 09/22/2021 12:41:13 |
|
9/22/2021 12:41 PM | |
Joined: 12/9/2020 Last visit: 10/19/2022 Posts: 46 Rating: (0) |
However, I can import this function block, is there any difference between these two FBs?
AttachmentLGF_Frequency.txt (157 Downloads) |
11/12/2021 4:10 AM | |
Joined: 4/2/2021 Last visit: 11/1/2022 Posts: 1 Rating: (0) |
Hey, I have had this problem before and for me at least the issue was related to the order in which you can import blocks into a project. If a block references another object that is not included in the project yet, it will give you this error. From Openness V16, it is possible to use a new overload of the import function that allows ignoring these errors and importing the block regardless of missing references. If you are using older versions, however, you'll just need to find a way to sort programmatically the import order. So for Openness V16 and ongoing, you should be able to import this block with :
You can have a look at the manual here, if you need more info. Hope it works! |
Follow us on