Skip to content

songyantao0617/python-startersguide

 
 

Repository files navigation

Python-Startersguide

This guide is meant to teach you the basics of Python on PLCnext. We'll learn how to run your Python code, build applications that can access the data-variables from our PLCnext Engineer project. We can access the variables in two ways, each with their own advantages and disadvantages. The REST interface can be considered less cumbersome to set for a few variables. Accessing the variables on the OPC UA server is a bit more difficult to set up but supports a lot more functions.

Prerequisites

  • For this guide you'll need at least a minimal expierence with PLCnext Engineer, PLCnext and Python.
  • Please have an AXC F 2152 with firmware 2021.0 LTS with an internet connection ready
  • Please download the provided PLCnext Project to your PLCnext controller

Setup script

We'll use a few different compontents on the controller, you can use installation scripts in this folder to set up pip3 (bootstrapped with python), balena-engine en download the different containers.

Examples

To get you started you can follow the example scripts. The instructions can be found in the directories of the examples. Start with Hello-world and go from there!

PLCnext Engineer

The PLCnext Engineer project we use in this guide as a demo-project

The first steps

Start by opening a shell session to your controller and clone this repositry to your controller. Then navigate to the example folder and start trying out the examples!

git clone https://github.com/pxcbe/python-startersguide.git

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.2%
  • Shell 2.8%
  • Dockerfile 1.0%