User Account 1 1
Cart 0  0,00

Control of Ethernet modules

There are various options available for controlling our Ethernet products.

Options for programming the Ethernet interface

Our Ethernet products can be programmed in various ways. For a better overview, we have divided these into the following points:

  • IP direct method
  • Standard method (registry)
  • DEDITEC TCP/IP protocol
  • Modbus TCP protocol

Control of Ethernet modules using the IP Direct method

This method allows you to open and control our Ethernet modules directly via the IP address. Installation of the DELIB setup is not necessary.

In the following example, the module is opened via IP Direct:

DAPI_OPENMODULEEX_STRUCT exbuffer = new DAPI_OPENMODULEEX_STRUCT();

exbuffer.address = „192.168.1.1“;

exbuffer.portno   = 9912;

exbuffer.timeout  = 5000;

handle = DapiOpenModuleEx(29, 0, exbuffer, 0);

Controlling Ethernet modules using the standard method (registry)

This method opens the module using the network configuration stored in the registry.

This means that the application software does not need to know the IP address, as this is stored in the registry on the computer. This makes it easier to distribute software to different computers.

The configuration can be saved in the registry using the ICT-Tool.

In the following example, the module is opened using the standard method:

uint ModulID = 39; (s. delib.h)

uint ModulNr = 0;

handle = DapiOpenModule(ModulID, ModulNr);

Control of Ethernet modules via TCP/IP using our DEDITEC Ethernet protocol

If necessary, you can program your own control system yourself. The protocol that describes communication via TCP/IP is fully documented. Control is register-based. A communication protocol has been created for this purpose, which is used to address the module's registers and thus execute read or write commands. The “Protocols & Register Assignment” manual describes the transmission and reception frames for communicating with our Ethernet modules.

 

Control of Ethernet modules via our Modbus TCP protocol

Modbus TCP is a protocol based on TCP/IP that is used for communication between different devices. It allows data to be read and written via so-called registers and bits. Standardized function codes are used for this purpose, such as:

General register allocation

Modbus
register
(dez)
Data type Access Data
size
(Bit)
Description
0 ... 9999 Coil write / read 1 Writing and reading back digital outputs
10000 ... 19999 Discrete Inputs read 1 Read digital inputs
30000 ... 39999 Input Register read 16 Read holder register
40000 ... 49999 Holding Register write / read 16 Write and read back registers

Control of Ethernet modules via Modbus TCP

Our modules can be controlled via the Modbus register protocol for quick and easy integration. This protocol allows you to conveniently read and write values, switch digital outputs, or query inputs. The complete protocol is available for download.

Example:

// Writes the digital outputs of channels 1-16
MASTER.WriteMultipleRegisters(SLAVE_ID, 0x0420, 0x03);

// Reads the values from channels 1-16
registerValue = MASTER.ReadHoldingRegisters(SLAVE_ID, 0x0420, NUMREGISTERS);

 

My cart
Your cart is empty.

Looks like you haven't made a choice yet.