maespinosa - 2021-01-20

Hi, I've created a project in Codesys interface. After, I've exported project tree in PLCopenXML from python scripts. Then I create a Codesys project from python using the exported files.
When I print library information I have some error libraries because placeholders can not be resolved.

Is it a way to resolve placeholders libraries from Python?
Here is the libraries information:

*Library Manager: Error: Could not open library '#CBML'. (Reason: The placeholder library 'CBML' could not be resolved.)
Library Manager: Error: Could not open library '#EtherCATStackLibrary'. (Reason: The placeholder library 'EtherCATStackLibrary' could not be resolved.)
Library Manager: Error: Could not open library '#IODrvEtherCATDriver'. (Reason: The placeholder library 'IODrvEtherCATDriver' could not be resolved.)
Library Manager: Error: Could not open library '#ElementCollections'. (Reason: The placeholder library 'ElementCollections' could not be resolved.)*
PLACEHOLDER: #IoStandard: IoStandard, 3.5.16.0 (System) => IoStandard, 3.5.16.0 (System)
PLACEHOLDER: #3SLicense: 3SLicense, 0.0.0.0 (3S - Smart Software Solutions GmbH) => 3SLicense, 3.5.16.0 (3S - Smart Software Solutions GmbH)
PLACEHOLDER: #CAA Device Diagnosis: CAA Device Diagnosis, 3.5.15.0 (CAA Technical Workgroup) => CAA Device Diagnosis, 3.5.15.0 (CAA Technical Workgroup)
PLACEHOLDER: #BreakpointLogging: Breakpoint Logging Functions, 3.5.5.0 (3S - Smart Software Solutions GmbH) => Breakpoint Logging Functions, 3.5.5.0 (3S - Smart Software Solutions GmbH)
PLACEHOLDER: #Standard: Standard, * (System) => Standard, 3.5.15.0 (System)
PLACEHOLDER: #Util: Util, * (System) => Util, 3.5.15.0 (System)
param: IBLOCKSIZE => 22800
LIBRARY MANAGED: CAA Types Extern, 3.5.13.0 (CAA Technical Workgroup): 3.5.13.0
PLACEHOLDER: #IecVarAccess: IecVarAccess, 3.3.1.20 (System) => IecVarAccess, 3.5.16.0 (System)
PLACEHOLDER: #IODrvEtherCAT: IoDrvEtherCAT, 3.5.16.0 (3S - Smart Software Solutions GmbH) => IoDrvEtherCAT, 3.5.16.0 (3S - Smart Software Solutions GmbH)
PLACEHOLDER: #IoDrvProfibusMaster: IoDrvEL6731, 3.5.15.0 (3S - Smart Software Solutions GmbH) => IoDrvCIFXProfibus, 3.5.16.0 (3S - Smart Software Solutions GmbH)
PLACEHOLDER: #IecSfc: IecSfc, 3.4.2.0 (System) => IecSfc, 3.4.2.0 (System)
PLACEHOLDER: #Analyzation: Analyzation, 3.5.2.0 (System) => Analyzation, 3.5.15.0 (System)
param: TABLE_UPPER_BOUND => 15
param: STRING_LENGTH_EXP => 255
param: STRING_LENGTH_ADDRESS => 20
param: STRING_LENGTH_COMMENT => 255
param: STRING_LENGTH_OUTSTRING => 255
param: TABLE_SHOW_VALID_ITEMS => FALSE
PLACEHOLDER: #IoDrvEL6224: IoDrvEL6224, 3.5.16.0 (3S - Smart Software Solutions GmbH) => IoDrvEL6224, 3.5.16.0 (3S - Smart Software Solutions GmbH)
LIBRARY MANAGED: Time and Date, 3.5.7.0 (3S - Smart Software Solutions GmbH): 3.5.7.0
PLACEHOLDER: #AC_DataLog: AC_DataLog, * (3S - Smart Software Solutions GmbH) => AC_DataLog, 3.5.16.0 (3S - Smart Software Solutions GmbH)
LIBRARY MANAGED: SysTimeRtc, 3.5.5.0 (System): 3.5.5.0
PLACEHOLDER: #Standard64: Standard64, * (System) => Standard64, 3.5.16.0 (System)
LIBRARY MANAGED: SysTimeCore, 3.5.5.0 (System): 3.5.5.0
LIBRARY MANAGED: CAA Mathematics, 3.5.12.0 (CAA Technical Workgroup): 3.5.12.0
PLACEHOLDER: #SysTask: SysTask, * (System) => SysTask, 3.5.10.0 (System)
PLACEHOLDER: #CmpIecTask: CmpIecTask, * (System) => CmpIecTask, 3.5.14.0 (System)
PLACEHOLDER: #CmpLog: CmpLog, * (System) => CmpLog, 3.5.16.0 (System)
PLACEHOLDER: #Component Manager: Component Manager, * (System) => Component Manager, 3.5.16.0 (System)
PLACEHOLDER: #CAA Mathematics: CAA Mathematics, * (CAA Technical Workgroup) => CAA Mathematics, 3.5.12.0 (CAA Technical Workgroup)
LIBRARY MANAGED: Unit Conversion Interfaces, * (Intern): 3.5.4.0
PLACEHOLDER: #MemoryUtils: MemoryUtils, * (3S - Smart Software Solutions GmbH) => MemoryUtils, 3.5.15.0 (3S - Smart Software Solutions GmbH)
PLACEHOLDER: #CAA Types: CAA Types Extern, 3.5.13.0 (CAA Technical Workgroup) => CAA Types Extern, 3.5.13.0 (CAA Technical Workgroup)
PLACEHOLDER: #CAA File: CAA File, * (CAA Technical Workgroup) => CAA File, 3.5.15.0 (CAA Technical Workgroup)
PLACEHOLDER: #StringUtils: StringUtils, * (System) => StringUtils, 3.5.15.0 (System)
LIBRARY MANAGED: SysTypes Interfaces, * (System): 3.5.2.0
LIBRARY MANAGED: EtherCATStack, 3.5.16.30 (3S - Smart Software Solutions GmbH): 3.5.16.30

The four first lines does that project can not build.
In addition, if I ope ncreated project in Codesys, It tels me that those libraries have to be resolved. I resolve them and then it builts properly.
The thing is that I have to be able to build it without open Codesys. So, like a said, I would like to resolve thoses libraries from Python scripts, after project creation.

Thanks in advance.

[UPDATE]
Indeed, I've done another test with the same result: I've exported the library manager in native format and when I reimport the files in a new project I open it and Codesys always asks to resolve those libraries...

Anyone could post a working exemple for export/import library manager please? There would be something that I'm misunderstaning ...

[UPDATE 2]
If I export the project to one native file, then the import works properly.
If I export the project to multiples native files, then the error has shown. I suspect that there is more informatation exported to one native file than to multiple files individually.

 
πŸ‘
1

Last edit: maespinosa 2021-01-22