4.8.1 Protocol : Modbus-IDA, serial


 

Telegram structure

The telegram circulation is controlled by the master station, i.e. RTU only replies on inquiry. The analysis of the values in the telegram in monitoring direction is only possible concerning the command/ inquiry sent before in control direction. Therefore for line recording with LIAN 98 two channels are used and correspond with each other; you have the choice between channels 1 + 2 or 3 + 4 ( 5 + 6, 7 + 8, 9 + 10 or 11 + 12 ). On the first channel recording is done in control direction ( master -> RTU ) and on the second channel in monitoring direction ( RTU -> master ). The advantage of this 2 channel recording mode is that RTU messages can be represented with the previous master command, e. g. the correct measurement number is displayed.

 

Information about the structure of the telegram see
<MODBUS serial : Telegram structure of the RTU-mode>

 


MODBUS serial : Configuration

 

 

With the channel button ( channel 1 ...12 ) on the bottom following settings are possible :

 

Each character has one start bit ( binary = 0 ), 8 information bits and normally one even parity bit and one stop bit ( binary = 1 ).

 

Interface

For each channel any COM port ( COM 1 till COM 24 ) can be selected.

Modem

An individual modem can be installed and connected for each channel. LIAN 98 is able to process up to twelve modems in the range of COM1 till COM24 simultaneously. Select here the modem assigned to the selected channel. Normally this assignment will be recognized by LIAN 98 and the corresponding modem will be set.

Setup Modem

The settings of the modem must be executed via the windows control panel "telephone and modem options". With this button you can check the modem settings and see if they correspond to the LIAN 98 configuration.

Connection type

Attention, the connection type should be set to full duplex for monitoring !
 

Full duplex :

Most of the modems are full duplex and can transmit data in both directions simultaneously. DTE ( LIAN 98 ) and DCE ( Modem ) work simultaneously as transmitter and receiver. None of both transmitters has to wait for clearance for transmitting data. Therefore the signals RTS and CTS are not significant. Sure, LIAN 98 is setting the control signals RTS and DTR to 1 when it is ready for transmission and receipt but it does not check the signals CTS and DSR.

Half duplex :

In case of a half duplex connection DTE ( LIAN 98 ) as well as DCE ( Modem ) can work as transmitter and receiver, hereby only one data line ( 2-wire connection ) is available that can be used alternately for transmission or receipt of data. The control signals RTS and CTS are used in order to define the allocation of transmission or receipt. When LIAN 98 should work as transmitter it activates the signal RTS and waits for the confirmation of the modem via the signal CTS. After the receipt of the signal CTS the data are transmitted and after the transmission of the data the signal RTS is set to 0. In each other case LIAN 98 is working as receiver only.

As long as the LIAN 98 software is ready for transmission and receipt the signal DTR is activated in order to show the modem that LIAN 98 is ready for operation, as well the software expects an activated DSR signal from the modem.

RTS Leading delay

0 ... 1000 msec
This parameter ist only used for the connection type "half duplex" and is determined by the initial transient behaviour of the used transmission equipment.
The RTS Leading defines the delay time from activating RTS signal to transmitting the first character and is used for modems whithout the hardware handshake signals "RTS and CTS". In this case the "RTS signal" must be led back over the "CTS line" to the PC with the help of a brazing bridge in the monitor cable. Dependent of the used modem it may be necessary to connect additionally the DTR-pin with the DSR-pin.
This function is deactivated if the "Leading and the Trailing" is set to NULL and therefore the control signals are analyzed diectly from the modem.

RTS Trailing delay

0 ... 1000 msec
This parameter ist only used for the connection type "half duplex" and is determined by the final transient behaviour of the used transmission equipment.
The RTS Trailing defines the delay time from the last character transmitted up to the RTS signal is deactivated.
This function is deactivated, if the "Leading and the Trailing" is set to NULL.

 

Baud rate

Transmission speed : 25 - 115200 baud ( variable )

Data byte

8 bit ( fixed )

Stop bit

1 bit ( variable )

Parity

even ( variable )

Timeout

1 - 9999 msec ( variable )

For this protocol the timeout must be kept as short as possible because the end of the telegram, respectively the beginning of the next telegram is detected with the timeout. As a basic rule the higher the baud rate the lower the timeout. For 19200 baud about 20 up to 30 msec.

 

Direction

The direction of the transmission can not be recognized on the basis of the telegrams. For this reason it is absolutely necessary to assign the correct direction to the channel. Otherwise the telegrams are marked as faulty ( see also above the explanation of the telegram structure ).

Control :

Use this setting for odd channels.

Control- or command direction are the telegrams from the master to the substation.

Monitoring :

Use this setting for even channels.

Monitoring direction are the telegrams from the substation to the master.

 

Calculation of the timeout :

The Timeout [ msec ] should be only a bit larger than the result of the following calculation :

timeout  >  ( (1000 / Baud rate) * number bits per  character ) * max. number bytes per telegram

number bits per character : 1 start bit + number data bits + number parity bits + number stop bits

 


MODBUS serial : Simulation

 

MODBUS serial : RTI ( Master )-Simulation

LIAN 98 simulates a MASTER and can communicate in the polling mode with up to 32 connected substations simultaneously.

 

 

Station Address
( address of the target station )

All telegrams to be sent are provided with the station address of the SIM list during master simulation.

Exception :
. If the station address 255 is inserted in a telegram of the TDB buffer, the telegram will be transmitted with the address = 0 ( "BROADCAST message to all server" ).
. If a server address of the server list is inserted in the telegram it will be transmitted unchanged with this inserted address.

Response timeout

1 - 30 000 msec

The Modbus standard specifies a fixed time out interval to be used for repeated frame transmissions. The time out interval and maximum number of retries are configurable and appropriate values will depend on the transmission system.

This parameter determines the time in milliseconds that the program LIAN 98 as master station at most has to wait for an acknowledge before the last transmission is repeated.

Number of frame retries

0 - 255

Via this parameter it is defined how many times the transmission is to be repeated when the response is missing.

Insert Slave- / Server Addresses
Number of addresses
delete
insert

Multi-Point Traffic Line : ( party line )
All stations to be processed at this line have to be inserted into the server list. LIAN 98 establishes the connection to this stations ( maximum 32 servers ) and reqests continuously the user data of this stations.

In order to insert the addresses please proceed as follows :

Activate "Insert Server Addresses" ( button "insert" will be displayed ).
Insert in the fields "Station Address" the station to be entered in the server list.
Take over the address into the server list by clicking "insert".
When all stations are inserted, please deactivate "Insert Server Addresses" ( button "insert" disappears ).

In order to delete a station out of this list select it and click "delete".

Disable automatic data requests

yes / no

When the RTI simulation is activated, LIAN 98 starts automatically with the request of the user data. If this requests are not wanted it can be deactivated here.

Data reqest ( TDBnum from )

Number of the TDB buffer containing the first request message.

Data reqest ( TDBnum till )

Number of the TDB buffer containing the last request message.

If this buffer number ( e.g. equal 0 ) smaller than the number of the TDB buffer "from", only the request telegram in the field "from " is used.

Request delay

0 - 30 000 msec

This parameter determines the time that the program LIAN 98 delays the next request.

 

MODBUS serial : RTU ( Slave )-Simulation

 

 

Station Address

All telegrams to be sent will be provided with the station address out of the SIM list during slave simulation.

Initialize Process Image

yes / no

 

MODBUS serial : Routing table

 

 

 

 

Enable router

yes / no

When this parameter is activated, the LIAN 98 starts the "Modbus RTU Master" with router function for the for the associated channel and establishes a connection to the substation. The assignment to the channel is set in the configuration ( KNF ) over the parameter "simulation list".
( see : MODBUS serial : RTI ( Master )-Simulation )

Message format

With this parameter the message format of the connected client/ master is selected. ( Modbus NET Client ).

Insert routing channel
Number of channels
delete
insert

All connected clients which should be taken into account from the LIAN 98 router have to be entered into the channel list.

In order to insert the channel numbers please proceed as follows :

activate "insert routing channel" ( button "insert" is displayed ).
Insert in the fields "Channel number" the channel to be entered. Take over the channel number by clicking "insert". When all channels are inserted please deactivate "Insert routing channels" ( button "insert" disappears ).

In order to delete one or more channels out of this list select it and click "delete".

 


MODBUS serial : Pre-filter/ Pre-trigger

 

MODBUS serial : Monitoring filters

 

Monitoring filters reduce capture on particular pre-defined data records. By setting the corresponding filters a carefully directed data preselection can be achieved, which results in a reduction of the data to be analyzed later.

 

 

Filter released

yes / no

With this option already set monitoring filters for one channel can be deactivated temporarily without deleting them.

protocol specific
filter mask

Here monitoring can be filtered for telegram specific values in which several OR-linked filter masks can be defined for the channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Adds the next OR-element.
remove Removes the current OR-element.

 

MODBUS serial : Action filters

 

For the simulation and execution of data tests actions can be caused with the receipt of defined records. Therefore the possibility exists to define action filters, that effect the transmission of a send-sequence or transmit one or more message buffers ( TDB ).

 

 

Action filter released

yes / no

With this option already set action filters for one channel can be deactivated temporarily without deleting them.

protocol specific
filter mask

The action filter is described over telegram specific features corresponding to a filter setting. Additionally each action filter requires an allocation to a send buffer or alternatively to a send sequence.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
Sendbuffer number
( from, from/ till )

In correspondence with the action filter the message buffer "from" or the message buffers "from/ till" are to be sent.

Sequence line number
( from, from/ till )

In correspondence with the action filter the send sequence is to be started at line number "from" or to be started at line number "from" and to be ended at line number "till".

add Adds the next OR-element.
remove Removes the current OR-element.

 

MODBUS serial : Start trigger

 

With the receipt of a telegram pre-defined as start trigger, recording is started.

 

 

Start trigger released

yes / no

With this option already set start triggers for one channel can be deactivated temporarily without deleting them.

protocol specific
trigger mask

Here you can define telegram specific start triggers for monitoring in which several OR-linked triggers can be defined for the channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Adds the next OR-element.
remove Removes the current OR-element.

 

MODBUS serial : Stop trigger

 

Monitoring can also be stopped by telegram-specific filters and/ or "stop on error" after a defined number of following records. The number of the following records is defined in the field "records after stop on error/ stop trigger" in the global parameters of the VFL settings.

 

 

Stop trigger released

yes / no

With this option already set stop triggers for one channel can be deactivated temporarily without deleting them.

protocol specific
trigger mask

Here you can define telegram specific stop triggers for monitoring in which several OR-linked triggers can be defined for the channel.

= Only values equal to 'from' are let through.
# Only values not equal to 'from' are let through.
< Only values less than 'from' are let through.
> Only values greater than 'from' are let through.
R 'from' and 'till' define a valid range
add Adds the next OR-element.
remove Removes the current OR-element.

 


Each alteration in the settings is displayed by an asterisk * in the caption title and will be only effective after saving.

 


MODBUS serial : Message display format

 

The sent and received messages of all channels are entered binary into the archive file. Before displaying on screen, the binary archived data are coverted to an easily readable procedure specific plaintext. In order to optimize the representation it can be chosen between three different plaintext settings. The plaintext format is set separately for each channel.
( see also "FMT file - Display format" )

 

 

Plain text format 1

Everything is displayed : Telegram header and information elements

Plain text format 2, 3

No header is displayed : Only information elements are displayed.

Plain text format 4, 5

No information element is displayed : Only telegram header is displayed.

 

Additional to the plain text output the transmission data can also be displayed in hexadecimal, decimal, ASCII, binary ( LSB first ) or binary ( MSB first ). Of course the plain text output can also be deactivated in order to display the transmission data only e.g. hexadecimal.

 


MODBUS serial : Error messages

 

Error checks during receive

 

per character

the start bit, the stop bit and the parity.

per frame

the function code, the checksum and the length.

 

*** TimeOut !

Within a telegram, there may be no pause between characters. In case of timeout occurs it is assumed that it is the end of the telegram and the telegram check is started. The sensitivity can be parameterized in the configuration ( timeout ).
Normally a time out is no error, but it is stored in the Pro file together with the initial error for a better analysis of the faulty transmission line in connection with a line error.

*E: COM-PORT !

Error during writing on the COM port. May be it is already occupied by another program.

E: Length !

The length of the telegram is wrong.

*E: Checksum !

Die Telegrammprüfsumme ( CRC16 ) im Prüfwort stimmt nicht.

*F: SYNC !

The protocol MODBUS provides no start byte for the identification of the telegram start. Therefore the receive routine sets the start of the telegram immediately after a TIMEOUT and checks the received telegram on plausibility. When this plausibility check fails, a synchronization error is noted and the telegram is entered into the PRO File.

*E: Overflow !

Error message from the UART. This error is noted only in the PRO file.

*E: Parity !

Error message from the UART. This error is noted only in the PRO file.

*E: Start/ Stop !

Error message from the UART. This error is noted only in the PRO file.

 

 

*E: TypeID !

The function code in the telegram is wrong.

 

Error checks during simulation

 

*E: Link address !

The received server address is incorrect or the entry in the SIM list is wrong.

*E: unexpected !

The respond at this time was not expected.

 


MODBUS serial : Parameter list

 

MODBUS serial : Data Model

 

 

 

Total length of the Process Image

maximum 64 kByte ( 0000... FFFF ) = 65536 bytes

 

 

 

Starting address of Coils

0... 65535

 

Length of Image for Coils

maximum 16 kByte

 

Starting address of Discrete Inputs

0... 65535

 

Length of Image for Discrete Inputs

maximum 16 kByte

 

Starting address of Holding Registers

0... 65535

 

Length of Image for Holding Registers

maximum 16 kByte

 

Starting address of Input Registers

0... 65535

 

Length of Image for Input Registers

maximum 16 kByte

 

 

MODBUS serial : Process Image

 

 

Setup Image for Coils and Diskrete Inputs

 

 

Setup Image for Holding- and Input Registers

 

 

 


MAYR Software

Wuerzburger Ring 39,  D 91056 Erlangen

Manual LIAN 98


LIAN 98 Protocol Router, Simulator and Analyzer
© Copyright 2001, 2006, 2011 by Werner Mayr. All Rights reserved.