Fronius Implementation Guide Gateway Modbus UDP extended Operating Instruction [EN]

/ Battery Charging Systems / Welding Technology / Solar Electronics
Implementation Guide Gateway Modbus UDP extended
Operating Instructions
Roboter Interface
EN
42,0410,1536 010-05022013
Introduction
Thank you for choosing Fronius - and congratulations on your new, technically high­grade Fronius product! This instruction manual will help you get to know your new machine. Read the manual carefully and you will soon be familiar with all the many great features of your new Fronius product. This really is the best way to get the most out of all the advantages that your machine has to offer.
Please also take special note of the safety rules - and observe them! In this way, you will help to ensure more safety at your product location. And of course, if you treat your product carefully, this definitely helps to prolong its enduring quality and reliability - things which are both essential prerequisites for getting outstanding results.
EN
ud_fr_st_et_00493 01/2012
Table of Contents
Ethernet......................................................................................................................................................... 2
Hardware.................................................................................................................................................. 2
Protocol .................................................................................................................................................... 2
Modbus ......................................................................................................................................................... 3
Protocol description.................................................................................................................................. 3
Data encoding .......................................................................................................................................... 3
Application Data Unit (ADU) ..................................................................................................................... 4
Modbus Functions ......................................................................................................................................... 5
03 (0x03) Read Holding Registers ........................................................................................................... 5
06 (0x06) Write Single Registers ............................................................................................................. 6
16 (0x10) Write Multiple Registers ........................................................................................................... 7
23 (0x17) Read/Write Multiple registers ................................................................................................... 8
100 (0x64) Configure Streaming Data ...................................................................................................... 9
101 (0x65) Action Streaming Data ......................................................................................................... 10
102 (0x66) Streaming Data ..................................................................................................................... 11
Exception codes .......................................................................................................................................... 13
Code 0x01 - Illegal Function .................................................................................................................. 13
Code 0x02 - Illegal Data Address .......................................................................................................... 13
Code 0x03 - Illegal Data Value ............................................................................................................... 13
Code 0x04 - Slave Device Failure .......................................................................................................... 13
Code 0x06 - Slave Device Busy ............................................................................................................ 13
Timeout Lifecycle ........................................................................................................................................ 14
General .................................................................................................................................................. 14
Client ...................................................................................................................................................... 14
Server .................................................................................................................................................... 14
Modbus UDP - Process image for MIG/MAG standard synergic, MIG/MAG pulse synergic and CMT ....... 15
Process data from controller to power source (0xF000 - 0xF0FF)......................................................... 15
Process data from power source to controller (0xF100 - 0xF1FF)......................................................... 16
Modbus UDP - Process image for TIG........................................................................................................ 18
Process data from controller to power source (0xF000 - 0xF0FF)......................................................... 18
Process data from power source to controller (0xF100 – 0xF1FF) ........................................................ 19
Modbus UDP - Process image for CC/CV .................................................................................................. 21
Process data from controller to power source (0xF000 – 0xF0FF) ....................................................... 21
Process data from power source to controller (0xF100 – 0xF1FF) ........................................................ 22
Modbus UDP - Process image for MIG/MAG standard manual .................................................................. 23
Process data from controller to power source (0xF000 – 0xF0FF) ....................................................... 23
Process data from power source to controller (0xF100 – 0xF1FF) ........................................................ 24
Special data ................................................................................................................................................. 26
Generic .................................................................................................................................................. 26
MIG/MAG ............................................................................................................................................... 28
Manually ................................................................................................................................................. 29
CC/CV-mode .......................................................................................................................................... 29
Stick (Rod electrode welding / MMA) ..................................................................................................... 29
TIG ......................................................................................................................................................... 30
Real Values ............................................................................................................................................ 31
Limits ...................................................................................................................................................... 31
Special process: MIG/MAG manual standard ........................................................................................32
Special process: MIG/MAG manual pulse.............................................................................................. 32
Pilot Plasma ........................................................................................................................................... 33
TAG Table ................................................................................................................................................... 34
1
Ethernet
Hardware
Protocol
- Data transfer rate 10 Mbaud
- Ethernet connector RJ45 / IP67 VarioSub (Phoenix Contact)
- Standard Ethernet cable (Twisted Pair, shielded)
Modbus UDP (Modbus Application Protocol Specification V1.1) One Modbus transaction is defined.
Adjustable UDP-Port (Factory setting is Port 502)
Public defined Modbus function 03 (0x03) Read Holding Registers
Public defined Modbus function 06 (0x06) Write Single Register
Public defined Modbus function 16 (0x10) Write Multiple Register
Public defined Modbus function 23 (0x17) Read/Write Multiple Register
User defined Modbus function 100 (0x64) Configure Streaming Data
User defined Modbus function 101 (0x65) Action Streaming Data
User defined Modbus function 102 (0x66) Streaming Data
Process data exchange between controller and power source:
- Function 23 (0x17) - Read/Write Multiple Register (0xF100-0xF0110 / 0xF000­0xF00E)
- Function 03 (0x03) – Read Holding Register (0xF100-0xF110)
- Function 06 (0x06) – Write Single Register (0xF000-0xF00E)
- Function 16 (0x10) – Write Multiple Register (0xF000-0xF00E)
Special Data, which not defined in the process image:
- Function 03 (0x03) - Read Holding Register (0xE000-0xE0C5). It is limited to read one register.
- Function 06 (0x06) – Write Single Register (0xE000-0xE0C5)
- Function 16 (0x10) – Write Multiple Register (0xE000-0xE0C5)
2
Modbus
Protocol descrip­tion
The MODBUS application data unit is built by the client that initiates a MODBUS transac­tion. The function indicates to the server what kind of action to perform. The MODBUS application protocol establishes the format of a request initiated by a client.
The function code field of a MODBUS data unit is coded in one byte. Valid codes are in the range of 1 ... 255 decimal (128 – 255 reserved for exception responses). When a message is sent from a Client to a Server device the function code field tells the server what kind of action to perform.
Sub-function codes are added to some function codes to define multiple actions.
The data field of messages sent from a client to server devices contains additional information that the server uses to take the action defined by the function code. This can include items like discrete and register addresses, the quantity of items to be handled, and the count of actual data bytes in the field.
The data field may be nonexistent (of zero length) in certain kinds request, in this case the server does not require any additional information. The function code alone specifies the action.
If no error occurs related to the MODBUS function requested in a properly received MODBUS ADU the data field of a response from a server to a client contains the data requested. If an error related to the MODBUS function requested occurs, the field contains an exception code that the server application can use to determine the next action to be taken.
For example a client can read the ON / OFF states of a group of discrete outputs or inputs or it can read/write the data contents of a group of registers.
When the server responds to the client, it uses the function code field to indicate either a normal (error-free) response or that some kind of error occurred (called an exception response). For a normal response, the server simply echoes the original function code.
Data encoding MODBUS uses a ‘big-Endian’ representation for addresses and data items. This means
that when a numerical quantity larger than a single byte is transmitted, the most signifi­cant byte is sent first.
Register size Value 16 Bit 0x1234 the first byte sent is 0x12 then 0x34
3
Application Data Unit (ADU)
This section describes the encapsulation of a MODBUS request or response when it is carried on a MODBUS UDP network.
MPAP Header Function code Data
MPAP Header description:
Transactions Identifier
It is used for transaction pairing, the MODBUS server copies in the response the trans­action identifier of the request.
Length: 2 Byte Description: Identification of a MODBUS Request / Response transaction Client: Initialized by the client Server: Recopied by the server from the received request
Protocol Identifier
It is used for intra-system multiplexing. The MODBUS protocol is identified by the value
0.
Length: 2 Byte Description: 0 = Modbus protocol Client: Initialized by the client Server: Recopied by the server from the received request
Length
The length field is a byte count of the following field, including the Unit Identifier, Function code and the data field.
Length: 2 Byte Description: Number of following bytes Client: Initialized by the client Server: -
Unit Identifier
This field is used for intra-system routing purpose. It is typically used to communicate to a MODBUS or MODBUS+ serial line slave through a gateway between an Ethernet network and a MODBUS serial line. This field is set by the MODBUS Client in the re­quest and must be returned with the same value in the response by the server.
Length: 1Byte Description: Identification of a remote slave connected on a serial line or on other
buses Client: Initialized by the client Server: Recopied by the server from the received request
Important! All MODBUS/UDP ADU are sent via UDP on registered port 502.
4
Modbus Functions
03 (0x03) Read Holding Regis­ters
This function code is used to read the contents of a contiguous block of holding registers in a remote device. In the Special Data area this contiguous block is limited from 1-4 registers. The request PDU specifies the starting register address and the number of registers. In the PDU registers are addressed starting at zero. Therefore registers numbered 1-16 are addressed as 0-15. The register data in the response message are packed as two bytes per register, with the binary contents right justified within each byte. For each register, the first byte con­tains the high order bits and the second contains the low order bits.
Request
Function code 1 Byte 0x03
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 1 to 125 (0x7D)
Response
Function code 1 Byte 0x03
Byte count 1 Byte 2 x N*
Register value N* x 2 Bytes -
N* = Quantity of Register
Error
Error code 1 Byte 0x83
Exception code 1 Byte 01 or 02 or 03 or 04
Example
Here is an example of a request to read registers 0xE011 (Gas preflow).
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 06
Unit Identifier 00
Function code 03
Starting Address Hi E0
Starting Address Lo 11
No. of Registers Hi 00
No. of Registers Lo 01
Response
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 05
Unit Identifier 00
Function code 03
Byte Count 02
Register value Hi (108) 08
Register value Lo (108) 98
The contents of register 0xE011 (Gas preflow) are shown as the two byte values of 08 98 hex, or 2200 decimal.
5
06 (0x06) Write Single Registers
This function code is used to write a single holding register in a remote device. The request PDU specifies the address of the register to be written. Registers are addressed starting at zero. Therefore register numbered 1 is addressed as 0. The normal response is an echo of the request, returned after the register contents have been written.
Request
Function code 1 Byte 0x06
Register Address 2 Bytes 0x0000 to 0xFFFF
Register Value 2 Bytes 0x0000 or 0xFFFF
Response
Function code 1 Byte 0x06
Register Address 2 Bytes 0x0000 to 0xFFFF
Register Value 2 Bytes 0x0000 or 0xFFFF
Error
Error code 1 Byte 0x86
Exception code 1 Byte 01 or 02 or 03 or 04
Example
Here is an example of a request to write register 0xE011 (Gas preflow) with the value 0x898 (decimal 2200):
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 06
Unit Identifier 00
Function code 06
Register Address Hi E0
Register Address Lo 11
Register Value Hi 08
Register Value Lo 98
Response
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 06
Unit Identifier 00
Function code 06
Register Address Hi E0
Register Address Lo 11
Register Value Hi 08
Register Value Lo 98
6
16 (0x10) Write Multiple Regis­ters
This function code is used to write a block of contiguous registers (1 to 20 registers) in a remote device. The requested written values are specified in the request data field. Data is packed as two bytes per register. The normal response returns the function code, starting address and quantity of registers written.
Request
Function code 1 Byte 0x10
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 0x0001 or 0x0078
Byte Count 1 Byte 2 x N*
Register Values N* x 2 Bytes Value
N* = Quantity to Write
Response
Function code 1 Byte 0x10
Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity of Registers 2 Bytes 1 to 123 (0x7B)
Error
Error code 1 Byte 0x90
Exception code 1 Byte 01 or 02 or 03 or 04
Example
Here is an example of a request to write two registers (0xF00B – 0xF00C)
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo ??
Unit Identifier 00
Function code 10
Starting Address Hi F0
Starting Address Lo 0B
Quantity of Registers Hi 00
Quantity of Registers Lo 02
Response
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 06
Unit Identifier 00
Function code 10
Starting Address Hi F0
Starting Address Lo 0B
Quantity of Registers Hi 00
Quantity of Registers Lo 02
Byte Count 04
Register Value Hi 7F
Register Value Lo FF
Register Value Hi 7F
Register Value Lo FF
7
23 (0x17) Read/ Write Multiple registers
This function code performs a combination of one read operation and one write operati­on in a single MODBUS transaction. The write operation is performed before the read. Holding registers are addressed starting at zero. Therefore holding registers 1-16 are addressed in the PDU as 0-15. The request PDU specifies the starting address and number of holding registers to be read as well as the starting address, number of holding registers, and the data to be written. The byte count specifies the number of bytes to follow in the write data field. The normal response contains the data from the group of registers that were read. The byte count field specifies the quantity of bytes to follow in the read data field.
Request
Function code 1 Byte 0x17
Read Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity to Read 2 Bytes 0x0001 to approx.0x0076
Write Starting Address 2 Bytes 0x0000 to 0xFFFF
Quantity to Write 2 Bytes 0x0001 to approx. 0X0076
Write Byte Count 1 Byte 2 x N*
Write Registers Value N* x 2 Bytes
N* = Quantity to Write
Response
Function code 1 Byte 0x17
Byte Count 1 Byte 2 x N'*
Read Registers value N'* x 2 Bytes
N* = Quantity to Read
Error
Error code 1 Byte 0x97
Exception code 1 Byte 01 or 02 or 03 or 04
Example
Here is an example of a request to read six registers and to write three registers:
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 11
Unit Identifier 00
Function code 17
Read Starting Address Hi F1
Read Starting Address Lo 00
Quantity to Read Hi 00
Field Name (Hex)
Write Starting Address Hi F0
Write Starting address Lo 00
Quantity to Write Hi 00
Quantity to Write Lo 03
Write Byte Count 06
Write Registers Value Hi 01
Write Registers Value Lo FA
Write Registers Value Hi 02
Write Registers Value Lo FB
Write Registers Value Hi 03
Write Registers Value Lo FC
Quantity to Read Lo 06
8
Write Multiple registers
(continued)
Response23 (0x17) Read/
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 0F
Unit Identifier 00
Function code 17
Byte Count 0C
Read Registers value Hi 00
Read Registers value Lo FE
Field Name (Hex)
Read Registers value Hi 0A
Read Registers value Lo CD
Read Registers value Hi 00
Read Registers value Lo 01
Read Registers value Hi 00
Read Registers value Lo 03
Read Registers value Hi 00
Read Registers value Lo 0D
Read Registers value Hi 00
Read Registers value Lo FF
100 (0x64) Confi­gure Streaming Data
This function code is used to configure the data in the streaming frame. This frame will be sent without a request from the client (or master). The request PDU specifies the IP-address and the port number of the client, the strea­ming frequency and the addresses of the register. The port number 15000 and 15001 are reserved for Fronius Applications. The normal response is an echo of the request.
Request
Function code 1 Byte 0x64
IP Address Hi Word 2 Bytes 0x0000 to 0xFFFF
IP Address Lo Word 2 Bytes 0x0000 to 0xFFFF
Port number 2 Byte 0x0000 to 0xFFFF
Frequency 2 Byte 0x0000 to 0xFFFF
Number of register 1 Byte 0x00 to 0xFF
Register Address N* x 2 Bytes
N* = Quantity of Register
Response
Function code 1 Byte 0x64
IP Address Hi Word 2 Bytes 0x0000 to 0xFFFF
IP Address Lo Word 2 Bytes 0x0000 to 0xFFFF
Port number 2 Byte 0x0000 to 0xFFFF
Frequency 2 Byte 0x0000 to 0xFFFF
Number of register 1 Byte 0x00 to 0xFF
Register Address N* x 2 Bytes
N* = Quantity of Register
Error
Error code 1 Byte 0xE5
Exception code 1 Byte 01 or 02 or 03 or 04
9
100 (0x64) Confi­gure Streaming Data
(continued)
Example
Here is an example of a request to configure the streaming data. IP-Address: 192.168.0.2 Port number: 500 Frequency: 20 Hz Address 1: 0xE070 Address 2: 0xE071 Address 3: 0xE068
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 0F
Unit Identifier 00
Function code 64
IP Address Hi Word Hi C0
IP Address Hi Word Lo A8
IP Address Lo Word Hi 00
IP Address Lo Word Lo 02
Port number Hi 01
Port number Lo E4
Frequency Hi 00
Frequency Lo 14
Number of register 03
Registers Value Hi E0
Registers Value Lo 70
Registers Value Hi E0
Registers Value Lo 71
Registers Value Hi E0
Registers Value Lo 68
Response
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 0F
Unit Identifier 00
Function code 64
IP Address Hi Word Hi C0
IP Address Hi Word Lo A8
IP Address Lo Word Hi 00
IP Address Lo Word Lo 02
Port number Hi 01
Port number Lo E4
Frequency Hi 00
Frequency Lo 14
Number of register 03
Registers Value Hi E0
Registers Value Lo 70
Registers Value Hi E0
Registers Value Lo 71
Registers Value Hi E0
Registers Value Lo 68
101 (0x65) Action Streaming Data
This function code is used to start and stop the streaming frame without a request from the client (or master). The request PDU specifies the start (0x01) or stop (0x00) of the streaming frame. The normal response is an echo of the request.
Request
Function code 1 Byte 0x65
Action 1 Bytes Bit 0…0 (Stop streaming)
Bit 0…1 (Start streaming)
10
101 (0x65) Action Streaming Data
(continued)
Response
Function code 1 Byte 0x65
Action 1 Bytes Bit 0…0 (Stop streaming)
Bit 0…1 (Start streaming)
Error
Error code 1 Byte 0xE5
Exception code 1 Byte 01 or 04 or 10
Example
Here is an example of a request to start the streaming data.
102 (0x66) Strea­ming Data
Request
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 03
Unit Identifier 00
Function code 65
Action streaming data 01
Response
Field Name (Hex)
Transaction Identifier Hi 00
Transaction Identifier Lo 01
Protocol Identifier Hi 00
Protocol Identifier Lo 00
Length Hi 00
Length Lo 03
Unit Identifier 00
Function code 65
Action streaming data 01
This function will be send from the server without a request from the client. The Transaction Identifier will be incremented every cycle by the server. The Protocol Identifier is the Protocol Identifier from the function 100 (0x64) Configure Streaming Data. The Unit Identifier is the Unit Identifier from the function 100 (0x64) Configure Streaming Data.
Response
Function code 1 Byte 0x66
Frequency 2 Byte 0x0000 to 0xFFFF
Timestamp in ms 2 Byte 0x0000 to 0xFFFF
Number of registers 1 Byte 0x00 to 0xFF
Register address 1 2 Byte 0x0000 to 0xFFFF
Register value 1 2 Byte 0x0000 to 0xFFFF
Register address n 2 Byte 0x0000 to 0xFFFF
Register value n 2 Byte 0x0000 to 0xFFFF
11
Loading...
+ 33 hidden pages