PiLC - S7 PLC for Raspberry Pi

http://bues.ch/cms/automation/pilc.html

PiLC is an Awlsim based PLC (programmable logic controller) package for the Raspberry Pi.

PiLC based on the Raspbian distribution and runs on the Raspberry Pi 1B+, 2, 3 and Raspberry Pi Zero devices.

PiLC supports digital I/O (I/Q, E/A operands) on the Raspberry GPIO. The BCM-GPIO-I/O is handled via Awlsim's rpigpio hardware module. See the example project raspberrypi.awlpro for a usage example.

Experimental support for PROFIBUS-DP is provided via the pyprofibus hardware module. This can be used to read data from and write data to PROFIBUS-DP slaves via the PiLC PROFIBUS-DP header.

Image preview of pilc_hat_front.jpg Image preview of pilc_rtc.jpg

Just extract the SD-card image and raw-copy it to an SD-card.
Note that it does not work to copy the image into a pre-formatted SD-card's filesystem. The image brings its own partition table and filesystem, so it needs to be copied directly to the raw SD-card.

On a Linux host this can be done as follows:

7z x pilc-x.y.img.7z                       # Extract the image using 7-Zip
dd if=pilc-x.y.img of=/dev/mmcblk0 bs=8M   # Copy the image to the SD card

Where x.y is the PiLC version number and /dev/mmcblk0 is the raw SD card device.
Note that on some systems you will have to use /dev/sdX instead of /dev/mmcblk0.

A more detailed description of the installation of SD card images can be found on the RaspberryPi site for Linux, Windows or Mac operating systems.

Image preview of pilc_et200s.jpg

Communication via PROFIBUS-DP can be achieved using the pyprofibus PROFIBUS software stack and the corresponding Awlsim hardware module.

In the photo to the left hand side you can see a prototype setup of a Raspberry Pi 2 driving the digital inputs and outputs of a Siemens ET 200S PROFIBUS-DP slave. The Raspberry Pi controls the ET 200S via the PiLC example AWL program that runs in Awlsim.

The PiLC scripts are part of Awlsim. A PiLC SD-card image can be built by running the pilc/pilc-bootstrap.sh script from the Awlsim package. Note that pilc-bootstrap.sh does only run on a Debian Linux host system (or another system that has debootstrap).

Latest bleeding edge awlsim can be downloaded using the Git version control system as follows:

via https:
git clone https://git.bues.ch/git/awlsim.git
or via http:
git clone http://git.bues.ch/git/awlsim.git
or via git:
git clone git://git.bues.ch/awlsim.git

or by downloading the awlsim snapshot archive.
To browse the Git repository online, go to the git web interface.
A mirror of the repository is available on Github and on Bitbucket.
If you want to contribute to awlsim, please read the contribution guidelines first.

  • Q: How is PiLC pronounced?
    A: It's pronounced like the English letters P L C. So just omit the i when pronouncing PiLC.
    I am fully aware that this pun does not really work in English. But a native German speaker might get it. :)

Copyright (C) Michael Büsch
Licensed under the terms of the GNU General Public License version 2 or (at your option) any later version. See the sourcecode for details. 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值