when I simulate a X20CP1586 with ArSim on my PC I can’t communicate with the PLC.
If found out that when I initialize the Tcp connection with the FB “TcpOpen” the error 32612 “tcpERR_INTERFACE - Invalid interface address” occurs.
So I checked the Interface name. I used the interface “IF2” to get the ip with “CfgGetIPAddr”. Then I took this ip for the “TcpOpen”-FB.
How to setup a TCP connection in ArSim? Are there any limitations on ArSim?
Why is the code that runs on real hardware not running on ArSim?
I also found out that when I want to setup an SimDevice, the SimDevice couldn’t startup. Maybe the same reason.
The log says “PnPManager - Couldn’t start AR I/O Management master - IF2.ST1”
You can also answer in germany (my native language).
If you want to communicate with the PLC only locally, 127.0.0.1 will be fine. For TcpOpen you just can leave pIfAddr = 0, so it listens on all interfaces.
If you want to connect to the ARSim from another network client, use 0.0.0.0 for the ARSim IP address.
PLC Configuration → Simulation → IP address
I can’t really help you regarding the SimDevice, since I never used it…
What is your usecase? I would’t really recommend using the IO switch board if that is what you are trying to do… Too much effort for little benefits… imho…