1 Reply Latest reply on Feb 26, 2018 4:47 PM by sraposo

    Problems with PI writing in a Siemens S7-1200 PLC


      Hello Everyone!


      I have an application where I need my PI to write in S7-1200 PLC (CPU 1214C) registers through Modbus interface every time some tags are updated (they are in the same scan class).
      The read and write tags and interface are perfectly configured, and I'm using MB_Server block on PLC side, and it works, but the PI write tags are getting stuck for a while (couple of hours) at "I/O timeout" very often (around 1 day). Looking at some logs I see some device timeouts for the PLC, although it remained on and running the program all the time.
      Anyone had same issue and/or has some light to help me make this communication steadier??

        • Re: Problems with PI writing in a Siemens S7-1200 PLC

          Hi Mateus,


          I/O Timeout usually indicates that the interface is having an issue communicating with the data source.


          I think a good next step for you would be to enable I/O tracing. You can find the info in the user manual: https://techsupport.osisoft.com/Downloads/File/6f9b132a-2055-4d20-b7a9-4f72fd624293


          Once the issue happens again, you should have more information in the SDK Logs: https://techsupport.osisoft.com/Troubleshooting/KB/3248OSI8/


          It might also be worthwhile to setup a script that monitor ping responses (if enabled in your environment) to make sure the issue isn't at the network level.


          You can do this with a simple .bat or .ps1 script. Example .bat:


          @echo off

          set/p host=Target address:

          set/p size=Packet size:

          set pingfile=Ping_%host%.txt


          echo Target address = %host% >%pingfile%

          for /f "tokens=*" %%A in ('ping %host% -n 1 -l %size%') do (echo %%A>>


          for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 -l %size%') do (

              echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%pingfile%

              echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A

              timeout 1 >NUL

              GOTO Loop