VEGA Modbus-TCP User Manual

Supplementary instructions
Modbus-TCP, ASCII protocol
VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
Internet
PLC/SPS
Document ID: 30768
Contents
1 Function as Modbus-TCP server
1.1 Modbus-TCP - general description ................................................................................... 3
1.2 Filing of the measured value as 2 byte short .................................................................... 3
1.3 Filing of measured value as 4 Byte Float .......................................................................... 6
2 ASCII protocol
2.1 Measured value enquiry via ASCII protocol ...................................................................... 9
2.2 Overview of the commands and options ........................................................................ 10
2.3 Version enquiry with command VERSION ...................................................................... 11
2.4 Help with command HELP ............................................................................................. 11
2.5 Delete the settings with the command CLEARSTORE ................................................... 11
2.6 Measured value enquiry with command % ..................................................................... 11
2.7 Measured value enquiry with command & ...................................................................... 16
2.8 Measured value enquiry with command? ....................................................................... 20
2.9 Measured value enquiry with command $ ...................................................................... 25
2.10 Option TIME ................................................................................................................... 29
2.11 Option REPEAT x ........................................................................................................... 29
2.12 Option STORE ............................................................................................................... 30
2.13 Option SUM ................................................................................................................... 30
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
2
30768-EN-130701

1 Function as Modbus-TCP server

1 Function as Modbus-TCP server

1.1 Modbus-TCP - general description

VEGAMET 391/624/625, VEGASCAN 693 and PLICSRADIO C62 signal conditioning instruments work as Modbus-TCP servers and make the existing PC/DCS values and relay switching conditions available in a temporary storage for collection via Modbus-TCP.
The instruments comply with the "Open Modbus-TCP-Specication" Release 1.0 from Schneider Electric. This standard is supported by many process control systems, remote IOs, visualisation programs and OPC servers. Communication is carried out via Port 502.
Beside the PC/DCS values, the switching conditions of the relay outputs can also be queried.
The enquiry of the PC/DCS values and relay values is made via the
appropriate function code (see also Modbus specication).
Function code 01: Read Coil Status (enquiry of the relay values)
Function code 02: Read Input Status (enquiry of the relay values)
Function code 03: Read Holding Registers (enquiry of the PC/
DCS values)
Function code 04: Read Input Registers (enquiry of the PC/DCS
values)
These function codes are normally available as library enquiries in the
PLC (e.g. Modicon).
PC/DCS output
VEGAMET 391/624/625 and PLICSRADIO C62 can provide up to six PC/DCS outputs, VEGASCAN 693 up to 30. Further relay values also exist (fail safe relay/operating relay, depending on the instrument
type).
Via the selected PC/DCS output you dene where the respective
measured values can be picked up in the temporary memory. The
conguration of the PC/DCS outputs is carried out via PACTware/
DTM.

1.2 Filing of the measured value as 2 byte short

The addressing of the PC/DCS values for Modbus systems is carried out "Word-orientated". In the temporary memory, a PC/DCS value is
represented by two words. The rst word contains the actual PC/DCS
value, the next higher word the corresponding status information. In
the specication, the term register word is also used instead of word.
The ling of measured values in the temporary memory is always
sorted according to PC/DCS output number. The following chart shows the addressing of the temporary memory via Modbus.
Register address in Modicon
30001 PC/DCS output 1: Measured value
30002 PC/DCS output 1: Status
30003 PC/DCS output 2: Measured value
30768-EN-130701
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
Temporary memory of VEGAMET/PLICSRADIO (1 word = 2 byte)
3
1 Function as Modbus-TCP server
Register address in Modicon
30004 PC/DCS output 2: Status
30005 PC/DCS output 3: Measured value
30006 PC/DCS output 3: Status
30007 PC/DCS output 4: Measured value
30008 PC/DCS output 4: Status
30009 PC/DCS output 5: Measured value
30010 PC/DCS output 5: Status
30011 PC/DCS output 6: Measured value
30012 PC/DCS output 6: Status
Register address in Modicon
30001 PC/DCS output 1: Measured value
30002 PC/DCS output 1: Status
30003 PC/DCS output 2: Measured value
30004 PC/DCS output 2: Status
30005 PC/DCS output 3: Measured value
30006 PC/DCS output 3: Status
30007 PC/DCS output 4: Measured value
30008 PC/DCS output 4: Status
30009 PC/DCS output 5: Measured value
30010 PC/DCS output 5: Status
30011 PC/DCS output 6: Measured value
30012 PC/DCS output 6: Status
30057 PC/DCS output 29: Measured value
30058 PC/DCS output 29: Status
30059 PC/DCS output 30: Measured value
30060 PC/DCS output 30: Status
Temporary memory of VEGAMET/PLICSRADIO (1 word = 2 byte)
Temporary memory of VEGASCAN (1 word = 2 byte)
As an alternative, register address 40001 is also available as start
address (function code 03).
Format of the PC/DCS value
The actual measured values are transmitted as signed data compris­ing two octets. This means that the value range encompasses max. +32768 to -32767. In addition to the measured value, the status of the measured value is delivered in a second register word.
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
4
30768-EN-130701
1 Function as Modbus-TCP server
Example of the data of a PC/DCS output
Measured value Status
Register addr. 30001 Register addr. 30002
High-Byte/Low-Byte High-Byte/Low-Byte
The status describes the condition of the associated measured value. The content of the measured value is only valid if the corresponding status has the value zero. If there is a status value unequal zero, the
status value and the corresponding value in the measured value eld
must be taken into account in a detailed failure diagnosis. The follow­ing chart explains the possible faults.
Status Measured
value
0x00 0xXXXX Valid measured value
0xXX 0x8000 An error number is transmitted in the status
0xXX 0x00XX An error number which corresponds to the er-
Note:
When transmitting the PC/DCS value in Modbus-TCP protocol
(measured value ling as 2 byte short), the decimal point itself is not
transmitted; the value -0.5 bar is transmitted as -50. If a data format was selected that allows values outside the value range to appear, a limit is set at the highest value of the value range.
Example: Percent was selected as "Reference value " and #.### as "Data format ". With this setting, the value 100 % would be transmit­ted as 100000, which is outside the valid range of max. +32767. This means that a limit will be imposed and 32767 transmitted instead. To avoid this, "Data format " #.## should be chosen so that the value 100 % is transmitted as 10000.
Note:
On the switching inputs of PLICSRADIO C62 (measurement loops 4 … 6) the values 0 (switch open) and 100 (switch closed) are trans­mitted as measured values; the units are discarded.
Meaning
corresponding to the error codes Exx (e.g. 29
= E29 = Simulation).
ror codes Exx is transmitted in the status and
in the measured value. Must be congured
via DTM.
Filing of the relay values
30768-EN-130701
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
The switching conditions of the relay are transferred as bit information.
The following equivalencies apply to the switching relays:
0 = Switching status O
1 = Switching status On
The following equivalencies apply to the fail safe relay:
0 = Failure message O, relay switching condition On
1 = Failure message O, relay switching condition O
The following chart shows the addressing of the temporary memory via Modbus.
5
1 Function as Modbus-TCP server
Register ad­dress in Modicon
10001 Fail safe relay Fail safe LED
10002 Relay 1 Relay 1
10003 Relay 2 Relay 2
10004 Relay 3 Relay 3
10005 ---- Relay 4
10006 ---- Relay 5
10007 ---- Relay 6
Temporary memory of VE­GAMET/PLICSRADIO (1 bit)
Temporary memory of VE­GAMET 391 (1 Bit)

1.3 Filing of measured value as 4 Byte Float

The ling of measured values in the temporary memory is always
sorted according to PC/DCS output number. The following chart shows the addressing of the temporary memory via Modbus. The values are accessed via FC 3 and 4. The status information is also transmitted as oat value. 8 byte are needed for one output, corre­sponding to 4 registers.
Information:
Note: A oat value comprises 2 registers, i.e. a total of 4 bytes!
Register address in Modicon
31001 PC/DCS output 1: Measured value
31003 PC/DCS output 1: Status
31005 PC/DCS output 2: Measured value
31007 PC/DCS output 2: Status
31009 PC/DCS output 3: Measured value
31011 PC/DCS output 3: Status
31013 PC/DCS output 4: Measured value
31015 PC/DCS output 4: Status
31017 PC/DCS output 5: Measured value
31019 PC/DCS output 5: Status
31021 PC/DCS output 6: Measured value
31023 PC/DCS output 6: Status
Temporary memory of VEGAMET/PLICSRADIO (2 words = 4 byte)
Register address in Modicon
31001 PC/DCS output 1: Measured value
31003 PC/DCS output 1: Status
31005 PC/DCS output 2: Measured value
31007 PC/DCS output 2: Status
31009 PC/DCS output 3: Measured value
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
6
Temporary memory of VEGASCAN (2 words = 4 byte)
30768-EN-130701
1 Function as Modbus-TCP server
Format of the PC/DCS value
Register address in Modicon
31011 PC/DCS output 3: Status
31013 PC/DCS output 4: Measured value
31015 PC/DCS output 4: Status
31017 PC/DCS output 5: Measured value
31019 PC/DCS output 5: Status
31021 PC/DCS output 6: Measured value
31023 PC/DCS output 6: Status
31113 PC/DCS output 29: Measured value
31115 PC/DCS output 29: Status
31117 PC/DCS output 30: Measured value
31119 PC/DCS output 30: Status
Temporary memory of VEGASCAN (2 words = 4 byte)
As an alternative, register address 41001 is also available as start
address (function code 03).
The actual measured values are transmitted as signed data compris­ing four octets. In addition to the measured value, the status of the measured value is supplied in a second register word.
Example of the data of a PC/DCS output
Float Bit 15…0 Float Bit 31…16
Register addr. 31001 Register addr. 31002
High-Byte/Low-Byte High-Byte/Low-Byte
Note:
On the switching inputs of PLICSRADIO C62 (measurement loops 4 … 6) the values 0 (switch open) and 100 (switch closed) are trans­mitted as measured values; the units are discarded.
Floating point of OPEN MODBUS/TCP SPECIFI­CATION
984 Floating point: Intel single precision real. First register contains
bits 15 … 0 of 32 bit number (bits 15 … 0 of signicand). Second
register contains bits 31 … 16 of 32 bit number (exponent and bits
23 … 16 of signicand).
The status describes the condition of the associated measured value. The content of the measured value is only valid if the corresponding status has the value zero. If there is a status value unequal zero, the
status value and the corresponding value in the measured value eld
must be taken into account in a detailed failure diagnosis. The follow­ing chart explains the possible faults.
Status Measured
value
0 XXXX Valid measured value
Meaning
30768-EN-130701
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
7
1 Function as Modbus-TCP server
Filing of the relay values
Status Measured
value
<> 0 0 An error number is transmitted in the status
<> 0 XX0XX An error number which corresponds to the er-
Meaning
corresponding to the error codes Exx (e.g. 29
= E29 = Simulation).
ror codes Exx is transmitted in the status and
in the measured value. Must be congured
via DTM.
The switching conditions of the relay are transferred as bit information.
The following equivalencies apply to the switching relays:
0 = Switching status O
1 = Switching status On
The following equivalencies apply to the fail safe relay:
0 = Failure message O, relay switching condition On
1 = Failure message O, relay switching condition O
The following chart shows the addressing of the temporary memory via Modbus.
Register ad­dress in Modicon
10001 Fail safe relay Fail safe LED
10002 Relay 1 Relay 1
10003 Relay 2 Relay 2
10004 Relay 3 Relay 3
10005 ---- Relay 4
10006 ---- Relay 5
10007 ---- Relay 6
Temporary memory of VE­GAMET/PLICSRADIO (1 bit)
Temporary memory of VE­GAMET 391 (1 Bit)
As an alternative, register address 00001 is also available as start address.
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
8
30768-EN-130701

2 ASCII protocol

2 ASCII protocol

2.1 Measured value enquiry via ASCII protocol

With the ASCII protocol you can enquire PC/DCS values via the Ethernet or RS232 interface. Through the use of ASCII characters, measured value enquiry is possible using simple terminal programs such as HyperTerminal.
The PC/DCS values are retrieved by special commands. It is possible
to get the measured value in dierent resolutions, with/without unit or
with current date/time.
Access via RS232
Access via Ethernet
The activation of the ASCII protocol is carried out via the instrument DTM under "Device settings - RS232 interface". For the ASCII proto­col, the following interface parameters are default settings:
Coding system: 8 Bits, ASCII
Baud rate: 9600 Bits/sec
Data bits: 8
Parity: none
Stop bits: 1
For direct connection between signal conditioning instrument and PC or DCS, the RS232 modem connection cable and an additionally connected interlink cable from the scope of delivery will be required. If connection is provided via modem, only the attached RS232 modem
connection cable is used. You will nd further information in chapter
"Connection".
The ASCII protocol is handled via the TCP/IP - Port 503. When us­ing the terminal program HyperTerminal, the following settings are required:
IP addr. of the signal conditioning instrument: 192.168.200.200
(default setting)
TCP/IP Port: 503
Connection: TCP/IP
30768-EN-130701
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
9
2 ASCII protocol
Fig. 1: Connection via HyperTerminal
The setting of "telnet:\\192.168.200.200:503" in the address eld of the Internet Explorers starts the terminal program HyperTerminal automatically. Max. four simultaneous connections are possible.

2.2 Overview of the commands and options

Commands
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
10
The following ASCII signs are interpreted as commands:
Command Description
Version Enquiry of the protocol version
help Indication of the command formats
clearstore Settings of the option Store will be deleted in the EEPROM
memory
% Measured value enquiry with three places in front of the deci-
mal point and one place after the decimal point without unit
& Measured value enquiry with six places after the decimal point
and without unit
? Measured value enquiry with six positions after the decimal
point and with unit
$ Measured value enquiry with 11 places as oating point and
with unit
Note:
On the switching inputs of PLICSRADIO C62 (measurement loops 4 … 6) the values 0 (switch open) and 100 (switch closed) are trans­mitted as measured values; the units are discarded.
30768-EN-130701
Loading...
+ 22 hidden pages