Supplementary instructions Modbus-TCP, ASCII protocol VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62 Internet PLC/SPS Document ID: 30768
Contents Contents 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..................................
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-Specification" Release 1.0 from Schneider Electric.
1 Function as Modbus-TCP server Register address in Modicon Temporary memory of VEGAMET/PLICSRADIO (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 Modicon Temporary memory of VEGASCAN (1 word = 2 byt
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.
1 Function as Modbus-TCP server Register address in Modicon Temporary memory of VETemporary memory of VEGAMET/PLICSRADIO (1 bit) GAMET 391 (1 Bit) 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 1.3 Filing of measured value as 4 Byte Float The filing of measured values in the temporary memory is always sorted according to PC/DCS output number.
1 Function as Modbus-TCP server Register address in Modicon Temporary memory of VEGASCAN (2 words = 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
1 Function as Modbus-TCP server Filing of the relay values Status Measured value Meaning <> 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 error codes Exx is transmitted in the status and in the measured value. Must be configured via DTM. The switching conditions of the relay are transferred as bit information.
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 different resolutions, with/without unit or with current date/time.
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 2.
2 ASCII protocol Options The above commands of the measured value enquiry can be also combined with the following options: Option Description TIME The current date/time is added to the answer REPEAT x The measured value is sent automatically by the signal conditioning instrument every x seconds STORE The enquiry is saved up to the STORE option and executed after a restart (only available with RS232 interface) SUM A check sum is transmitted for each line which is sent Information: For commands an
2 ASCII protocol • Reply from the signal conditioning instrument End identification: Carriage Return CR (1 sign) Total length of the telegram: 3 … 5 characters Number of bytes Character T1 1 = DCS no. 3 001 … 030 T2 1 # Value 5…6 -067.3 T3 1 % 1 CR End identification • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol • Reply from the signal conditioning instrument End identification: Carriage Return CR (1 sign) Total length of the telegram: 2 characters "N"-times repetition of the following telegram (N=total number of assigned PC/DCS outputs) Number of bytes Character T1 1 = DCS no. 3 001 … 030 T2 1 # Value 5…6 -067.3 T3 1 % End identification 1 CR • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol Enquiry of the control system Number of bytes Character Identifier 1 % Begin 1…3 001 … 030 or 1 … 30 Separator 1 L or I Quantity 1…3 001 … 030 or 1 … 30 End identification 1 CR • • • • • Identifier: "%" (1 character) Start: No.
2 ASCII protocol Answer: =001# 067.3% =002# 824.6% =003#-067.3% % Block enquiry with range Enquiry of the control system As answer to the range enquiry, the range stated in the enquiry with PC/DCS values is delivered. The measured value is transmitted with three decimal places in front of the decimal point and one decimal place after the decimal point without unit.
2 ASCII protocol Character Meaning 5 ".": Decimal point 6 • • 1-digit number (after the decimal point) T3: "%" (1 character) End identification: Carriage Return CR (1 sign) Total length of the telegram: (End-Start+1)*12 … 13 Example: Note: The % sign is a separator, not the unit % Enquiry: %002-004 Answer: =002# 067.3% =003# 824.6% =004#-067.3% 2.
2 ASCII protocol • Value: Numerical value of the PC/DCS output or with interferred measured value the text "FAULT" Formatting of the value: Character Meaning 1 "- ": Minus with negative numbers " ": Space with positive numbers 2…7 • • 6-digit number after the decimal point T3: "%" (1 character) End identification: Carriage Return CR (1 sign) Total length of the telegram: 14 characters Example: Note: The % sign is a separator, not the unit % Enquiry: &001 Answer: =001#-000673% & Block enquiry
2 ASCII protocol Formatting of the value: Character Meaning 1 "- ": Minus with negative numbers " ": Space with positive numbers 2…7 • • 6-digit number after the decimal point T3: "%" (1 character) End identification: Carriage Return CR (1 sign) Total length of the telegram: N*14 characters Example: Note: The % sign is a separator, not the unit % Enquiry: & Answer: =001# 000673% =002# 008246% =003#-000673% =004#-008246% & Block enquiry with length Enquiry of the control system The range state
2 ASCII protocol Number of bytes Character T3 1 % End identification 1 CR • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol Reply from the signal conditioning instrument (End-Start+1)-times repetition of the following telegram Number of bytes Character T1 1 = DCS no. 3 001 … 030 T2 1 # Value 5…6 -000673 T3 1 % End identification 1 CR • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol • • Reply from the signal conditioning instrument Start: No. of the requested PC/DCS output (1 … 3 characters) End identification: Carriage Return CR (1 sign) Total length of the telegram: 3 … 5 characters Number of bytes Character T1 1 = DCS no. 3 001 … 030 T2 1 # Value 7 -000673 T3 1 # Unit 0…n xxx End identification 1 CR • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol Reply from the signal conditioning instrument "N"-times repetition of the following telegram (N=total number of assigned PC/DCS outputs) Number of bytes Character T1 1 = DCS no. 3 001 … 030 T2 1 # Value 7 -000673 T3 1 # Unit 0…n xxx End identification 1 CR • • • • T1: "=" (1 character) DCS no.: No.
2 ASCII protocol End identification • • • • • Number of bytes Character 1 CR Identifier: "?" (1 character) Start: No. of the requested PC/DCS output (1 … 3 characters) Separator: "L" or "I" (1 sign) Quantity: Number of requested PC/DCS outputs (1 … 3 signs) End identification: Carriage Return CR (1 sign) Total length of the telegram: 5 … 9 characters Reply from the signal conditioning instrument "N"-times repetition of the following telegram Number of bytes Character T1 1 = DCS no.
2 ASCII protocol Enquiry of the control system Number of bytes Character Identifier 1 ? Begin 1…3 001 … 030 or 1 … 30 Separator 1 - End 1…3 001 … 030 or 1 … 30 End identification 1 CR • • • • • Identifier: "?" (1 character) Start: Start no. of the requested PC/DCS output (1 … 3 characters) Separator: "-" (1 sign) End: End no.
2 ASCII protocol =001# 000673#% =002# 00824#kg =003#-000673#m 2.9 Measured value enquiry with command $ $ individual enquiry Enquiry of the control system The PC/DCS value stated in the enquiry is delivered as reply to the individual enquiry. The measured value is transmitted with 11 decimal places as floating point and with unit.
2 ASCII protocol Example: Enquiry: $001 Answer: =001# 824.6 #kg $ Block enquiry Enquiry of the control system All assigned PC/DCS values in the instrument are delivered as reply to the block enquiry. The measured value is transmitted with 11 decimal places as floating point and with unit.
2 ASCII protocol Answer: =001# 824.6 #kg =002# 67.3 #% =003#-824.6 #% =004#-67.3 #m $ Block enquiry with length Enquiry of the control system The range stated in the enquiry with PC/DCS values is delivered as reply to the range enquiry. The measured value is transmitted with 11 positions as floating point and with unit.
2 ASCII protocol • • • Example: T3: "#" (1 character) Unit: Unit as text (0 … n unit) End identification: Carriage Return CR (1 sign) Total length of the telegram: Number*(14 characters+Unit character) Enquiry: $001L003 Answer: =001# 67.3 #kg =002# 824.3 #% =003#-67.3 #m $ Block enquiry with range Enquiry of the control system The range stated in the enquiry with PC/DCS values is delivered as reply to the range enquiry.
2 ASCII protocol Formatting of the value: Character Meaning 1 "- ": Minus with negative numbers " ": Space with positive numbers 2 … 11 • • • Example: 11-digit number with comma or error code T3: "#" (1 character) Unit: Unit as text (0 … n unit) End identification: Carriage Return CR (1 sign) Total length of the telegram: (End-Start+1)*(18 characters+Unit character) Enquiry: $001-003 Answer: =001# 67.3 #kg =002# 824.3 #% =003#-67.3 #m 2.
2 ASCII protocol @2005/04/07 09:02:29 =001# 27.77 #% @2005/04/07 09:02:39 =001# 28.44 #% Enquiry: (terminates the repetition) $001 time repeat 0 2.12 Option STORE By adding the attribute STORE, the enquiry is stored in the EEPROM memory up to the option STORE. After switching on the instrument again, this enquiry will be used as input telegram and an answer will be generated. Example Note: This option is only available for the RS232 interface.
INDEX INDEX A ASCII 9 B Baud rate 9 D Data format 5 F Filing of measured values 3 Floating point 7 M Modbus-PCP 3 Modem 9 P Parity 9 PC/DCS 3 Port 9 R Reference value 5 Relay values 5, 8 T 30768-EN-130701 Telent 10 Modbus-TCP, ASCII protocol • VEGAMET 391/624/625, VEGASCAN 693, PLICSRADIO C62 31
All statements concerning scope of delivery, application, practical use and operating conditions of the sensors and processing systems correspond to the information available at the time of printing. Subject to change without prior notice © VEGA Grieshaber KG, Schiltach/Germany 2013 VEGA Grieshaber KG Am Hohenstein 113 77761 Schiltach Germany Phone +49 7836 50-0 Fax +49 7836 50-201 E-mail: info.de@vega.com www.vega.