Supplementary instructions
Modbus-TCP, ASCII protocol
VEGAMET 391/624/625, VEGASCAN 693,
PLICSRADIO C62
Internet
PLC/SPS
Document ID: 30768
Contents |
|
|
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 |
130701-EN-30768
2 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
1 Function as Modbus-TCP server
1.1Modbus-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-Specification" 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 specification).
•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)
•Functionvalues) code 04: Read Input Registers (enquiry of the PC/DCS
|
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 define where the respective |
|
measured values can be picked up in the temporary memory. The |
|
configuration of the PC/DCS outputs is carried out via PACTware/ |
|
DTM. |
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 first word contains the actual PC/DCS value, the next higher word the corresponding status information. In the specification, the term register word is also used instead of word.
The filing 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.
130701 |
|
Register address in |
Temporary memory of VEGAMET/PLICSRADIO |
|
|
30001 |
PC/DCS output 1: Measured value |
|
|
|
|
Modicon |
(1 word = 2 byte) |
|
EN- |
|
|
|
|
|
30002 |
PC/DCS output 1: Status |
|
|
- |
|
30003 |
PC/DCS output 2: Measured value |
|
30768 |
|
|
||
|
|
|
|
|
|
|
|
|
|
|
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62 |
3 |
1 Function as Modbus-TCP server
Register address in |
Temporary memory of VEGAMET/PLICSRADIO |
Modicon |
(1 word = 2 byte) |
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 |
Temporary memory of VEGASCAN (1 word = |
Modicon |
2 byte) |
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 |
As an alternative, register address 40001 is also available as start address (function code 03).
Format of the PC/DCS The actual measured values are transmitted as signed data compris- value 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.
4 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
130701-EN-30768
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 field must be taken into account in a detailed failure diagnosis. The following chart explains the possible faults.
Status |
Measured |
Meaning |
|
value |
|
0x00 |
0xXXXX |
Valid measured value |
0xXX |
0x8000 |
An error number is transmitted in the status |
|
|
corresponding to the error codes Exx (e.g. 29 |
|
|
= E29 = Simulation). |
0xXX |
0x00XX |
An error number which corresponds to the er- |
|
|
ror codes Exx is transmitted in the status and |
|
|
in the measured value.Must be configured |
|
|
via DTM. |
Note:
When transmitting the PC/DCS value in Modbus-TCP protocol
(measured value filing 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 transmitted 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 transmitted as measured values; the units are discarded.
Filing of the relay values The switching conditions of the relay are transferred as bit information. The following equivalencies apply to the switching relays:
•0 = Switching status Off
•1 = Switching status On
The following equivalencies apply to the fail safe relay:
•0 = Failure message Off, relay switching condition On
•1 = Failure message Off, relay switching condition Off
The following chart shows the addressing of the temporary memory via Modbus.
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62 |
5 |
1 Function as Modbus-TCP server
Register ad- |
Temporary memory of VE- |
Temporary memory of VE- |
dress in |
GAMET/PLICSRADIO (1 bit) |
GAMET 391 (1 Bit) |
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 |
The filing 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 float value.8 byte are needed for one output, corresponding to 4 registers.
Information:
Note:A float value comprises 2 registers, i.e.a total of 4 bytes!
|
|
|
|
|
|
Register address in |
Temporary memory of VEGAMET/PLICSRADIO |
|
|
Modicon |
(2 words = 4 byte) |
|
|
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 |
Register address in |
Temporary memory of VEGASCAN (2 words = |
|
|
Modicon |
4 byte) |
|
|
31001 |
PC/DCS output 1: Measured value |
-30768 |
|
31003 |
PC/DCS output 1: Status |
||
31005 |
PC/DCS output 2: Measured value |
||
|
|
-EN |
|
31007 |
PC/DCS output 2: Status |
||
|
|
130701 |
|
31009 |
PC/DCS output 3: Measured value |
||
|
6 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
|
|
1 Function as Modbus-TCP server |
|
|
|
|
|
|
Register address in |
Temporary memory of VEGASCAN (2 words = |
|
|
Modicon |
4 byte) |
|
|
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 |
|
As an alternative, register address 41001 is also available as start address (function code 03).
Format of the PC/DCS |
|
The actual measured values are transmitted as signed data compris- |
||||
value |
|
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 |
|
984 Floating point: Intel single precision real. First register contains |
||||
MODBUS/TCP SPECIFI- |
|
bits 15 … 0 of 32 bit number (bits 15 … 0 of significand).Second |
||||
CATION |
|
register contains bits 31 … 16 of 32 bit number (exponent and bits |
23 … 16 of significand).
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 field must be taken into account in a detailed failure diagnosis. The following chart explains the possible faults.
130701 |
|
|
|
|
|
|
Status |
value |
Meaning |
|
|
|
|
Measured |
|
||
EN- |
|
|
|
|
|
|
0 |
XXXX |
Valid measured value |
|
|
30768- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62 |
7 |
1 Function as Modbus-TCP server
Status |
Measured |
Meaning |
|
value |
|
<> 0 |
0 |
An error number is transmitted in the status |
|
|
corresponding to the error codes Exx (e.g. 29 |
|
|
= E29 = Simulation). |
<> 0 |
XX0XX |
An error number which corresponds to the er- |
|
|
ror codes Exx is transmitted in the status and |
|
|
in the measured value.Must be configured |
|
|
via DTM. |
Filing of the relay values The switching conditions of the relay are transferred as bit information. The following equivalencies apply to the switching relays:
•0 = Switching status Off
•1 = Switching status On
The following equivalencies apply to the fail safe relay:
•0 = Failure message Off, relay switching condition On
•1 = Failure message Off, relay switching condition Off
The following chart shows the addressing of the temporary memory via Modbus.
Register adTemporary memory of VE- |
Temporary memory of VE- |
|
dress in |
GAMET/PLICSRADIO (1 bit) |
GAMET 391 (1 Bit) |
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 |
As an alternative, register address 00001 is also available as start address.
130701-EN-30768
8 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
|
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 different resolutions, with/without unit or |
|
|
with current date/time. |
|
Access via RS232 |
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 find further information in chapter |
|
|
"Connection". |
|
Access via Ethernet |
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 field of the Internet Explorers starts the terminal program HyperTerminal automatically. Max. four simultaneous connections are possible.
Commands |
|
|
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 floating 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. |
10 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62
130701-EN-30768