I have tried to insert a POU, Task config and symbol config into the new project with the following modified example script of "taskconfig-example.py" by Martin:
\#\#Mainprogram\#proj=projects.primaryfound=proj.find('Application',True)assert(found,'Application not found')app=found[0]print(app)\#addPOUpou=app.create_pou(mypou)\#Createtaskconfigurationtaskconfig=app.create_task_configuration()assert(taskconfig,'task config was not created')\#addsymbolconfigtaskconfig=app.create_symbol_configuration()
after executed the script, I can create POU under connector "Application" successfully. but creating Task and Symbol config were failed. CDY show error "'Script Object' object hast no attribute 'create_task_configuration' .( the same error message in case of creating Symbol config).
Have any idea, what is wrong with above script? or the CDY version does not support the methods?
Thanks for Help!
hhz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have test it with SP10 . Adding POU and Task config work, but Symbol config done not work.
Error diagnose hows no attribute "create_symbol_configuration()".
Is the script commands wrong?
BR.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the help on the taskconfig, but the creating of a symbol config doesn't work for me.
I have run your example code in SP10 (well, KeMotion 3.10a, but it uses CoDeSys 3.5.10 under the hood), but it gives me the AttributeError that the ScriptObject has no 'create_symbol_config' attribute.
I've checked the scriptengine.dll and did an API-dump and it has the command 'create_symbol_config', with the two bools and the Guid as parameters, but it doesn't seem to use it.
I've downloaded and installed CoDeSys 3.5.11P2 (x64) and it has no problem creating a symbol configuration from script.
Relevant part of my code:
```and giving optimizedCalculator as parameter instead of Guid.Empty does not affect the issue of the AttributeError arising. Neither does changing the bools to True.
How can this be resolved?
Edit:
I manually made a symbol configuration and I printed it. It does not qualify as a ScriptSymbolConfigObject (not even as a NoSymbolConfigObject) and using symconf.is_symbol_config gives an AttributeError. I can't do anything with it beyond basic ScriptObject-handling (such as get_name, guid, remove, etc...)
Testing the same script with a project in SP11P2 works flawlessly and it shows up as a ScriptSymbolConfigObject and the corresponding methods work with no issue.
This seems to be an issue with the implementation of CoDeSys 3.5.10 by KEBA in KeMotion 3.10a. Is there a way I can check whether this is the case by comparing some SP11P2 dll's with those from KeMotion?
I'm also wondering why the commands do show up in the API dump.
BR
Wouter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
WousV hat geschrieben:
How can this be resolved?
Edit:
I manually made a symbol configuration and I printed it. It does not qualify as a ScriptSymbolConfigObject (not even as a NoSymbolConfigObject) and using symconf.is_symbol_config gives an AttributeError. I can't do anything with it beyond basic ScriptObject-handling (such as get_name, guid, remove, etc...)
Testing the same script with a project in SP11P2 works flawlessly and it shows up as a ScriptSymbolConfigObject and the corresponding methods work with no issue.
This seems to be an issue with the implementation of CoDeSys 3.5.10 by KEBA in KeMotion 3.10a. Is there a way I can check whether this is the case by comparing some SP11P2 dll's with those from KeMotion?
I'm also wondering why the commands show up in the API dump.
The Scripting API for the SymbolConfig is implemented in the plug-in ScriptDriverSymbolcConfigObject. If the plug-in is installed and loaded with the profile you should be able to use it.
In CODESYS you can see what plug-ins are loaded but I don't know if there is a way in KeMotion. I think you should contact the support from KEBA and ask them for help.
BR
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello support team,
I have tried to insert a POU, Task config and symbol config into the new project with the following modified example script of "taskconfig-example.py" by Martin:
after executed the script, I can create POU under connector "Application" successfully. but creating Task and Symbol config were failed. CDY show error "'Script Object' object hast no attribute 'create_task_configuration' .( the same error message in case of creating Symbol config).
Have any idea, what is wrong with above script? or the CDY version does not support the methods?
Thanks for Help!
hhz
Hi hhz.
Both features are available for CODESYS V3.5 SP10 or newer.
BR
Martin
Hi Martin,
Thanks!
I have test it with SP10 . Adding POU and Task config work, but Symbol config done not work.
Error diagnose hows no attribute "create_symbol_configuration()".
Is the script commands wrong?
BR.
Hi hhz.
Where did you get that command? It is wrong. See my example below.
BR
Martin
Thanks ! now it works well.
Thanks for the help on the taskconfig, but the creating of a symbol config doesn't work for me.
I have run your example code in SP10 (well, KeMotion 3.10a, but it uses CoDeSys 3.5.10 under the hood), but it gives me the AttributeError that the ScriptObject has no 'create_symbol_config' attribute.
I've checked the scriptengine.dll and did an API-dump and it has the command 'create_symbol_config', with the two bools and the Guid as parameters, but it doesn't seem to use it.
I've downloaded and installed CoDeSys 3.5.11P2 (x64) and it has no problem creating a symbol configuration from script.
Relevant part of my code:
optimizedCalculator = Guid('{0141eb75-141b-4ea1-9a8c-75f952b22a6c}')
```and giving optimizedCalculator as parameter instead of Guid.Empty does not affect the issue of the AttributeError arising. Neither does changing the bools to True.
How can this be resolved?
Edit:
I manually made a symbol configuration and I printed it. It does not qualify as a ScriptSymbolConfigObject (not even as a NoSymbolConfigObject) and using symconf.is_symbol_config gives an AttributeError. I can't do anything with it beyond basic ScriptObject-handling (such as get_name, guid, remove, etc...)
Testing the same script with a project in SP11P2 works flawlessly and it shows up as a ScriptSymbolConfigObject and the corresponding methods work with no issue.
This seems to be an issue with the implementation of CoDeSys 3.5.10 by KEBA in KeMotion 3.10a. Is there a way I can check whether this is the case by comparing some SP11P2 dll's with those from KeMotion?
I'm also wondering why the commands do show up in the API dump.
BR
Wouter
Hi Wouter.
The Scripting API for the SymbolConfig is implemented in the plug-in ScriptDriverSymbolcConfigObject. If the plug-in is installed and loaded with the profile you should be able to use it.
In CODESYS you can see what plug-ins are loaded but I don't know if there is a way in KeMotion. I think you should contact the support from KEBA and ask them for help.
BR
Martin