Installing the TwinCAT/BSD
The TwinCAT 3 Function TF6250 - Modbus TCP is available as package TF6250-Modbus-TCP
for TwinCAT/BSD in the package repository. The package can be installed via the command:
doas pkg install TF6250-Modbus-TCP
Further information about the Package Server can be found in the TwinCAT/BSD manual.
The installation stores the TwinCAT Modbus TCP Server and its default configuration file TcModbusSrv.xml
in the following directory:
ls /usr/local/etc/TwinCAT/Functions/TF6250-Modbus-TCP
After a restart of the system or restart of TwinCAT, the Modbus TCP Server is started and the configuration from TcModbusSrv.xml
is taken over.
Information about the configuration can be found in the chapter Configuration.
To adapt the configuration file, different text editors are available under TwinCAT/BSD.
Alternatively, you can use a remote access to replace TcModbusSrv.xml
with an existing configuration file.
In order for the changes to TcModbusSrv.xml
to be adopted by the TwinCAT Modbus Server, the TwinCAT system must be stopped and restarted. This can be achieved via the following command:
doas service TcSystemService restart