cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Python programming and ctrlX CORE Python Runtime App

PedroReboredo
Community Moderator

Python programming and ctrlX CORE Python Runtime App

Dear Community,

is it possible to program an app using Python? If yes, what is the purpose of providing the ctrlX CORE Python Runtime App?
For sure, I'm just asking for a friend 🙂

Thanks in advance.

Regards, Pedro

5 REPLIES 5
JohannesA
Established Member

Re: Python programming and ctrlX CORE Python Runtime App

Hi Pedro,

the support of Python in the SDK is still in preparation, target date is about March 2021.

 

Regards, Johannes

jochen-scheib
Established Member

Re: Python programming and ctrlX CORE Python Runtime App

Hi,

Already today it is possible to interpret and run python scripts using the "Python" app on the ctrlX CORE. The scripts can be easily deployed as part of the configuration.
AndyL
Member

Re: Python programming and ctrlX CORE Python Runtime App

Hi,

Maybe the following thread could be of interest to you [How to run Python scripts on ctrlX CORE]

https://developer.community.boschrexroth.com/t5/ctrlX-CORE/How-to-run-Python-scripts-on-the-ctrlX-CO...

PedroReboredo
Community Moderator

Re: Python programming and ctrlX CORE Python Runtime App

Thanks for your answers!

You are now officially part of the developR series 9.

Thanks AndyL for the link to the Python how to! We identified the question as a possible open question to include in the series regarding our ctrlX AUTOMATION Community.
One funny aspect: As we entered the subject line, our intellisense already proposed exactly this How To 🙂

Regards,
Pedro

 

 

bostroemc
Established Member

Re: Python programming and ctrlX CORE Python Runtime App

A simple Python app that accesses the data layer via the REST API is available here: https://github.com/bostroemc/webconnector-lite

The app polls a (fixed) PLC variable, then pushes the value out a WebSocket where it may be read by a web page.  (A sample html page with the required WebSocket client is included.)

To build the app for the ARM-based ctrlX CORE, I used the build tool supplied by Canonical: https://snapcraft.io/

Note that the PLC variable TYPE is not fixed, and may be any simple type (DINT, REAL, etc.) or even an array of these simple types.

Until Python is fully supported by the SDK, access via the REST API might be a good option for some applications.  (Note that this sample app is fully self-contained does not require that the "Python app" be installed on the CORE.)

 

 

 

 

 

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist