Modbus RTU VLT Micro Drive
Modbus RTU VLT Micro Drive
8 8
NOTE
Screened, twisted-pair cables are recommended in order to reduce noise between conductors.
61 68 69 COMM. GND P N
130BB795.10
69
8 8
Fieldbus cable
Min.200mm
90 crossing
Brake resistor
70
A short format of 8 bytes for process data. A long format of 16 bytes that also includes a parameter channel. A format used for texts.
8 8
Start bit
Reset after a fault trip Run at various preset speeds Run in reverse Change of the active set-up Control of the 2 relays built into the frequency converter
A number of data bytes (variable, depending on the type of telegram) follows. A data control byte (BCC) completes the telegram.
195NA099.10
STX
LGE
ADR
DATA
BCC
The Bus Reference is commonly used for speed control. It is also possible to access the parameters, read their values, and where possible, write values to them. This permits a range of control options, including controlling the setpoint of the frequency converter when its internal PI controller is used.
71
The 10 represents the fixed characters, while the n is variable (depending on the length of the text).
8 8
The checksum is calculated as an XOR-function. Before the first byte in the telegram is received, the Calculated Checksum is 0.
STX
LGE
ADR
PCD1
PCD2
BCC
Parameter block The parameter block is used to transfer parameters between master and slave. The data block is made up of 12 bytes (6 words) and also contains the process block.
STX LGE ADR PKE IND
PWEhigh
PWElow
PCD1
PCD2
BCC
Text block The text block is used to read or write texts via the data block.
STX LGE ADR PKE IND Ch1 Ch2 Chn PCD1 PCD2 BCC
72
Error code 0 1 2 3 4 5 6 7 9
FC+ Specification. Illegal Parameter Number Parameter cannot be changed. Upper or lower limit exceeded Subindex corrupted No Array Wrong Data Type Not used Not used Description element not available No parameter write access No text available Not while Running Other error
PKE
IND
PWEhigh
PWElow
AK 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PNU
11 15 17 18 100
Parameter number
>100 130 131 132 252 253 254 255 No bus access for this parameter Write to factory set-up not possible No LCP access Unknown viewer Request not supported Unknown attribute No error
Bits no. 12-15 transfer parameter commands from master to slave and return processed slave responses to the master.
Parameter commands master slave Bit no. 15 0 0 0 0 1 1 1 14 0 0 0 0 1 1 1 13 0 0 1 1 0 1 1 12 0 1 0 1 1 0 1 No command Read parameter value Write parameter value in RAM (word) Write parameter value in RAM (double word) Write parameter value in RAM and EEprom (double word) Write parameter value in RAM and EEprom (word) Read text Parameter command
8 8
Response slave master Bit no. 15 0 0 0 0 1 14 0 0 0 1 1 13 0 0 1 1 1 12 0 1 0 1 1 No response Parameter value transferred (word) Parameter value transferred (double word) Command cannot be performed text transferred Response
If the command cannot be performed, the slave sends this response: 0111 Command cannot be performed - and issues the following fault report in the parameter value:
73
Serial communication is only capable of reading parameters containing data type 9 (text string). 15-40 FC Type to 15-53 Power Card Serial Number contain data type 9. For example, read the unit size and mains voltage range in 15-40 FC Type. When a text string is transferred (read), the length of the telegram is variable, and the texts are of different lengths. The telegram length is defined in the second byte of the telegram (LGE). When using text transfer, the index character indicates whether it is a read or a write command. To read a text via the PWE block, set the parameter command (AK) to F Hex. The index character high-byte must be 4.
Conversion index 74 2 1 0 -1 -2 -3 -4 -5
8 8
8.4.12 Conversion
The various attributes of each parameter are displayed in the section Factory Settings. Parameter values are transferred as whole numbers only. Conversion factors are therefore used to transfer decimals. 4-12 Motor Speed Low Limit [Hz] has a conversion factor of 0.1. To preset the minimum frequency to 10Hz, transfer the value 100. A conversion factor of 0.1 means that the value transferred is multiplied by 0.1. The value 100 is thus perceived as 10.0.
E19E PKE
H 0000 IND
Note: 4-14 Motor Speed High Limit [Hz] is a single word, and the parameter command for write in EEPROM is E. Parameter number 4-14 is 19E in hexadecimal. The response from the slave to the master is:
74
119E PKE
H 0000 IND
requests from another device, and how errors are detected and reported. It also establishes a common format for the layout and contents of message fields. During communications over a Modbus RTU network, the protocol determines: How each controller learns its device address
130BA093.10
Recognizes a message addressed to it Determines which actions to take Extracts any data or other information contained in the message If a reply is required, the controller constructs the reply message and sends it. Controllers communicate using a master-slave technique in which only one device (the master) can initiate transactions (called queries). The other devices (slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. The master can address individual slaves, or can initiate a broadcast message to all slaves. Slaves return a message (called a response) to queries that are addressed to them individually. No responses are returned to broadcast queries from the master. The Modbus RTU protocol establishes the format for the masters query by placing into it the device (or broadcast) address, a function code defining the requested action, any data to be sent, and an error-checking field. The slaves response message is also constructed using Modbus protocol. It contains fields confirming the action taken, any data to be returned, and an error-checking field. If an error occurs in receipt of the message, or if the slave is unable to perform the requested action, the slave will construct an error message, and send it in response, or a time-out occurs.
1155 PKE
H 0000 IND
If the value in 3-41 Ramp 1 Ramp up Time is 10 s, the response from the slave to the master is:
130BA267.10
8 8
1155 PKE
H 0000 IND
3E8 Hex corresponds to 1000 decimal. The conversion index for 3-41 Ramp 1 Ramp up Time is -2, i.e. 0.01. 3-41 Ramp 1 Ramp up Time is of the type Unsigned 32.
Start Stop of the frequency converter in various ways: Coast stop Quick stop DC Brake stop Normal (ramp) stop Reset after a fault trip Run at a variety of preset speeds
75
Run in reverse Change the active set-up Control the frequency converters built-in relay
The Bus Reference is commonly used for speed control. It is also possible to access the parameters, read their values, and where possible, write values to them. This permits a range of control options, including controlling the setpoint of the frequency converter when its internal PI controller is used.
broadcast), and to recognise when the message is completed. Partial messages are detected and errors set as a result. Characters for transmission must be in hexadecimal 00 to FF format in each field. The frequency converter continuously monitors the network bus, also during silent intervals. When the first field (the address field) is received, each frequency converter or device decodes it to determine which device is being addressed. Modbus RTU messages addressed to zero are broadcast messages. No response is permitted for broadcast messages. A typical message frame is shown in Table 8.1.
Start T1-T2-T3T4 Address 8 bits Function 8 bits Data Nx8 bits CRC check 16 bits T1-T2-T3T4 End
8 8
8.8 Modbus RTU Message Framing Structure 8.8.1 Frequency Converter with Modbus RTU
The controllers are set up to communicate on the Modbus network using RTU (Remote Terminal Unit) mode, with each byte in a message containing 2 4-bit hexadecimal characters. The format for each byte is shown in Table 8.1.
Start bit Data byte Stop/ parity Stop
Coding System
8-bit binary, hexadecimal 0-9, A-F. 2 hexadecimal characters contained in each 8bit field of the message 1 start bit 8 data bits, least significant bit sent first 1 bit for even/odd parity; no bit for no parity 1 stop bit if parity is used; 2 bits if no parity
76
message is sent from a master to a slave device, the function code field tells the slave what kind of action to perform. When the slave responds to the master, it uses the function code field to indicate either a normal (errorfree) response, or that some kind of error occurred (called an exception response). For a normal response, the slave simply echoes the original function code. For an exception response, the slave returns a code that is equivalent to the original function code with its most significant bit set to logic 1. In addition, the slave places a unique code into the data field of the response message. This tells the master what kind of error occurred, or the reason for the exception. Please also refer to the sections 8.8.10 Function Codes Supported by Modbus RTU and 8.8.11 Modbus Exception Codes.
Holding register 40001 is addressed as register 0000 in the data address field of the message. The function code field already specifies a holding register operation. Therefore, the 4XXXX reference is implicit. Holding register 40108 is addressed as register 006BHEX (107 decimal).
Coil Number 1-16 17-32 Frequency converter control word (see Table 8.2) Frequency converter speed or setpoint reference Range 0x0 0xFFFF (-200% ... ~200%) Table 8.2) 49-64 Open loop mode: Frequency converter output frequency Closed loop mode: Frequency converter feedback signal 65 Parameter write control (master to slave) 0= Parameter changes are written to the RAM of the frequency converter Parameter changes are written to the RAM and EEPROM of the frequency converter. Master to slave Slave to master Master to slave Master to slave Description Signal Direction
33-48
8 8
1=
66-6553 Reserved 6 Coil 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 No reversing Reversing 0 Preset reference LSB Preset reference MSB DC brake Coast stop Quick stop Freeze freq. Ramp stop No reset No jog Ramp 1 Data not valid Relay 1 off Relay 2 off Set up LSB No DC brake No coast stop No quick stop No freeze freq. Start Reset Jog Ramp 2 Data valid Relay 1 on Relay 2 on 1
77
Coil 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
0 Control not ready Frequency converter not ready Coasting stop No alarm Not used Not used Not used No warning Not at reference Hand mode Out of freq. range Stopped Not used No voltage warning Not in current limit No thermal warning
1 Control ready Frequency converter ready Safety closed Alarm Not used Not used Not used Warning At reference Auto mode In frequency range Running Not used Voltage warning Current limit Thermal warning
8 8
Bus adress Bus register1 PLC Register Content 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 10 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 Reserved Reserved Reserved Free Free Modbus conf Last error code
Access
Description Reserved for Legacy Drives VLT 5000 and VLT 2800 Reserved for Legacy Drives VLT 5000 and VLT 2800 Reserved for Legacy Drives VLT 5000 and VLT 2800
TCP only. Reserved for Modbus TCP (p12-28 and 12-29 store in Eeprom etc.) Error code recieved from parameter database, refer to WHAT 38295for details Address of register with which last error occurred, refer to WHAT 38296 for details Sub index of parameter to be accessed. Refer to WHAT 38297 for details Parameter 0-01 (Modbus Register = 10 parameter number 20 bytes space reserved pr parameter in Modbus Map Parameter 0-02 20 bytes space reserved pr parameter in Modbus Map Parameter 0-03 20 bytes space reserved pr parameter in Modbus Map
Last error register Read only Index pointer FC par. 0-01 Read/Write Dependent on parameter access Dependent on parameter access Dependent on parameter access
19 29
20 30
40020 40030
Value written in Modbus RTU telegram must be one or less than register number. E.g. Read Modbus Register 1 by writing value 0 in telegram.
* Used to specify the index number to be used when accessing an indexed parameter.
78
8 8
Diagnostic 8 s
Restart communication Return diagnostic register Clear counters and diagnostic register Return bus message count Return bus communication error count Return bus exception error count Return slave message count
8.9.3 IND
The array index is set in Holding Register 9 and used when accessing array parameters.
79
Field Name Slave Address Function Starting Address HI Starting Address LO No. of Points HI No. of Points LO Error Check (CRC)
Example (HEX) 01 (frequency converter address) 01 (read coils) 00 20 (32 decimals) Coil 33 00 10 (16 decimals) -
8 8
Non standard Data Types Non standard data types are text strings and are stored as 4x registers (40001 4FFFF). The parameters are read using function 03HEX "Read Holding Registers" and written using function 10HEX "Preset Multiple Registers." Readable sizes range from 1 register (2 characters) up to 10 registers (20 characters).
8.10 Examples
The following examples illustrate various Modbus RTU commands. If an error occurs, please refer to 8.8.11 Modbus Exception Codes.
NOTE
Coils and registers are addressed explicit with an off-set of -1 in Modbus. I.e. Coil 33 is addressed as Coil 32.
8.10.1 Read Coil Status (01 HEX) 8.10.2 Force/Write Single Coil (05 HEX)
Description This function reads the ON/OFF status of discrete outputs (coils) in the frequency converter. Broadcast is never supported for reads. Query The query message specifies the starting coil and quantity of coils to be read. Coil addresses start at zero, i.e. coil 33 is addressed as 32. Example of a request to read coils 33-48 (Status Word) from slave device 01. Description This function forces the coil to either ON or OFF. When broadcast the function forces the same coil references in all attached slaves. Query The query message specifies the coil 65 (parameter write control) to be forced. Coil addresses start at zero, i.e. coil 65 is addressed as 64. Force Data = 00 00HEX (OFF) or FF 00HEX (ON).
Field Name Slave Address Function Coil Address HI Coil Address LO Force Data HI Force Data LO Error Check (CRC) Example (HEX) 01 (frequency converter address) 05 (write single coil) 00 40 (64 decimal) Coil 65 FF 00 (FF 00 = ON) -
80
Response The normal response is an echo of the query, returned after the coil state has been forced.
Field Name Slave Address Function Force Data HI Force Data LO Quantity of Coils HI Quantity of Coils LO Error Check (CRC) Example (HEX) 01 05 FF 00 00 01 -
Slave Address Function Starting Address HI Starting Address LO No. of Points HI No. of Points LO
8 8
NOTE
Coil addresses start at zero, i.e. coil 17 is addressed as 16.
Field Name Slave Address Function Coil Address HI Coil Address LO Quantity of Coils HI Quantity of Coils LO Byte Count Force Data HI (Coils 8-1) Force Data LO (Coils 10-9) Error Check (CRC) Example (HEX) 01 (frequency converter address) 0F (write multiple coils) 00 10 (coil address 17) 00 10 (16 coils) 02 20 00 (ref. = 2000hex)
Response 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 contains the high-order bits and the second contains the low-order bits. Example: Hex 000088B8 = 35.000 = 15Hz.
Field Name Slave Address Function Byte Count Data HI (Register 3030) Data LO (Register 3030) Data HI (Register 3031) Data LO (Register 3031) Error Check (CRC) 16 E3 60 Example (HEX) 01 03 04 00
Response The normal response returns the slave address, function code, starting address, and quantity of coils forced.
Field Name Slave Address Function Coil Address HI Coil Address LO Quantity of Coils HI Quantity of Coils LO Error Check (CRC) Example (HEX) 01 (frequency converter address) 0F (write multiple coils) 00 10 (coil address 17) 00 10 (16 coils) -
81
Field Name Slave Address Function Register Address HI Register Address LO Preset Data HI Preset Data LO Error Check (CRC)
Field Name Slave Address Function Starting Address HI Starting Address LO No. of Registers HI No. of registers LO Error Check (CRC)
Example (HEX) 01 10 04 19 00 02 -
Response The normal response is an echo of the query, returned after the register contents have been passed.
Field Name Slave Address Function Register Address HI Register Address LO Preset Data HI Preset Data LO Error Check (CRC) Example (HEX)
8.11 Danfoss FC Control Profile 8.11.1 Control Word According to FC Profile (8-10 Protocol = FC profile)
Master-slave CTW Speed ref. 130BA274.10
01 06 03 E7 00 01 Bit
Bit no.:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
8 8
Bit value = 0 Reference value Reference value DC brake Coasting Quick stop Hold output frequency Ramp stop No function No function Ramp 1 Data invalid Relay 01 open Relay 02 open Parameter set-up No function
Bit value = 1 external selection lsb external selection msb Ramp No coasting Ramp use ramp Start Reset Jog Ramp 2 Data valid Relay 01 active Relay 02 active selection lsb Reverse
00 01 02 03 04 05 06 07 08 09 10 11 12 13 15
Explanation of the Control Bits Bits 00/01 Bits 00 and 01 are used to choose between the four reference values, which are pre-programmed in 3-10 Preset Reference according to the Table 8.4:
Response The normal response returns the slave address, function code, starting address, and quantity of registers preset.
82
Programmed ref. Parameter value 1 2 3 4 3-10 Preset Reference [0] 3-10 Preset Reference [1] 3-10 Preset Reference [2] 3-10 Preset Reference [3]
Bit 01 0 0 1 1
Bit 00 0 1 0 1
Bit 06, Ramp stop/start Bit 06 = 0: Causes a stop and makes the motor speed ramp down to stop via the selected ramp down parameter. Bit 06 = 1: Permits the frequency converter to start the motor, if the other starting conditions are met. Make a selection in 8-53 Start Select to define how Bit 06 Ramp stop/start gates with the corresponding function on a digital input. Bit 07, Reset Bit 07 = 0: No reset. Bit 07 = 1: Resets a trip. Reset is activated on the signals leading edge, i.e. when changing from logic 0 to logic 1. Bit 08, Jog Bit 08 = 1: The output frequency is determined by 3-11 Jog Speed [Hz]. Bit 09, Selection of ramp 1/2 Bit 09 = "0": Ramp 1 is active (3-41 Ramp 1 Ramp up Time to 3-42 Ramp 1 Ramp Down Time). Bit 09 = "1": Ramp 2 (3-51 Ramp 2 Ramp up Time to 3-52 Ramp 2 Ramp down Time) is active. Bit 10, Data not valid/Data valid Tell the frequency converter whether to use or ignore the control word. Bit 10 = 0: The control word is ignored. Bit 10 = 1: The control word is used. This function is relevant because the telegram always contains the control word, regardless of the telegram type. Thus, you can turn off the control word if you do not want to use it when updating or reading parameters. Bit 11, Relay 01 Bit 11 = "0": Relay not activated. Bit 11 = "1": Relay 01 activated provided that Control word bit 11 is chosen in 5-40 Function Relay. Bit 12, Relay 02 Bit 12 = "0": Relay 02 is not activated. Bit 12 = "1": Relay 02 is activated provided that Control word bit 12 is chosen in 5-40 Function Relay. Bit 13, Selection of set-up Use bits 13 to choose from the 2 menu set-ups according to the shown table.
Set-up 1 2 Bit 13 0 1
NOTE
Make a selection in 8-56 Preset Reference Select to define how Bit 00/01 gates with the corresponding function on the digital inputs. Bit 02, DC brake Bit 02 = 0 leads to DC braking and stop. Set braking current and duration in 2-01 DC Brake Current and 2-02 DC Braking Time. Bit 02 = 1 leads to ramping. Bit 03, Coasting Bit 03 = 0: The frequency converter immediately "lets go" of the motor, (the output transistors are "shut off") and it coasts to a standstill. Bit 03 = 1: The frequency converter starts the motor if the other starting conditions are met. Make a selection in 8-50 Coasting Select to define how Bit 03 gates with the corresponding function on a digital input. Bit 04, Quick stop Bit 04 = 0: Makes the motor speed ramp down to stop (set in 3-81 Quick Stop Ramp Time). Bit 05, Hold output frequency Bit 05 = 0: The present output frequency (in Hz) freezes. Change the frozen output frequency only by means of the digital inputs (5-10 Terminal 18 Digital Input to 5-13 Terminal 29 Digital Input) programmed to Speed up and Slow down.
8 8
NOTE
If Freeze output is active, the frequency converter can only be stopped by the following:
Bit 03 Coasting stop Bit 02 DC braking Digital input (5-10 Terminal 18 Digital Input to 5-13 Terminal 29 Digital Input) programmed to DC braking, Coasting stop, or Reset and coasting stop.
The function is only possible when Multi Set-Ups is selected in 0-10 Active Set-up.
83
Make a selection in 8-55 Set-up Select to define how Bit 13 gates with the corresponding function on the digital inputs. Bit 15 Reverse Bit 15 = 0: No reversing. Bit 15 = 1: Reversing. In the default setting, reversing is set to digital in 8-54 Reversing Select. Bit 15 causes reversing only when Ser. communication, Logic or Logic and is selected.
Bit 03, No error/trip Bit 03 = 0 : The frequency converter is not in fault mode. Bit 03 = 1: The frequency converter trips. To re-establish operation, enter [Reset]. Bit 04, No error/error (no trip) Bit 04 = 0: The frequency converter is not in fault mode. Bit 04 = 1: The frequency converter shows an error but does not trip. Bit 05, Not used Bit 05 is not used in the status word.
Bit 06, No error / triplock Bit 06 = 0: The frequency converter is not in fault mode. Bit 06 = 1: The frequency converter is tripped and locked. Bit 07, No warning/warning Bit 07 = 0: There are no warnings. Bit 07 = 1: A warning has occurred.
Bit no.:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
8 8
Bit 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
Bit = 0 Control not ready Drive not ready Coasting No error No error Reserved No error No warning Speed reference Local operation Out of frequency limit No operation Drive OK Voltage OK Torque OK Timer OK
Bit = 1 Control ready Drive ready Enable Trip Error (no trip) Triplock Warning Speed = reference Bus control Frequency limit OK In operation Stopped, auto start Voltage exceeded Torque exceeded Timer exceeded
Bit 08, Speed reference/speed = reference Bit 08 = 0: The motor is running but the present speed is different from the preset speed reference. It might e.g. be the case when the speed ramps up/down during start/ stop. Bit 08 = 1: The motor speed matches the preset speed reference. Bit 09, Local operation/bus control Bit 09 = 0: [STOP/RESET] is activate on the control unit or Local control in F-02 Operation Method is selected. You cannot control the frequency converter via serial communication. Bit 09 = 1 It is possible to control the frequency converter via the fieldbus / serial communication. Bit 10, Out of frequency limit Bit 10 = 0: The output frequency has reached the value in 4-12 Motor Speed Low Limit [Hz] or 4-14 Motor Speed High Limit [Hz]. Bit 10 = "1": The output frequency is within the defined limits. Bit 11, No operation/in operation Bit 11 = 0: The motor is not running. Bit 11 = 1: The frequency converter has a start signal or the output frequency is greater than 0Hz. Bit 12, Drive OK/stopped, autostart: Bit 12 = 0: There is no temporary over temperature on the inverter. Bit 12 = 1: The inverter stops because of over temperature but the unit does not trip and will resume operation once the over temperature stops.
Explanation of the Status Bits Bit 00, Control not ready/ready Bit 00 = 0: The frequency converter trips. Bit 00 = 1: The frequency converter controls are ready but the power component does not necessarily receive any power supply (in case of external 24V supply to controls). Bit 01, Drive ready Bit 01 = 1: The frequency converter is ready for operation but the coasting command is active via the digital inputs or via serial communication. Bit 02, Coasting stop Bit 02 = 0: The frequency converter releases the motor. Bit 02 = 1: The frequency converter starts the motor with a start command.
84
Bit 13, Voltage OK/limit exceeded Bit 13 = 0: There are no voltage warnings. Bit 13 = 1: The DC voltage in the frequency converters intermediate circuit is too low or too high. Bit 14, Torque OK/limit exceeded Bit 14 = 0: The motor current is lower than the torque limit selected in 4-18 Current Limit. Bit 14 = 1: The torque limit in 4-18 Current Limit is exceeded.
Bit 15, Timer OK/limit exceeded Bit 15 = 0: The timers for motor thermal protection and thermal protection are not exceeded 100%. Bit 15 = 1: One of the timers exceeds 100%.
8 8
0% (0hex)
100% (4000hex)
85