ARM (Linux)

 

This is the most common architecture for the small cards linux based. Most likely you should be able to run Snap7 in almost all of them.

The reference packet for these devices is snap7-iot-arm

The tests were made with:

Descrizione: Descrizione: H:\img\pi3.jpg

Raspberry PI 1 Rev B

Raspberry PI 2

Raspberry PI 3

Descrizione: Descrizione: H:\img\pcduino.jpg

PcDuino

Descrizione: Descrizione: H:\img\cubieboard.jpg

CubieBoard

Descrizione: Descrizione: H:\img\beaglebone.jpg

BeagleBone Black

Descrizione: Descrizione: H:\img\udoo-quad.jpg

UDOO Quad

Descrizione: Descrizione: H:\img\mele a2000.jpg

Mele A2000

 

 

Programming

 

Regardless of the developing tool that you want to use for your programs, Snap7 library must be compiled with the GNU toolchain. You can choice either to compile it yourself or to use the deployed libsnap7.so.

 

Build Snap7

To build Snap7, the GNU toolchain must be present into your device. If you don’t find it you have to install it with the package manager of your distro.

To see if it is present just type g++ --version .

For Debian derived distro you can execute sudo apt-get install build-essential to download and install the toolchain.

 

Raspberry 1

Go to /build/unix and execute sudo make –f arm_v6_linux.mk install

The compilation must be completed with 0 Errors and 0 Warnings.

 

All other cards

Go to /build/unix and execute sudo make –f arm_v7_linux.mk install

The compilation must be completed with 0 Errors and 0 Warnings.

 

Developing your programs

I tested these devices with C and C++ and FreePascal/Lazarus where available. but you can program them also using other languages like Java, Python or Node.JS. Please refer to Snap7 documentation for them.

There are two set of examples available, to test them:

Go to /examples/cpp/arm_v7-linux/ and execute make all .

To compile the examples for Raspberry 1 change v7 to v6 .

To test the plain c examples, change the folder from cpp to plain-c .

 

ARM (Windows)

 

We are speaking of Windows 10 IoT.

To work with this OS I suggest you to look at Sharp7 project which allows you to program in .NET UWP.