/
Revolution Pi Python Introduction

Revolution Pi Python Introduction

A quick and easy introduction to how to use the RevPi with the Python programming language.

Why Python?

LED switch with Python

  • Works like writing a "1" to the location in the process image where the RevPiLED is located

  • Where is the RevPiLED located in the process image?

  • Run the following command

piTest -v RevPiLED
  • At offset 119

Read or write strings

The devices in PiCtory usually provide byte access to the data. You can test this example by using a Virtual Device 32 Bytes in PiCtory.

We read out the offset of “Output_1” variable. This may vary on your configuration, so be careful here.

Python example code

Verify the contents of the process image with piTest

RevPiModIO

  • Library developed from the RevPi community

  • Allows easy use of symbolic names from PiCtory

  • Installation not necessary, already on the device

  • Documentation

Switch the LED with RevPiModIO

 Python I/O Bit Mirror

Video Tutorials

Also, take a look at our video tutorials about Python

Besides, take a look at the following video tutorials

Verwandte Artikel

Related content

GATEWAY Module for Sercos III FAQ
GATEWAY Module for Sercos III FAQ
Read with this
Node-RED Tutorial
Node-RED Tutorial
More like this
GATEWAY Module for PROFIBUS FAQ
GATEWAY Module for PROFIBUS FAQ
Read with this
Revolution Pi Questions And Answers
Revolution Pi Questions And Answers
More like this
How do I setup my own time server
How do I setup my own time server
Read with this
Revolution Pi PiControl
Revolution Pi PiControl
More like this