Closed celevra closed 5 years ago
Do you mean with an S7-1500 PLC programmed with any version of TIA Portal? Yes, as long as you use slot 1 in nodeS7, as long as you have GET/PUT enabled in the PLC configurations (I think it's under security, connection mechanisms) and as long as you use data blocks where "Optimized" has been turned off. (Right click the data block and go to attributes)
Is there anything else to configure? I got an project for a S7-1500 PLC and started the simulation of the CPU. But I can't get a successful connection:
[11819,478408411] { host: '127.0.0.1', port: 102, rack: 0, slot: 1 }
[11819,481145051] Connection cleanup is happening
[11819,485210458 127.0.0.1 S1] Attempting to connect to host...
[11820,486824089 127.0.0.1 S1] We Caught a connect error ECONNREFUSED
[S7] Could not connect to 127.0.0.1:102 on rack:0, slot:1
Did you enable PUT/GET access as @plcpeople stated?
And IP 127.0.0.1 will never be your S7-1500. That's the loopback address of your computer.
Yes, PUT/GET is enabled. I thought the simulator uses localhost. Where do I get the IP of the simulated PLC?
EDIT: After restarting my system and checking the port it should be available at localhost. Now I get the following response:
[13787,546523983] { host: '127.0.0.1', port: 102, rack: 0, slot: 1 }
[13787,550368966] Connection cleanup is happening
[13787,557102575 127.0.0.1 S1] Attempting to connect to host...
[13787,559866767 127.0.0.1 S1] TCP Connection Established to 127.0.0.1 on port 102
[13787,560405385 127.0.0.1 S1] Will attempt ISO-on-TCP connection
[13787,561570168 127.0.0.1 S1] Using rack [0] and slot [1]
[13787,564120157 127.0.0.1 S1] ISO-on-TCP connection DISCONNECTED.
[S7] Could not connect to 127.0.0.1:102 on rack:0, slot:1
PLCSIM doesn't accept external S7 connections - you can't use other 3rd party HMI packages with PLCSIM either. For that you would need PLCSIM Advanced.
You are seeing the TCP port being available, but PLCSIM doesn't accept the S7 connection once the TCP connection is established.
I read about the tool NetSimPLC. It publishes the internal simulation IP to connect from an external computer. Do you know this tool? Would it help in our use case?
I used this tool years ago and it worked well for testing - I thought it only worked with Step 7 <= 5.5 and S7-300/400 but reading now, it looks like it works with TIA and a simulated S7-1200/1500. It looks like you might want to try a port other than 102 or start the NetToPLCSIM application first to get it to claim port 102 before anything else does. Please let us know how it goes, I may try this too as it would be useful if it works.
It worked, thanks a lot for your help!
Steps to get this working:
Thanks for the update and procedure for others. I will close the issue now since it seems resolved, but if anyone has anything to add about getting nodeS7 working with PLCSIM Advanced, the info is welcome.
Hi,
is it also possible to communicate with Tia Portal 1500?
regards
Celevra