Host name setting for ARSim

Dears

I am simulating a connection between ARSim(AS6.3) and HMI application(Movicon.NExT) by OPC UA

Now I could browse OPC tags through UaExpert using IP address of ARSim.

Unfortunately the HMI application uses hostname to connect the OPC tags(of couse it is possible to change to IP address but it is huge work as the application is done)

I checked carefully the setting of ARSim but can’t find the related setting.

It seems ARSim doesnot support hostname?

Hi @jimlgb ,
@jan.rehak, I guess, was facing similar issue last year: Opc_Ua_any device unable to connect to a server using Hostname - Ask Questions / B&R Software & Runtime - B&R Community

=================
We have so many posts, it’s hard to find the one where we already studied the case.

I asked AI some help: “Can I connect my client to B&R CPU server by OPC UA with hostname and not with IP address?”

Yes, you can connect your OPC UA client to a B&R CPU server using a hostname instead of an IP address

To make this work seamlessly, both the server network configuration and the client-side system name resolution must be configured properly.

so I have found the link to Jan’s post.

=================

Additional notes from AI how to do that, of course we have to verify the information, but as you see below there is a keyword “DNS”, maybe we didn’t think about that when we studied the problem…:

Required Configuration Steps

  • Activate DNS on the B&R CPU: Open your B&R Automation Studio project. Navigate to the CPU configuration settings. Ensure that the DNS configuration is enabled. This allows the Automation Runtime to interact correctly with network name resolutions.
  • Match the DNS Suffix: The client machine and the B&R server should share the same DNS suffix, and it must match your local network’s DNS.
  • Assign Unique Hostnames: Verify that the client computer and the B&R CPU have completely different hostnames assigned to them to prevent identity conflicts on the network.
  • Use a Local Hosts File (Workaround): If you do not have a dedicated DNS server running on your industrial network, you can bypass this by editing the local hosts file on your client computer. Add the line [PLC_IP_Address] [PLC_Hostname] (e.g., 192.168.0.1 br-automation) inside the C:\Windows\System32\drivers\etc\hosts file.
  • Endpoint URL Syntax: When connecting from your client, specify the endpoint string using the syntax opc.tcp://[hostname]:4840.

=================

Finally I it warms us on possible issue due to “Certificate” or “Device Drivers”

Potential Pitfalls to Watch For

  • Certificate Validation Errors: If you are using encrypted or secure endpoints, your client may throw an ERR_CERT_COMMON_NAME_INVALID error. This happens if the B&R CPU’s security certificate was generated explicitly bound only to its IP address rather than its hostname. You will need to regenerate the certificate in Automation Studio to include the server domain name/hostname.

  • OpcUa_any Device Drivers: If your client is actually another B&R PLC utilizing the OpcUa_any driver block, standard hostname parsing can sometimes fail depending on your Automation Runtime version. In these scenarios, B&R recommends switching over to connection function blocks from the standard AsOpcUac library (such as those in OpcUa_Sample) instead of using the raw OpcUa_any hardware tree configuration.

    Ciao
    Valerio

Dear Valerio
Thx for your prompt reply, but my case is different, hard plc could be accessed by HMI application with hostname, but i am wondering whether ARsim could have a hostname, i can only set IP address for it, and the configuration ID is not hostname.

获取 Outlook for iOS

General

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Hi,

Did you try yo set ip address of ArSim to 0.0.0.0 and use your laptop hostname?

Regards,
Florent

Dear Florent
There are 8 plc with different hostname and IP address in my case, so it won’t work.
So my question is whether ARsim could be set a dedicated hostname, thx.

获取 Outlook for iOS

General

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Second question to AI:

can B&R arsim have an hostname?

No, B&R ARsim does not have its own unique, independent network hostname. Because ARsim (Automation Runtime Simulation) runs as a native Windows process (AR000.exe) on your development PC, it shares the exact same hostname and network stack as your host Windows computer.

If external devices or software need to connect to your ARsim instance using a hostname instead of a raw IP address, they must target the Windows computer’s hostname.

How to reach ARsim using a Hostname*

To successfully direct traffic via a hostname to your ARsim target, configure your system using these steps:

  1. Bind ARsim to the Network: By default, ARsim only listens on the local loopback address (127.0.0.1), making it invisible to outside networks. To open it up, navigate to your CPU Configuration in Automation Studio and change the Simulation IP Address to 0.0.0.0. This tells ARsim to bind to all available network interfaces on your PC.
  2. Find your Windows Hostname: Open the Windows Command Prompt on the simulation PC and type hostname.
  3. Connect from External Clients: When setting up external software (such as an OPC UA client, SCADA system, or another PLC), use your Windows PC’s hostname as the target address

I hope it helps
Ciao
Valerio

Dear Valerio

Thanks very much for you kindly support, actually Florent gave me the same suggestion, thanks again.

You saved my time to make the test, and now the only solution seems is on HMI application because I am using 8 PLC.