FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
05-08-2020 12:15 AM - last edited 2 weeks ago by aa-dc-prod2
By installing the Python app, the interpreter stays present on the ctrlX-CORE.
Since the functionality had been upgraded and its interfaces changed incompatible - latest created script files (maybe Tiger-generated form promoter-package) are not executable anymore. The attached Interpreter description will offer the info needed to update the former script coding.
The upcoming script-manager-functionality/app is supposed to provide an easy and intuitive way to place and execute scripts on the ctrlX-CORE. Meanwhile we need to get familiar with interims solution.
Goal of the paper is to get familiar with the script-handling-workaround, which will be dispensable soon.
Transfer the script files using the Configuration interface.
a) Use the Configuration-Website to download the config to the PC.
b) Unzip and add the python script file(s) and zip again.
c) Create a new/empty configuration by clicking + and upload the modified zip file.
d) The prepared configuration gets active by clicking the Hook-button – which registers the *py file(s) at the Ubuntu OS
(do not care about the storage location – you may not find easily viewing with SSH/MobaXterm).
e) Get the authentification token first
f) Create a new script instance by sending a similar Rest-payload.
g) Finally the script can be started by sending the payload containing path and filename of the related script.
POST |
https://192.168.1.1/automation/api/v1.0/script/instances/CustomerScript1/cmd/file
|
with the payload:
{"name":"/var/snap/rexroth-automationcore/common/solutions/activeConfiguration/PythonBsp2.py"}
Solved! Go to Solution.
10-14-2020 03:04 PM
I tried to do this and sucessfully created an instance under script but when I send the post request to cmd/file of the instance with the file path I got the error "DL_CREATION_FAILED" with code 404. I am trying this on a virtual CORE and I saw with ssh that in the directory "/var/snap/rexroth-automationcore/common/solutions" I do not have a directory of "activeConfiguration", in my case this directory is completely empty even though I did active my configuration. I saw that my added script file was stored in the "/var/snap/rexroth-solutions/common/solutions/activeConfiguration" directory. But even when I try this path as the pay load I still get the same error.
10-19-2020 10:09 AM
Hello,
the Failure 404 assume that the 'URL-Path' is not correct.
Assuming you added as well the Authorization Token in the https Rrequest do run the script (that mistake is related to Failure 401),
I want you to check the typing please.
I just tried it with the ctrlX CORE virtual and it worked fine. I guess you included the 'AuthentifcationToken' as well in the 2nd https request to run the script file.
Please return if the info did not help to solve the topic.
Bye Jens
04-14-2021 09:51 PM - last edited on 04-20-2021 01:44 PM by CodeShepherd
Thanks for the information. The scripts runs fine when the file is located in the root.
I was trying to run files located in the tiger folder and me a 500 error.
{"name":"/var/snap/rexroth-automationcore/common/solutions/activeConfiguration/scripts/bosch/tiger/ReadWritePLC.py"}
04-20-2021 12:11 PM
11-03-2022 08:52 PM
Is there any update to this process? I am not seeing the Configurations menu on RM22.07.
11-11-2022 12:32 PM
The button to view the configuration (app data) moved in the top bar and is a folder with a gear in it: