Menu

Unable to connect to an S7-1200

2015-08-31
2019-09-18
  • Dave Andreoli

    Dave Andreoli - 2015-08-31

    Hi all,

    I'm trying to connect to an S7-1200 using the client example provided by snap7, but I always get a "Connection Refused" error:

    +-----------------------------------------------------
    | UNIT Connection
    +-----------------------------------------------------
    | ERROR !!!
    | TCP : Connection refused
    +-----------------------------------------------------

    I can ping the PLC and tryied different combinations for Rack/Slot and ConnectionType but always failed.

    I'm on a linux box (32bit), compiled the libsnap7.so and the examples. I can run the server example and connect to it using the client example without any problems.

    Do the PLC need to be configured in some special way to accept the connection?
    I'm really a newbie in the PLC world, I'm probably missing something basic ;)

    Any suggestion are welcome

    Thanks in advance
    davemds

     
  • Dave Andreoli

    Dave Andreoli - 2015-09-21

    no one?
    I'm still not able to connect, can someone suggest some other clients to test the connection?

    Thanks in advance

     
  • Dave Andreoli

    Dave Andreoli - 2015-09-25

    Thanks,

    I finally fixed everything, the problem was totally outside the Snap7 scope... was an hardware connection problem.

    Snap7 worked like a charm at the first try, without any special configuration on the PLC side.

    Really congrats (and thanks) for this great piece of open software!
    :)

     
  • Ahmad Bilal

    Ahmad Bilal - 2019-09-17

    Hi Dave,
    I know it's too late but still can you please explain the problem you had? and the solution to the problem as well. thanks

     
  • Ahmad Bilal

    Ahmad Bilal - 2019-09-18

    Problem solved. No hardware problem instead used wireshark to get the IP where plc sending data to.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.