(Optional) Configure Adapter Windows Service
Select the adapter procedure needed for your project:
To Install the Adapter as a Service for a C# Adapter
- Start the Task Manager, and select the Processes tab.
- Right-click the ThingSharp [adapter name] process, and click End Task.
- Right-click the Command Prompt, and click Run as Administrator.
- Change to the directory where the adapter is installed—for example [drive:]\ProgramFiles (x86)\Siemens\[adapter name]\Bin.
NOTE: Depending on how the adapter was installed, the path may or may not contain a Bin directory.
- Enter the following command to set the new IP address, port number, and Windows service:
[adapter name].exe -ip:xxx.xxx.xxx.xxx -port:xxxx -wsport:xxxx
-service
To Install the Adapter as a Service for a Java Adapter
- Install the third-party tool called winsw. For more information, see https://www.bhupeshsingh.com/2019/08/how-to-run-any-java-application-as-windows-service.
- Create the winsw.xml file that describes your service:
<service>
<id>MyService</id>
<name>My Service App</name>
<description>Java adapter windows service</description>
<executable>java</executable>
<arguments>-myadapter.jar</arguments>
</service>
- From the command line where you installed winsw, add the service.
- Run
winsw.exe install
.
NOTE: For additional configuration options, run the adapter from the Command Prompt and enter the following: [adapter name] -?