Skip to content

Speed and position profile generator made in Python

License

Notifications You must be signed in to change notification settings

wernerpaulin/PyProfGen

Repository files navigation

PyProfGen

Speed and position profile generator made in Python
Link to Repository: https://github.com/wernerpaulin/PyProfGen

GitHub issues GitHub forks GitHub stars GitHub license


Logo

PyProfGen

This profile generator is written in Python® 3. It generates a velocity and position profile depending on set parameters like target position, velocity and acceleration.

Table of Contents
  1. About The App
  2. Getting Started
  3. Communication
  4. Data Management
  5. Information
  6. Legal Statements

About The App

Gallery

Gallery 1 Gallery 2 Gallery 3 Gallery 4

Features

  • 100ms scan interval
  • Generates a velocity and rotary speed profile
  • Generates position profile
  • Dynamic deceleration ramp calculation in position control mode

Operating Modes

  • Velocity control
  • Absolute position control
  • Relative position control
  • Automatic mode: cases the profile generator to initiate relative movements
  • Stop movement

Built With

Technology Description
Python® asyncio for concurrent execution of coroutines
Eclipse Paho® MQTT client
Docker® Container technology

Getting Started

Find this app in the App Store and use it in a machine.

Prerequisites

This app requires a MQTT broker which can either run as an app or on a different host but in the same network of the Runtime.

Usage

  1. This app is per default connecting to the Eclipse Mosquitto MQTT broker app on the Runtime. If you choose to use another broker change the environmental variable "MQTT_BROKER_IP".
  2. This app is per default connecting to the broker via port 1883 which is the default port for MQTT. If you have multiple brokers running in parallel each of these brokers requires a separate port. Please set the environmental variable "MQTT_BROKER_PORT" accordingly.
  3. An easy way to control this app is using the Node-RED app.

Communication

Interfaces

The app publishes the following MQTT topics:

Topic Value Example
pyprofgen.lenze.mosaiq/parameteronconnect "{"setDistance": 200, "setVelocity": 300, "setAcceleration": 200, "maxPosition": 1000000000, "minPosition": -1000000000, "maxVelocity": 500, "maxAccleration": 1000.0, "maxMotorRotarySpeed": 2000.0, "automaticCycleStopTime": 1.0}"
pyprofgen.lenze.mosaiq/monitor "{"actVelocity": 0, "actPosition": 0, "actRotarySpeed": 0.0}"
pyprofgen.lenze.mosaiq/parameter "{"setDistance": 200, "setVelocity": 300, "setAcceleration": 200, "maxPosition": 1000000000, "minPosition": -1000000000, "maxVelocity": 500, "maxAccleration": 1000.0, "maxMotorRotarySpeed": 2000.0, "automaticCycleStopTime": 1.0}"
pyprofgen.lenze.mosaiq/command Stop: "MC_MoveStop"
Move relative: MC_MoveRelative
Move absolute: MC_MoveAbsolute
Automatic mode: MC_LE_AutomaticMode

Published Ports By This App

Container Port Protocol Description
n.a.

Please note: Ports can be mapped to different host ports in the machine settings

Data Management

Environmental Variables

Environmental variables are used to initialize or define a certain functionality of an app and can be changed in the machine settings:

Variable Default Value Changeable by User Description
MQTT_BROKER_IP localhost yes Hostname or IP address of MQTT broker
MQTT_BROKER_PORT 1883 yes Port used by the MQTT broker
MQTT_BROKER_KEEPALIVE 60 yes Maximum time that this app does not communicate with the broker

Volumes

Mount points are access points to volumes (like paths) provided to the app to read and write data:

Mount Point Default Data Changeable by User Description
n.a.

Information

Developer Compatibility Size on Runtime Copyright License
Lenze SE Requires Runtime 1.0 or later 61.7 MB © 2021- Lenze SE MIT License. See LICENSE for more information.

Legal Statements

  • "Python®" and the Python logos are trademarks or registered trademarks of the Python Software Foundation.
  • "Eclipse®", "Mosquitto®", Paho® and the respective logos are trademarks or registered trademarks of the Eclipse Foundation.
  • "Docker®" and "Docker Hub®" are trademarks or registered trademarks of Docker.

About

Speed and position profile generator made in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published