Pages
▼
Tuesday, January 5, 2016
Google Trends - Which Country Loves the Raspberry Pi the Most?
I often visit google.com/trends and decided to do a query on "Raspberry Pi" and here were the results:
Monday, January 4, 2016
10+ Things the Raspberry Pi Can Do As a Cheaper Replacement in Industrial Automation
The Raspberry Pi has many Industrial Control Applications and many ways to interface with current Industrial Protocols.
I am starting a Raspberry Pi Industrialized Google+ Community to gather people smarter than me to answer questions,give tutorials on Raspberry Pi and PLC interfaces, show present and upcoming raspberry pi hardware, and to show off their cool industrial projects using the Raspberry Pi.
Since I'm a python fan here's a list of Ethernet/Serial Based Protocols I've found:
I am starting a Raspberry Pi Industrialized Google+ Community to gather people smarter than me to answer questions,give tutorials on Raspberry Pi and PLC interfaces, show present and upcoming raspberry pi hardware, and to show off their cool industrial projects using the Raspberry Pi.
Since I'm a python fan here's a list of Ethernet/Serial Based Protocols I've found:
- ModbusTCP/RTU using pymodbus
- *Profinet (a GitHub link)
- S7 Protocol using snap7 python (tutorial here)
- (Siemen's S7-300,S7-1500 / S7-200,S7-1200)
- Koyo ECOM Protocol, (see my github, and here for example usage)
- DL05, DL06 PLCs
- *EtherNet/IP (Link)
* I've not tested these libraries yet.
Here are the ways the Raspberry Pi can replace or enhance your Industrial Automation Process:
- Bridging Protocols. Normally a protocol converter/bridge can cost $100+
- Modbus RTU <--> Modbus TCP,Siemens S7, Koyo ECOM, EtherNet/IP-->
- Modbus TCP <--> Siemens S7, Koyo ECOM, EtherNet/IP-->
- Any Other Serial ASCII Device <--> Modbus TCP, Siemens S7, Koyo ECOM, EtherNet/IP-->
- Cheap HMI Screen Replacement. HMI can cost $1000s and since the Raspberry Pi can integrate with several protocols it could be a decent replacement to save some $$$, £££, or €€€ depending on where you live. Of course it may take some knowledge on either HTM5 with websockets or using QT as your front ends.
- 7" Touch Screens for $50
- 15" Touch Screen Monitor for $172
- 15" Open Frame Industrialized One for $335
- Serve Sensor Data. Since many of the protocols developed in python, c++, and others include Server or RemoteIO like modes it can serve as a cheap sensor interface to a PLC. Normally a temperature sensor/transmitter either 4-20mA or 0-10v costs $100+ also. (unless you get this PT100 RTD 4-20mA for $8). What's great about the Pi is that is can handle tons of sensors and you can map it out it your programming. Keep in mind that none of these solutions are hardened for the industrial environment (although neither is the Raspberry pi....)
- Replace a Temperature Sensor $2-$15 (Link for Different Sensors For Pi)
- Replace Humidity Sensors $5 with DHT22/AM2302 (These are Temperature/Humidity Sensors)
- Tank Level Monitoring can be replaced with Distance Sensors. (List of Distance Sensors Here)
- AC/DC Current Sensors. $7 (*Requires ADC Input Add-on Module)
- Vibration Sensor $7 (*Requires ADC Input Add-on Module)
- 20+ More Analog Sensors Here
- Remote Relay I/O.
- Relay Boards. I posted a while back some relay boards that sit on the Raspberry Pi as a Hat or Module. Here are other boards with Automation in mind
- PI-Cubes has released an awesome IO package mainly used for HVAC but has great IO abilities.
(+Dalibor Zaric Nice!) - UniPi
- 2 Analog 0-10v Inputs
- 1 Analog 0-10v Output
- 14 Digital Inputs
- 8 Relays
- 16 Channel Relay Boards
- Remote Analog I/O
- 8 Ch 4-20mA Analog Input Board $50 for the Pi (also rs485, modbus)
- Ereshop 4 Ch analog input $29
0-10v or 4-20mA
- Custom Raspberry Pi. Lastly I am going to mention the customizable Raspberry Pi. Yes, Customizable! Element14 can customize the board to fit your process a little better. Adding Wifi, more GPIO, onboard Flash memory, and others.
Saturday, January 2, 2016
Raspberry Pi - SCADA - Another Video Tutorial Snap7 Python for S7-1200 PLC
Another Simple snap7 Python Tutorial
Covers creating a simple example on turning on and off a PLC output.
import snap7.client as c from snap7.util import * from time import sleep def WriteOutput(dev,bytebit,cmd): byte,bit = bytebit.split('.') byte,bit = int(byte),int(bit) data = dev.read_area(0x82,0,byte,1) set_bool(data,byte,bit,cmd) dev.write_area(0x82,byte,data) def main(): myplc = snap7.client.Client() myplc.connect('10.10.54.2',0,1) for x in range(10): WriteOutput(myplc,'0.0',x%2==0) # turns true every other iteration sleep(1) if __name__ == "__main__": main()