Network interface not available in ARSim

Hi together,

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).

Regards
Jan

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…

Best regards,

Hi Marcel,

like you mentioned when I set pIfAddr = 0 my TCP Connection is running.
Big step forward.

Now I only have to found out why I have an issue with the SimDevice.

Thank you

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…

1 Like

Hi @Fischer do you have any updates to this topic?