|
<< Click to Display Table of Contents >> Navigation: Components > Driver > Modbus Master > Channel |
Import / Export
This function simplifies the creation of channels, as each channel does not have to be created individually in the channel editor.
It is important that the document to be imported is an XML file with the correct formatting. The easiest way is to create a channel, export it, edit/add to it and then import it again.
Example XML file structure:
<?xml version="1.0" encoding="utf-8"?>
<ModbusChannelList>
<ModbusChannel Name="FC3_22_BIT" Id="31" DeviceId="10" Address="25" Count="1" ValueType="BIT" Function="SPECIAL_HOLDING_REGISTER_RW_BIT_ACCESS" Factor="1" Offset="0" Unit="" NullOnReadError="False" TriggerWriteAll="False" StaticRegister="False" MinValidValue="0" MaxValidValue="0" />
<ModbusChannel Name="FC3_BIT" Id="25" DeviceId="10" Address="27" Count="1" ValueType="BIT" Function="SPECIAL_HOLDING_REGISTERS_RO_BIT_ACCESS" Factor="1" Offset="0" Unit="" NullOnReadError="False" TriggerWriteAll="False" StaticRegister="False" MinValidValue="0" MaxValidValue="0" />
<ModbusChannel Name="FC6_BIT" Id="21" DeviceId="10" Address="26" Count="1" ValueType="BIT" Function="SPECIAL_HOLDING_REGISTER_WO_BIT_ACCESS" Factor="1" Offset="0" Unit="" NullOnReadError="False" TriggerWriteAll="False" StaticRegister="False" MinValidValue="0" MaxValidValue="0" />
...
...
</ModbusChannelList>
Channels
Device name |
Device ID [0 - 247] |
Function |
Register Address [decimal] |
Data type |
Number of registers |
Factor |
Offset |
Min valid value |
Max valid value |
Unit |
Send zero on read error |
Triggers "write all" |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Channel001 |
1 |
Read coil (1) |
0 |
Bit |
1 |
1 |
0 |
0 |
0 |
|
|
|
... |
|
|
|
|
|
|
|
|
|
|
|
|
Columns marked with (*) can be edited together. The rows must be selected for this.
Name |
Description |
|---|---|
Name |
Name of the channel which is displayed in the Dynamic folder in the communication window. Subfolders can be created with #, whereby the text before # is the folder name and the text after # is the data point name. This allows data points to be summarised. Example: Current#L1; Current#L2; Current#L3 - A Current folder containing the data points L1; L2; L3 appears in the Dynamic folder. |
Device ID [0 - 247] |
Device ID assigned in the device settings of the Modbus device, each device must be assigned its own ID so that it can also be uniquely identified. Not applicable for most Modbus-TCP connections. A broadcast is sent to all devices via ID 0. |
Function |
Various function codes are used to query values. The code is normally given as text and number in brackets. The number code is always unique. The required function code must be selected according to the product manual. |
Register Address [decimal] |
Address of the start register, from here the values are read or written. The address must be given in decimal, in the assignment tables these are often given in HEX. The conversion can be done e.g. via the Excel function "=hex2dec" or the Windows computer (view\programmer). |
Data type |
The specific data type for the registers, inputs, outputs, etc. to be read out. If the data to be read out is represented in several registers, the data type must be adapted accordingly. |
Number of values |
Number of registers to be queried (mostly for texts). |
Factor |
The read-out values can be directly provided with a factor. The factor also applies to writing to the registers. From master to slave is divided, from slave to master is multiplied. |
Offset |
An offset can be set for the result, e.g. for temperatures. |
Min valid value |
Setting to output only permissible values between this minimum value and the maximum value. Invalid values are not output at the data point (only at the diagnostic output). If Min and Max value is 0, the limit value is ignored. The output at the data point also depends on the setting"Send zero on read error". |
Max valid value |
Setting to output only permissible values between the minimum value and this maximum value. Invalid values are not output at the data point (only at the diagnostic output). If Min and Max value is 0, the limit value is ignored. The output at the data point also depends on the setting"Send zero on read error". |
Unit |
The unit of the value can be entered here. This is output as text in the folder Dynamic --> Unit. |
Send zero on read error |
If the specified register cannot be read or can no longer be read, the output is set to undefined. |
Write Trigger All |
If this option is set for one channel and it is written to, all other writable registers are also rewritten. Without this option, only this one register is written. |
Method |
Data type |
Service |
Service code |
Access |
Remark |
|---|---|---|---|---|---|
Bitwise |
Outputs/coils |
Read coils |
1 |
Read (read) |
Read digital outputs (e.g. relays) |
Bit by bit |
Outputs |
Read discrete input |
2 |
Read (read) |
Read digital inputs |
Word by word |
Output |
Read internal register (holding) |
3 |
Read (read) |
Read measured values, counter readings, average values, Reading the device configuration |
Word by word |
Outputs |
Read input register (Input) |
4 |
Read (read) |
Read analogue inputs |
Bit by bit |
Inputs/coils |
Set coil |
5 |
Write (write) |
Writing a digital output (e.g. relay) |
Word by word |
Inputs/coils |
Write register |
6 |
Write (write) |
Writing values Writing device configuration |
Bit by bit |
Inputs |
Set multiple coils |
15 |
Write (write) |
Write several digital outputs (e.g. relays) |
Word by word |
Inputs |
Write several internal registers |
16 |
Write (write) |
Writing multiple values |
Word by word |
Bidirectional |
Read/write internal register |
3/6 |
Read/Write (read/write) |
Read and write a value |
Word by word |
Bidirectional |
Read/write multiple internal registers |
3/16 |
Read/Write (read/write) |
Read and write multiple values |
Bit by bit |
Bidirectional |
Coil read/write |
1/5 |
Read/Write (read/write) |
Read and write a digital output |
Read/write coils |
Bidirectional |
Read/write multiple coils |
1/15 |
Read/Write (read/write) |
Read and write from multiple digital inputs/outputs. |
Word-by-word/bit access |
Outputs |
Input register Bit access reading |
4 |
Read (read) |
Reading analogue inputs The values are output or set on the EisBaer side in individual bits. |
Wordwise/bit access |
Bidirectional |
Internal register Bit access read/write |
3/22 |
Read/Write (read/write) |
Reading and writing measured values, counter readings, average values, reading and writing the device configuration The values are output or set on the EisBaer side in individual bits. |
Bit by bit |
Bidirectional |
Multiple internal registers Read/write bit access |
3/6 3/22 |
Read/Write (read/write) |
Read and write multiple values as bit access |