RemoteTwinCAT
As mentioned earlier, using AUTD3 with TwinCAT requires a Windows OS and a specific network adapter.
If you want to develop on a non-Windows PC, you can use the RemoteTwinCAT
link to remotely operate TwinCAT from Linux/macOS.
Install
cargo add autd3-link-twincat --features remote
target_link_libraries(<TARGET> PRIVATE autd3::link::twincat)
Included in the main library.
Included in the main library.
Included in the main library.
Setup
To use RemoteTwinCAT
, you need two PCs.
One of these PCs must be able to use TwinCAT
.
Hereby, this PC is referred to as the “server”.
The other PC, which is the development PC using the SDK, has no particular restrictions as long as it is connected to the same LAN as the server. H
ereby, this PC is referred to as the “client”.
First, connect the server to the AUTD device.
The LAN adapter used for this connection must be a TwinCAT-compatible adapter.
Then, connect the server and client via a different LAN.
This LAN adapter does not need to be TwinCAT-compatible1.
Next, check the IP addresses of the LAN between the server and client.
For example, let’s assume the server’s IP is 172.16.99.104
and the client’s IP is 172.16.99.62
.
Next, start the AUTD Server
on the server.
Specify the client’s IP address (in this example, 172.16.99.62
) in the Client IP address
field.

The “Server AmsNetId” and “Client AmsNetId” will be displayed on the right side of the screen, so make a note of them.
NOTE: The first four digits of the “Server AmsNetId” do not necessarily represent the server’s IP address.
APIs
In the constructor of RemoteTwinCAT
, specify the “Server AmsNetId”.
You can also specify the server’s IP address and the client’s NetId with server_ip
and client_ams_net_id
.
These can be omitted, but it is generally recommended to specify them.
from pyautd3.link.twincat import RemoteTwinCAT, RemoteTwinCATOption
RemoteTwinCAT(
server_ams_net_id="172.16.99.111.1.1",
option=RemoteTwinCATOption(
server_ip="172.16.99.104",
client_ams_net_id="172.16.99.62.1.1",
),
)
Firewall
If you encounter TCP-related errors, it is possible that the ADS protocol is being blocked by the firewall. In that case, configure the firewall to allow connections on TCP/UDP port 48898.
Wireless LAN is also acceptable.