6 data transmission with modbus ascii, 6data transmission with modbus ascii – VEGA VEGASCAN 850 Modbus signal output User Manual

Page 11

Advertising
background image

Modbus signal output VEGASCAN 850

11

6

Data transmission with Modbus ASCII

Already several years ago, the firm AEG developed a communication technique for its PLC,
called Modbus. This specification is used today by several companies for the coupling of IO-
components.
For the Modbus, there are two versions: Modbus RTU and Modbus ASCII. Both have the
same data content, but the scale and the coding of the characters are different.

ASCII mode

In the ASCII mode, the transmission starts with the character ‘:’ and ends with CR LF. For cod-
ing, hexadecimal figures ‘0’ to ‘9’ and ‘A’ to ‘F’ are available. The coding is made by converting
all characters hexadecimally. Due to this conversion to double number of characters must be
transmitted via the interface.
For communication, it is necessary for a Slave participant to continuously monitor the bus. If
the character ‘:’ is received, a new data frame begins. The addressed Slave is then deter-
mined by the next two characters.

Measured values transferred as DCS values in ASCII mode

The transmission of the DCS values via the Modbus is made via the function code 04 "Read
Input Registers“.

Proceeding with Modbus-Master Modicon or Freelance 2000

When using an AEG-Modicon or a Freelance 2000 from Hartmann & Braun as Modbus-Master,
these systems take over the communication to the Modbus. In this case only the respective
function enquiry "Read Input Status“ must be programmed in the PLC, and the required pa-
rameters such as Slave address, start register and number of register must be stated. The
conversion of the output addresses in VEGASCAN to the input registers of the PLC are given
in the table in supplement chapter "1.7 Measured value image“.

Procedure with Modbus-Master-simulation (e.g. PC)
In case the data enquiry should be made via a Modbus-Master-simulation, this can be done,
for example, yb writing your own communication driver using the "Function code 04 = Read
Input Registers“. The following demonstration should explain the communication processes
between Modbus-Master and VEGASCAN on the Modbus.

Example:
A DCS value (DCS output 15) should be collected. The slave address of VEGASCAN is set to
1. actual measured value on VEGASCAN DCS output 15 is: 3.30% (= 0x014A).

Data transmission with Modbus ASCII

Advertising