Dewesoft NET Interface

What is the Dewesoft NET interface?

The Dewesoft NET interface uses standard TCP/IP sockets for communication between a measurement unit and a client. A Dewesoft measurement unit needs to be pre-configured before a client can connect to it.

Measurement Unit Configuration

When a Dewesoft measurement unit is defined as a Slave measurement unit, it starts listening to incoming connections on the TCP port number 8999. This property needs to be set only once as Dewesoft will remember it afterwards.

The option Accept events from clients in Options - Settings - Advanced - NET has to be enabled.

If a firewall is active on the measurement unit, it is important to either open port number 8999 for incoming connections or disable the firewall. If the client communicates with the measurement unit through a router, the firewall on the router also needs to be properly configured.

Client Configuration

The simplest possible client is a telnet software which comes with most Operating systems (Windows, Linux, etc…).

To connect to Dewesoft running on a measurement unit in MS Windows, enter telnet computername 8999 in Command prompt. Computername is either the DNS name or the IP address. In Windows, you can also use NETBIOS computer names, since NETBIOS names are resolved to DNS/IP names (only inside LAN).

If the connection is successful, Dewesoft will respond with a welcome message.

After that, the client software can send requests to Dewesoft, which will respond to most requests with either a +OK message, meaning the request was accepted, or a +ERR message, meaning the request was denied.

Dewesoft NET clients have two modes of operation: Control or View mode. When a client connects to a measurement unit, it is automatically set to View mode. When operating in View mode, a client can only issue request which do not alter the state of Dewesoft on measurement units, e.g., it cannot start or stop acquisition, load a setup, etc. However, a client can issue requests which return the state of Dewesoft and it can also capture live data from the measurement unit, but only if acquisition is already running.

If the client needs full control of Dewesoft, it needs to switch to Control mode. This can be done by sending a SETMODE 1 command. Only one client at a time can be Control mode. If another client is already in Control mode, the request will fail. A client can switch to View mode with a SETMODE 0 command. An unlimited number of clients can be connected in View mode.

Capturing Live Data From a Measurement Unit

You can get a list of all available channels with the LISTUSEDCHS command. A multiline response from Dewesoft is always enclosed inside +STX and +ETX tags. The format of binary data is described on the Channel information page.

When capturing data from a unit, an additional TCP data port is needed which the client needs to open. After that, send the STARTTRANSFER portnumber request and the Dewesoft measurement unit will try connecting to the data port on the client computer.

To initiate transfer, send a PREPARETRANSFER command with a list of channels from which you want data. Multiline inputs should be enclosed in /STX and /ETX tags. After this, Dewesoft will start sending binary data.