SICK FlexiSoft, Modbus/TCP and python

Last week i tried to read and write data to and from a SICK FlexiSoft Safty controller which has a Modbus/TCP gateway. Because i had a lot of trouble to get that up and running i decided to write a few lines about i managed to solve my problems …