Siemens Simatic S5 Arduino/Adafruit operator panel

1Lynx1

Member
Join Date
Oct 2011
Location
Here
Posts
13
Might aswell post this here as it's more likely to be of interest for those who's looking into communicating with Siemens Simatic S5 PLC's.

Here's a useful thing for S5 PLC's, it's an, however simple, Arduino/Adafruit LCD display- based operator panel designed to change the value of a dataword in a datablock in the PLC, will come in handy where there's a need for frequent changes of such a value.
It's based on using the navigation keys (Adafruit 2x16 LCD display with integrated buttons) for changing the value itself and then pressing the Select button in order to send the new value to the PLC.
I used such an Adafruit display including buttons which was originally designed for a Raspberry Pi, but I adapted it to a Arduino Mega instead, which wasn't too hard given that there's only 4 wires in all (+5V, GND, SDA and SCL) and those pins are already available on the Mega as is.
Hopefully I've explained the whole shebang in the sketch, shouldn't be all that hard for whoever to adapt the code to suit your own needs.

Sources and inspiration:
AS511 protocol description : http://www.runmode.com/as511protocol_description.pdf
Converter TTY/RS232 : http://www.plcman.co.uk/232_20ma.zip (the "original" converter, the first one I replicated in order to be able to connect to a S5 PLC, works just fine!)
Schematics (of the above) TTY/RS232 converter : http://siodemka.p.lodz.pl/~kazz/rs2tty_838.gif
Serial sniffer mod (for Realterm) : https://embeddedfreak.wordpress.com/2008/08/17/rs232-serial-sniffermonitoring-circuit/
Realterm : http://realterm.sourceforge.net/ . Display data in HEX (with space), also make sure to set the correct serial protocol. I run this program on an old laptop running XP and it actually takes a little bit of fiddling back and forth with the controls/menues to make it display the data the way I want it to.
Arduino Mega / Adafruit wiring : https://learn.adafruit.com/system/a...__displays_RGB_LCD_WIRING_rev1.png?1396772126
Adafruit Pi GPIO : http://elinux.org/images/2/2a/GPIOs.png

Note: Keep TTL (which includes both the Arduino serial ports and the AS511 PLC TTY interface) completely separated from RS232 voltage levels at all times.
Mixing the two (TTL and RS232 voltages) can/will lead to destroying the Arduino's and/or the PLC's serial interfaces.
Use the schematics provided, which is based on the TTY/RS232 converter, as it works just fine both as an interface between the Arduino and the PLC and also as an interface to the serial sniffing computer running Realterm.

Good luck :)

Arduino - Adafruit.jpg Sniffer_mod.jpg
 

Attachments

  • 232_20MA.DWG
    50.3 KB · Views: 10
  • Example B_OWRITE.txt
    677 bytes · Views: 14
  • AS511_DB48_DW0.pdf
    56.7 KB · Views: 21

Similar Topics

Good Evening , It has been several years since I used Siemens Software . I’m looking to purchase the software for a Siemens Simatic S7...
Replies
4
Views
509
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
558
Hi to all, Our company does not usually use Siemens PLCs, but have a press with one in it. We are trying to change the IP address in our Simatic...
Replies
2
Views
1,076
Hi. I have 2 files where I would like to see the ladder logic differences (similar to the Rockwell compare function). I am using TISoft Siemens...
Replies
1
Views
1,275
Hi all, First time posting here. I have a Siemens Simatic S7-1200 controller that I intend to use for a small project at home. I also have a...
Replies
7
Views
2,051
Back
Top Bottom