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:

Web Search

Image Search


Video Search



News Search


Google Shopping Search

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:
  1. ModbusTCP/RTU using pymodbus 
  2. *Profinet (a GitHub link
  3. S7 Protocol using snap7 python (tutorial here)
    • (Siemen's S7-300,S7-1500 / S7-200,S7-1200)
  4. Koyo ECOM Protocol, (see my github, and here for example usage)
    • DL05, DL06 PLCs
  5. *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. 

  • Remote Relay I/O.


  • Remote Analog I/O


  • 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()